/* Ayush Raj Naveen — portfolio
   One committed dark theme: blue-black ground, amber accent (a nod to Momentum's
   gold-on-black), ice-blue for anything that reads as data. */

:root {
  --bg: #0a0e17;
  --bg-2: #0d1320;
  --panel: #111827;
  --raised: #182036;
  --line: #243049;
  --line-2: #33405f;
  --text: #e9edf5;
  --muted: #9aa6bf;
  --dim: #66728c;
  --amber: #f2b950;
  --amber-2: #ffd479;
  --amber-ink: #1a1304;
  --ice: #7cc6ff;
  --ok: #4ade80;
  --warn: #fb923c;
  --bad: #f87171;
  --grid: rgba(124, 198, 255, 0.06);

  --font-display: "Chakra Petch", "Avenir Next Condensed", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail: 232px;
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 10px;
  --radius-lg: 14px;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.4rem);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.waiting { opacity: 1; transform: none; }
  .timeline::before { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }
button { font: inherit; color: inherit; }

.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.01em; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.dim { color: var(--dim); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; padding: 8px 12px; background: var(--amber); color: var(--amber-ink); z-index: 100; border-radius: 6px; }
.skip:focus { top: 8px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); animation: pulse 2.4s ease-out infinite; }
.dot-amber { background: var(--amber); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ---------- shell: rail + main ---------- */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 32px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-mono); font-size: 0.9rem; }
.brand:hover { text-decoration: none; }
.mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--amber); color: var(--amber-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em;
}
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem;
  border-left: 2px solid transparent;
}
.rail-nav a::before { content: "·"; color: var(--dim); }
.rail-nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.rail-nav a.active { color: var(--amber); border-left-color: var(--amber); background: var(--panel); }
.rail-nav a.active::before { content: "›"; color: var(--amber); }
.rail-nav .rail-ext { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 14px; }
.rail-nav .rail-ext::before { content: "→"; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.rail-status { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); line-height: 1.4; }
.rail-status .dot { margin-top: 5px; }
.rail-clock { color: var(--dim); font-variant-numeric: tabular-nums; }
.rail-links { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 0.8rem; }

.topbar {
  display: none; position: sticky; top: 0; z-index: 40;
  align-items: center; gap: 16px;
  padding: 10px var(--gutter);
  background: rgba(10, 14, 23, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap; }
.topbar-nav a:hover { color: var(--amber); text-decoration: none; }
.topbar-nav .linklike { margin-left: 8px; white-space: nowrap; text-decoration: none; color: var(--amber); }
.topbar-always { display: flex; }

main { min-width: 0; }
.hero, .section, .stats, .footer { padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2)); }
.section { padding-block: 72px; border-top: 1px solid var(--line); }
.eyebrow { color: var(--ice); margin-bottom: 10px; }
.section h2 { font-size: var(--step-3); margin-bottom: 28px; }

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 40px; align-items: center;
  padding-block: 64px 56px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  right: -120px; top: -80px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 185, 80, 0.16), transparent 62%);
  pointer-events: none;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: var(--step-4); line-height: 0.98; }
.thesis { font-size: var(--step-2); line-height: 1.4; color: var(--muted); max-width: 30ch; }
.thesis em { font-style: normal; color: var(--text); }
.status-list { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17, 24, 39, 0.7); max-width: 460px; }
.status-list li { display: grid; grid-template-columns: 14px minmax(92px, auto) minmax(0, 1fr); align-items: center; gap: 10px; color: var(--muted); }
.status-list .k { color: var(--ice); }
.status-list .v { color: var(--text); overflow-wrap: break-word; }
.status-list .dot { justify-self: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 8px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-2); }
.btn-primary[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ice); color: var(--ice); }
.linklike { background: none; border: 0; padding: 0; color: var(--ice); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- chat ---------- */

.hero-chat { min-height: 520px; }
.chat {
  display: flex; flex-direction: column; height: 520px;
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(242, 185, 80, 0.06);
  overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font-family: var(--font-display); font-weight: 700; flex: none; }
.chat-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chat-title strong { font-family: var(--font-mono); font-weight: 500; font-size: 0.9rem; }
.chat-engine { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 0.72rem; }
.chat-engine .dot { width: 6px; height: 6px; }
.chat-engine.live { color: var(--ok); }
.chat-engine.live .dot { background: var(--ok); }
.chat-engine.local { color: var(--warn); }
.chat-engine.local .dot { background: var(--warn); }
.chat-close { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); }
.chat-close:hover { color: var(--text); border-color: var(--line-2); }

