/* ============================================================================
   SHAMAR BRYANT — PORTFOLIO / app.css
   Ground-up design system. Dark, editorial, control-room precision.
   Motion is tied to intent (hover, focus, navigation), never to scroll.
   ============================================================================ */

/* ── Fonts loaded in <head> (Space Grotesk / Inter / JetBrains Mono) ── */

/* ─────────────────────────  Tokens  ───────────────────────── */
:root {
  /* surfaces */
  --bg:        #0A0B0E;
  --bg-1:      #101218;
  --bg-2:      #14171F;
  --surface:   rgba(255,255,255,.024);
  --surface-2: rgba(255,255,255,.05);
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);

  /* text */
  --fg:     #ECEEF3;
  --muted:  #99A2B2;
  --faint:  #5C6472;

  /* accent (iris / indigo) */
  --accent:      #6E8BFF;
  --accent-2:    #9C8CFF;
  --accent-ink:  #080910;
  --accent-soft: rgba(110,139,255,.12);
  --accent-line: rgba(110,139,255,.35);
  --grad:        linear-gradient(135deg, #6E8BFF 0%, #9C8CFF 100%);

  /* semantic */
  --pos:  #37D399;
  --warn: #FBBF24;

  /* form */
  --radius:   14px;
  --radius-s: 10px;
  --radius-l: 20px;
  --bar-h:    60px;
  --ease:     cubic-bezier(.22,.61,.36,1);
  --ease-2:   cubic-bezier(.16,1,.3,1);
  --maxw:     1160px;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

/* ─────────────────────────  Reset  ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
::selection { background: rgba(110,139,255,.28); color: #fff; }

html { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: calc(var(--bar-h) + 28px);
  overflow-x: hidden;
}

/* Ambient field — calm, static depth. No scroll coupling. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% -12%, rgba(110,139,255,.11), transparent 68%),
    radial-gradient(45% 40% at 100% -5%, rgba(156,140,255,.07), transparent 70%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(125% 80% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(125% 80% at 50% 0%, #000 30%, transparent 78%);
}

/* ─────────────────────────  Type  ───────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; color: var(--fg); }
h1 { font-size: clamp(2.7rem, 6.2vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
p  { color: var(--muted); }
strong { color: var(--fg); font-weight: 600; }
code, pre, .mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-line); }
.eyebrow.center { justify-content: center; }

.lede { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 46ch; line-height: 1.7; }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ─────────────────────────  Layout  ───────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head h2 { margin: .85rem 0 1rem; }
.section-head p { font-size: 1rem; }
[id] { scroll-margin-top: calc(var(--bar-h) + 40px); }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; }

/* ─────────────────────────  Top bar (floating)  ───────────────────────── */
.topbar {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 28px)); height: var(--bar-h); z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 16px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(15,17,23,.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  transition: background .35s var(--ease), border-color .35s, box-shadow .35s;
}
.topbar.scrolled { background: rgba(11,13,18,.86); border-color: var(--line-2); box-shadow: 0 14px 44px -16px rgba(0,0,0,.7); }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; color: var(--fg); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  color: var(--accent-ink); background: var(--grad);
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -6px rgba(110,139,255,.7);
}

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; padding: .5rem .8rem; border-radius: 9px;
  font-size: .88rem; font-weight: 500; color: var(--muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--fg); background: var(--surface); }
.nav-link.active { color: var(--fg); }
.nav-link.active::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--grad);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: .55rem; height: 38px; padding: 0 .7rem;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: .82rem; transition: border-color .2s, color .2s, background .2s;
}
.kbd-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface-2); }
.kbd { font-family: var(--font-mono); font-size: .72rem; padding: .12rem .38rem; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); color: var(--muted); }

.menu-btn { display: none; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn span:nth-child(1) { top: 14px; } .menu-btn span:nth-child(2) { top: 19px; } .menu-btn span:nth-child(3) { top: 24px; }
.menu-btn.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: center; gap: .4rem;
  padding: 2rem 2rem; background: rgba(9,10,14,.92); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a { font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--muted); padding: .35rem 0; transition: color .2s, transform .2s; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--fg); transform: translateX(6px); }
.mobile-menu .mm-foot { margin-top: 2rem; display: flex; gap: 1rem; }

