/* ============ TOKENS ============ */
:root {
  --bg: #0a0e14;
  --bg-panel: #10151d;
  --bg-panel-2: #141b25;
  --line: #1f2937;
  --line-soft: #182029;
  --text: #e7ebf1;
  --text-dim: #8b96a5;
  --text-faint: #5b6472;
  --amber: #3ddc84;
  --amber-dim: #1f8a52;
  --teal: #47d0e0;
  --danger: #e2604f;

  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1120px;
  --pad: clamp(20px, 5vw, 64px);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 800; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--amber); color: #1a1206; }

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

/* subtle grain + scanline, decorative, very low opacity */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
}
.scanline {
  position: fixed; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(61,220,132,0.015), transparent);
  background-size: 100% 6px;
  opacity: 0.4;
}

.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ============ NAV — persistent terminal title bar ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(10,14,20,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color .3s ease;
}
.nav.scrolled { background: rgba(10,14,20,0.92); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; gap: 16px;
}
.nav-chrome { display: flex; gap: 6px; margin-right: 4px; }
.nav-chrome .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3341; }
.nav-brand { font-family: var(--mono); font-weight: 700; font-size: 16px; }
.nav-brand .dim { color: var(--amber); }
.nav-path {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  display: none;
}
.cursor-blink { animation: blink 1s step-end infinite; color: var(--amber); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--text-dim); transition: color .2s ease; font-family: var(--mono); }
.nav-links a:hover { color: var(--amber); }
.nav-cta {
  font-family: var(--mono); font-size: 13px; border: 1px solid var(--amber-dim);
  color: var(--amber); padding: 8px 16px; border-radius: 3px;
  transition: background-color .2s ease, color .2s ease;
}
.nav-cta:hover { background: var(--amber); color: #08140d; }

@media (min-width: 900px) {
  .nav-path { display: inline-block; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ============ SECTION COMMAND PROMPTS ============ */
.cmd-prompt {
  font-family: var(--mono); font-size: 12.5px; color: var(--amber-dim);
  margin-bottom: 10px; letter-spacing: 0.01em;
}
.cmd-prompt .dim { color: var(--text-faint); }

/* ============ BOOT / AUTH PRELOADER ============ */
.boot-screen {
  position: fixed; inset: 0; z-index: 500;
  background: #05070a;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
  animation: bootFailsafe 0.01s linear 4s forwards;
}
@keyframes bootFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.boot-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-lines {
  font-family: var(--mono); font-size: 14px; color: var(--amber);
  width: min(90vw, 520px);
  line-height: 1.9;
}
.boot-lines p { margin: 0; opacity: 0; color: var(--text-dim); }
.boot-lines p.show { opacity: 1; }
.boot-lines p.ok { color: var(--amber); }
.boot-lines .cursor-blink { color: var(--amber); }

/* ============ GLITCH HOVER (nav links) ============ */
[data-glitch] { position: relative; }
[data-glitch].glitching { color: var(--amber) !important; text-shadow: -1px 0 var(--danger), 1px 0 var(--teal); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 60px;
  position: relative;
}
.hero-inner {
  max-width: 1680px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 2fr; gap: 56px; align-items: center;
}

.terminal {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 480px;
  margin-bottom: 32px;
  overflow: hidden;
}
.terminal-bar {
  display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
}
.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: #2a3341; }
.terminal-body { padding: 16px 18px; font-family: var(--mono); font-size: 13px; min-height: 108px; }
.term-line {
  color: var(--text-dim); margin: 0 0 8px; white-space: pre-wrap; word-break: break-word;
  border-right: 2px solid transparent;
}
.term-line.term-out { color: var(--amber); }
.term-line.term-cursor { margin: 0; }
.cursor { color: var(--amber); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-headline {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-sub {
  max-width: 46ch;
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; }

.btn {
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  padding: 13px 24px; border-radius: 4px; display: inline-block;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--amber); color: #17120a; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(61,220,132,0.25); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber-dim); color: var(--amber); }
.btn.full { width: 100%; text-align: center; border: none; cursor: pointer; }

.hero-meta {
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.hero-meta a { color: var(--text-dim); transition: color .2s ease; }
.hero-meta a:hover { color: var(--amber); }
.hero-meta .sep { color: var(--line); }

/* cascade-in entrance, sequenced by JS adding .in with staggered delay */
.cascade { opacity: 0; transform: translateY(22px); transition: opacity .75s cubic-bezier(.16,.8,.3,1), transform .75s cubic-bezier(.16,.8,.3,1); }
.cascade.in { opacity: 1; transform: none; }

/* ============ RECON CONSOLE (hero right column) ============ */
.recon-console {
  position: relative;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
  height: clamp(420px, 62vh, 640px);
  will-change: transform, opacity, filter;
}
.console-rain { position: absolute; inset: 0; z-index: 0; opacity: 0.5; }
.console-bar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  background: rgba(10,14,20,0.55); backdrop-filter: blur(3px);
}
.console-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3341; }
.dot-r { background: #e2604f !important; }
.dot-y { background: #3ddc84 !important; }
.dot-g { background: #4bd1a0 !important; }
.console-title { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-left: 6px; }
.console-live {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--teal); display: flex; align-items: center; gap: 5px;
}
.console-live .dot { background: var(--teal); box-shadow: 0 0 6px var(--teal); animation: livePulse 1.4s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.console-body {
  position: relative; z-index: 1; flex: 1; overflow: hidden;
  padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.85;
}
.console-line { color: var(--text-dim); opacity: 0; white-space: pre-wrap; word-break: break-word; }
.console-line.show { opacity: 1; }
.console-line .ok { color: var(--teal); }
.console-line .warn { color: var(--amber); }
.console-line .path { color: var(--text); }
.console-line .dim { color: var(--text-faint); }

.console-footer {
  position: relative; z-index: 1;
  padding: 12px 18px 16px; border-top: 1px solid var(--line-soft);
  background: rgba(10,14,20,0.4);
}
.gauge-row { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.06em; }
.gauge { flex: 1; height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.gauge-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--amber-dim), var(--amber)); transition: width .5s cubic-bezier(.16,.8,.3,1); }
.gauge-pct { color: var(--amber); min-width: 34px; text-align: right; }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-transform: lowercase;
}
.scroll-line { width: 1px; height: 26px; background: linear-gradient(var(--amber-dim), transparent); }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .recon-console { order: -1; margin-bottom: 8px; height: clamp(340px, 52vh, 480px); }
}
@media (max-width: 480px) {
  .console-body { font-size: 11px; }
}

/* ============ SECTIONS (shared) ============ */
.section { padding: 100px 0; border-top: 1px solid var(--line-soft); }
.section-head { margin-bottom: 48px; max-width: 60ch; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 12px; }
.section-sub { font-size: 16px; }

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

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
.about-copy h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 20px; }
.about-copy p { margin-bottom: 16px; font-size: 16px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.stat {
  background: var(--bg); padding: 26px 20px;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s cubic-bezier(.16,.8,.3,1), transform .6s cubic-bezier(.16,.8,.3,1);
}
.stat.in { opacity: 1; transform: none; }
.stat-num { display: block; font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--amber); }
.stat-label { display: block; font-size: 13px; color: var(--text-dim); margin-top: 6px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ PROJECTS ============ */
.project-list { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); perspective: 1200px; }
.project {
  background: var(--bg-panel);
  padding: 32px clamp(20px, 4vw, 40px);
  transition: background-color .25s ease, opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1);
  opacity: 0; transform: translateY(46px) scale(0.98);
  transform-style: preserve-3d;
  border-left: 2px solid transparent;
}
.project.in { opacity: 1; transform: translateY(0) scale(1); }
.project.in:hover { background: var(--bg-panel-2); border-left-color: var(--amber-dim); transition: transform .15s ease, background-color .25s ease, border-color .25s ease; }
.project-tag {
  font-family: var(--mono); font-size: 12px; color: var(--teal);
  margin-bottom: 10px;
}
.project h3 { font-size: 22px; margin-bottom: 10px; }
.project p { max-width: 74ch; font-size: 15px; margin-bottom: 16px; }
.project-tech { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tech span {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: 3px;
}

/* ============ SKILLS ============ */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.skill-card {
  background: var(--bg-panel); padding: 26px 22px;
  opacity: 0; transform: translateY(36px);
  transition: opacity .6s cubic-bezier(.16,.8,.3,1), transform .6s cubic-bezier(.16,.8,.3,1);
}
.skill-card.in { opacity: 1; transform: none; }
.skill-card h3 { font-size: 15px; color: var(--amber); margin-bottom: 14px; }
.skill-card li { font-size: 14px; color: var(--text-dim); padding: 6px 0; border-top: 1px solid var(--line-soft); }
.skill-card li:first-child { border-top: none; }

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* ============ EXPERIENCE ============ */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 26px 0; border-top: 1px solid var(--line-soft);
  opacity: 0; transform: translateX(-24px);
  transition: opacity .6s cubic-bezier(.16,.8,.3,1), transform .6s cubic-bezier(.16,.8,.3,1);
}
.tl-item.in { opacity: 1; transform: none; }
.tl-item:first-child { border-top: none; }
.tl-dates { font-family: var(--mono); font-size: 13px; color: var(--text-faint); padding-top: 3px; }
.tl-body h3 { font-size: 17px; margin-bottom: 4px; }
.tl-org { font-size: 14px; color: var(--amber); margin-bottom: 10px; }
.tl-body p { font-size: 14.5px; max-width: 68ch; }

@media (max-width: 660px) {
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
}

.certs {
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 10px;
}
.certs span {
  font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 3px;
}

/* ============ BADGES ============ */
.badge-featured-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft);
  margin-bottom: 56px;
}
.badge-featured {
  background: var(--bg-panel); padding: 26px 22px; display: flex; flex-direction: column; gap: 16px;
  transition: background-color .25s ease, transform .5s cubic-bezier(.16,.8,.3,1), opacity .5s cubic-bezier(.16,.8,.3,1);
  opacity: 0; transform: translateY(36px) scale(0.97);
}
.badge-featured.in { opacity: 1; transform: none; }
.badge-featured:hover { background: var(--bg-panel-2); }
.badge-featured img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.4)); }
.badge-featured h3 { font-size: 16px; line-height: 1.3; }
.badge-issuer { font-family: var(--mono); font-size: 11.5px; color: var(--teal); margin: 4px 0 2px; }
.badge-featured p { font-size: 13.5px; }

