/* SELVEDGE — Pierce Paeste portfolio
   Tokens and component specs per DESIGN.md. Mobile-first, flat specificity. */

:root {
  --base: #FAF1E3;
  --surface: #FFFBF2;
  --tint: #F5E3C8;
  --ink: #2B2013;
  --ink-2: #6A5A48;
  --accent: #BE3D1E;
  --accent-deep: #A6350F; /* hover shade of --accent, not a palette addition */

  --hairline: rgba(43, 32, 19, 0.12);
  --border-strong: rgba(43, 32, 19, 0.25);
  --shelf-rule: rgba(43, 32, 19, 0.20);
  --shadow-card: 0 10px 30px -18px rgba(43, 32, 19, 0.35);
  --shadow-lift: 0 16px 40px -20px rgba(43, 32, 19, 0.45);

  --font-display: 'Bricolage Grotesque', system-ui, 'Avenir Next', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', monospace;

  --r-chip: 999px;
  --r-btn: 12px;
  --r-card: 14px;
  --r-big: 18px;
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);

  --size-body: clamp(1.0625rem, 0.9rem + 0.5vw, 1.125rem);
  --size-lead: clamp(1.125rem, 1.8vw, 1.375rem);
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-top: 84px; /* fixed two-row nav */
  background: var(--base);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: 1.65;
  overflow-wrap: break-word;
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, dl, dd, dt { margin: 0; padding: 0; }
a { color: inherit; }
strong { font-weight: 600; }

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

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  scroll-margin-top: 120px;
}

#main { scroll-margin-top: 120px; }

.section-head { margin-bottom: 40px; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.875rem, 4vw, 2.625rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: var(--size-lead);
  line-height: 1.5;
  max-width: 60ch;
  margin-top: 16px;
}

.mono-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  left: 8px;
  top: 8px;
  position: fixed;
}

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-bar {
  position: relative;
  z-index: 2;
  background: var(--base);
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 44px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav-link:hover { color: var(--accent); }

.nav-link.is-active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-cta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--surface);
  padding: 6px 14px;
  border-radius: var(--r-chip);
  text-decoration: none;
}

.nav-cta:hover { background: var(--accent-deep); }

.nav-strip {
  position: relative;
  z-index: 1;
  background: var(--base);
}

.nav-strip-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.nav-strip-inner::-webkit-scrollbar { display: none; }

.nav-strip-inner .nav-link { flex: 0 0 auto; }

.strip-hidden .nav-strip {
  transform: translateY(-100%);
  visibility: hidden;
}

/* Scrolled state: hairline sits under whichever row is the visible bottom edge. */
.is-scrolled .nav-strip {
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(43, 32, 19, 0.06);
}

.is-scrolled.strip-hidden .nav-bar {
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(43, 32, 19, 0.06);
}

/* Row-1 links hidden on mobile; the strip carries them. */
.nav-links .nav-link { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: var(--r-btn);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
}

.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--shadow-lift); }

.btn-ghost {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: calc(14px - 1.5px) calc(24px - 1.5px);
  box-shadow: none;
}

.btn-ghost:hover { box-shadow: var(--shadow-card); }

/* ---------- Hero ---------- */

.hero {
  min-height: calc(88vh - 84px);
  min-height: calc(88svh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  scroll-margin-top: 120px;
  padding-block: 48px 88px;
}

.hero-eyebrow { margin-bottom: 24px; }

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.875rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  position: relative;
  margin-bottom: 28px;
}

.hero-name-text { display: inline-block; }

.hero-dot {
  display: inline-block;
  color: var(--accent);
}

/* Dot pop, activated by JS after the scan pass */
.js-scan .hero-dot {
  opacity: 0;
  transform: scale(0.2);
}

.js-scan .hero-dot.dot-in {
  opacity: 1;
  transform: scale(1);
}

/* Two-layer scan state, activated by JS only */
.scan-live .hero-name-text {
  position: absolute;
  inset: 0;
}

.hero-name-ghost {
  display: inline-block;
  color: rgba(43, 32, 19, 0.14);
}

.scan-beam {
  position: absolute;
  top: -30px; /* beam bottom (the rule) starts at the h1 top edge */
  left: -8px;
  right: -8px;
  height: 30px;
  pointer-events: none;
  background: linear-gradient(to top,
    var(--accent) 0, var(--accent) 2px,
    rgba(190, 61, 30, 0.16) 2px, rgba(190, 61, 30, 0) 100%);
}