/* ─────────────────────────  Buttons  ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  height: 46px; padding: 0 1.3rem; border-radius: 11px; font-size: .92rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--fg); color: #0a0b0e; }
.btn--primary:hover { box-shadow: 0 10px 30px -10px rgba(255,255,255,.35); transform: translateY(-2px); }
.btn--accent { background: var(--grad); color: var(--accent-ink); }
.btn--accent:hover { box-shadow: 0 12px 34px -10px rgba(110,139,255,.6); transform: translateY(-2px); }
.btn--ghost { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.btn--line { background: transparent; color: var(--muted); border-color: var(--line); }
.btn--line:hover { color: var(--fg); border-color: var(--line-2); }
.btn--sm { height: 40px; padding: 0 1rem; font-size: .86rem; }
.btn-arrow { transition: transform .2s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* text link with animated underline */
.link { color: var(--accent); position: relative; }
.link::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: currentColor; transition: right .3s var(--ease); }
.link:hover::after { right: 0; }

/* ─────────────────────────  Chips / tags / meta  ───────────────────────── */
.chip { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .32rem .7rem; }
.chip i { color: var(--accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: .22rem .5rem; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.tag--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag--pos { color: var(--pos); border-color: rgba(55,211,153,.3); background: rgba(55,211,153,.1); }
.tag--warn { color: var(--warn); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.1); }

/* ─────────────────────────  Cards / grid  ───────────────────────── */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card--link { display: flex; flex-direction: column; }
.card--glow:hover { box-shadow: 0 24px 60px -28px rgba(110,139,255,.5); }
.card-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 1.1rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.card h3 { margin-bottom: .5rem; font-size: 1.08rem; }
.card p { font-size: .9rem; line-height: 1.62; }
.card .chip-row { margin-top: 1rem; }

/* Featured project card */
.pcard { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.pcard:hover { border-color: var(--line-2); transform: translateY(-4px); }
.pcard-media { height: 176px; border-bottom: 1px solid var(--line); background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-body { padding: 1.4rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.pcard-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.pcard-sum { font-size: .88rem; color: var(--muted); line-height: 1.6; flex: 1; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; padding-top: .4rem; }
.pcard.featured { border-color: var(--accent-line); }
.pcard.featured::before { content: ''; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius); background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none; }

/* schematic (mono flow) used inside media */
.schematic { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.9; padding: 1rem; }
.schematic b { color: var(--accent); font-weight: 500; }
.schematic .ar { color: var(--faint); }

/* ─────────────────────────  Hero  ───────────────────────── */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin: 1.1rem 0 0; }
.hero-role { font-family: var(--font-mono); font-size: clamp(1rem, 1.7vw, 1.2rem); color: var(--accent); margin-top: 1rem; min-height: 1.4em; }
.hero-role .cursor { display: inline-block; width: 9px; height: 1.05em; background: var(--accent); margin-left: 3px; vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .lede { margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-meta { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-meta .m-num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; color: var(--fg); }
.hero-meta .m-lab { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-top: .1rem; }
.hero-meta > div + div { padding-left: 2rem; border-left: 1px solid var(--line); }

.portrait { position: relative; justify-self: end; }
.portrait img { width: 100%; max-width: 320px; aspect-ratio: 4/4.6; object-fit: cover; border-radius: var(--radius-l); border: 1px solid var(--line-2); filter: saturate(1.02) contrast(1.02); }
.portrait::after { content: ''; position: absolute; inset: -1px; border-radius: calc(var(--radius-l) + 1px); padding: 1px; background: linear-gradient(150deg, var(--accent-line), transparent 55%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.portrait .p-chip { position: absolute; left: -18px; bottom: 26px; display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .74rem; color: var(--fg); background: rgba(16,18,24,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: 10px; padding: .5rem .7rem; box-shadow: 0 12px 30px -12px rgba(0,0,0,.7); }
.portrait .p-chip i { color: var(--pos); }

/* ─────────────────────────  Terminal (interactive console)  ───────────────────────── */
.console { max-width: 780px; }
.term { background: #08090D; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.term-head { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.term-head .d { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.term-head .d.r { background: #ff5f57; } .term-head .d.y { background: #febc2e; } .term-head .d.g { background: #28c840; }
.term-head .t { margin-left: .5rem; font-family: var(--font-mono); font-size: .74rem; color: var(--faint); }
.term-body { padding: 1.2rem 1.3rem 1.4rem; font-family: var(--font-mono); font-size: .82rem; line-height: 1.85; min-height: 260px; max-height: 380px; overflow-y: auto; }
.term-body .l { white-space: pre-wrap; word-break: break-word; }
.term-body .l.dim { color: var(--faint); }
.term-body .l.ok { color: var(--pos); }
.term-body .l.ac { color: var(--accent); }
.term-body .l.er { color: #ff7a7a; }
.term-line { display: flex; gap: .55rem; align-items: baseline; }
.term-line .ps { color: var(--accent); flex-shrink: 0; }
.term-in { flex: 1; background: none; border: none; outline: none; color: var(--fg); font-family: var(--font-mono); font-size: .82rem; caret-color: var(--accent); }
.term-body::-webkit-scrollbar { width: 8px; } .term-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ─────────────────────────  Command palette (⌘K)  ───────────────────────── */
.cmdk { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding-top: 14vh; background: rgba(6,7,10,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s; }
.cmdk.open { opacity: 1; visibility: visible; }
.cmdk-panel { width: min(560px, calc(100% - 32px)); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); overflow: hidden; transform: translateY(-8px) scale(.98); transition: transform .22s var(--ease-2); }
.cmdk.open .cmdk-panel { transform: none; }
.cmdk-input-wrap { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.cmdk-input-wrap i { color: var(--faint); }
.cmdk-input { flex: 1; background: none; border: none; outline: none; color: var(--fg); font-size: 1rem; }
.cmdk-input::placeholder { color: var(--faint); }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: .5rem; }
.cmdk-group { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: .6rem .7rem .3rem; }
.cmdk-item { display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; border-radius: var(--radius-s); font-size: .9rem; color: var(--muted); cursor: pointer; }
.cmdk-item i { width: 18px; text-align: center; color: var(--faint); }
.cmdk-item .k { margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: var(--faint); }
.cmdk-item.sel, .cmdk-item:hover { background: var(--accent-soft); color: var(--fg); }
.cmdk-item.sel i, .cmdk-item:hover i { color: var(--accent); }
.cmdk-empty { padding: 1.4rem; text-align: center; color: var(--faint); font-size: .9rem; }

/* ─────────────────────────  Page header (inner pages)  ───────────────────────── */
.page-head { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.crumbs { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--faint); margin-bottom: 1.4rem; }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { opacity: .5; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.page-head .lede { margin-top: 1.1rem; max-width: 64ch; }

/* ─────────────────────────  Doc / case study  ───────────────────────── */
.doc { display: grid; grid-template-columns: 210px 1fr; gap: 3.5rem; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--bar-h) + 40px); }
.doc-toc .lbl { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: .8rem; }
.doc-toc a { display: block; font-size: .82rem; color: var(--muted); padding: .35rem .7rem; border-left: 2px solid var(--line); transition: color .2s, border-color .2s; }
.doc-toc a:hover, .doc-toc a.active { color: var(--fg); border-left-color: var(--accent); }
.doc-body > section { margin-bottom: 3rem; }
.doc-body h2 { font-size: 1.4rem; padding-bottom: .6rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.doc-body h3 { margin: 1.8rem 0 .8rem; font-size: 1.1rem; }
.doc-body p { margin-bottom: 1rem; line-height: 1.75; font-size: .95rem; }
.doc-body ul, .doc-body ol { margin: 0 0 1.1rem; padding-left: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.doc-body li { position: relative; font-size: .93rem; color: var(--muted); line-height: 1.6; }
.doc-body ul li::before { content: ''; position: absolute; left: -1.1rem; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.doc-body ol { counter-reset: n; }
.doc-body ol li { counter-increment: n; }
.doc-body ol li::before { content: counter(n); position: absolute; left: -1.5rem; top: 0; font-family: var(--font-mono); font-size: .72rem; color: var(--accent); font-weight: 600; }
.doc-body p code, .doc-body li code { font-family: var(--font-mono); font-size: .85em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 5px; padding: .06em .4em; word-break: break-word; }

.snapshot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.6rem 0; }
.snapshot table { width: 100%; border-collapse: collapse; }
.snapshot td { padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: top; color: var(--muted); }
.snapshot tr:last-child td { border-bottom: none; }
.snapshot td:first-child { width: 150px; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }

.codeblock { background: #07080B; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.3rem 0; }
.codeblock .ch { display: flex; justify-content: space-between; padding: .5rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); font-family: var(--font-mono); font-size: .72rem; color: var(--faint); }
.codeblock .cc { padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--font-mono); font-size: .8rem; line-height: 1.8; color: #d5dae4; white-space: pre; }
.cmd { color: var(--accent); } .out { color: var(--pos); } .cmt { color: var(--faint); } .hl { color: var(--warn); }

.callout { border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--radius-s); padding: 1rem 1.2rem; margin: 1.3rem 0; font-size: .9rem; color: var(--muted); background: var(--accent-soft); }
.callout.warn { border-left-color: var(--warn); background: rgba(251,191,36,.06); }
.callout strong { color: var(--fg); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1.6rem 0; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-align: center; background: var(--bg-1); }
.metric .v { font-family: var(--font-mono); font-size: 2rem; font-weight: 500; color: var(--accent); line-height: 1; }
.metric .v.pos { color: var(--pos); } .metric .v.warn { color: var(--warn); }
.metric .l { font-size: .76rem; color: var(--muted); margin-top: .5rem; }

.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 1.6rem 0; }
.fig { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fig img { width: 100%; height: auto; }
.fig figcaption { padding: .6rem .9rem; font-size: .74rem; color: var(--faint); border-top: 1px solid var(--line); }

.challenge { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.2rem 0; }
.challenge .cx { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1.05rem; }
.challenge .cx.p { border-left: 2px solid var(--warn); } .challenge .cx.s { border-left: 2px solid var(--pos); }
.challenge .cx .lbl { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .45rem; }
.challenge .cx.p .lbl { color: var(--warn); } .challenge .cx.s .lbl { color: var(--pos); }
.challenge .cx p { font-size: .85rem; margin: 0; }
.chips-used { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

.doc-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 2rem; border-top: 1px solid var(--line); margin-top: 2rem; }

/* ─────────────────────────  Certifications  ───────────────────────── */
.cert { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); transition: border-color .3s, transform .3s var(--ease); }
.cert:hover { border-color: var(--line-2); transform: translateY(-3px); }
.cert-ico { width: 50px; height: 50px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.cert h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.cert .iss { font-size: .84rem; color: var(--faint); margin-bottom: .6rem; }
.cert p { font-size: .86rem; line-height: 1.55; }
.cert.prog { opacity: .92; } .cert.prog .cert-ico { color: var(--warn); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.3); }

/* ─────────────────────────  Footer  ───────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 3.5rem 2.5rem; position: relative; }
.footer::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-line), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-word { font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--bg-2); -webkit-text-stroke: 1px var(--line-2); }
.footer p { font-size: .88rem; max-width: 34ch; margin-top: .8rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 500; margin-bottom: 1rem; }
.footer-col a { display: block; font-size: .9rem; color: var(--muted); padding: .3rem 0; transition: color .2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--faint); }
.footer-social { display: flex; gap: .6rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.footer-social a:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface); }

/* ─────────────────────────  Contact  ───────────────────────── */
.contact-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-row .ci { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); flex-shrink: 0; }
.contact-row .cl { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.contact-row .cv { font-size: .95rem; color: var(--fg); }

/* ─────────────────────────  Focus / a11y  ───────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ─────────────────────────  View transitions  ───────────────────────── */
@view-transition { navigation: auto; }

/* ─────────────────────────  Responsive  ───────────────────────── */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .portrait { justify-self: start; } .portrait img { max-width: 260px; }
  .doc { grid-template-columns: 1fr; gap: 2rem; } .doc-toc { display: none; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-actions { display: none; }
  .menu-btn { display: block; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .challenge { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-meta > div + div { padding-left: 0; border-left: none; }
}

/* ─────────────────────────  Reduced motion  ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
  .hero-role .cursor { animation: none; }
}