.badge-wall-head { margin-bottom: 20px; }
.badge-wall-head h3 { font-size: 15px; color: var(--text-dim); font-weight: 600; }

.badge-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px;
}
.badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 10px; border: 1px solid var(--line-soft); border-radius: 6px;
  background: var(--bg-panel);
  transition: border-color .2s ease, transform .2s ease, opacity .5s cubic-bezier(.16,.8,.3,1);
  opacity: 0; transform: translateY(20px) scale(0.9);
  text-align: center;
}
.badge-item.in { opacity: 1; transform: none; }
.badge-item:hover { border-color: var(--amber-dim); transform: translateY(-3px); }
.badge-item img { width: 44px; height: 44px; object-fit: contain; }
.badge-item span { font-size: 10.5px; color: var(--text-faint); line-height: 1.3; }

@media (max-width: 900px) {
  .badge-featured-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .badge-featured-grid { grid-template-columns: 1fr; }
  .badge-wall { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-copy h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 16px; }
.contact-copy p { max-width: 46ch; margin-bottom: 24px; font-size: 16px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 14px; }
.contact-links a { color: var(--text-dim); transition: color .2s ease; width: fit-content; }
.contact-links a:hover { color: var(--amber); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 8px; }
.contact-form input, .contact-form textarea {
  font-family: var(--sans); font-size: 14px; color: var(--text);
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px 14px; resize: vertical;
  transition: border-color .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--amber-dim); outline: none; }
