:root {
  --bg: #050608;
  --bg-alt: #101218;
  --accent: #ffcc33;
  --accent-soft: rgba(255, 204, 51, 0.15);
  --text: #f4f4f4;
  --muted: #a0a4ad;
  --border: #262a33;
  --danger: #ff5555;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: radial-gradient(circle at top, #151822 0, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* HEADER / NAV */

header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f5f0e6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-title span:first-child {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-title span:last-child {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.badge-lab {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* BASIC LAYOUT */

main {
  flex: 1;
}

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 2.5fr);
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.hero-title {
  font-size: clamp(2.3rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-highlight {
  color: var(--accent);
}

.hero-subtitle {
  max-width: 32rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  font-size: 0.98rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.hero-tag {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.25rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  background: rgba(0,0,0,0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #1b1300;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 204, 51, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
}

/* HERO ASIDE / SIDEBAR */

.hero-aside {
  border-radius: 20px;
  background: radial-gradient(circle at top left, var(--accent-soft), var(--bg-alt));
  border: 1px solid var(--border);
  padding: 3rem 1.4rem 1.4rem; /* extra top padding for logo */
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.hero-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(255,85,85,0.12), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.mini-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.65rem 0.7rem;
  background: rgba(0,0,0,0.45);
  font-size: 0.78rem;
}

.mini-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.mini-value {
  font-family: var(--mono);
  font-size: 0.8rem;
}

.mini-warning {
  color: var(--danger);
}

/* PANELS / CONTENT GRID */

.sections-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 2fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .sections-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1.3rem 1.4rem;
  background: rgba(5,6,8,0.9);
}

.panel + .panel {
  margin-top: 1rem;
}

.panel h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

.panel p {
  font-size: 0.9rem;
  color: var(--muted);
}

.bullet-list {
  margin-top: 0.4rem;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.bullet-list li::before {
  content: "▸";
  margin-right: 0.5rem;
  color: var(--accent);
  font-size: 0.7rem;
}

.bullet-list li {
  margin: 0.2rem 0;
}

.code-block {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: #050608;
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  border: 1px solid #1a1d25;
  overflow-x: auto;
  margin-top: 0.5rem;
  color: #e2e5f2;
}

.danger-box {
  margin-top: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255,85,85,0.6);
  background: rgba(255, 50, 50, 0.07);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #ffaaaa;
}

/* CONTACT */

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 1.2rem;
}

@media (max-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.contact-meta strong {
  color: var(--text);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.field input,
.field textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(4,5,8,0.9);
  padding: 0.55rem 0.65rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--sans);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255,204,51,0.4);
}

/* FOOTER */

footer {
  border-top: 1px solid var(--border);
  padding: 1.3rem 1.5rem 1.7rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-inner span {
  opacity: 0.8;
}

/* BLOG / LAB LOG */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.post-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(5, 6, 8, 0.95);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.post-body {
  padding: 0.9rem 1rem 1rem;
}

.post-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.3rem;
}

.post-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.post-excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.post-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

/* GENERIC PAGE WRAPPER FOR POSTS */

.page-main {
  max-width: 800px;
  margin: 2.5rem auto;
  padding: 0 1.5rem 3rem;
}

.page-backlink {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.page-backlink:hover {
  color: var(--accent);
}

.page-header {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.page-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.page-title {
  font-size: 1.8rem;
  margin-top: 0.2rem;
}

.page-figure {
  margin: 1.2rem 0;
}

.page-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.page-figure figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.page-article {
  font-size: 0.96rem;
  line-height: 1.7;
  color: #d7dae2;
}

.page-article h2 {
  margin-top: 1.4rem;
  font-size: 1.2rem;
}

.page-article ul {
  margin: 0.4rem 0 0.8rem 1.1rem;
}