.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; max-width: 92%; }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { width: 24px; height: 24px; font-size: 0.75rem; margin-top: 2px; }
.bubble { padding: 10px 13px; border-radius: 12px; line-height: 1.5; font-size: 0.95rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-bot .bubble { background: var(--raised); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg-user .bubble { background: rgba(242, 185, 80, 0.14); border: 1px solid rgba(242, 185, 80, 0.35); border-top-right-radius: 4px; }
.bubble a { color: var(--ice); }
.bubble code { font-family: var(--font-mono); font-size: 0.85em; color: var(--ice); }
.msg-note .bubble { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 1em; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.cursor::after { content: "▍"; color: var(--amber); animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }


.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chip { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; cursor: pointer; }
.chip:hover { color: var(--amber); border-color: var(--amber); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-2); }
.chat-form textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 120px;
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  font: inherit; font-size: 0.95rem; line-height: 1.4;
}
.chat-form textarea::placeholder { color: var(--dim); }
.chat-send { width: 44px; border-radius: 8px; border: 0; background: var(--amber); color: var(--amber-ink); font-family: var(--font-mono); font-weight: 500; cursor: pointer; }
.chat-send:hover { background: var(--amber-2); }
.chat-send[disabled] { opacity: 0.5; cursor: progress; }

.chat-drawer { position: fixed; right: 20px; bottom: 20px; width: min(420px, calc(100vw - 32px)); z-index: 60; }
.chat-drawer .chat { height: min(640px, calc(100vh - 40px)); }
.chat-dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 55;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font-family: var(--font-mono); font-size: 0.85rem;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.8); cursor: pointer;
}
.chat-dock:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- about ---------- */

.prose { display: flex; flex-direction: column; gap: 16px; max-width: 68ch; font-size: var(--step-1); color: var(--muted); }
.prose p:first-child { color: var(--text); }

/* ---------- experience ---------- */

.timeline { position: relative; display: flex; flex-direction: column; gap: 36px; padding-left: 28px; border-left: 1px solid var(--line); max-width: 900px; }
.tl-item { position: relative; display: flex; flex-direction: column; gap: 10px; }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ice); }
.tl-item.current::before { border-color: var(--amber); background: var(--amber); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tl-meta .range { color: var(--muted); }
.tl-role { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); }
.tl-org { color: var(--muted); }
.tl-org a { color: var(--ice); }
.tl-summary { color: var(--muted); max-width: 66ch; }
.tl-bullets { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; color: var(--text); max-width: 72ch; }
.tl-bullets li { list-style: "–  "; color: var(--muted); }
.tl-bullets li::marker { color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 3px 9px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }

/* ---------- projects ---------- */

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); min-width: 0; }
.project.featured { grid-column: 1 / -1; border-color: rgba(242, 185, 80, 0.45); background: linear-gradient(180deg, rgba(242, 185, 80, 0.06), transparent 40%), var(--panel); }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.project-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); }
.project-name a { color: var(--text); }
.project-tag { color: var(--muted); flex-basis: 100%; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.pill.live { border-color: rgba(74, 222, 128, 0.45); color: var(--ok); }
.project-desc { color: var(--muted); max-width: 70ch; }
.project.featured .project-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 24px; }
.stack-col { display: flex; flex-direction: column; gap: 14px; }
.pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; font-family: var(--font-mono); font-size: 0.78rem; }
.pipeline span { padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2); color: var(--ice); }
.pipeline i { color: var(--dim); font-style: normal; padding: 0 3px; }
.highlights { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; }
.highlights li { list-style: "▸  "; color: var(--muted); }
.highlights li::marker { color: var(--amber); font-size: 0.8em; }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.project-link { font-family: var(--font-mono); font-size: 0.85rem; }
.detections { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.78rem; }
.detections th { text-align: left; font-weight: 500; color: var(--dim); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.detections td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.detections td:nth-child(2) { color: var(--ice); white-space: nowrap; }
.sev { font-weight: 500; }
.sev-critical { color: var(--bad); }
.sev-high { color: var(--warn); }
.sev-medium { color: var(--amber); }
.table-wrap { overflow-x: auto; }

/* ---------- skills ---------- */

.manifest { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); overflow: hidden; max-width: 1000px; }
.manifest > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.manifest > div:last-child { border-bottom: 0; }
.manifest dt { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ice); padding-top: 4px; }
.manifest dt::after { content: ":"; color: var(--dim); }
.manifest dd { margin: 0; }