.form-note { font-size: 13px; color: var(--teal); min-height: 1em; }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line-soft); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); flex-wrap: wrap; gap: 8px; }

/* ============ TOAST NOTIFICATIONS ============ */
.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 10px;
  pointer-events: none;
}
.toast {
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  background: var(--bg-panel); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--teal);
  padding: 12px 16px; border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(10px) scale(0.97);
  transition: opacity .35s ease, transform .35s ease;
  max-width: 300px;
}
.toast.in { opacity: 1; transform: none; }
.toast .toast-icon { color: var(--teal); font-size: 14px; flex-shrink: 0; }
.toast.toast-warn { border-left-color: var(--amber); }
.toast.toast-warn .toast-icon { color: var(--amber); }

/* ============ DOWNLOAD FLIGHT ANIMATION ============ */
.download-packet {
  position: fixed; z-index: 300; pointer-events: none;
  font-family: var(--mono); font-size: 11px; color: #17120a;
  background: var(--amber); border-radius: 3px;
  padding: 5px 9px; white-space: nowrap;
  box-shadow: 0 0 18px rgba(61,220,132,0.5);
  transition: transform 1s cubic-bezier(.6,-0.28,.74,.05), opacity .4s ease .6s, top 1s cubic-bezier(.6,-0.28,.74,.05), left 1s cubic-bezier(.6,-0.28,.74,.05);
}

