/* ─────────────────────────────────────────────────── base + theme ── */
:root {
  --bg: #06100B;
  --bg-alt: #0A1812;
  --surface: #0E1A14;
  --border: rgba(124,255,178,0.14);
  --text: #C8E6D3;
  --muted: #5E7E6A;
  --accent: #7CFFB2;
  --font: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --pad: 16px;
  --gap: 22px;
  --sect-y: 108px;
  --hero-y: 128px;
  --max-w: 1240px;
}

* { box-sizing: border-box; }

html, body, #root {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* scanlines (terminal direction) */
.has-scanlines::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.022) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  z-index: 200;
}

.shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, color-mix(in oklab, var(--accent) 4%, transparent), transparent 65%),
    var(--bg);
}

/* ─────────────────────────────────────────────────────── topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 26px;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.topbar-l, .topbar-r { display: flex; align-items: center; gap: 16px; }

.logo { color: var(--text); font-weight: 600; letter-spacing: -.01em; }
.logo-glyph { color: var(--accent); margin-right: 4px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.path { color: var(--muted); font-size: 12px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }

.cmdk-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cmdk-btn:hover { border-color: var(--accent); color: var(--text); }

kbd {
  display: inline-block;
  font-family: var(--font);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
  color: var(--text);
  border: 1px solid var(--border);
  line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────── page ── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 26px;
}

/* ─────────────────────────────────────────────────────────── hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: var(--hero-y) 0 calc(var(--hero-y) * 0.6);
  border-bottom: 1px dashed var(--border);
}

.hero-handle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(56px, 8vw, 108px);
  line-height: .96;
  font-weight: 700;
  letter-spacing: -.04em;
  margin: 0 0 18px;
}
.hero-name-2 { color: var(--accent); }

.shell-brutalist .hero-name {
  font-size: clamp(72px, 11vw, 152px);
  letter-spacing: -.06em;
  font-weight: 800;
  text-transform: uppercase;
}
.shell-brutalist .hero-name-2 {
  color: var(--bg);
  background: var(--accent);
  padding: 0 .12em;
}

.hero-sub {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 24px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  color: var(--text);
  background: color-mix(in oklab, var(--text) 7%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.hero-blurb {
  font-size: 16px;
  color: color-mix(in oklab, var(--text) 80%, var(--muted));
  max-width: 56ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

.kbd-hint {
  font-size: 12px; color: var(--muted); margin-left: 4px;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, color .15s, box-shadow .15s;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-glyph { color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 40%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 18%, transparent);
}
.btn-primary .btn-glyph { color: var(--bg); }

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.shell-brutalist .btn { border-radius: 0; border-width: 2px; }
.shell-brutalist .btn-primary { border-width: 2px; }

/* ───────────────────────────────────────────────────── terminal hero ── */
.term {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,0.45),
              0 0 0 1px color-mix(in oklab, var(--accent) 6%, transparent);
}
.shell-brutalist .term { border-radius: 0; border-width: 2px; }

.term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.term-dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.term-title {
  margin-left: 8px;
  font-size: 11px;
  color: var(--muted);
}

.term-body {
  padding: 18px 18px 22px;
  font-size: 13px;
  min-height: 360px;
}

.term-line { display: block; }
.term-prompt { color: var(--accent); font-weight: 700; }
.term-cmd { color: var(--text); }
.term-out {
  color: color-mix(in oklab, var(--text) 75%, var(--muted));
  margin: 2px 0 10px;
  padding-left: 14px;
  text-wrap: pretty;
}
.term-cursor {
  display: inline-block;
  background: var(--accent);
  color: var(--accent);
  margin-left: 1px;
  animation: blink 1s steps(2, end) infinite;
  width: .55em;
  height: 1em;
  vertical-align: -.18em;
}
@keyframes blink { 50% { opacity: 0; } }

/* ──────────────────────────────────────────────────────── sections ── */
.sect {
  padding: var(--sect-y) 0 0;
  scroll-margin-top: 56px;
}
.sect-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.sect-num {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}
.sect-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: lowercase;
}
.sect-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.shell-brutalist .sect-label {
  color: var(--text);
  font-size: 16px;
  letter-spacing: .04em;
}