/* ---------- education ---------- */

.edu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 1000px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); }
.edu-line { color: var(--muted); }
.edu-line strong { color: var(--text); font-weight: 500; }
.kv { display: flex; flex-direction: column; gap: 6px; }
.kv div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.honors { display: flex; flex-direction: column; gap: 10px; }
.honors li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.honors .h-name { color: var(--text); }
.honors .h-detail { color: var(--dim); font-family: var(--font-mono); font-size: 0.78rem; }

/* ---------- scroll progress ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 80; background: linear-gradient(90deg, var(--amber), var(--amber-2)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- hero extras ---------- */

.hero::before { background-image: radial-gradient(420px circle at var(--mx, 30%) var(--my, 30%), rgba(242, 185, 80, 0.10), transparent 60%), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: auto, 36px 36px, 36px 36px; }
.typed { color: var(--ice); font-size: 1rem; min-height: 1.6em; margin-top: -6px; }
.typed-prompt { color: var(--amber); }
.typed-caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--amber); animation: caret 1s steps(1) infinite; }
.hero-aside { color: var(--dim); font-size: 0.9rem; }
.hero-copy > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.05s; }
.hero-copy > :nth-child(3) { animation-delay: 0.1s; }
.hero-copy > :nth-child(4) { animation-delay: 0.15s; }
.hero-copy > :nth-child(5) { animation-delay: 0.2s; }
.hero-copy > :nth-child(6) { animation-delay: 0.25s; }
.hero-copy > :nth-child(7) { animation-delay: 0.3s; }
.hero-chat { animation: rise 0.7s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- stats strip ---------- */

.stats { padding-block: 0 56px; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); color: var(--amber); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }

/* ---------- scroll reveals ---------- */

.reveal.waiting { opacity: 0; transform: translateY(18px); }
.reveal.in { transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--stagger, 0ms), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--stagger, 0ms); }

/* Timeline line fills in as you read down it. */
.timeline::before { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 100%; background: var(--amber); transform-origin: top; transform: scaleY(var(--fill, 0)); opacity: 0.8; }

/* Project cards: a light that follows the pointer, and a lift on hover. */
.project { position: relative; transition: transform 0.2s ease, border-color 0.2s ease; }
.project::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgba(242, 185, 80, 0.09), transparent 60%); }
.project:hover { transform: translateY(-2px); border-color: var(--line-2); }
.project.featured:hover { border-color: rgba(242, 185, 80, 0.6); }
.project:hover::after { opacity: 1; }
.chips span { transition: color 0.15s ease, border-color 0.15s ease; }
.chips span:hover { color: var(--ice); border-color: var(--line-2); }

/* ---------- contact ---------- */

.contact-pitch { color: var(--muted); font-size: var(--step-1); max-width: 64ch; margin: -8px 0 28px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.contact-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); transition: border-color 0.2s ease, transform 0.2s ease; min-width: 0; }
.contact-card:first-child { border-color: rgba(242, 185, 80, 0.45); background: linear-gradient(180deg, rgba(242, 185, 80, 0.07), transparent 55%), var(--panel); }
.contact-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.contact-label { color: var(--ice); }
.contact-value { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); overflow-wrap: anywhere; }
.contact-note { color: var(--muted); font-size: 0.9rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.btn-small { padding: 9px 14px; font-size: 0.8rem; }

/* ---------- ⌘K quick menu + toast ---------- */

.kbd-hint { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 0; background: none; border: 0; color: var(--dim); cursor: pointer; }
.kbd-hint:hover { color: var(--amber); }
kbd { font-family: var(--font-mono); font-size: 0.72rem; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--panel); }
.palette { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 14vh 16px 16px; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 14, 0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.palette-box { position: relative; width: min(560px, 100%); border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--panel); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); overflow: hidden; animation: rise 0.18s ease-out both; }
.palette-input { width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font-size: 0.95rem; outline: none; }
.palette-input::placeholder { color: var(--dim); }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.palette-item.on { background: var(--raised); color: var(--text); box-shadow: inset 2px 0 0 var(--amber); }
.palette-hint { color: var(--dim); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-empty { padding: 14px 12px; color: var(--dim); }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.72rem; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translateX(-50%); padding: 10px 16px; border: 1px solid rgba(74, 222, 128, 0.45); border-radius: 999px; background: var(--panel); color: var(--ok); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.8); animation: rise 0.2s ease-out both; }

