/* =========================================================
   Noor Halden — brand: ink black, bone white, signal lime
   ========================================================= */
:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --card: #141416;
  --line: #232327;
  --line-2: #2e2e33;
  --fg: #f4f4f5;
  --fg-2: #a1a1aa;
  --fg-3: #63636b;
  --accent: #c6ff3d;
  --accent-dim: rgba(198, 255, 61, .14);

  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 16px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--mono); font-size: .9em; color: var(--accent); }

#grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .footer { position: relative; z-index: 2; }

/* ---------- shared bits ---------- */
.kicker { font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: .02em; margin-bottom: 1rem; }
.dim { color: var(--fg-3); }
.accent { color: var(--accent); }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  font-family: var(--mono); font-size: .72rem; color: var(--fg-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--bg-2);
  margin: 0 1px;
}

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.3rem; border-radius: 10px;
  font-weight: 500; font-size: .95rem;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(198, 255, 61, .55); }
.btn-primary span { transition: transform .2s; }
.btn-primary:hover > span:not(.copy-hint) { transform: translateX(3px); }
.btn-ghost { border: 1px solid var(--line-2); font-family: var(--mono); font-size: .85rem; color: var(--fg-2); background: rgba(20,20,22,.6); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--fg-3); color: var(--fg); }
.btn-lg { font-size: clamp(1rem, 2.4vw, 1.35rem); padding: 1.1rem 1.6rem; font-family: var(--mono); }
.copy-hint {
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  padding: .15rem .45rem; border-radius: 5px; border: 1px solid currentColor; opacity: .55;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 2rem;
  max-width: var(--max); margin: 0 auto; padding: 1.1rem 1.5rem;
}
.nav::before {
  content: ""; position: absolute; inset: .5rem .5rem; z-index: -1;
  background: rgba(10, 10, 11, .7); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 14px;
}
.nav::after { /* hides content scrolling above the floating pill */
  content: ""; position: absolute; top: 0; left: -100vw; right: -100vw; height: .5rem; z-index: -2;
  background: var(--bg);
}
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; padding-left: .5rem; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; font-family: var(--mono); font-size: .85rem; }
.nav-links a { color: var(--fg-2); transition: color .2s; }
.nav-links a span { color: var(--fg-3); margin-right: .35rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a:hover span, .nav-links a.active span { color: var(--accent); }
.kbd-btn { display: flex; padding: .3rem; border-radius: 8px; transition: background .2s; }
.kbd-btn:hover { background: var(--card); }

/* ---------- hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) 1.5rem 4rem; }
.status {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .78rem; color: var(--fg-2);
  padding: .4rem .85rem; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(20,20,22,.7);
  margin-bottom: 2rem;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.6rem, 7.4vw, 5.8rem); font-weight: 600; letter-spacing: -.045em; line-height: .98; margin-bottom: 1.8rem; }
.hero h1 .line { display: block; }
.hero h1 .dim { color: var(--fg-3); }
.rotator { color: var(--accent); display: inline-block; min-height: 1em; }
.rotator::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: .05em; font-weight: 400; }
.lede { max-width: 560px; font-size: 1.12rem; color: var(--fg-2); margin-bottom: 2.4rem; }
.lede b { color: var(--fg); font-weight: 500; }

.terminal {
  max-width: 560px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  background: rgba(17, 17, 19, .85); backdrop-filter: blur(8px); margin-bottom: 2.4rem;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-bar span { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: .72rem; color: var(--fg-3); transform: translateX(-18px); }
.term-body { font-family: var(--mono); font-size: .82rem; line-height: 1.75; padding: 1rem 1.1rem; min-height: 9.6rem; color: var(--fg-2); white-space: pre-wrap; }
.term-body .pr { color: var(--accent); }
.term-body .ok { color: var(--accent); }
.term-body .w { color: var(--fg); }
.term-body .cur { display: inline-block; width: .55em; background: var(--accent); animation: blink 1s steps(1) infinite; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 3.5rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 2.5rem; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.hero-meta .label { display: block; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); margin-bottom: .2rem; }
#clock { font-family: var(--mono); }

/* ---------- logo strip ---------- */
.strip { position: relative; z-index: 2; border-block: 1px solid var(--line); overflow: hidden; padding: 1.1rem 0; background: rgba(10,10,11,.6);
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.strip-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 30s linear infinite; font-weight: 600; font-size: 1.15rem; color: var(--fg-3); letter-spacing: -.01em; }
.strip-track b { color: var(--line-2); font-weight: 400; }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 12vh, 8rem) 1.5rem 0; }
.section-head { margin-bottom: 3rem; }
.section-head h2, .contact h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }

/* spotlight hover (cursor-following glow) */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 255, 61, .09), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.spot::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 255, 61, .6), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.project:hover { transform: translateY(-4px); }
.project-visual {
  position: relative; height: 230px; overflow: hidden; border-bottom: 1px solid var(--line);
  background-color: var(--bg-2);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.project-info { padding: 1.5rem 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .75rem; color: var(--fg-3); margin-bottom: .6rem; }
.project h3 { font-size: 1.55rem; font-weight: 600; letter-spacing: -.03em; margin-bottom: .5rem; }
.project p { color: var(--fg-2); font-size: .97rem; margin-bottom: 1.1rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.tags li { font-family: var(--mono); font-size: .72rem; color: var(--fg-2); padding: .25rem .55rem; border: 1px solid var(--line-2); border-radius: 6px; }
.metric { margin-top: auto; font-family: var(--mono); font-size: .8rem; color: var(--fg-3); border-top: 1px dashed var(--line-2); padding-top: .9rem; }
.metric b { color: var(--accent); font-size: 1rem; margin-right: .3rem; }

/* visual: tidepool */
.v-tidepool .shape { position: absolute; border: 1.5px solid var(--fg-3); border-radius: 10px; }
.v-tidepool .s1 { left: 12%; top: 22%; width: 120px; height: 80px; }
.v-tidepool .s2 { left: 48%; top: 40%; width: 90px; height: 90px; border-radius: 50%; border-color: var(--accent); background: var(--accent-dim); }
.v-tidepool .s3 { left: 70%; top: 18%; width: 80px; height: 50px; border-style: dashed; }
.v-tidepool [class^="cursor"] {
  position: absolute; font-family: var(--mono); font-size: .7rem; padding: .15rem .45rem; border-radius: 0 6px 6px 6px; color: var(--bg);
}
.v-tidepool [class^="cursor"]::before { content: ""; position: absolute; left: -10px; top: -12px; border: 7px solid transparent; border-left-color: inherit; transform: rotate(-135deg); }
.v-tidepool .cursor-a { background: var(--accent); left: 30%; top: 60%; animation: driftA 6s ease-in-out infinite; }
.v-tidepool .cursor-b { background: var(--fg); left: 62%; top: 25%; animation: driftB 7s ease-in-out infinite; }

/* visual: lumen */
.v-lumen { display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: .7rem 1.2rem; padding: 1.6rem 2rem; }
.v-lumen .tok { font-family: var(--mono); font-size: .72rem; color: var(--fg-2); display: flex; align-items: center; gap: .5rem; }
.v-lumen .tok i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); }
.v-lumen .ui-btn { justify-self: start; background: var(--accent); color: var(--bg); font-size: .8rem; font-weight: 600; padding: .45rem .9rem; border-radius: 8px; }
.v-lumen .ui-toggle { width: 42px; height: 24px; border-radius: 999px; background: var(--accent); position: relative; }
.v-lumen .ui-toggle i { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); animation: toggle 3s ease-in-out infinite; }
.v-lumen .ui-input { grid-column: 1 / -1; font-family: var(--mono); font-size: .75rem; color: var(--fg-3); padding: .55rem .8rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); }