.hero-tagline {
  font-size: var(--size-lead);
  line-height: 1.5;
  max-width: 52ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.scroll-hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.scroll-arrow { display: inline-block; }

@media (max-height: 700px) {
  .scroll-hint { display: none; }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.about-prose p + p { margin-top: 16px; }

.glance {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 24px;
  align-self: start;
}

.glance-title {
  color: var(--ink-2);
  margin-bottom: 16px;
}

.glance-rows {
  display: grid;
  gap: 12px;
}

.glance-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}

.glance-row dt {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 3px;
}

.glance-row dd { color: var(--ink); }

/* ---------- Projects: the trophy shelf ---------- */

.shelf-rule {
  height: 2px;
  background: var(--shelf-rule);
  margin-bottom: 40px;
}

.podium-shelf {
  position: relative;
  margin-bottom: 40px;
}

.plinth {
  position: absolute;
  top: -24px;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--tint);
  z-index: 0;
}

.podium-shelf .shelf-rule { margin-bottom: 0; }

.rule-podium {
  position: relative;
  z-index: 1;
}

.rule-podium::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 48px;
  height: 6px;
  background: var(--accent);
}

.project-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.project-card:hover {
  border-color: rgba(190, 61, 30, 0.4);
  box-shadow: var(--shadow-lift);
}

/* Card-local scan sweep (runs only while .is-scanning, added by JS) */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  right: -8px;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top,
    rgba(190, 61, 30, 0.55) 0, rgba(190, 61, 30, 0.55) 2px,
    rgba(190, 61, 30, 0.08) 2px, rgba(190, 61, 30, 0) 30px);
}

.podium-card {
  border-radius: var(--r-big);
  padding: 32px;
}

/* Media + writeup rows: media stacks above the text on mobile */
.media-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.project-media {
  background: var(--tint);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone-recorded portrait clips: framed like a phone, never stretched */
.media-item {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 420px;
  border: 6px solid var(--ink);
  border-radius: 22px;
  background: var(--ink);
  box-shadow: var(--shadow-card);
}

.project-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-chip);
}

.chip-event {
  background: var(--tint);
  color: var(--ink);
  padding: 4px 10px;
}

.chip-stamp {
  background: var(--accent);
  color: var(--surface);
  padding: 5px 12px;
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(43, 32, 19, 0.18);
}

.chip-build {
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  padding: 4px 10px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.card-subtitle {
  font-weight: 600;
  color: var(--ink-2);
}

.podium-title {
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.card-hook {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 12px;
}

.card-desc {
  color: var(--ink-2);
  margin-bottom: 20px;
}

.card-meta { margin-top: auto; }

.card-role {
  margin-bottom: 16px;
}

.role-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.role-text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--tint);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: var(--r-chip);
}

/* Podium internals */
.podium-readout {
  margin-bottom: 20px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: 4px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 12px;
}

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

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.standard-shelf .shelf-rule:last-child { margin-bottom: 0; }

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.skill-group::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 16px;
}

.skill-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.15;
  margin-bottom: 16px;
}

.skill-list {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--ink-2);
}

.skill-list strong { color: var(--ink); }

/* ---------- Background ---------- */

.background-wrap { max-width: 720px; }

.edu-list { border-bottom: 1px solid var(--hairline); }

.edu-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-bottom: 28px;
}

.edu-entry + .edu-entry {
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}

.edu-stage {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 4px;
}

.edu-line {
  font-weight: 600;
  color: var(--ink);
}

.edu-close {
  font-style: italic;
  color: var(--ink);
  margin-top: 28px;
}

/* ---------- Currently ---------- */

.currently-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.now-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 20px;
}

.chip-status {
  background: var(--tint);
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  padding: 3px 10px;
}

.now-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.15;
  margin-top: 12px;
  margin-bottom: 8px;
}

.now-copy { color: var(--ink-2); }

/* ---------- Connect ---------- */

.wa-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--accent);
  color: var(--surface);
  border-radius: var(--r-big);
  padding: 28px 32px;
  text-decoration: none;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.wa-card:hover { box-shadow: 0 16px 40px -18px rgba(190, 61, 30, 0.5); }