/* ──────────────────────────────────────────────────────────── about ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 64px;
}
.about-prose p {
  margin: 0 0 16px;
  font-size: 15px;
  color: color-mix(in oklab, var(--text) 85%, var(--muted));
  text-wrap: pretty;
  max-width: 60ch;
}
.about-prose b { color: var(--accent); font-weight: 600; }

.about-skills { display: flex; flex-direction: column; gap: 14px; }
.skill-row { }
.skill-key {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.skill-vals { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--text);
}
.chip-sm { font-size: 11px; padding: 2px 7px; }

.shell-brutalist .chip { border-radius: 0; }

/* ──────────────────────────────────────────────────────────── now ── */
.now-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.now-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}
.now-key { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.now-key b { color: var(--accent); font-weight: 600; }
.now-val { font-size: 14px; color: var(--text); text-wrap: pretty; }
.shell-brutalist .now-card { border-radius: 0; }

/* ───────────────────────────────────────────────────── experience ── */
.exp { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.exp-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  transition: background .15s;
}
.exp-row:hover {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.exp-range { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.exp-head { font-size: 16px; }
.exp-role { color: var(--text); font-weight: 600; }
.exp-sep { color: var(--muted); margin: 0 8px; }
.exp-company { color: var(--accent); }
.exp-notes { color: color-mix(in oklab, var(--text) 80%, var(--muted)); font-size: 14px; margin: 8px 0 10px; max-width: 70ch; }
.exp-stack { display: flex; flex-wrap: wrap; gap: 5px; }

/* ───────────────────────────────────────────────────── projects ── */
.proj-hint {
  font-size: 11px; color: var(--muted); margin-bottom: 10px;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.proj {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.proj::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at var(--mx,50%) 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.proj:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); transform: translateY(-2px); box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.proj:hover::before { opacity: 1; }
.shell-brutalist .proj { border-radius: 0; }

.proj-id { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.proj-id code { color: var(--accent); }
.proj-title { font-size: 18px; margin: 0 0 6px; color: var(--text); font-weight: 600; line-height: 1.25; }
.proj-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; margin-bottom: 12px; }
.proj-summary { font-size: 13.5px; color: color-mix(in oklab, var(--text) 82%, var(--muted)); margin: 0 0 16px; text-wrap: pretty; }

.proj-reveal {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, margin .25s ease;
}
.proj:hover .proj-reveal,
.proj:focus-within .proj-reveal {
  max-height: 240px;
  opacity: 1;
  margin-top: 4px;
}

.proj-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
}
.shell-brutalist .proj-metrics { border-radius: 0; }
.proj-metric-v { color: var(--accent); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.proj-metric-l { color: var(--muted); font-size: 11px; }

.proj-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.proj-link { font-size: 12px; color: var(--accent); }

/* ───────────────────────────────────────────────────────── oss ── */
.oss-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
}

.oss-heat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.shell-brutalist .oss-heat, .shell-brutalist .repo { border-radius: 0; }

.oss-heat-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--muted);
  margin-bottom: 12px;
}
.oss-heat-legend { display: inline-flex; align-items: center; gap: 3px; }
.oss-heat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.heat { display: flex; gap: 3px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell {
  width: 12px; height: 12px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--text) 5%, transparent);
}
.heat-1 { background: color-mix(in oklab, var(--accent) 22%, var(--bg-alt)); }
.heat-2 { background: color-mix(in oklab, var(--accent) 40%, var(--bg-alt)); }
.heat-3 { background: color-mix(in oklab, var(--accent) 65%, var(--bg-alt)); }
.heat-4 { background: var(--accent); }

