:root {
  --bg: #050b12;
  --bg-2: #08121c;
  --panel: rgba(12, 26, 36, 0.72);
  --line: rgba(52, 224, 234, 0.16);
  --text: #e2eef3;
  --dim: #7f9aa6;
  --purple: #34e0ea;
  --purple-d: #0891b2;
  --blue: #60a5fa;
  --cyan: #86efac;
  --white: #ffffff;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(8, 145, 178, 0.14), transparent 60%),
              radial-gradient(900px 600px at -10% 40%, rgba(56, 189, 248, 0.07), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
.dim { color: var(--dim); }
.blue { color: var(--cyan); }
::selection { background: var(--purple-d); color: var(--white); }

#rain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.55;
}
main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  font-family: var(--mono); font-size: 14px;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid rgba(52, 224, 234, 0.08);
  /* always tinted so the links stay readable over the bright hero art */
  background: rgba(5, 11, 18, 0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav.scrolled { background: rgba(5, 11, 18, 0.85); border-color: var(--line); }
.brand { color: var(--white); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.brand-drop { filter: hue-rotate(40deg) saturate(1.5); }
.caret { color: var(--purple); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: #b3c7d0; transition: color 0.2s; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.links a:hover, .links a.active { color: var(--white); }
.links a.active::before { content: "> "; color: var(--purple); }

.radio-btn {
  display: flex; align-items: center; gap: 8px;
  font: inherit; color: var(--text); cursor: pointer;
  background: rgba(8, 145, 178, 0.12); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; transition: 0.2s;
}
.radio-btn:hover { border-color: var(--purple); }
.radio-btn[aria-pressed="true"] { background: rgba(8, 145, 178, 0.3); border-color: var(--purple); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 30%; background: var(--purple); border-radius: 1px; }
.radio-btn[aria-pressed="true"] .eq i { animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s !important; background: var(--blue); }
.eq i:nth-child(3) { animation-delay: -0.6s !important; }
.eq i:nth-child(4) { animation-delay: -0.15s !important; background: var(--blue); }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

.radio-panel {
  position: fixed; top: 64px; right: clamp(16px, 4vw, 48px); z-index: 21;
  background: rgba(9, 18, 27, 0.95); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-family: var(--mono); font-size: 13px; min-width: 260px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.rp-title { color: var(--white); margin-bottom: 8px; }
.rp-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text); cursor: pointer; }
.rp-row input[type="checkbox"] { accent-color: var(--purple); }
.rp-row input[type="range"] { flex: 1; accent-color: var(--purple); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: clamp(640px, 100vh, 1000px); display: flex; align-items: center;
  padding: 110px clamp(16px, 6vw, 96px) 80px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: 70% center;
  transform: scale(1.04); animation: drift 30s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 11, 18, 0.95) 0%, rgba(5, 11, 18, 0.75) 38%, rgba(5, 11, 18, 0.1) 75%),
              linear-gradient(0deg, var(--bg) 0%, transparent 25%);
}
@keyframes drift { to { transform: scale(1.1) translateX(-1.5%); } }
.hero-inner { position: relative; max-width: 640px; }
.eyebrow { font-family: var(--mono); color: var(--purple); margin: 0 0 12px; font-size: 14px; }
h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.04; margin: 0 0 28px; letter-spacing: -0.02em; color: var(--white); }
.grad {
  background: linear-gradient(90deg, var(--purple), var(--blue) 60%, var(--white));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.term {
  background: rgba(7, 16, 24, 0.78); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(6px); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.term-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--dim);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2b4552; }