.wa-label,
.wa-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wa-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.connect-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 16px 20px;
  text-decoration: none;
}

.tile:hover { border-color: rgba(190, 61, 30, 0.4); }

.tile-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.tile:hover .tile-label { color: var(--accent); }

.tile-value {
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-line,
.footer-top {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.footer-top { text-decoration: none; }

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

/* ---------- Breakpoints ---------- */

@media (min-width: 480px) {
  .connect-grid { grid-template-columns: repeat(2, 1fr); }

  .edu-entry {
    grid-template-columns: 120px 1fr;
    gap: 24px;
  }

  .edu-stage { padding-top: 2px; }
}

@media (min-width: 768px) {
  body { padding-top: 64px; }

  .section { scroll-margin-top: 96px; }

  .hero {
    scroll-margin-top: 96px;
    min-height: calc(88vh - 64px);
    min-height: calc(88svh - 64px);
  }

  .nav-bar-inner { height: 64px; }

  .nav-strip { display: none; }

  .nav-links .nav-link { display: inline-block; }

  .is-scrolled .nav-bar {
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 1px 0 rgba(43, 32, 19, 0.06);
  }

  .section-head { margin-bottom: 48px; }

  .about-grid {
    grid-template-columns: 7fr 5fr;
    gap: 48px;
  }

  /* Media beside the writeup, alternating sides down the page */
  .media-card {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 32px;
    align-items: stretch;
  }

  .media-card .project-media { grid-column: 1; grid-row: 1; }
  .media-card .project-content { grid-column: 2; grid-row: 1; }

  .media-right .project-media { grid-column: 2; }
  .media-right .project-content { grid-column: 1; }

  .media-item { max-height: 460px; }

  /* Podium stats sit in a row once there's width for it */
  .podium-readout {
    display: flex;
    padding-block: 16px;
  }

  .podium-readout .stat {
    flex: 1;
    padding-block: 0;
    padding-inline: 20px;
  }

  .podium-readout .stat:first-child { padding-left: 0; }

  .podium-readout .stat + .stat {
    border-top: 0;
    border-left: 1px solid var(--hairline);
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .currently-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .connect-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .project-card { padding: 28px; }

  .podium-card { padding: 32px; }

  .media-card { gap: 40px; }

  .connect-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Motion (gated entirely behind the media query) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .nav-strip {
    transition: transform 200ms ease-out, visibility 0s linear 0s;
  }

  .strip-hidden .nav-strip {
    transition: transform 200ms ease-out, visibility 0s linear 200ms;
  }

  .nav-link,
  .nav-cta,
  .footer-top,
  .tile,
  .tile-label,
  .wa-card,
  .btn,
  .project-card {
    transition: color 180ms ease-out, background-color 180ms ease-out,
      border-color 180ms ease-out, box-shadow 180ms ease-out,
      transform 220ms var(--ease-spring);
  }

  .btn:hover { transform: translateY(-2px); }

  .btn:active { transform: translateY(0) scale(0.98); }

  .project-card:hover { transform: translateY(-5px); }

  .wa-card:hover { transform: translateY(-2px) rotate(-0.3deg); }

  .tile:hover { transform: translateY(-3px); }

  /* The rubber stamp straightens up when its card is inspected */
  .chip-stamp { transition: transform 260ms var(--ease-spring); }

  .project-card:hover .chip-stamp { transform: rotate(0deg) scale(1.05); }

  /* Hero dot pops in after the scan pass */
  .js-scan .hero-dot {
    transition: transform 420ms var(--ease-spring), opacity 150ms ease-out;
  }

  /* Scroll cue bobs, gently */
  .scroll-arrow { animation: bob 2.2s ease-in-out infinite; }

  @keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
  }

  /* Scroll reveals: hidden state is only ever added by JS */
  .reveal-init {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }

  .reveal-init.revealed {
    opacity: 1;
    transform: none;
    transition: opacity 500ms var(--ease-out-quart), transform 650ms var(--ease-spring);
  }

  /* Card scan sweep (stagger handled by JS) */
  .project-card.is-scanning::after {
    animation: card-scan 500ms var(--ease-out-quart) both;
  }

  @keyframes card-scan {
    from { transform: translateY(-100%); opacity: 1; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Static scan state: plain accent underline, visible from first paint */
  .hero-name-text::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--accent);
    margin-top: 10px;
  }
}