/* ============ CURSOR FOLLOWER (desktop, hover-capable only) ============ */
.crosshair {
  position: fixed; top: 0; left: 0; width: 26px; height: 26px;
  border: 1px solid var(--amber-dim); border-radius: 50%;
  pointer-events: none; z-index: 250;
  transform: translate(-50%, -50%);
  transition: width .18s ease, height .18s ease, border-color .18s ease, opacity .2s ease;
  opacity: 0.85;
}
.crosshair::before, .crosshair::after {
  content: ''; position: absolute; background: var(--amber-dim);
}
.crosshair::before { top: 50%; left: -7px; width: 4px; height: 1px; transform: translateY(-50%); }
.crosshair::after { top: -7px; left: 50%; width: 1px; height: 4px; transform: translateX(-50%); }
.crosshair.hover { width: 42px; height: 42px; border-color: var(--amber); }

/* ============ SCRAMBLE / DECRYPT HEADINGS ============ */
.scramble { position: relative; }

/* ============ CONTACT SUBMIT STATE ============ */
#contact-submit:disabled { opacity: 0.7; cursor: default; }
#contact-submit .dots::after { content: ''; display: inline-block; width: 1em; text-align: left; animation: dotting 1.2s steps(4) infinite; }
@keyframes dotting { 0% { content: ''; } }

/* ============ BADGE CLICK RIPPLE ============ */
.badge-item, .badge-featured { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; background: rgba(61,220,132,0.35);
  transform: scale(0); animation: rippleOut .6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut { to { transform: scale(3.2); opacity: 0; } }

@media (hover: none) {
  .crosshair { display: none; }
}

body.has-crosshair { cursor: none; }
body.has-crosshair a, body.has-crosshair button { cursor: none; }
body.has-crosshair input, body.has-crosshair textarea { cursor: text; }

/* ============ ACCESS SEQUENCE — scroll-scrubbed lock, Apple-style ============ */
.access-sequence {
  position: relative;
  height: 300vh; /* scroll distance the unlock animation is scrubbed across */
}
.access-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  background: var(--bg);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.scan-svg {
  width: min(220px, 40vw); height: auto;
  color: var(--text-dim);
  overflow: visible;
}
.scan-svg.granted { color: var(--amber); }

.scan-ring-bg { color: var(--line-soft); opacity: 0.9; }

.scan-ring-ticks {
  stroke-dasharray: 3 8;
  color: var(--text-faint);
  transform-origin: 100px 100px;
  animation: scanSpin 7s linear infinite;
}
@keyframes scanSpin { to { transform: rotate(360deg); } }

/* the primary scroll-scrubbed element: dasharray/offset set inline by JS every frame */
.scan-ring-progress {
  transform-origin: 100px 100px;
  transform: rotate(-90deg); /* start the fill at 12 o'clock */
  transition: none;
}

.scan-laser {
  color: var(--amber);
  fill: currentColor;
  opacity: 0.55;
  filter: blur(1.5px);
  animation: scanSweep 2.4s ease-in-out infinite;
}
@keyframes scanSweep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(200px); }
}

.scan-icon-locked, .scan-icon-granted {
  transition: opacity .35s ease, transform .35s ease;
  transform-origin: 100px 100px;
}
.scan-icon-locked {
  animation: scanDots 1.4s ease-in-out infinite;
  color: var(--text-dim);
}
@keyframes scanDots {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.scan-icon-granted { opacity: 0; transform: scale(0.5); color: var(--amber); }
.scan-svg.granted .scan-icon-locked { opacity: 0 !important; }
.scan-svg.granted .scan-icon-granted { opacity: 1; transform: scale(1); }
.scan-svg.granted .scan-icon-granted.pop { animation: grantedPop .55s cubic-bezier(.2,1.4,.4,1); }
@keyframes grantedPop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.scan-pulse { opacity: 0; color: var(--amber); }
.scan-pulse.burst { animation: pulseBurst 0.9s ease-out; }
@keyframes pulseBurst {
  0% { opacity: 0.7; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.9); }
}

.access-caption { font-family: var(--mono); text-align: center; width: 100%; padding: 0 20px; }
.access-status {
  font-size: 13px; letter-spacing: 0.1em; margin: 0;
  color: var(--text-dim);
  transition: opacity .18s ease, color .3s ease;
}
.access-status.granted { color: var(--amber); }
.access-pct { font-family: var(--mono); font-size: 12px; color: var(--text-faint); letter-spacing: 0.08em; }

@media (prefers-reduced-motion: reduce) {
  .access-sequence { height: auto; }
  .access-sticky { position: static; height: auto; padding: 90px 0; }
  .scan-laser, .scan-ring-ticks { animation: none; }
}