/* ---------- footer ---------- */

.footer { display: flex; flex-direction: column; gap: 14px; padding-block: 40px 48px; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 0.9rem; }
.noscript { padding: 16px var(--gutter); color: var(--amber); }

/* ---------- résumé page ---------- */

.resume { max-width: 820px; margin-inline: auto; padding: 48px var(--gutter) 64px; display: flex; flex-direction: column; gap: 44px; }
.resume-head { display: flex; flex-direction: column; gap: 14px; }
.resume-head h1 { font-size: var(--step-3); }
.resume-summary { color: var(--muted); max-width: 70ch; font-size: var(--step-1); }
.resume-contact { display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); }
.resume-contact li:not(:last-child)::after { content: "·"; color: var(--dim); padding: 0 10px; }
.resume-section { display: flex; flex-direction: column; gap: 20px; }
.resume-section h2 { display: flex; flex-direction: column; gap: 4px; font-size: var(--step-2); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.resume-section h2 .eyebrow { margin: 0; font-weight: 400; }
.resume-entries { display: flex; flex-direction: column; gap: 26px; }
.resume-entry { display: flex; flex-direction: column; gap: 8px; }
.entry-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline; }
.entry-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.entry-org { color: var(--muted); }
.entry-dates { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-summary { color: var(--muted); max-width: 72ch; }
.resume-bullets { display: flex; flex-direction: column; gap: 5px; padding-left: 18px; max-width: 76ch; }
.resume-bullets li { list-style: "–  "; color: var(--text); }
.resume-bullets li::marker { color: var(--dim); }
.resume .manifest { max-width: none; }
.resume .manifest dd { color: var(--muted); }
.resume-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 20px; border-top: 1px solid var(--line); }

@media print {
  :root {
    --bg: #fff; --bg-2: #fff; --panel: #fff; --raised: #f3f4f6; --line: #d1d5db; --line-2: #9ca3af;
    --text: #111827; --muted: #374151; --dim: #6b7280; --amber: #92400e; --ice: #1d4ed8;
    color-scheme: light;
  }
  @page { margin: 14mm 16mm; }
  body { font-size: 10.5pt; line-height: 1.4; }
  .topbar, .no-print, .skip { display: none !important; }
  .resume { padding: 0; gap: 22px; max-width: none; }
  .resume-head h1 { font-size: 22pt; }
  .resume-summary { font-size: 10.5pt; }
  .resume-section { gap: 12px; }
  .resume-section h2 { font-size: 13pt; padding-bottom: 4px; }
  .resume-section h2 .eyebrow { display: none; }
  .resume-entries { gap: 14px; }
  .resume-entry { break-inside: avoid; }
  .chips span, .pill { border-color: #9ca3af; background: #fff; }
  .manifest, .manifest > div { border-color: #d1d5db; }
  .manifest > div { padding: 6px 0; }
  a { color: var(--ice); }
  a[href^="http"]::after { content: ""; }
}

/* ---------- responsive ---------- */

@media (max-width: 1119px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { display: flex; }
  .brand-name { display: none; }
  .hero { padding-block: 48px; }
}

@media (max-width: 959px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-chat { min-height: 0; }
  .chat { height: 480px; }
  .project.featured .project-body { grid-template-columns: minmax(0, 1fr); }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .edu-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 56px; }
}

@media (max-width: 560px) {
  .entry-head { grid-template-columns: minmax(0, 1fr); }
  .status-list li { grid-template-columns: 14px minmax(0, 1fr); }
  .status-list .v { grid-column: 2; }
  .manifest > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kv div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .chat-drawer { right: 0; bottom: 0; width: 100vw; }
  .chat-drawer .chat { height: 100dvh; border-radius: 0; }
  .btn { width: 100%; }
}
