/* ================================================================
   Midnight Editorial v2 — design tokens & base
   ================================================================ */
:root {
  --bg: #0a0e1a;
  --surface: #101728;
  --surface-2: #151e33;
  --border: rgba(148, 163, 184, 0.12);
  --text: #e8edf6;
  --muted: #8b98ae;
  --muted-dim: #7b8aa1; /* quieter than --muted, still AA at 12px */
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-ink: #062229; /* text on accent backgrounds */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
  --nav-height: 72px;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.booting,
body.palette-open,
body.menu-open {
  overflow: hidden;
}

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

img,
svg {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

[hidden] {
  display: none !important;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.12rem 0.42rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
  vertical-align: 1px;
}

/* ================================================================
   Boot overlay — injected by fx.js, never present in static markup
   (so a JS failure can never leave a blank screen behind it)
   ================================================================ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.25, 1);
}

.boot.done {
  transform: translateY(-100%);
}

.boot-line {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 3vw, 1rem);
  color: var(--accent);
  white-space: nowrap;
}

.boot-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

.boot-skip {
  position: absolute;
  bottom: 2.25rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-dim);
}

/* ================================================================
   Scroll progress bar
   ================================================================ */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ================================================================
   Custom cursor (fine pointers, motion-safe — gated by .has-cursor)
   ================================================================ */
.cursor-dot,
.cursor-ring {
  display: none;
}

body.has-cursor * {
  cursor: none !important;
}

body.has-cursor input,
body.has-cursor textarea {
  cursor: text !important;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 350;
  pointer-events: none;
  border-radius: 50%;
}

body.has-cursor .cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
}

body.has-cursor .cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(34, 211, 238, 0.65);
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease,
    background-color 0.25s ease, opacity 0.25s ease;
}

body.has-cursor .cursor-ring.is-active {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  background: rgba(34, 211, 238, 0.08);
}

body.has-cursor .cursor-dot.is-hidden,
body.has-cursor .cursor-ring.is-hidden {
  opacity: 0;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  /* No transform here on purpose — .magnetic writes transform on every
     mousemove, and easing it makes the button lag behind the pointer. */
  transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease;
}

.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-solid:hover {
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

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

/* ================================================================
   Navigation
   ================================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.nav-links a:not(.nav-cta) {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent);
}

.kbd-chip {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.3rem;
  background: none;
  border: 0;
  cursor: pointer;
}

.kbd-chip:hover kbd {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-cta {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle span:nth-child(1) {
  top: 17px;
}

.nav-toggle span:nth-child(2) {
  top: 25px;
}

.nav.open .nav-toggle span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav.open .nav-toggle span:nth-child(2) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ================================================================
   Hero
   ================================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: calc(var(--nav-height) + 3rem) 0 4rem;
  overflow: hidden;
}

#net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Sits under the copy but must not eat clicks or text selection. */
  pointer-events: none;
}

/* soft accent glow */
.hero::after {
  content: "";
  position: absolute;
  top: -10%;
  right: -12%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.13), rgba(129, 140, 248, 0.06) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.eyebrow-sep {
  margin: 0 0.5rem;
  opacity: 0.45;
}

/* Inherits size/shape from .status-dot; adds the outward pulse. */
.pulse-dot {
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(34, 211, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
  }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-name .line {
  display: block;
  overflow: hidden;
}

/* letter spans injected by JS (motion-safe only) */
.hero-name .ltr {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.15, 1);
  transition-delay: calc(var(--i) * 26ms);
}

.hero-name.in .ltr {
  transform: none;
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.2em;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
}

.prompt-symbol {
  color: var(--accent);
}

#typewriter {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.caret {
  width: 10px;
  height: 1.25em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-pitch {
  max-width: 56ch;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-hint {
  margin-top: 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-dim);
}

/* ================================================================
   Marquee
   ================================================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee-track span:nth-child(even) {
  color: var(--accent);
  font-size: 0.6rem;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ================================================================
   Stats
   ================================================================ */
.stats {
  border-block: 1px solid var(--border);
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ================================================================
   Sections (shared)
   ================================================================ */
.section {
  padding: 7.5rem 0;
}

.section-head {
  position: relative;
  margin-bottom: 3.5rem;
}

.ghost-num {
  position: absolute;
  top: -0.52em;
  left: -0.04em;
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6.5rem, 15vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 163, 184, 0.13);
  pointer-events: none;
  user-select: none;
}

.section-head.center {
  text-align: center;
}

.section-head.center .ghost-num {
  left: 50%;
  transform: translateX(-50%);
}

.section-eyebrow {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  color: var(--accent);
  letter-spacing: 0;
}

/* ================================================================
   About
   ================================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text {
  color: var(--muted);
  font-size: 1.05rem;
}

.about-text p + p {
  margin-top: 1.25rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.fact {
  padding: 0.85rem 0;
}

.fact + .fact {
  border-top: 1px solid var(--border);
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.fact dd {
  font-weight: 500;
}

/* ================================================================
   Experience timeline (accent line draws in on scroll)
   ================================================================ */
