/* Layout. Palettes live in tokens.css. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

:root {
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(96px, 12vw, 160px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body, .top, .card, .feature, dialog {
  transition: background-color 240ms linear, color 240ms linear, border-color 240ms linear;
}

::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

a { color: inherit; }
[hidden] { display: none !important; }
strong { font-weight: 600; }
.mono { font-family: var(--mono); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- backdrop ---------- */

#aurora {
  position: fixed;
  inset: -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px) saturate(1.15);
  opacity: var(--aurora-opacity);
  transition: opacity 200ms linear;
}
#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--rain-opacity);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  transition: opacity 600ms linear;
}
#rain.idle { opacity: 0; }
[data-page="404"] { --rain-opacity: 0.32; --aurora-opacity: 0.35; }
[data-page="404"] #rain { -webkit-mask-image: none; mask-image: none; }
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
[data-theme="rose-pine"] .grain, [data-theme="catppuccin-latte"] .grain, [data-theme="flexoki-light"] .grain, [data-theme="lupine"] .grain, [data-theme="white"] .grain { opacity: 0.08; mix-blend-mode: multiply; }

/* ---------- skip ---------- */

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 12px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
}
.skip:focus { top: 16px; }

/* ---------- top nav ---------- */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.top .wrap { width: 100%; display: flex; align-items: center; gap: 24px; }

.mark {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mark i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  font-size: 14px;
  color: var(--dim);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  position: relative;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }

.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  font: inherit;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 160ms, color 160ms, background-color 160ms;
}
.icon-btn:hover { color: var(--fg); border-color: var(--dim); }
.icon-btn .swatch {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.icon-btn kbd {
  font: inherit;
  font-size: 10px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
}

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

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px 0 80px;
}
.hero .wrap { width: 100%; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}
.eyebrow .live { color: var(--green); display: inline-flex; align-items: center; gap: 7px; }
.eyebrow .live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  60% { box-shadow: 0 0 0 6px transparent; }
}