.oss-repos { display: flex; flex-direction: column; gap: 10px; }
.repo {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .15s, transform .15s;
}
.repo:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.repo-name { color: var(--accent); font-weight: 600; font-size: 14px; }
.repo-desc { color: color-mix(in oklab, var(--text) 80%, var(--muted)); font-size: 13px; margin: 4px 0 8px; }
.repo-meta { display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.repo-lang { color: var(--text); }

/* ───────────────────────────────────────────────────── play / gol ── */
.play-note {
  font-size: 13.5px;
  color: color-mix(in oklab, var(--text) 80%, var(--muted));
  max-width: 60ch;
  margin: 0 0 18px;
}
.gol {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.shell-brutalist .gol { border-radius: 0; }
.gol-grid {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}
.gol-cell {
  aspect-ratio: 1 / 1;
  background: color-mix(in oklab, var(--text) 4%, transparent);
  border-radius: 2px;
  cursor: pointer;
  transition: background .12s;
}
.gol-cell:hover { background: color-mix(in oklab, var(--accent) 30%, transparent); }
.gol-cell.is-on {
  background: var(--accent);
  box-shadow: 0 0 6px color-mix(in oklab, var(--accent) 60%, transparent);
}
.gol-ctrls {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.gol-ctrls button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}
.gol-ctrls button:hover { border-color: var(--accent); color: var(--accent); }
.gol-meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.gol-meta b { color: var(--accent); }

/* ────────────────────────────────────────────────────── contact ── */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.shell-brutalist .contact-card { border-radius: 0; }
.contact-pre {
  margin: 0 0 18px;
  padding: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}
.shell-brutalist .contact-pre { border-radius: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.contact-foot { font-size: 12px; color: var(--muted); }

/* ────────────────────────────────────────────────────── footer ── */
.foot {
  max-width: var(--max-w);
  margin: 64px auto 0;
  padding: 30px 26px 60px;
  border-top: 1px solid var(--border);
}
.foot-art {
  color: var(--accent);
  font-size: 11px;
  line-height: 1.05;
  margin: 0 0 16px;
  opacity: .85;
}
.foot-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }

/* ────────────────────────────────────────────────────── cmd-k ── */
.cmdk-scrim {
  position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in oklab, var(--bg) 60%, rgba(0,0,0,.6));
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  animation: scrim-in .15s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.cmdk {
  width: min(560px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
}
.shell-brutalist .cmdk { border-radius: 0; }
.cmdk-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.cmdk-prompt { color: var(--accent); font-weight: 700; font-size: 13px; }
.cmdk-input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.cmdk-esc {
  font-size: 11px; color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmdk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.cmdk-row.is-sel { background: color-mix(in oklab, var(--accent) 14%, transparent); }
.cmdk-row.is-sel .cmdk-label { color: var(--text); }
.cmdk-kind {
  font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  min-width: 60px;
}
.cmdk-label { color: color-mix(in oklab, var(--text) 90%, var(--muted)); flex: 1; }
.cmdk-enter { color: var(--accent); font-size: 12px; }
.cmdk-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ──────────────────────────────────────────────────────── density ── */
.density-compact { font-size: 14px; }
.density-compact .hero-blurb { font-size: 15px; }
.density-compact .hero-name { font-size: clamp(46px, 6.5vw, 92px); }
.density-compact .now-card { padding: 12px 14px; }
.density-compact .proj { padding: 16px 16px 14px; }
.density-compact .exp-row { padding: 12px 0; }
.density-compact .term-body { min-height: 280px; padding: 14px 14px 18px; font-size: 12.5px; }

/* ──────────────────────────────────────────────────── direction tweaks ── */
.shell-brutalist {
  background:
    repeating-linear-gradient(0deg, transparent 0 64px, color-mix(in oklab, var(--accent) 6%, transparent) 64px 65px),
    var(--bg);
}
.shell-brutalist .topbar { border-bottom-width: 2px; }
.shell-brutalist .sect-rule { background: var(--text); height: 2px; }
.shell-brutalist .sect-num { color: var(--text); }
.shell-brutalist .status { border-radius: 0; }
.shell-brutalist .chip { border-width: 2px; }

.shell-console .hero-name { font-weight: 600; }
.shell-console .term { border-radius: 6px; }

/* ───────────────────────────────────────────────── responsive ── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 64px 0; }
  .about-grid, .oss-grid { grid-template-columns: 1fr; gap: 28px; }
  .proj-grid { grid-template-columns: 1fr; }
  .now-grid { grid-template-columns: 1fr; }
  .exp-row { grid-template-columns: 1fr; gap: 8px; }
  .topbar-l .path { display: none; }
}