.timeline {
  position: relative;
  display: grid;
  gap: 3.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 1px;
  background: var(--border);
}

.timeline::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 1px;
  height: var(--tl-progress, 0px);
  max-height: calc(100% - 12px);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  z-index: 1;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.timeline-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.4rem 0 1.1rem;
}

.impact-list {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
}

.impact-list li {
  position: relative;
  padding-left: 1.4rem;
}

.impact-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ================================================================
   Projects — index list
   ================================================================ */
.project-index {
  border-top: 1px solid var(--border);
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr minmax(0, 240px) 24px;
  align-items: center;
  gap: 0.35rem 2rem;
  padding: 1.9rem 0.5rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease;
}

/* Rows without a url render as <div class="is-static"> — no link
   affordances, so nothing promises a destination that isn't there. */
.project-row.is-static {
  grid-template-columns: 3rem 1fr minmax(0, 240px);
}

.project-row:not(.is-static):hover {
  background: rgba(34, 211, 238, 0.04);
}

/* Shifted with transform rather than padding so hovering a row never
   triggers a layout pass. */
.row-num,
.row-main {
  transition: transform 0.25s ease;
}

.project-row:not(.is-static):hover .row-num,
.project-row:not(.is-static):hover .row-main {
  transform: translateX(10px);
}

.row-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.row-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  transition: color 0.25s ease;
}

.project-row:not(.is-static):hover .row-title {
  color: var(--accent);
}

.row-desc {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 52ch;
}

.row-tags {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  text-align: right;
}

.project-row .arrow {
  color: var(--muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.project-row:hover .arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ================================================================
   Skills
   ================================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skill-group h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Non-interactive by design — no hover state, so nothing invites a click. */
.chips li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}

/* ================================================================
   Contact
   ================================================================ */
.contact {
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact .section-head {
  margin-bottom: 0;
}

.contact-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.contact-sub {
  max-width: 46ch;
  margin: 1.75rem auto 2.75rem;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.5vw, 2rem);
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  transition: text-decoration-color 0.2s ease;
}

.contact-email:hover {
  text-decoration-color: var(--accent);
}

.contact-meta {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.back-top:hover {
  color: var(--accent);
}

/* ================================================================
   Command palette
   ================================================================ */
.palette {
  position: fixed;
  inset: 0;
  z-index: 320;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.palette-panel {
  position: relative;
  width: min(560px, 92vw);
  margin: 16vh auto 0;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#palette-input {
  width: 100%;
  padding: 1.1rem 1.3rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

#palette-input:focus {
  outline: none;
}

#palette-input::placeholder {
  color: var(--muted);
}

#palette-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem;
}

.palette-group {
  padding: 0.6rem 0.85rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

#palette-list [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
}

#palette-list [role="option"] .hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.6;
}

#palette-list [role="option"].active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
}

.palette-hint {
  padding: 0.75rem 1.3rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.palette-hint kbd {
  margin-right: 0.15rem;
}

/* ================================================================
   Motion — reveals, smooth scroll (motion-safe only)
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .reveal,
  .reveal-group > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.in,
  .reveal-group.in > * {
    opacity: 1;
    transform: none;
  }

  .reveal-group > :nth-child(2) { transition-delay: 90ms; }
  .reveal-group > :nth-child(3) { transition-delay: 180ms; }
  .reveal-group > :nth-child(4) { transition-delay: 270ms; }
  .reveal-group > :nth-child(5) { transition-delay: 360ms; }
  .reveal-group > :nth-child(6) { transition-delay: 450ms; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot,
  .caret,
  .marquee-track {
    animation: none;
  }

  .boot {
    display: none;
  }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .kbd-chip,
  .hero-hint {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 24px 1.5rem;
    background: rgba(10, 14, 26, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav.open .nav-links {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav-links a:not(.nav-cta) {
    padding: 0.9rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    justify-content: center;
    margin-top: 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-row {
    grid-template-columns: 2.25rem 1fr 20px;
    align-items: start;
    padding: 1.5rem 0.25rem;
  }

  .project-row.is-static {
    grid-template-columns: 2.25rem 1fr;
  }

  /* Touch has no hover — don't shift rows around under a finger. */
  .project-row:hover .row-num,
  .project-row:hover .row-main {
    transform: none;
  }

  .row-num {
    padding-top: 0.4rem;
  }

  .row-tags {
    grid-column: 2;
    text-align: left;
    margin-top: 0.6rem;
  }

  .project-row .arrow {
    margin-top: 0.5rem;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 4.75rem 0;
  }

  /* Keeps the availability line on one row on narrow phones. */
  .hero-time {
    display: none;
  }

  .stats {
    padding: 2.5rem 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