h1 {
  font-family: var(--sans);
  font-size: clamp(60px, 11.5vw, 176px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-top: 28px;
  text-wrap: balance;
}
h1 .accent {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.06em;
}
h1 .cursor {
  display: inline-block;
  width: 0.09em;
  height: 0.78em;
  background: var(--accent);
  margin-left: 0.06em;
  vertical-align: -0.04em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tagline {
  margin-top: 36px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--fg);
  text-wrap: pretty;
}
.tagline em { font-style: normal; color: var(--dim); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 22px;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 200ms var(--ease), border-color 160ms, background-color 160ms, color 160ms;
}
.btn:hover { border-color: var(--dim); transform: translateY(-1px); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn .arrow { transition: transform 200ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.hero-foot {
  position: absolute;
  left: 0; right: 0; bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.hero-foot kbd {
  font: inherit;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i {
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent), transparent);
  display: block;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- glance strip ---------- */

.glance {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.glance .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.glance div {
  padding: 22px 24px 22px 0;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.glance div:first-child { border-left: 0; padding-left: 0; }
.glance dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.glance dd { font-size: 15px; color: var(--fg); }
.glance dd em { font-style: normal; color: var(--dim); }

/* ---------- sections ---------- */

.section {
  position: relative;
  z-index: 1;
  padding: var(--section) 0 0;
  scroll-margin-top: 40px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.kicker span { color: var(--dim); margin-right: 10px; }
h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.section-head p {
  color: var(--dim);
  font-size: 16px;
  max-width: 40ch;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- work ---------- */

.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter button {
  font: inherit;
  font-size: 13px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 160ms;
}
.filter button:hover { color: var(--fg); border-color: var(--dim); }
.filter button.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 85%, transparent);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg) 8%, transparent);
}
.feature h3 {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 14px 0 12px;
}
.feature .lead { font-size: 18px; color: var(--dim); line-height: 1.55; max-width: 44ch; }
.feature .desc { margin-top: 20px; font-size: 16px; line-height: 1.65; max-width: 52ch; }

.meta {
  font-family: var(--mono);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--dim);
  font-size: 12px;
}
.meta .type { color: var(--accent); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.shipping, .status.live { color: var(--green); }
.status.shipping::before { animation: pulse 2.4s ease-in-out infinite; }
.status.building { color: var(--yellow); }
.status.paused { color: var(--dim); }

.stack {
  font-family: var(--mono);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--dim);
  font-size: 12px;
  margin-top: 22px;
}
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.links a {
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color 160ms, background-color 160ms;
}
.links a:hover { border-color: var(--dim); background: color-mix(in srgb, var(--fg) 5%, transparent); }

/* audit log visual */
.audit {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.audit .hd {
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--dim);
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.audit .hd b { color: var(--fg); font-weight: 500; }
.audit .ln {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  padding: 5px 0;
  color: var(--fg);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.in .audit .ln { opacity: 1; transform: none; }
.in .audit .ln:nth-child(2) { transition-delay: 300ms; }
.in .audit .ln:nth-child(3) { transition-delay: 500ms; }
.in .audit .ln:nth-child(4) { transition-delay: 700ms; }
.in .audit .ln:nth-child(5) { transition-delay: 900ms; }
.in .audit .ln:nth-child(6) { transition-delay: 1100ms; }
.in .audit .ln:nth-child(7) { transition-delay: 1300ms; }
.audit .t { color: var(--dim); }
.audit .ok { color: var(--green); }
.audit .wait { color: var(--yellow); }
.audit .hash { color: var(--accent); }

.case { margin-top: 24px; }
.case summary {
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.case summary::-webkit-details-marker { display: none; }
.case summary::after { content: "↓"; transition: transform 200ms; }
.case[open] summary::after { transform: rotate(180deg); }
.case-body {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
.case-body h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.case-body p { font-size: 14.5px; line-height: 1.6; color: var(--fg); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  text-decoration: none;
  color: inherit;
  transition: transform 260ms var(--ease), border-color 200ms, background-color 200ms, box-shadow 260ms var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface);
  box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--accent) 35%, transparent);
}
.card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 16px 0 6px; }
.card .tag { color: var(--dim); font-size: 14px; margin-bottom: 12px; }
.card .desc { font-size: 15px; line-height: 1.6; }
.card .stack { margin-top: auto; padding-top: 22px; }
.card .links { margin-top: 16px; }
.card .links a { font-size: 13px; padding: 7px 12px; }
.card.more { display: none; }
.grid.expanded .card.more { display: flex; }
.card[hidden] { display: none !important; }
.more-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- now ---------- */

.now-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.now h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.now p, .now li { font-size: 16px; line-height: 1.65; }
.now ul { list-style: none; }
.now li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.now li::before { content: "—"; position: absolute; left: 0; color: var(--dim); }
.stamp { font-family: var(--mono); font-size: 12px; color: var(--dim); }

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

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.portrait {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--line);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.85) contrast(1.05);
  transition: filter 600ms var(--ease), transform 900ms var(--ease);
}
.portrait:hover img { filter: none; transform: scale(1.03); }
.portrait .cap {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; justify-content: space-between;
}
.prose p { font-size: 18px; line-height: 1.7; max-width: 60ch; margin-bottom: 20px; color: var(--fg); }
.prose p:first-child { font-size: 22px; line-height: 1.5; letter-spacing: -0.01em; }
.prose p:last-child { margin-bottom: 0; }
.prose .hl { color: var(--accent); }

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

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.row .when { font-family: var(--mono); font-size: 13px; color: var(--dim); padding-top: 4px; }
.row .when.current { color: var(--accent); }
.row h4 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.row .org { font-size: 15px; color: var(--dim); margin: 4px 0 12px; }
.row .org a { color: var(--dim); text-decoration: none; }
.row .org a:hover { color: var(--fg); }
.row p { font-size: 16px; line-height: 1.65; max-width: 62ch; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.creds span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

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

.contact { text-align: center; padding-bottom: var(--section); }
.contact h2 {
  font-size: clamp(56px, 10vw, 140px);
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.contact h2 span { color: var(--accent); }
.contact .blurb { margin: 28px auto 36px; color: var(--dim); font-size: 18px; max-width: 46ch; }
.contact .cta { justify-content: center; margin-top: 0; }
.contact .btn.primary { font-size: 16px; padding: 16px 26px; }
.contact .links { justify-content: center; margin-top: 22px; }

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

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 40px; padding: 22px 0 4px; width: 100%; }
.foot .tiers h4 { color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.foot .tiers ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot .tiers a[aria-current="page"] { color: var(--fg); }
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 40px; }
.repos h4 { color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; font-family: var(--mono); }
.repos ul { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.repos li { display: flex; justify-content: space-between; gap: 10px; }
.repos li a { color: var(--fg); text-decoration: none; }
.repos li a:hover { color: var(--accent); }
.repo-tag { font-family: var(--mono); color: var(--dim); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0; }

/* ---------- dialogs ---------- */

dialog {
  font-family: var(--sans);
  color: var(--fg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  width: min(620px, calc(100vw - 32px));
  margin: 12vh auto 0;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
dialog::backdrop {
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
dialog[open] { animation: pop 180ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.985); } }

.dlg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.dlg-head b { color: var(--fg); font-weight: 500; }
.dlg-close { font: inherit; background: transparent; border: 0; color: var(--dim); cursor: pointer; }
.dlg-close:hover { color: var(--fg); }
.dlg-foot {
  display: flex; gap: 16px; padding: 10px 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  border-top: 1px solid var(--line);
}
.dlg-foot kbd { font: inherit; color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }

.launcher .row-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.launcher .prompt { color: var(--accent); font-family: var(--mono); font-size: 16px; }
.launcher input {
  flex: 1; font: inherit; font-size: 17px;
  background: transparent; border: 0; outline: none;
  color: var(--fg); caret-color: var(--accent);
}
.launcher ul { list-style: none; max-height: 340px; overflow: auto; padding: 8px; }
.launcher li {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; cursor: pointer;
}
.launcher li .kind {
  font-family: var(--mono);
  color: var(--dim); font-size: 10px; min-width: 56px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.launcher li .lbl { flex: 1; }
.launcher li .lbl mark { background: transparent; color: var(--accent); }
.launcher li .dotsw { width: 10px; height: 10px; border-radius: 50%; }
.launcher li .hint-k { font-family: var(--mono); color: var(--dim); font-size: 11px; }
.launcher li.sel { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.launcher li.sel .kind { color: var(--accent); }
.launcher .empty { padding: 18px; color: var(--dim); font-size: 14px; }
.launcher .out {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 13px; line-height: 1.7;
  max-height: 220px; overflow: auto;
}
.launcher .out[hidden] { display: none; }
.launcher .out .c { color: var(--accent); }
.launcher .out .d { color: var(--dim); }
.launcher .out .e { color: var(--red); }

.keys .grid-k {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 12px 20px; padding: 18px 22px;
  font-size: 14px; align-items: center;
}
.keys .grid-k kbd { font-family: var(--mono); font-size: 12px; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; background: var(--surface-2); }
.keys .grid-k span { color: var(--dim); }
.keys .grid-k .sec { grid-column: 1 / -1; font-family: var(--mono); color: var(--accent); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px; }

.picker ul { list-style: none; padding: 8px; max-height: 68vh; overflow: auto; }
.picker li button {
  width: 100%; display: flex; align-items: center; gap: 14px;
  font: inherit; font-size: 15px; color: var(--fg);
  background: transparent; border: 0; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; text-align: left;
}
.picker li button:hover, .picker li button.sel { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.picker .dotsw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); flex-shrink: 0; }
.picker .note { margin-left: auto; font-family: var(--mono); color: var(--dim); font-size: 12px; }
.picker li button.sel .note::after { content: "  ●"; color: var(--accent); }

.osd {
  position: fixed;
  top: 84px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.osd[hidden] { display: none; }

/* ---------- 404 ---------- */

.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 0 80px; position: relative; z-index: 1; }
.lost h1 { font-size: clamp(96px, 20vw, 260px); margin-top: 0; }
.lost .tagline { margin: 24px auto 0; }
.lost .cta { justify-content: center; }
[data-theme="matrix"] h1 .accent,
[data-theme="hackerman"] h1 .accent,
[data-theme="matrix"] .contact h2 span { text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- subpages (now, lab, audit, omarchy, uses, play, keys, guestbook, status, writing, work) ---------- */

.page-hero { position: relative; z-index: 1; padding: 150px 0 24px; }
.page-hero h1 { font-size: clamp(44px, 7vw, 104px); margin-top: 20px; line-height: 0.95; }
.page-hero .tagline { margin-top: 22px; font-size: clamp(17px, 1.6vw, 21px); max-width: 52ch; }
.page-hero .eyebrow a { color: inherit; text-decoration: none; }
.page-hero .eyebrow a:hover { color: var(--fg); }
.section.tight { padding-top: clamp(56px, 7vw, 96px); }
.section.tight .section-head { margin-bottom: 32px; }
.page-end { padding-bottom: var(--section); }
.hero-note { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.hero-note a { color: var(--accent); text-decoration: none; }
.hero-note a:hover { text-decoration: underline; }
.note-line { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.note-line a { color: var(--dim); }

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: clamp(20px, 3vw, 32px);
}
.panel h3, .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.panel p { font-size: 15px; line-height: 1.6; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.chip, .chips a, .chips button {
  font: inherit;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 160ms, color 160ms, background-color 160ms;
}
.chip:hover, .chips a:hover, .chips button:hover { color: var(--fg); border-color: var(--dim); }
.chip[aria-pressed="true"], .chips [aria-pressed="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.contact .chips { justify-content: center; margin-top: 18px; }
.ph { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); border: 1px solid color-mix(in srgb, var(--yellow) 40%, transparent); border-radius: 4px; padding: 1px 6px; vertical-align: middle; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { border-top: 1px solid var(--line); padding-top: 16px; }
.stat dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.stat dd { font-size: 20px; letter-spacing: -0.01em; line-height: 1.3; text-wrap: pretty; }
.stat dd small { display: block; color: var(--dim); font-size: 13px; margin-top: 6px; font-family: var(--mono); }
.stat dd a { color: inherit; text-decoration: none; }
.stat dd a:hover { color: var(--accent); }

/* interactive audit log */
.audit.live { box-shadow: none; }
.audit .ln.bad, .audit .bad { color: var(--red); }
.audit .ln.warn, .audit .warn { color: var(--yellow); }
.audit .ln .bad { color: var(--red); }
.audit .ln .warn { color: var(--yellow); }
.audit.live .ln { opacity: 1; transform: none; }
.audit.live .ln.new { animation: row-in 420ms var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateX(-6px); } }
.audit .empty { color: var(--dim); padding: 10px 0; }
.audit .ft { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.audit .ft button { font: inherit; color: var(--dim); background: transparent; border: 0; cursor: pointer; padding: 0; }
.audit .ft button:hover { color: var(--fg); }

/* simulator form */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span, .field > label:first-child { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.field input[type="text"], .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none; width: 100%;
  transition: border-color 160ms;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.toggles { display: grid; gap: 10px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.45; }
.toggle input { accent-color: var(--accent); margin-top: 4px; width: 15px; height: 15px; flex-shrink: 0; }
.toggle small { display: block; color: var(--dim); font-size: 12.5px; }
.sim-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.verdict { margin-top: 16px; font-size: 14.5px; color: var(--dim); line-height: 1.55; min-height: 2.2em; }
.verdict b { color: var(--fg); font-weight: 500; }
.verdict .tone-ok { color: var(--green); } .verdict .tone-wait { color: var(--yellow); } .verdict .tone-bad { color: var(--red); } .verdict .tone-warn { color: var(--yellow); }

/* palette mixer */
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 16px 0; }
.swatches div { border-radius: 10px; aspect-ratio: 1.6; border: 1px solid var(--line); position: relative; }
.swatches div span { position: absolute; left: 8px; bottom: 6px; font-family: var(--mono); font-size: 10px; color: var(--dim); mix-blend-mode: difference; color: #fff; }
.mixer-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
pre.code {
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; overflow: auto; max-height: 300px; margin-top: 14px; white-space: pre;
}

/* pipeline (audit path) */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: stage; margin-top: 8px; }
.stage {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: border-color 300ms, background-color 300ms, opacity 300ms;
}
.stage::before { content: counter(stage, decimal-leading-zero); counter-increment: stage; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.stage h4 { font-size: 15px; font-weight: 600; margin: 8px 0 6px; letter-spacing: -0.01em; }
.stage p { font-size: 13px; color: var(--dim); line-height: 1.5; min-height: 3.2em; }
.stage .st { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; color: var(--dim); }
.stage .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stage.pass .st { color: var(--green); }
.stage.human .st { color: var(--yellow); }
.stage.human { border-color: color-mix(in srgb, var(--yellow) 45%, var(--line)); }
.stage.block .st { color: var(--red); }
.stage.block { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.stage.warn .st { color: var(--yellow); }
.stage.warn { border-color: color-mix(in srgb, var(--yellow) 50%, var(--line)); }
.stage.skip { opacity: 0.5; }
.stage.skip .st::before { background: transparent; border: 1px solid currentColor; }
.stage.unreached { opacity: 0.35; }
.stage.pass.pulse { animation: stage-pulse 700ms var(--ease); }
@keyframes stage-pulse { 30% { border-color: var(--accent); } }
.pipeline-note { margin-top: 24px; font-size: 16px; line-height: 1.65; max-width: 64ch; }
.pipeline-note em { font-style: normal; color: var(--dim); }

/* wallpapers */
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.wall { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 420 / 910; border: 1px solid var(--line); background: var(--surface); }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--ease); }
.wall:hover img { transform: scale(1.04); }
.wall .cap {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: #fff;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 8px; padding: 6px 8px;
}
.wall .cap a, .wall .cap button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; text-decoration: none; opacity: 0.8; padding: 0; }
.wall .cap a:hover, .wall .cap button:hover { opacity: 1; }
.wall.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.rice-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.rice-grid img { width: 100%; border-radius: 16px; border: 1px solid var(--line); display: block; }
.rice-grid ul { list-style: none; display: grid; gap: 10px; font-size: 15.5px; line-height: 1.6; }
.rice-grid li { padding-left: 18px; position: relative; }
.rice-grid li::before { content: "—"; position: absolute; left: 0; color: var(--dim); }
.kb-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 40px; }
.kb h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.kb dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; align-items: center; }
.kb dt kbd, .keys-table kbd, .kbd { font-family: var(--mono); font-size: 12px; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; background: var(--surface-2); white-space: nowrap; }
.kb dd { color: var(--dim); }

/* uses */
.uses-list { display: grid; }
.uses-item { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.uses-item h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.uses-item h4 a { color: inherit; text-decoration: none; }
.uses-item h4 a:hover { color: var(--accent); }
.uses-item p { color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.book img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: block; }
.book h4 { font-size: 14px; font-weight: 600; margin-top: 12px; line-height: 1.35; }
.book .by { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.book p { font-size: 12.5px; color: var(--dim); margin-top: 6px; line-height: 1.5; }

/* focus timer */
.timer { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ring { position: relative; width: min(360px, 78vw); aspect-ratio: 1; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: var(--line); }
.ring .prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 950ms linear, stroke 300ms; }
.ring.break .prog { stroke: var(--green); }
.ring .time { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .time b { font-family: var(--mono); font-size: clamp(52px, 8vw, 76px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.ring .time span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.timer.running .ring .time span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
.timer-side h2 { font-size: clamp(28px, 3vw, 40px); }
.timer-side .cta { margin-top: 24px; }
.timer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-top: 32px; }
.timer-stats .stat dd { font-size: 18px; }
.timer-keys { margin-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* keys page */
.keys-table { display: grid; grid-template-columns: max-content 1fr; gap: 14px 28px; align-items: center; font-size: 15px; }
.keys-table span { color: var(--dim); }
.keys-table .sec { grid-column: 1 / -1; font-family: var(--mono); color: var(--accent); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 14px; }
.keys-table .sec:first-child { margin-top: 0; }
details.eggs { margin-top: 12px; }
details.eggs summary { cursor: pointer; list-style: none; color: var(--accent); font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
details.eggs summary::-webkit-details-marker { display: none; }
details.eggs summary::after { content: "↓"; transition: transform 200ms; }
details.eggs[open] summary::after { transform: rotate(180deg); }
details.eggs .keys-table { margin-top: 18px; }

/* guestbook */
.gb-form { display: grid; gap: 4px; max-width: 560px; }
.gb-form .count { font-family: var(--mono); font-size: 12px; color: var(--dim); text-align: right; }
.gb-form .row2 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gb-form .btn { font-size: 14px; padding: 11px 18px; }
.gb-form .honey { position: absolute; left: -9999px; }
.notice { border-left: 2px solid var(--yellow); padding: 8px 14px; color: var(--dim); font-size: 14px; line-height: 1.55; }
.notice.ok { border-color: var(--green); }
.gb-list { display: grid; margin-top: 8px; }
.gb-entry { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.gb-entry img { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: block; }
.gb-entry .who { font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.gb-entry .who b { color: var(--fg); font-weight: 500; }
.gb-entry p { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.gb-entry.pending { opacity: 0.75; }

/* status */
.svc { display: grid; grid-template-columns: 1fr auto auto; gap: 14px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc .name { font-weight: 600; letter-spacing: -0.01em; }
.svc .name a { color: inherit; text-decoration: none; }
.svc .name a:hover { color: var(--accent); }
.svc .note { color: var(--dim); font-size: 13px; margin-top: 2px; }
.svc img { height: 20px; display: block; }
.status.up { color: var(--green); }
.status.degraded { color: var(--yellow); }
.status.down { color: var(--red); }

/* writing */
.post { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.post:last-child { border-bottom: 1px solid var(--line); }
.post time { font-family: var(--mono); font-size: 13px; color: var(--dim); padding-top: 4px; }
.post h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.post h3 a { color: inherit; text-decoration: none; }
.post h3 a:hover { color: var(--accent); }
.post p { color: var(--dim); margin-top: 8px; font-size: 15.5px; line-height: 1.6; max-width: 60ch; }
.article { max-width: 68ch; }
.article p { font-size: 18px; line-height: 1.7; margin-bottom: 20px; }
.article p:first-child { font-size: 21px; line-height: 1.5; }

/* work case study */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.case-grid h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.case-grid p { font-size: 16.5px; line-height: 1.65; }
.case-grid p.pending { color: var(--dim); font-style: italic; }
.control {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 20px; padding: 28px 32px;
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%), color-mix(in srgb, var(--surface) 80%, transparent);
}
.control h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.control p { color: var(--dim); font-size: 14.5px; margin-top: 4px; }
.work-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.work-nav a { color: var(--dim); text-decoration: none; }
.work-nav a:hover { color: var(--fg); }


/* iddqd */
.egg-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 10px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
html.crt body::before {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  animation: crt-flicker 4s steps(1) infinite;
}
html.crt main, html.crt .top { filter: saturate(1.3) contrast(1.05); }
@keyframes crt-flicker { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.72; } 52% { opacity: 0.95; } 80% { opacity: 0.85; } }

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

@media (max-width: 1024px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .books { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .timer { grid-template-columns: 1fr; gap: 32px; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .now-grid { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; }
}
@media (max-width: 760px) {
  .top { height: 60px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding: 100px 0 100px; min-height: 92svh; }
  .eyebrow { font-size: 12px; gap: 8px; }
  .eyebrow::before { display: none; }
  .icon-btn#theme-btn span:last-child { display: none; }
  .hero-foot { display: none; }
  .glance .wrap { grid-template-columns: 1fr 1fr; }
  .glance div { padding: 16px 0 16px 16px; }
  .glance div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .glance div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; }
  .now-grid { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .case-body { grid-template-columns: 1fr; }
  .repos, .foot .tiers { grid-template-columns: 1fr; }
  .resume .two { grid-template-columns: 1fr; }
  .resume-row { grid-template-columns: 1fr; gap: 4px; }
  .contact .blurb { font-size: 16px; }
  dialog { margin-top: 6vh; }
  .page-hero { padding-top: 110px; }
  .sim, .two, .rice-grid, .case-grid, .uses-item { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .stage p { min-height: 0; }
  .books { grid-template-columns: 1fr 1fr; }
  .svc { grid-template-columns: 1fr auto; }
  .svc img { grid-column: 1 / -1; }
  .post { grid-template-columns: 1fr; gap: 6px; }
  .control { padding: 22px; }
  .walls { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .audit .ln { opacity: 1; transform: none; }
  #rain, #aurora { display: none; }
  html.crt body::before { display: none; }
  .ring .prog { transition: none; }
}

/* ---------- additions 2026-09-22: menu, utilities, media, resume, print ---------- */

.menu-btn { display: none; }
dialog.menu { width: min(520px, calc(100vw - 32px)); }
.menu-nav { display: grid; padding: 10px 12px 6px; }
.menu-nav a { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.menu-nav a:hover, .menu-nav a[aria-current="page"] { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.menu-tiers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 18px; padding: 10px 24px 20px; }
.menu-tiers h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.menu-tiers a { display: block; font-size: 14px; color: var(--dim); text-decoration: none; padding: 3px 0; }
.menu-tiers a:hover, .menu-tiers a[aria-current="page"] { color: var(--fg); }
.dlg-foot .linklike { font: inherit; color: var(--dim); background: transparent; border: 0; padding: 0; cursor: pointer; }
.dlg-foot .linklike:hover, .dlg-foot a:hover { color: var(--fg); }
.dlg-foot a { color: var(--dim); text-decoration: none; margin-left: auto; }
.linklike { font: inherit; color: var(--accent); background: transparent; border: 0; padding: 0; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

.sans { font-family: var(--sans); }
.accent-text { color: var(--accent); }
.centered { justify-content: center; }
.spaced { margin-top: 40px; }
.spaced-sm { margin-top: 18px; }
.dim { color: var(--dim); }
.control-cta { margin: 0; }
.stamp-link { color: var(--accent); text-decoration: none; }
.kbd-inline { font: inherit; font-size: 11px; opacity: 0.7; }
code.mono { font-family: var(--mono); font-size: 0.9em; }
.gh-meta { color: var(--dim); }

.card .shot { width: calc(100% + 56px); margin: -28px -28px 0; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 20px 20px 0 0; border-bottom: 1px solid var(--line); }
.feature-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6); }
.work-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 20px; border: 1px solid var(--line); }
.work-shot figcaption { margin-top: 10px; }

.toggles.wide { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.path-panel { margin-bottom: 20px; }
.post-nav { margin-top: 48px; }
.stats.playing { margin-top: 24px; }
.changelog .hash { color: var(--accent); }

/* resume */
.resume .two { grid-template-columns: 1.4fr 0.8fr; gap: 48px; align-items: start; }
.resume .kicker { margin-top: 36px; }
.resume .kicker:first-child { margin-top: 0; }
.resume-profile { font-size: 18px; line-height: 1.6; max-width: 60ch; }
.resume-row { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.resume-row .when { font-family: var(--mono); font-size: 12.5px; color: var(--dim); padding-top: 3px; }
.resume-row h4 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.resume-row h4 a { color: inherit; text-decoration: none; }
.resume-row h4 .type { font-family: var(--mono); font-size: 11px; font-weight: 400; margin-left: 8px; letter-spacing: 0.06em; }
.resume-row .org { font-size: 14px; color: var(--dim); margin: 2px 0 8px; }
.resume-row .org a { color: inherit; text-decoration: none; }
.resume-row ul { padding-left: 18px; display: grid; gap: 6px; font-size: 15px; line-height: 1.55; }
.resume-row p { font-size: 15px; line-height: 1.55; color: var(--fg); }
.resume-stack { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; align-items: baseline; }
.resume-stack dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.resume-edu { list-style: none; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.resume-edu span { color: var(--dim); font-size: 13.5px; }
.print-btn { margin-left: 8px; }

@media print {
  @page { margin: 12mm 14mm; }
  html, body { background: #fff !important; color: #111 !important; font-size: 10.5pt; }
  :root, [data-theme] { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --fg: #111; --dim: #555; --line: #ddd; --accent: #1f4fa3; }
  #aurora, #rain, .grain, .top, .foot, .skip, .osd, dialog, .egg-badge, .print-btn, #print-btn, .hero-note, .cursor, .resume .note-line, .eyebrow::before { display: none !important; }
  .page-hero { padding: 0 0 6px; }
  .page-hero .eyebrow { font-size: 8.5pt; }
  .page-hero h1 { font-size: 26pt; margin-top: 6px; letter-spacing: -0.03em; }
  .page-hero .tagline { font-size: 10pt; margin-top: 6px; max-width: none; }
  .section, .section.tight { padding-top: 10px; }
  .wrap { max-width: none; padding: 0; }
  .resume .two { grid-template-columns: 1.55fr 0.75fr; gap: 22px; }
  .resume .kicker { margin: 16px 0 6px; font-size: 8pt; }
  .resume-profile { font-size: 10pt; line-height: 1.45; }
  .resume-row { grid-template-columns: 82px 1fr; gap: 12px; padding: 8px 0; break-inside: avoid; }
  .resume-row .when { font-size: 8pt; }
  .resume-row h4 { font-size: 11pt; }
  .resume-row .org { font-size: 9pt; margin: 1px 0 4px; }
  .resume-row p, .resume-row ul { font-size: 9.5pt; line-height: 1.4; }
  .resume-row ul { gap: 2px; padding-left: 14px; }
  .resume-stack { font-size: 9pt; gap: 4px 10px; }
  .resume-stack dt { font-size: 7.5pt; }
  .resume-edu { font-size: 9.5pt; gap: 6px; }
  .resume-edu span { font-size: 8.5pt; }
  .creds { gap: 5px; margin-top: 8px; }
  .creds span { border-color: #ccc; font-size: 8pt; padding: 3px 8px; }
  a { color: inherit; text-decoration: none; }
}