/* visual: parcel */
.v-parcel { display: flex; align-items: flex-end; padding: 1.5rem 2rem; }
.v-parcel .bars { display: flex; align-items: flex-end; gap: 10px; height: 75%; width: 100%; }
.v-parcel .bars i { flex: 1; height: var(--h); background: linear-gradient(var(--accent), rgba(198,255,61,.15)); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow 1.4s cubic-bezier(.2,.8,.2,1) both; }
.v-parcel .bars i:nth-child(odd) { background: linear-gradient(var(--fg-3), rgba(99,99,107,.1)); }
.v-parcel .bars i:nth-child(n) { animation-delay: calc(var(--i, 0) * 80ms); }
.v-parcel .kpi { position: absolute; top: 1.2rem; left: 1.5rem; font-family: var(--mono); font-size: .7rem; color: var(--fg-3); background: var(--bg); border: 1px solid var(--line-2); padding: .5rem .7rem; border-radius: 8px; }
.v-parcel .kpi b { display: block; color: var(--fg); font-size: 1.1rem; }

/* visual: drift */
.v-drift svg { width: 100%; height: 100%; }
.wave { fill: none; stroke-width: 2; stroke-dasharray: 8 6; }
.w1 { stroke: var(--accent); animation: dash 6s linear infinite; }
.w2 { stroke: var(--fg-3); animation: dash 9s linear infinite reverse; }
.w3 { stroke: var(--fg); opacity: .4; stroke-dasharray: none; animation: sway 4s ease-in-out infinite; transform-origin: center; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; }
.card-label { font-family: var(--mono); font-size: .72rem; color: var(--fg-3); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.card-label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.c-bio { grid-column: span 4; }
.c-stats { grid-column: span 2; display: grid; gap: 1rem; align-content: center; }
.c-stack { grid-column: span 3; }
.c-now { grid-column: span 3; }
.c-principles { grid-column: span 6; }
.bio { font-size: 1.12rem; color: var(--fg); margin-bottom: .9rem; letter-spacing: -.01em; }
.bio.dim { font-size: .98rem; color: var(--fg-2); margin: 0; }
.stat b { display: block; font-size: 2.6rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stat b::after { content: "+"; color: var(--accent); }
.stat:last-child b::after { content: ""; }
.stat span { font-family: var(--mono); font-size: .72rem; color: var(--fg-3); }
.code { font-family: var(--mono); font-size: .82rem; line-height: 1.8; color: var(--fg-2); overflow-x: auto; }
.code .k { color: #a78bfa; } .code .v { color: var(--fg); } .code .p { color: var(--fg); } .code .s { color: var(--accent); }
.now { list-style: none; display: grid; gap: .9rem; }
.now li { display: grid; grid-template-columns: 90px 1fr; font-size: .98rem; }
.now span { font-family: var(--mono); font-size: .75rem; color: var(--fg-3); padding-top: .2rem; }
.principles { list-style: none; counter-reset: p; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.principles li { counter-increment: p; font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; }
.principles li::before { content: "0" counter(p); display: block; font-family: var(--mono); font-size: .72rem; color: var(--accent); margin-bottom: .4rem; }

/* ---------- git log ---------- */
.gitlog { list-style: none; }
.commit { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; }
.graph { position: relative; display: flex; justify-content: center; }
.graph::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.commit:first-child .graph::before { top: 12px; }
.commit:last-child .graph::before { bottom: auto; height: 12px; }
.graph i { position: relative; z-index: 1; margin-top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--fg-3); }
.graph i.head { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-dim); }
.graph i.root { border-radius: 3px; }
.commit-body { padding-bottom: 2.6rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; transition: transform .3s; }
.commit:last-child .commit-body { border-bottom: 0; margin-bottom: 0; }
.commit:hover .commit-body { transform: translateX(6px); }
.hash { font-family: var(--mono); font-size: .78rem; color: #e3b341; margin-bottom: .4rem; }
.ref { color: var(--accent); margin-left: .4rem; padding: .05rem .45rem; border: 1px solid rgba(198,255,61,.4); border-radius: 5px; }
.ref.muted { color: var(--fg-3); border-color: var(--line-2); }
.commit h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em; }
.commit h3 span { color: var(--fg-3); font-weight: 500; }
.when { font-family: var(--mono); font-size: .75rem; color: var(--fg-3); margin: .2rem 0 .7rem; }
.commit-body > p:last-child { color: var(--fg-2); max-width: 640px; }

/* ---------- contact ---------- */
.contact { text-align: center; padding-bottom: 6rem; }
.contact h2.big { font-size: clamp(2.4rem, 7vw, 5.4rem); letter-spacing: -.045em; line-height: 1; margin-bottom: 2.5rem; }
.contact-row { margin-bottom: 2.5rem; }
.socials { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.socials a { display: inline-block; font-family: var(--mono); font-size: .85rem; color: var(--fg-2); padding: .55rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; transition: all .2s; }
.socials a:hover { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.socials a span { display: inline-block; transition: transform .2s; }
.socials a:hover span { transform: translate(2px, -2px); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 2rem 1.5rem 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .75rem; color: var(--fg-2); border-top: 1px solid var(--line);
}

/* ---------- command palette ---------- */
.palette {
  position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.palette.open { opacity: 1; pointer-events: auto; }
.palette-box {
  width: min(560px, 92vw); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(198,255,61,.06);
  transform: translateY(-8px) scale(.98); transition: transform .25s cubic-bezier(.2,.9,.3,1.2);
}
.palette.open .palette-box { transform: none; }
.palette-input { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.palette-input span { font-family: var(--mono); color: var(--accent); }
.palette-input input { flex: 1; background: none; border: 0; outline: none; color: var(--fg); font: inherit; font-size: 1rem; }
.palette-input input::placeholder { color: var(--fg-3); }
.palette-list { list-style: none; max-height: 320px; overflow-y: auto; padding: .4rem; }
.palette-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 8px; cursor: pointer; font-size: .95rem; color: var(--fg-2); }
.palette-list li .ic { font-family: var(--mono); font-size: .8rem; width: 22px; color: var(--fg-3); text-align: center; }
.palette-list li .hint { margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--fg-3); }
.palette-list li.sel { background: var(--card); color: var(--fg); }
.palette-list li.sel .ic { color: var(--accent); }
.palette-list .empty { color: var(--fg-3); cursor: default; justify-content: center; }
.palette-foot { display: flex; gap: 1.2rem; padding: .7rem 1.2rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .7rem; color: var(--fg-3); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; transition: all .3s cubic-bezier(.2,.9,.3,1.2);
  font-family: var(--mono); font-size: .82rem; background: var(--fg); color: var(--bg);
  padding: .65rem 1rem; border-radius: 10px; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.project.reveal.in:hover { transform: translateY(-4px); }

/* ---------- keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198,255,61,.6); } 70% { box-shadow: 0 0 0 8px rgba(198,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(198,255,61,0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes driftA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px,-30px); } }
@keyframes driftB { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-70px,50px); } }
@keyframes toggle { 0%,40% { right: 3px; } 50%,90% { right: 21px; } 100% { right: 3px; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes dash { to { stroke-dashoffset: -140; } }
@keyframes sway { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(-.6); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .projects { grid-template-columns: 1fr; }
  .c-bio, .c-stats, .c-stack, .c-now, .c-principles { grid-column: span 6; }
  .c-stats { grid-template-columns: repeat(3, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .kbd-btn { margin-left: auto; }
  .hero-meta { gap: 1.4rem; }
  .c-stats { grid-template-columns: 1fr; }
  .stat b { font-size: 2.1rem; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* mobile + perf pass */
html,body{overflow-x:clip}
#grid{width:100%;height:100%}
@media(max-width:640px){.copy-hint{font-size:.72rem}.nav-links a{padding:.4rem 0}}
