/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #eceae2;
  --text: #151513;
  --muted: #5f5e57;
  --faint: #8b8980;
  --line: #dedbd1;
  --line-strong: #c9c6bb;
  --accent: #3e6b00;          /* text-safe accent */
  --accent-fill: #b9ec3b;     /* highlight / button fill */
  --accent-soft: #e5f2c4;
  --on-accent: #111700;
  --grid: rgba(21, 21, 19, 0.06);
  --shadow: 0 1px 2px rgba(20, 20, 10, 0.04), 0 12px 32px -12px rgba(20, 20, 10, 0.12);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d0b;
    --surface: #131511;
    --surface-2: #1a1d18;
    --text: #ecebe5;
    --muted: #a3a29a;
    --faint: #6f6e67;
    --line: #24271f;
    --line-strong: #353930;
    --accent: #c3f04c;
    --accent-fill: #c3f04c;
    --accent-soft: rgba(195, 240, 76, 0.1);
    --on-accent: #111700;
    --grid: rgba(236, 235, 229, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0d0b;
  --surface: #131511;
  --surface-2: #1a1d18;
  --text: #ecebe5;
  --muted: #a3a29a;
  --faint: #6f6e67;
  --line: #24271f;
  --line-strong: #353930;
  --accent: #c3f04c;
  --accent-fill: #c3f04c;
  --accent-soft: rgba(195, 240, 76, 0.1);
  --on-accent: #111700;
  --grid: rgba(236, 235, 229, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
strong { font-weight: 600; }

::selection { background: var(--accent-fill); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent-fill);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* =========================================================
   Buttons & chips
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.btn-primary:hover { background: color-mix(in oklab, var(--accent-fill) 88%, #000); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font: 500 12.5px/1 var(--font-mono);
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-fill);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--text);
  color: var(--accent-fill);
  font: 600 15px/1 var(--font-mono);
}
:root[data-theme="dark"] .brand-mark { background: var(--surface-2); border: 1px solid var(--line-strong); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark { background: var(--surface-2); border: 1px solid var(--line-strong); }
}

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* show the icon for the theme you'd switch TO */
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

.menu-btn { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: -1px 0 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 13px/1 var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.75rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  font-weight: 600;
  text-wrap: balance;
}
h1 em {
  color: var(--accent);
  font-size: 1.08em;
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 26px;
  max-width: 560px;
  font-size: 17.5px;
  color: var(--muted);
  text-wrap: pretty;
}
.lede strong { color: var(--text); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

/* Terminal */
.terminal {
  border-radius: var(--radius);
  background: #0f110d;
  border: 1px solid #262a22;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #d9d8d0;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid #22261e;
  background: #141711;
}
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2f342a; }
.terminal-bar span:first-child { background: #ff6159; }
.terminal-bar span:nth-child(2) { background: #ffbd2e; }
.terminal-bar span:nth-child(3) { background: #28c940; }
.terminal-bar p {
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-18px);
  font: 12px/1 var(--font-mono);
  color: #7c7f74;
}
.terminal-body {
  margin: 0;
  padding: 20px 20px 22px;
  font: 13.5px/1.75 var(--font-mono);
  white-space: pre-wrap;
  overflow-x: auto;
  min-height: 300px;
}
.t-prompt { color: #c3f04c; margin-right: 4px; }
.t-out { color: #9a9d90; }
.t-out b { color: #e6e5dd; font-weight: 500; }
.t-cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: -0.15em;
  background: #c3f04c;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Stats */
.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 72px 0 0;
  border-top: 1px solid var(--line);
}
.stats > div {
  padding: 24px 24px 8px 0;
  border-right: 1px solid var(--line);
}
.stats > div + div { padding-left: 24px; }
.stats > div:last-child { border-right: 0; }
.stats dt { font: 500 12.5px/1.3 var(--font-mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.stats dd { margin: 10px 0 0; font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stats p { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 112px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-num {
  font: 500 13px/1 var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 600;
  text-wrap: balance;
}
h2 em { color: var(--accent); }
.section-sub {
  margin-top: 18px;
  font-size: 17px;
  color: var(--muted);
  max-width: 620px;
  text-wrap: pretty;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pillar {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.pillar:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pillar-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 22px;
}
.pillar-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
.pillar p { margin-top: 10px; color: var(--muted); font-size: 15.5px; flex: 1; }
.pillar .chips { margin-top: 22px; }

/* =========================================================
   Timeline
   ========================================================= */
.timeline { border-top: 1px solid var(--line); }
.role {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.role-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  position: sticky;
  top: 96px;
  align-self: start;
}
.role-dates { font: 500 14px/1.3 var(--font-mono); color: var(--text); }
.role-loc { font-size: 14px; color: var(--faint); }
.badge-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11.5px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge-now::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.role-body h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
}
.role-body .at { color: var(--muted); font-weight: 500; }
.role-ctx { margin-top: 4px; font-size: 14.5px; color: var(--faint); font-style: normal; }

.bullets { margin-top: 18px; display: grid; gap: 10px; }
.bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 15.5px;
  text-wrap: pretty;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--faint);
}
.bullets strong { color: var(--text); }
.role-body .chips { margin-top: 20px; }

/* =========================================================
   Featured project
   ========================================================= */
.section-head h2 em { display: inline; }
.project-links { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 13px/1 var(--font-mono);
  color: var(--muted);
}
.btn .gh { fill: currentColor; stroke: none; }

.arch {
  margin: 0 0 40px;
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg);
  border: 1px solid var(--line);
  background-image:
    radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 18px 18px;
}
.arch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1.25fr) 110px minmax(0, 1fr);
  gap: 14px 0;
  align-items: stretch;
}
.node {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.node-kicker {
  font: 500 11px/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.node h4 { margin-top: 8px; font-size: 17px; letter-spacing: -0.015em; font-weight: 600; }
.node > p:not(.node-kicker):not(.node-foot) { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.node-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.mods { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.mods li {
  font: 500 12px/1 var(--font-mono);
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}
.node-core { border-color: var(--text); }
.node-ai { border-color: var(--accent); }
.node-ai .mods li { background: var(--accent-soft); color: var(--accent); }

.edge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  text-align: center;
}
.edge span { font: 500 10.5px/1.25 var(--font-mono); color: var(--faint); }
.edge i {
  position: relative;
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--line-strong);
}
.edge i::before,
.edge i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--line-strong);
  border-right: 1.5px solid var(--line-strong);
}
.edge i::after { right: 0; transform: translateY(-50%) rotate(45deg); }
.edge i::before { left: 0; transform: translateY(-50%) rotate(-135deg); }

.node-wide.node-data { grid-column: 1 / 4; display: flex; align-items: center; gap: 16px; }
.node-wide.node-data h4 { margin: 0; }
.node-wide.node-int { grid-column: 4 / 6; margin-left: 14px; }
.node-wide.node-data { margin-right: 0; }
.node-int .mods { margin-top: 10px; }

.arch-infra {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font: 500 12.5px/1 var(--font-mono);
  color: var(--muted);
}
.arch-infra span::before { content: "▸ "; color: var(--accent); }

.arch figcaption {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--faint);
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  padding: 28px;
  background: var(--surface);
}
.feature h3 { font-size: 17px; letter-spacing: -0.015em; font-weight: 600; }
.feature p { margin-top: 10px; font-size: 15px; color: var(--muted); text-wrap: pretty; }

/* =========================================================
   Skills
   ========================================================= */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.skill .chips li { white-space: normal; line-height: 1.25; }
.skill {
  min-width: 0;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.skill h3 {
  font: 500 12.5px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 18px;
}
.skill .chips li { font-size: 13px; color: var(--text); background: var(--bg); }
.skill-hl { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.skill-hl h3 { color: var(--accent); }
.skill-hl .chips li { background: var(--accent-soft); border-color: transparent; }

/* =========================================================
   Contact
   ========================================================= */
.contact { padding-top: 40px; }
.contact-card {
  position: relative;
  padding: clamp(36px, 6vw, 72px);
  border-radius: calc(var(--radius) + 8px);
  background: var(--text);
  color: var(--bg);
  overflow: hidden;
}
.contact-card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-fill) 55%, transparent), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.contact-card .section-num { color: var(--accent-fill); }
.contact-card h2 { max-width: 760px; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.contact-card h2 em { color: var(--accent-fill); }
.contact-card .section-sub { color: color-mix(in oklab, var(--bg) 70%, var(--text)); }

:root[data-theme="dark"] .contact-card { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
:root[data-theme="dark"] .contact-card .section-sub { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact-card { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
  :root:not([data-theme="light"]) .contact-card .section-sub { color: var(--muted); }
}

.email-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.email {
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  border-bottom: 2px solid var(--accent-fill);
  padding-bottom: 2px;
  word-break: break-all;
  transition: color 0.2s;
}
.email:hover { color: var(--accent-fill); }
.contact-card .btn-ghost { color: inherit; border-color: color-mix(in oklab, currentColor 35%, transparent); }
.contact-card .btn-ghost:hover { border-color: currentColor; }

.socials {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 36px;
}
.socials a {
  font: 500 14px/1 var(--font-mono);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.socials a:hover { opacity: 1; }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 40px 0 48px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--faint);
}
.footer a:hover { color: var(--text); }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .t-cursor, .badge-now::before { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .terminal { max-width: 620px; }
  .pillars { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }

  .arch-grid { grid-template-columns: 1fr; gap: 0; }
  .edge { flex-direction: row; padding: 10px 0; gap: 10px; }
  .edge i { width: 1.5px; height: 28px; flex: none; }
  .edge i::before { display: none; }
  .edge i::after { right: auto; left: 50%; top: auto; bottom: 0; transform: translateX(-50%) rotate(135deg); }
  .edge span { flex: 1; text-align: right; }
  .edge span:last-child { text-align: left; }
  .node-wide.node-data,
  .node-wide.node-int { grid-column: auto; margin: 14px 0 0; }
  .arch-infra { margin-top: 14px; }
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; border-radius: 10px; }
  .menu-btn { display: grid; }
  .nav-cta { display: none; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { padding: 22px 16px 18px 0; }
  .stats > div + div { padding-left: 0; }
  .stats > div:nth-child(2n) { border-right: 0; padding-left: 16px; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .role { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .role-meta { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

  .skills { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero { padding-top: 44px; }
  .features { grid-template-columns: 1fr; }
  .arch { padding: 16px; }
  .terminal-body { font-size: 12.5px; min-height: 0; }
  .stats dd { font-size: 36px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
}