.term-bar i:nth-child(1) { background: #34e0ea; }
.term-bar i:nth-child(2) { background: #60a5fa; }
.term-bar i:nth-child(3) { background: #e2eef3; }
.term-bar span { margin-left: 10px; }
.term-body {
  margin: 0; padding: 16px 18px; font-family: var(--mono); font-size: 14px;
  white-space: pre-wrap; min-height: 150px; color: var(--text);
}
.term-body .p { color: var(--purple); }
.term-body .o { color: var(--dim); }
.caret-blink { color: var(--purple); animation: blink 1s steps(1) infinite; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  font-family: var(--mono); font-size: 14px; padding: 12px 20px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, 0.03); transition: 0.2s;
}
.btn:hover { border-color: var(--blue); color: var(--white); transform: translateY(-2px); }
.btn.primary { background: linear-gradient(90deg, var(--purple-d), #2563eb); border-color: transparent; color: var(--white); }
.btn.primary:hover { box-shadow: 0 10px 30px rgba(8, 145, 178, 0.4); }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--dim); font-size: 22px; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- sections ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 110px clamp(16px, 4vw, 40px) 40px; }
.h2 { font-family: var(--mono); font-size: clamp(24px, 3vw, 34px); color: var(--white); margin: 0 0 10px; font-weight: 700; }
.h2 .num { color: var(--purple); margin-right: 6px; }
.h3 { font-family: var(--mono); color: var(--white); font-size: 18px; margin: 64px 0 18px; }
.h3::before { content: "## "; color: var(--blue); }
.lede { color: var(--dim); max-width: 640px; margin: 0 0 36px; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: start; margin-top: 30px; }
.about-text p { margin: 0 0 16px; font-size: 17px; }
.about-text strong { color: var(--white); }
.rdc {
  position: relative; margin: 8px 0 28px; border-radius: 14px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.rdc img { width: 100%; height: auto; aspect-ratio: 1280 / 597; object-fit: cover; transition: transform 0.6s; }
.rdc:hover img { transform: scale(1.03); }
.rdc figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px;
  background: linear-gradient(0deg, rgba(5, 11, 18, 0.92), transparent);
  font-family: var(--mono); font-size: 12px; color: var(--white);
}
.rdc figcaption span {
  display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 6px;
  background: rgba(134, 239, 172, 0.15); border: 1px solid rgba(134, 239, 172, 0.5); color: #86efac; font-size: 11px;
}
.avatar-wrap { position: relative; width: min(260px, 70%); margin-top: 24px; }
.ingame {
  position: absolute; right: -18px; bottom: -18px; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 14px; text-decoration: none;
  background: rgba(7, 16, 24, 0.92); border: 1px solid rgba(134, 239, 172, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(134, 239, 172, 0.15);
  transition: border-color 0.2s, transform 0.2s;
}
.ingame:hover { border-color: #86efac; transform: translateY(-2px); }
.ingame img { width: 56px; height: 56px; border-radius: 10px; background: #07111a; }
.ingame span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: #86efac; }
.ingame strong { display: block; font-family: var(--mono); color: var(--white); font-size: 14px; }
.avatar { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 0 60px rgba(8, 145, 178, 0.25); }
.code { background: rgba(7, 16, 24, 0.85); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #cde3ea; }
.code .k { color: var(--purple); }
.code .s { color: #93c5fd; }
.code .t { color: #86efac; }
.code .c { color: #4f6b77; font-style: italic; }
/* grid children may shrink below their content (long code lines, videos) instead of widening the page */
.about > *, .skills > *, .ai-work > *, .features > *, .projects > *, .project > *, .showcase > *, .practices > *, .tools > * { min-width: 0; }

/* HUD corner brackets, echoing the in-game UI */
.hud { position: relative; }
.hud::before, .hud::after {
  content: ""; position: absolute; width: 14px; height: 14px; z-index: 3; pointer-events: none;
  border: 2px solid var(--purple); opacity: 0.55; transition: opacity 0.3s, width 0.3s, height 0.3s;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.hud:hover::before, .hud:hover::after { opacity: 1; width: 28px; height: 28px; }

/* hero stats */
.hero-lede { font-size: 18px; color: #cde3ea; max-width: 560px; margin: -10px 0 22px; }
.stats {
  display: grid; grid-template-columns: repeat(4, auto); width: max-content; max-width: 100%; margin: 0 0 6px;
  background: rgba(7, 16, 24, 0.72); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px);
}
.stats::before, .stats::after { border-radius: 0; }
.stat { padding: 10px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: var(--mono); font-size: 22px; color: var(--white); font-weight: 700; }
.stat span { font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* stack */
.stack { display: grid; gap: 14px; }
.stack-group { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; }
.stack-key { font-family: var(--mono); font-size: 13px; color: var(--purple); padding-top: 6px; }
.stack-items { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-family: var(--mono); font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8, 145, 178, 0.07); color: var(--text);
}

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.feature:hover { border-color: rgba(52, 224, 234, 0.45); box-shadow: 0 20px 60px rgba(8, 145, 178, 0.15); }
.feature.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr; }
.feature.lead ~ .feature.lead { grid-template-columns: 1fr 1.5fr; }
.feature.lead ~ .feature.lead .media { order: 2; }
.media { position: relative; background: #000; aspect-ratio: 16 / 10; }
.media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .badge {
  position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11px;
  padding: 4px 8px; border-radius: 6px; background: rgba(5, 11, 18, 0.8); color: var(--cyan); border: 1px solid var(--line);
}
.feature .info { padding: 20px 24px 24px; }
.feature.lead .info { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--purple); text-transform: lowercase; }
.kicker::before { content: "// "; }
.feature h3, .card h4 { margin: 6px 0 10px; color: var(--white); font-size: 21px; line-height: 1.2; }
.feature.lead h3 { font-size: 28px; }
.feature p, .card p { color: #b3c7d0; margin: 0 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--blue); background: rgba(96, 165, 250, 0.08); padding: 3px 8px; border-radius: 6px; }

/* cards */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: 0.3s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: rgba(96, 165, 250, 0.45); }
.card .thumb { aspect-ratio: 16 / 10; background: #07111a; overflow: hidden; cursor: zoom-in; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card .media-thumb { cursor: default; background: #000; }
.card .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 18px 20px 22px; }
.card h4 { font-size: 19px; }

/* projects */
.projects { display: grid; gap: 22px; }
.project { display: grid; grid-template-columns: 1.1fr 1fr; }
.project:not(.featured) { grid-template-columns: 0.8fr 1fr; max-width: 880px; }
.project .thumb-link, .project > .thumb { display: block; height: 100%; }
.project .body { display: flex; flex-direction: column; justify-content: center; padding: 24px 28px; }
.project .thumb { position: relative; aspect-ratio: auto; height: 100%; min-height: 240px; cursor: default; }
.project .thumb img { position: absolute; inset: 0; }
.thumb-link .thumb { cursor: pointer; }
.project.featured h4 { font-size: 26px; }
.p-badge {
  position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px);
  font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 8px;
  background: rgba(5, 11, 18, 0.85); color: var(--white); border: 1px solid var(--purple);
  box-shadow: 0 0 18px rgba(8, 145, 178, 0.35); backdrop-filter: blur(4px);
}
.p-badge::before { content: "● "; color: var(--cyan); }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 18px; }
.p-stats div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 145, 178, 0.06); }
.p-stats b { display: block; font-family: var(--mono); font-size: 20px; color: var(--white); }
.p-stats span { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.project h4 a { color: var(--white); }
.project h4 a:hover { color: var(--blue); }
.project .play { font-family: var(--mono); font-size: 13px; }
.project .play:hover { color: var(--white); }

/* earlier work */
.earlier { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.old {
  display: flex; flex-direction: column; padding: 16px 18px; border-radius: 12px;
  background: rgba(7, 16, 24, 0.7); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s;
}
.old:hover { border-color: rgba(52, 224, 234, 0.4); transform: translateY(-2px); }
.old-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.old h4 { margin: 0; color: var(--white); font-size: 16px; }
.old-year { font-family: var(--mono); font-size: 12px; color: var(--purple); }
.old-role { font-family: var(--mono); font-size: 11px; color: #86efac; margin-top: 2px; }
.old p { margin: 8px 0 12px; color: #b3c7d0; font-size: 14px; line-height: 1.5; }
.old-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; }
.old-stat { color: var(--white); padding: 3px 8px; border-radius: 6px; background: rgba(8, 145, 178, 0.12); }
.old-foot a:hover { color: var(--white); }

/* skills timeline */
.skillmap {
  padding: 18px 22px 20px; margin-bottom: 26px;
  background: rgba(7, 16, 24, 0.7); border: 1px solid var(--line); border-radius: var(--radius);
}
.sm-head, .sm-row { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 16px; }
.sm-axis { position: relative; height: 26px; }
.sm-axis span {
  position: absolute; top: 4px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.sm-row {
  padding: 7px 0; border-top: 1px solid rgba(52, 224, 234, 0.07); cursor: pointer; border-radius: 8px;
  transition: background 0.2s;
}
.sm-row:hover, .sm-row:focus-visible { background: rgba(8, 145, 178, 0.08); }
.sm-label { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--text); }
.sm-label svg { width: 18px; height: 18px; flex: none; color: var(--purple); }
.sm-track {
  position: relative; height: 22px;
  background-image: repeating-linear-gradient(90deg, rgba(52, 224, 234, 0.07) 0 1px, transparent 1px calc(100% / 9));
}
.sm-bar {
  position: absolute; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 4px;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.35), var(--purple));
  box-shadow: 0 0 12px rgba(52, 224, 234, 0.35);
  transform-origin: left center;
}
.js .skillmap:not(.in) .sm-bar { transform: translateY(-50%) scaleX(0); }
.js .skillmap .sm-bar { transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sm-row:nth-of-type(2) .sm-bar { transition-delay: 0.05s; }
.sm-row:nth-of-type(3) .sm-bar { transition-delay: 0.1s; }
.sm-row:nth-of-type(4) .sm-bar { transition-delay: 0.15s; }
.sm-row:nth-of-type(5) .sm-bar { transition-delay: 0.2s; }
.sm-row:nth-of-type(6) .sm-bar { transition-delay: 0.25s; }
.sm-row:nth-of-type(7) .sm-bar { transition-delay: 0.3s; }
.sm-row:nth-of-type(8) .sm-bar { transition-delay: 0.35s; }
.sm-row:nth-of-type(9) .sm-bar { transition-delay: 0.4s; }
.sm-row:nth-of-type(10) .sm-bar { transition-delay: 0.45s; }
.sm-dot {
  position: absolute; top: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--bg); border: 2px solid var(--purple); z-index: 1; transition: transform 0.2s;
}
.sm-dot:hover { transform: translate(-50%, -50%) scale(1.4); z-index: 4; }
.sm-dot::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  background: rgba(5, 11, 18, 0.96); border: 1px solid var(--purple); color: var(--white);
  font-family: var(--mono); font-size: 12px; opacity: 0; transition: opacity 0.15s;
}
.sm-dot:hover::after { opacity: 1; }
.sm-dot:hover { box-shadow: 0 0 0 4px rgba(52, 224, 234, 0.15); }

/* skill cards */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill {
  display: flex; flex-direction: column; padding: 20px 22px 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.skill:hover { border-color: rgba(52, 224, 234, 0.4); }
.skill.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 30% { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(52, 224, 234, 0.25), 0 0 40px rgba(8, 145, 178, 0.35); } }
.skill header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.s-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: rgba(8, 145, 178, 0.12); border: 1px solid rgba(52, 224, 234, 0.3); color: var(--purple);
}
.s-icon svg { width: 22px; height: 22px; }
.skill h4 { margin: 0; color: var(--white); font-size: 18px; line-height: 1.2; }
.s-since { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.s-blurb { margin: 0 0 14px; color: #b3c7d0; font-size: 15px; }
.s-items { list-style: none; margin: 0 0 16px; padding: 0 0 0 12px; display: grid; gap: 7px; border-left: 1px solid var(--line); }
.s-items li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 14px; color: var(--text); line-height: 1.4; }
.s-items li::before {
  content: ""; position: absolute; left: -16px; top: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--purple);
}
.s-when { font-family: var(--mono); font-size: 12px; color: var(--purple); padding-top: 1px; }
.s-learnt {
  margin: auto 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; color: #cde3ea;
  background: rgba(134, 239, 172, 0.05); border: 1px solid rgba(134, 239, 172, 0.2);
}
.s-learnt span { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 11px; color: #86efac; }

/* building with AI */
.ai-work { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ai-intro { margin: 0 0 20px; font-size: 17px; color: #cde3ea; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.pipeline::before {
  content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; opacity: 0.6;
  background: repeating-linear-gradient(to bottom, #86efac 0 6px, transparent 6px 12px);
  animation: flow 0.9s linear infinite;
}
.pipeline li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.ps-num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; z-index: 1;
  background: var(--bg); border: 2px solid #86efac; color: #86efac; font-family: var(--mono); font-size: 14px; font-weight: 700;
}
.pipeline h4 { margin: 6px 0 4px; color: var(--white); font-size: 17px; }
.pipeline p { margin: 0; color: #b3c7d0; font-size: 15px; }
.ai-right { background: rgba(7, 16, 24, 0.85); }
.ai-feats { list-style: none; margin: 0; padding: 14px 18px 6px; display: grid; gap: 7px; font-family: var(--mono); font-size: 13px; }
.ai-feats li { display: grid; grid-template-columns: 38px 34px 1fr; gap: 8px; color: var(--white); }
.af-hash { color: #86efac; }
.af-when { color: var(--dim); }
.ai-stat { padding: 10px 18px 16px; font-family: var(--mono); font-size: 12px; color: var(--purple); border-top: 1px solid var(--line); margin-top: 8px; }

/* architecture */
.arch {
  display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr; grid-template-rows: auto 70px auto;
  padding: 26px; margin-bottom: 14px; background: rgba(7, 16, 24, 0.7); border: 1px solid var(--line); border-radius: var(--radius);
}
.node {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(52, 224, 234, 0.3); background: rgba(8, 145, 178, 0.07);
}
.node-tag { font-family: var(--mono); font-size: 11px; color: var(--purple); }
.node b { color: var(--white); font-size: 17px; }
.node small { color: var(--dim); font-size: 13px; line-height: 1.4; }
.node-note { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.arch-game { grid-column: 1 / -1; grid-row: 1; }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.place { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 8px; background: rgba(5, 11, 18, 0.8); border: 1px solid var(--line); color: var(--white); }
.arch-api { grid-column: 1; grid-row: 3; }
.arch-db { grid-column: 3; grid-row: 3; }
.arch-bot { grid-column: 5; grid-row: 3; }
.arch-discord { grid-column: 7; grid-row: 3; }
.arch-link { display: flex; align-items: center; justify-content: center; font-family: var(--mono); color: var(--purple); }
.arch-link.h { grid-row: 3; font-size: 20px; }
.hl1 { grid-column: 2; } .hl2 { grid-column: 4; } .hl3 { grid-column: 6; }
.arch-link.v { grid-row: 2; position: relative; }
.l1 { grid-column: 1; } .l2 { grid-column: 5; }
.arch-link.v::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; opacity: 0.7;
  background: repeating-linear-gradient(to bottom, var(--purple) 0 6px, transparent 6px 12px);
  animation: flow 0.9s linear infinite;
}
@keyframes flow { to { background-position: 0 12px; } }
.arch-link.v span {
  position: relative; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  background: rgba(7, 16, 24, 0.95); color: var(--dim); font-size: 11px;
}
.arch-caption { color: var(--dim); font-size: 15px; max-width: 760px; margin: 0 0 40px; }

/* practices */
.practices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.practice { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.p-num { font-family: var(--mono); color: var(--purple); font-size: 13px; }
.practice h4 { color: var(--white); margin: 6px 0 8px; font-size: 18px; }
.practice p { margin: 0; color: #b3c7d0; font-size: 15px; }

/* git log */
.gitlog { max-width: 860px; }
.log { list-style: none; margin: 0; padding: 16px 18px 20px; display: grid; gap: 9px; font-family: var(--mono); font-size: 14px; }
.log li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.l-hash { color: #86efac; }
.l-ref { color: var(--purple); font-weight: 700; }
.l-when { color: var(--dim); min-width: 72px; }
.l-msg { color: var(--white); }

/* tools */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tool {
  background: rgba(7, 16, 24, 0.8); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; font-family: var(--mono); transition: 0.3s; position: relative;
}
.tool:hover { border-color: var(--purple); }
.tool .cmd { color: var(--dim); font-size: 13px; }
.tool .cmd b { color: var(--purple); font-weight: 500; }
.tool h4 { font-family: var(--mono); color: var(--white); margin: 8px 0 2px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tool h4 img { width: 26px; height: 26px; }
.tool .lang { color: var(--cyan); font-size: 12px; margin-bottom: 12px; }
.t-note { font-size: 11px; font-weight: 400; color: #86efac; border: 1px solid rgba(134, 239, 172, 0.4); border-radius: 6px; padding: 1px 6px; }
.tool p { font-family: var(--sans); color: #b3c7d0; margin: 0; font-size: 15px; }

/* contact */
.contact .term.big { max-width: 720px; }
.contacts { list-style: none; margin: 0; padding: 4px 18px 22px; display: grid; gap: 8px; }
.contacts a {
  display: grid; grid-template-columns: 22px 92px 1fr; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02); color: var(--text); font-family: var(--mono); font-size: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.contacts a:hover { border-color: var(--purple); background: rgba(8, 145, 178, 0.12); transform: translateX(4px); }
.c-icon { width: 20px; height: 20px; color: var(--purple); }
.c-label { color: var(--dim); }
.c-val { color: var(--white); overflow-wrap: anywhere; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  max-width: 1200px; margin: 80px auto 0; padding: 28px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--line); position: relative; font-family: var(--mono); font-size: 13px;
}

/* goose */
.goose {
  position: absolute; right: clamp(16px, 4vw, 40px); top: -38px; width: 40px; height: 40px;
  padding: 0; border: 0; background: none; cursor: pointer; animation: waddle 26s ease-in-out infinite;
}
.goose svg { width: 100%; height: 100%; animation: bob 0.45s ease-in-out infinite alternate; overflow: visible; }
.g-body { fill: #e2eef3; }
.g-beak { fill: #fb923c; }
.g-eye { fill: #050b12; }
.g-leg { stroke: #fb923c; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.goose.hop svg { animation: hop 0.45s ease-out; }
@keyframes bob { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-1px); } }
@keyframes hop { 40% { transform: translateY(-14px) rotate(-8deg); } }
/* easter egg: ten clicks and the goose gets big */
.goose.mega { z-index: 30; animation-play-state: paused; }
.goose.mega svg { transform-origin: 50% 100%; animation: mega 2s cubic-bezier(0.3, 1.4, 0.5, 1); }
@keyframes mega {
  0% { transform: scale(1); }
  18% { transform: scale(6.4); }
  24%, 30%, 36%, 42%, 48%, 54% { transform: scale(6) rotate(-3deg); }
  27%, 33%, 39%, 45%, 51%, 57% { transform: scale(6) rotate(3deg); }
  80% { transform: scale(6); }
  100% { transform: scale(1); }
}
/* the page shakes while it honks (not on body, so the fixed nav keeps its place) */
.quake main, .quake .footer, .quake .nav { animation: quake 1.1s linear 0.25s; }
@keyframes quake {
  0%, 100% { transform: none; }
  10% { transform: translate(-6px, 3px) rotate(-0.3deg); }
  20% { transform: translate(5px, -4px) rotate(0.3deg); }
  30% { transform: translate(-5px, -2px); }
  40% { transform: translate(6px, 3px) rotate(0.2deg); }
  50% { transform: translate(-4px, 4px) rotate(-0.2deg); }
  60% { transform: translate(4px, -3px); }
  70% { transform: translate(-3px, 2px); }
  80% { transform: translate(2px, -2px); }
  90% { transform: translate(-1px, 1px); }
}
@keyframes waddle {
  0% { transform: translateX(0) scaleX(-1); }
  44% { transform: translateX(-55vw) scaleX(-1); }
  50% { transform: translateX(-55vw) scaleX(1); }
  94% { transform: translateX(0) scaleX(1); }
  100% { transform: translateX(0) scaleX(-1); }
}

.term-wrap { position: relative; margin-top: 34px; }
.gosling { width: 32px; height: 32px; top: -31px; right: auto; left: 78%; animation: waddle-term 21s ease-in-out -7s infinite; }
@keyframes waddle-term {
  0% { left: 78%; transform: scaleX(-1); }
  44% { left: 4%; transform: scaleX(-1); }
  50% { left: 4%; transform: scaleX(1); }
  94% { left: 78%; transform: scaleX(1); }
  100% { left: 78%; transform: scaleX(-1); }
}

/* accessibility */
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px;
  background: var(--purple); color: #050b12; font-family: var(--mono);
}
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 6px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(3, 8, 14, 0.94);
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 90vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 10px; margin: 0 auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox figcaption { font-family: var(--mono); color: var(--dim); margin-top: 12px; font-size: 13px; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--white);
  width: 46px; height: 46px; border-radius: 50%; font-size: 26px; cursor: pointer; line-height: 1;
}
.lightbox button:hover { border-color: var(--purple); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* responsive */
@media (max-width: 900px) {
  .about, .features, .feature.lead, .feature.lead ~ .feature.lead, .project, .project:not(.featured) { grid-template-columns: 1fr; }
  .feature.lead ~ .feature.lead .media { order: 0; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .project .thumb { aspect-ratio: 16 / 9; min-height: 0; }
  .showcase, .practices { grid-template-columns: 1fr 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
  .ai-work { grid-template-columns: 1fr; }
  .sm-head, .sm-row { grid-template-columns: 1fr; gap: 4px; }
  .sm-head > span:first-child { display: none; }
  .sm-axis span:nth-child(even) { display: none; }
    .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stack-group { grid-template-columns: 1fr; gap: 6px; }
  .arch { display: flex; flex-direction: column; gap: 8px; }
  .arch-game { order: 1; } .l1 { order: 2; } .arch-api { order: 3; } .hl1 { order: 4; } .arch-db { order: 5; }
  .hl2 { order: 6; } .arch-bot { order: 7; } .hl3 { order: 8; } .arch-discord { order: 9; } .l2 { order: 10; }
  .arch-link.v { height: 44px; }
  .arch-link.h { transform: rotate(90deg); height: 28px; }
  .links {
    position: fixed; top: 58px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(5, 11, 18, 0.97); border-bottom: 1px solid var(--line); display: none;
  }
  .links.open { display: flex; }
  .links a { padding: 14px 24px; }
  .menu-btn { display: block; }
  .radio-btn { margin-left: auto; }
  .radio-label { display: none; }
  .contacts a { grid-template-columns: 22px 1fr; }
  .c-label { display: none; }
}
@media (max-width: 600px) {
  .showcase, .practices { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .skillmap { padding: 14px; }
  .hero-lede { font-size: 16px; }
  .stat b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  #rain { display: none; }
}
