/* Daniel D'Jesus — Interactive Resume */

:root {
  --void: #0a0a0a;
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --text: #e8e6df;
  --muted: #7a7568;
  --gold: #ff2434;
  --amber: #e50914;
  --warm: #ff4d5a;
  --accent: var(--gold);
  --accent-dim: rgba(255, 36, 52, 0.08);
  --amber-glow: rgba(229, 9, 20, 0.45);
  --gold-glow: rgba(255, 36, 52, 0.25);
  --border: rgba(255, 36, 52, 0.14);
  --border-strong: rgba(255, 77, 90, 0.28);
  --max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(5rem, 12vw, 9rem);
  --font-pixel: "Press Start 2P", monospace;
  --font-terminal: "VT323", "Courier New", monospace;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-text: none;
  --glow-soft: none;
  --section-pad-compact: clamp(2.5rem, 6vw, 4.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.15vw, 1.2rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--void);
  cursor: default;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: geometricPrecision;
}

::selection {
  background: rgba(255, 36, 52, 0.35);
  color: var(--void);
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── CRT atmosphere ── */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(10, 10, 10, 0.1) 3px,
    rgba(255, 36, 52, 0.02) 4px
  );
  opacity: calc(0.1 * var(--hero-flicker, 1) + 0.04);
}

.crt-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(229, 9, 20, 0.03), transparent 55%);
}

.container {
  width: min(var(--max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section-rule {
  --rule-scale: 1;
  position: relative;
}

.section-rule::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--amber), transparent);
  opacity: 0.45;
  transform-origin: left center;
  transform: scaleX(var(--rule-scale));
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ── Header ── */

/* ========== HEADER ========== */

.site-header {
    position: fixed;
    inset: 0 auto auto 0;
    width: 100%;
    z-index: 100;
    background-color: #0a0a0a;
    border-bottom: 1px solid #222;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding: clamp(1rem, 2vw, 1.35rem) 0;
}

.site-header::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(229, 9, 20, 0.15) 18%,
        rgba(255, 36, 52, 0.35) 50%,
        rgba(229, 9, 20, 0.15) 82%,
        transparent 100%
    );
    z-index: 2;
}

.site-header::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: clamp(2rem, 5vw, 3.25rem);
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.92) 0%,
        rgba(10, 10, 10, 0.72) 38%,
        rgba(10, 10, 10, 0.28) 72%,
        rgba(10, 10, 10, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.site-header.is-scrolled {
    background-color: #0a0a0a;
    border-bottom: 1px solid #222;
    box-shadow:
        0 1px 0 rgba(255, 36, 52, 0.05),
        0 10px 36px rgba(0, 0, 0, 0.72),
        0 22px 56px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.site-header.is-scrolled::before,
.site-header.is-scrolled::after {
  opacity: 1;
}

.header-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}


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

.brand-prompt {
  font-family: var(--font-terminal);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--amber);
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-pixel);
  font-size: clamp(0.75rem, 2.8vw, 1.35rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.15em;
  background: var(--gold);
  vertical-align: -0.08em;
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.brand-tag {
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav a {
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  color: var(--gold);
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Hero ── */

.hero {
  --hero-flicker: 1;
  --hero-glow: 1;
  --title-chroma-x: 2px;
  --title-chroma-y: 0px;
  --title-frame-alpha: 0.5;
  --subtitle-scan-y: 0px;
  --crt-bezel: clamp(0.55rem, 1.2vw, 0.85rem);
  --crt-titlebar-h: clamp(2.1rem, 3.8vw, 2.65rem);
  --crt-footer-h: clamp(1.85rem, 3.2vw, 2.35rem);
  --crt-rail-w: clamp(2.5rem, 4vw, 3.25rem);
  --crt-parallax-x: 0px;
  --crt-parallax-y: 0px;
  --hero-vh: 100vh;
  --hero-vh: 100svh;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(var(--crt-titlebar-h) + 2.5rem)
    calc(var(--crt-rail-w) + var(--gutter) * 0.5)
    calc(var(--crt-footer-h) + 2.75rem);
  overflow: hidden;
  z-index: 2;
  cursor: crosshair;
  background: var(--void);
  box-shadow:
    inset 0 0 0 1px rgba(255, 36, 52, 0.12),
    inset 0 0 80px rgba(229, 9, 20, 0.04);
}

#hero-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

#hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 38%, rgba(229, 9, 20, 0.08), transparent 65%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.85) 100%);
}

#hero-background canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
  visibility: visible;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.hero-boot-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-boot-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(229, 9, 20, 0.1) 42%,
    rgba(255, 36, 52, 0.2) 50%,
    rgba(229, 9, 20, 0.08) 58%,
    transparent 100%
  );
  transform: translateY(-100%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.hero-film-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: hero-grain 0.45s steps(4) infinite;
  mix-blend-mode: overlay;
}

.hero-warm-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 170, 60, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(229, 9, 20, 0.04) 0%, transparent 40%, rgba(229, 9, 20, 0.02) 100%);
  opacity: 0.06;
  mix-blend-mode: soft-light;
}

@keyframes hero-grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, -3%); }
  50% { transform: translate(2%, 1%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 80% at 50% 45%, rgba(10, 10, 10, 0.35), rgba(10, 10, 10, 0.82) 72%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.45) 45%, rgba(10, 10, 10, 0.75) 100%);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 75% 55% at 65% 15%, rgba(229, 9, 20, 0.06), transparent 58%),
    radial-gradient(ellipse 45% 35% at 8% 85%, rgba(255, 36, 52, 0.04), transparent 52%),
    linear-gradient(180deg, transparent 55%, var(--void) 100%);
  pointer-events: none;
}

/* ── Hero CRT monitor frame (full-bleed, not a floating card) ── */

.hero-crt-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.hero-crt-frame__bezel {
  position: absolute;
  inset: var(--crt-bezel);
  border: 2px solid rgba(255, 36, 52, 0.28);
  box-shadow:
    0 0 24px rgba(255, 36, 52, 0.1),
    0 0 48px rgba(229, 9, 20, 0.06),
    inset 0 0 40px rgba(229, 9, 20, 0.04),
    inset 0 0 0 1px rgba(229, 9, 20, 0.12);
  transform: translate(var(--crt-parallax-x), var(--crt-parallax-y));
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.hero:hover .hero-crt-frame__bezel {
  border-color: rgba(255, 36, 52, 0.38);
  box-shadow:
    0 0 32px rgba(255, 36, 52, 0.14),
    0 0 64px rgba(229, 9, 20, 0.09),
    inset 0 0 48px rgba(229, 9, 20, 0.06),
    inset 0 0 0 1px rgba(229, 9, 20, 0.18);
}

.hero-crt-frame__pixel {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: radial-gradient(rgba(255, 36, 52, 0.08) 0.55px, transparent 0.55px);
  background-size: 4px 4px;
  transform: translate(calc(var(--crt-parallax-x) * 0.3), calc(var(--crt-parallax-y) * 0.3));
}

.hero-crt-frame__scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(10, 10, 10, 0.14) 2px,
    rgba(10, 10, 10, 0.14) 3px
  );
  mix-blend-mode: multiply;
  transform: translate(calc(var(--crt-parallax-x) * 0.45), calc(var(--crt-parallax-y) * 0.45));
}

.hero-crt-frame__phosphor {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 50% at 50% 42%, rgba(229, 9, 20, 0.06), transparent 68%);
  opacity: calc(0.5 + var(--hero-glow) * 0.2);
}

.hero.is-booting .hero-crt-frame__titlebar,
.hero.is-booting .hero-crt-frame__footer,
.hero.is-booting .hero-crt-frame__rail,
.hero.is-booting .hero-crt-frame__rule {
  opacity: 0;
}

.hero.is-boot-complete .hero-crt-frame__titlebar,
.hero.is-boot-complete .hero-crt-frame__footer,
.hero.is-boot-complete .hero-crt-frame__rail,
.hero.is-boot-complete .hero-crt-frame__rule {
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

.hero-crt-frame__titlebar {
  position: absolute;
  top: var(--crt-bezel);
  left: var(--crt-bezel);
  right: var(--crt-bezel);
  height: var(--crt-titlebar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0 clamp(0.65rem, 1.5vw, 1rem);
  font-family: var(--font-terminal);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 36, 52, 0.5);
  transform: translate(calc(var(--crt-parallax-x) * 0.5), calc(var(--crt-parallax-y) * 0.35));
}

.hero-crt-frame__titlebar-label {
  color: var(--amber);
  opacity: 0.8;
  white-space: nowrap;
}

.hero-crt-frame__titlebar-sub {
  justify-self: start;
  color: rgba(255, 36, 52, 0.35);
  font-size: 0.9em;
}

.hero-crt-frame__titlebar-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-crt-frame__pill {
  display: block;
  width: clamp(0.9rem, 1.8vw, 1.2rem);
  height: 0.38rem;
  border: 1px solid rgba(255, 36, 52, 0.25);
  background: rgba(10, 10, 10, 0.7);
  opacity: 0.5;
  animation: crt-pill-idle 3s steps(2) infinite;
}

.hero-crt-frame__pill.is-on {
  background: rgba(229, 9, 20, 0.4);
  border-color: rgba(255, 36, 52, 0.45);
  opacity: 0.95;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.25);
  animation: crt-pill-on 2s steps(2) infinite;
}

.hero-crt-frame__close-box {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.25rem;
  border: 1px solid rgba(255, 36, 52, 0.4);
  background: rgba(229, 9, 20, 0.12);
  box-shadow: inset 0 0 6px rgba(255, 36, 52, 0.08);
}

.hero-crt-frame__rule {
  position: absolute;
  left: calc(var(--crt-bezel) + 0.5rem);
  right: calc(var(--crt-bezel) + 0.5rem);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(229, 9, 20, 0.35) 15%,
    rgba(255, 36, 52, 0.5) 50%,
    rgba(229, 9, 20, 0.35) 85%,
    transparent
  );
  opacity: 0.5;
  transform: translateX(calc(var(--crt-parallax-x) * 0.25));
}

.hero-crt-frame__rule--top {
  top: calc(var(--crt-bezel) + var(--crt-titlebar-h));
}

.hero-crt-frame__rule--mid {
  top: 58%;
  opacity: 0.22;
}

.hero-crt-frame__rule--bottom {
  bottom: calc(var(--crt-bezel) + var(--crt-footer-h));
}

.hero-crt-frame__rail {
  position: absolute;
  top: calc(var(--crt-bezel) + var(--crt-titlebar-h) + 0.5rem);
  bottom: calc(var(--crt-bezel) + var(--crt-footer-h) + 0.5rem);
  width: var(--crt-rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-family: var(--font-terminal);
  font-size: clamp(0.68rem, 0.85vw, 0.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 36, 52, 0.32);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(var(--crt-parallax-y));
}

.hero-crt-frame__rail--left {
  left: calc(var(--crt-bezel) + 0.35rem);
}

.hero-crt-frame__rail--right {
  right: calc(var(--crt-bezel) + 0.35rem);
}

.hero-crt-frame__rail-bar {
  display: block;
  width: 3px;
  height: 2.5rem;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 36, 52, 0.45) 0,
    rgba(255, 36, 52, 0.45) 3px,
    transparent 3px,
    transparent 6px
  );
  opacity: 0.45;
  writing-mode: horizontal-tb;
}

.hero-crt-frame__footer {
  position: absolute;
  bottom: var(--crt-bezel);
  left: var(--crt-bezel);
  right: var(--crt-bezel);
  height: var(--crt-footer-h);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 clamp(0.65rem, 1.5vw, 1rem);
  font-family: var(--font-terminal);
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 36, 52, 0.4);
  transform: translate(calc(var(--crt-parallax-x) * 0.4), calc(var(--crt-parallax-y) * -0.3));
}

.hero-crt-frame__footer-label {
  color: var(--amber);
  opacity: 0.7;
  white-space: nowrap;
}

.hero-crt-frame__barcode {
  flex: 1;
  max-width: 8rem;
  height: 0.6rem;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 36, 52, 0.5) 0,
    rgba(255, 36, 52, 0.5) 2px,
    transparent 2px,
    transparent 4px,
    rgba(229, 9, 20, 0.38) 4px,
    rgba(229, 9, 20, 0.38) 5px,
    transparent 5px,
    transparent 8px
  );
  opacity: 0.45;
}

.hero-crt-frame__footer-status {
  color: rgba(255, 36, 52, 0.35);
  white-space: nowrap;
}

.hero-crt-frame__footer-icons {
  display: flex;
  gap: 0.3rem;
  color: rgba(229, 9, 20, 0.45);
  font-size: 0.72rem;
}

@keyframes crt-pill-idle {
  0%, 80%, 100% { opacity: 0.45; }
  85% { opacity: 0.7; }
}

@keyframes crt-pill-on {
  0%, 65%, 100% { opacity: 0.85; }
  70% { opacity: 1; }
}

@keyframes crt-frame-flicker {
  0%, 94%, 100% { opacity: 1; }
  95% { opacity: 0.97; }
  96% { opacity: 1; }
  97% { opacity: 0.98; }
}

.hero.is-boot-complete .hero-crt-frame__scanlines {
  animation: crt-frame-flicker 5s steps(1) infinite;
}

.hero.is-crt-pulse .hero-crt-frame__bezel {
  animation: crt-pulse-distort 0.4s steps(3);
}

.hero.is-crt-pulse .hero-crt-frame__scanlines {
  opacity: 0.58;
}

@keyframes crt-pulse-distort {
  0% { filter: none; transform: translate(var(--crt-parallax-x), var(--crt-parallax-y)); }
  33% { filter: brightness(1.1); transform: translate(calc(var(--crt-parallax-x) + 2px), var(--crt-parallax-y)) skewX(0.3deg); }
  66% { filter: brightness(1.05); transform: translate(calc(var(--crt-parallax-x) - 1px), calc(var(--crt-parallax-y) + 1px)); }
  100% { filter: none; transform: translate(var(--crt-parallax-x), var(--crt-parallax-y)); }
}

.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero.is-booting .hero-summary,
.hero.is-booting .scroll-hint {
  opacity: 0;
  visibility: hidden;
}

.hero-objective-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.05em;
  position: relative;
  padding: 0.2em 0.45em;
  isolation: isolate;
}

.hero-objective-wrap::after {
  content: "";
  position: absolute;
  inset: -0.04em -0.1em;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(10, 10, 10, 0.32) 2px,
    rgba(10, 10, 10, 0.32) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.65;
}

.hero-type-cursor {
  font-family: var(--font-pixel);
  font-size: clamp(1.75rem, 11vw, 6.5rem);
  line-height: 1;
  color: var(--gold);
  animation: cursor-blink 0.85s step-end infinite;
  text-shadow: 0 0 20px rgba(255, 36, 52, 0.35);
}

.hero.is-booting .hero-type-cursor {
  opacity: 0;
}

.hero-objective-text.is-typing + .hero-type-cursor {
  opacity: 1;
}

.hero.is-boot-complete .hero-type-cursor {
  opacity: 0;
  visibility: hidden;
}

.hero-objective-text.is-ready,
.crt-title-label.is-ready {
  opacity: 1;
  visibility: visible;
}

.hero-objective-text.is-typing {
  text-shadow:
    var(--title-chroma-x) var(--title-chroma-y) rgba(229, 9, 20, 0.32),
    calc(var(--title-chroma-x) * -1) calc(var(--title-chroma-y) * -0.5) rgba(255, 36, 52, 0.18),
    0 0 calc(48px * var(--hero-glow)) rgba(255, 36, 52, 0.45),
    0 0 calc(100px * var(--hero-glow)) rgba(229, 9, 20, 0.2),
    0 2px 24px rgba(0, 0, 0, 0.6);
}

.crt-title-label.is-typing {
  text-shadow:
    1px 0 rgba(229, 9, 20, 0.22),
    -1px 0 rgba(255, 36, 52, 0.15),
    0 0 calc(16px * var(--hero-glow)) rgba(229, 9, 20, 0.35),
    0 1px 12px rgba(0, 0, 0, 0.65);
}

.hero.is-boot-complete .crt-title-label {
  animation: none;
}

.crt-title-label {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  font-family: var(--font-pixel);
  font-size: clamp(0.5rem, 1.2vw, 0.7rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  line-height: 1.8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

.hero-objective {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  width: 100%;
  min-height: clamp(4rem, 18vw, 9rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-objective-text {
  font-family: var(--font-pixel);
  font-size: clamp(1.75rem, 11vw, 6.5rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  opacity: var(--hero-flicker, 1);
  visibility: visible;
  min-height: 1.3em;
  transform: scaleX(0.9);
  transform-origin: center center;
  -webkit-text-stroke: 2px rgba(229, 9, 20, 0.4);
  paint-order: stroke fill;
  filter: drop-shadow(0 0 calc(22px * var(--hero-glow)) rgba(255, 36, 52, 0.38));
  text-shadow:
    var(--title-chroma-x) var(--title-chroma-y) rgba(229, 9, 20, 0.26),
    calc(var(--title-chroma-x) * -1) calc(var(--title-chroma-y) * -0.5) rgba(255, 36, 52, 0.16),
    0 0 calc(36px * var(--hero-glow)) rgba(255, 36, 52, 0.55),
    0 0 calc(72px * var(--hero-glow)) rgba(229, 9, 20, 0.28),
    0 0 calc(120px * var(--hero-glow)) rgba(255, 36, 52, 0.08),
    0 3px 28px rgba(0, 0, 0, 0.75);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.hero.is-title-glitch .hero-objective-text.is-ready {
  transform: scaleX(0.9) skewX(-1.2deg) translateX(1px);
}

.hero.is-title-hover .hero-objective-text.is-ready,
.hero:hover .hero-objective-text.is-ready {
  filter:
    drop-shadow(0 0 calc(34px * var(--hero-glow)) rgba(255, 36, 52, 0.52))
    drop-shadow(0 0 calc(60px * var(--hero-glow)) rgba(229, 9, 20, 0.25));
}

.hero-objective-text.is-ready {
  text-shadow:
    var(--title-chroma-x) var(--title-chroma-y) rgba(229, 9, 20, 0.28),
    calc(var(--title-chroma-x) * -1) calc(var(--title-chroma-y) * -0.5) rgba(255, 36, 52, 0.18),
    0 0 calc(44px * var(--hero-glow)) rgba(255, 36, 52, 0.6),
    0 0 calc(88px * var(--hero-glow)) rgba(229, 9, 20, 0.32),
    0 0 calc(140px * var(--hero-glow)) rgba(255, 36, 52, 0.1),
    0 3px 28px rgba(0, 0, 0, 0.75);
}

.hero-objective-text.is-fading {
  opacity: 0;
  transform: scaleX(0.9) translateY(8px);
}

.hero-summary {
  position: relative;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.65;
  color: var(--text);
  max-width: 44rem;
  text-align: center;
  opacity: calc(var(--hero-flicker, 1) * 0.98 + 0.02);
  text-shadow:
    0 0 calc(18px * var(--hero-glow)) rgba(255, 36, 52, 0.12),
    0 0 calc(36px * var(--hero-glow)) rgba(229, 9, 20, 0.06),
    0 1px 16px rgba(0, 0, 0, 0.7);
}

.hero-summary::after {
  content: "";
  position: absolute;
  inset: -4px 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(10, 10, 10, 0.14) 3px,
    rgba(10, 10, 10, 0.14) 4px
  );
  opacity: 0.45;
  transform: translateY(var(--subtitle-scan-y, 0));
  mix-blend-mode: multiply;
}

.hero .scroll-hint {
  margin-top: 0.5rem;
  cursor: pointer;
}

/* ── Hero credit line ── */

.hero-credit {
  position: absolute;
  left: calc(var(--crt-bezel) + var(--crt-rail-w) + 0.5rem);
  bottom: calc(var(--crt-bezel) + var(--crt-footer-h) + 0.65rem);
  z-index: 6;
  max-width: min(36rem, calc(100% - var(--gutter) * 2));
  margin: 0;

  display: flex;
  align-items: baseline;
  gap: 0.5rem;

  font-family: var(--font-terminal);
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  line-height: 1.25;
  letter-spacing: 0.035em;

  color: var(--gold);
  opacity: 0.44;

  pointer-events: none;
  user-select: none;

  text-align: left;
  text-shadow:
    0 0 10px rgba(255, 36, 52, 0.12),
    0 0 22px rgba(229, 9, 20, 0.06),
    0 1px 10px rgba(0, 0, 0, 0.85);

  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.hero-credit__prompt {
  flex: 0 0 auto;
  color: var(--amber);
  opacity: 0.9;
}

.hero-credit__text {
  color: rgba(255, 36, 52, 0.76);
}

/* Keep the credit hidden during the boot sequence */
.hero.is-booting .hero-credit {
  opacity: 0;
  transform: translateY(6px);
}

/* Reveal subtly after boot completes */
.hero.is-boot-complete .hero-credit {
  opacity: 0.44;
  transform: translateY(0);
}

/* Slight Swiss-polished hover behavior */
.hero:hover .hero-credit {
  opacity: 0.58;
}

/* Mobile refinement */
@media (max-width: 640px) {
  .hero {
    --crt-rail-w: 1.75rem;
    padding-left: calc(var(--crt-rail-w) + 0.75rem);
    padding-right: calc(var(--crt-rail-w) + 0.75rem);
  }

  .hero-crt-frame__rail span:not(.hero-crt-frame__rail-bar) {
    font-size: 0.62rem;
  }

  .hero-crt-frame__rail--right span:first-child {
    display: none;
  }

  .hero-crt-frame__titlebar-sub {
    display: none;
  }

  .hero-crt-frame__footer-status {
    display: none;
  }

  .hero-crt-frame__rule--mid {
    display: none;
  }

  .hero-credit {
    left: calc(var(--crt-bezel) + 0.5rem);
    bottom: calc(var(--crt-bezel) + var(--crt-footer-h) + 0.5rem);
    flex-direction: column;
    gap: 0.12rem;
    max-width: calc(100% - var(--crt-bezel) * 2 - 1rem);
    font-size: 0.95rem;
    line-height: 1.25;
    opacity: 0.38;
  }

  .hero.is-boot-complete .hero-credit {
    opacity: 0.38;
  }

  .hero:hover .hero-credit {
    opacity: 0.46;
  }
}

/* ── Terminal story scroll ── */

.story {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
}

.story-scroller {
  position: relative;
}

.story-pin {
  display: block;
  padding: 0;
}

.story .story-pin-inner {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1680px;
  margin-left: var(--gutter);
  margin-right: auto;
}

.story-header {
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
}

.story-section-title {
  font-size: clamp(1rem, 2.6vw, 1.65rem);
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.story-col--left {
  min-width: 0;
}

.story-col--right {
  display: none !important;
}

/* ── Terminal panel frame ── */

.terminal-panel {
  position: relative;
  padding: clamp(0.85rem, 1.6vw, 1.15rem);
  border: 2px solid rgba(255, 77, 90, 0.32);
  background:
    linear-gradient(160deg, rgba(229, 9, 20, 0.07) 0%, transparent 42%),
    #050505;
  box-shadow:
    inset 0 0 0 1px rgba(255, 36, 52, 0.1),
    inset 0 0 24px rgba(229, 9, 20, 0.03),
    0 18px 44px rgba(0, 0, 0, 0.5);
}

.terminal-panel-frame {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(255, 36, 52, 0.12);
}

.terminal-panel-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--amber);
  border-style: solid;
  opacity: 0.7;
}

.terminal-panel-corner--tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.terminal-panel-corner--tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.terminal-panel-corner--bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.terminal-panel-corner--br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.terminal-panel-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(229, 9, 20, 0.22);
  font-family: var(--font-terminal);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-panel-id,
.story-right-panel-id {
  color: var(--amber);
}

.terminal-panel-title,
.story-right-panel-title {
  text-align: center;
  color: var(--gold);
}

.terminal-panel-status {
  color: var(--muted);
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
}

.terminal-window {
  border: 2px solid rgba(255, 36, 52, 0.22);
  background: #060606;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 36, 52, 0.06),
    inset 0 2px 12px rgba(0, 0, 0, 0.45);
  max-width: 100%;
}

/* ── Right panel placeholder ── */

.story-right-panel {
  min-height: clamp(560px, 78vh, 860px);
  display: flex;
  flex-direction: column;
  border: 2px dashed rgba(229, 9, 20, 0.28);
  background:
    linear-gradient(180deg, rgba(229, 9, 20, 0.04) 0%, transparent 30%),
    rgba(8, 8, 8, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 36, 52, 0.06);
}

.story-right-panel-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: clamp(0.85rem, 1.6vw, 1.15rem);
  border-bottom: 1px dashed rgba(229, 9, 20, 0.2);
  font-family: var(--font-terminal);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-right-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 2rem;
  text-align: center;
}

.story-right-placeholder-label {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(0.45rem, 1vw, 0.6rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.story-right-placeholder-text {
  margin: 0;
  font-family: var(--font-terminal);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-right-placeholder-meta {
  margin: 0.5rem 0 0;
  font-family: var(--font-terminal);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  letter-spacing: 0.08em;
  color: rgba(229, 9, 20, 0.45);
}

.terminal-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.15rem;
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.1), rgba(229, 9, 20, 0.04));
  border-bottom: 2px solid var(--border);
}

.terminal-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.terminal-dot--close { background: #ff6b5a; }
.terminal-dot--min { background: var(--warm); }
.terminal-dot--max { background: #6bcf4e; opacity: 0.85; }

.terminal-title {
  font-family: var(--font-terminal);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text);
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-status {
  font-family: var(--font-terminal);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.terminal-body {
  border-top: 1px solid rgba(255, 36, 52, 0.06);
  background: #080808;
}

.terminal-viewport {
  position: relative;
  height: clamp(560px, 78vh, 860px);
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 9, 20, 0.45) rgba(255, 36, 52, 0.06);
}

.terminal-viewport:focus-visible {
  outline: 2px solid rgba(255, 36, 52, 0.35);
  outline-offset: -2px;
}

.terminal-viewport::-webkit-scrollbar {
  width: 10px;
}

.terminal-viewport::-webkit-scrollbar-track {
  background: rgba(255, 36, 52, 0.04);
}

.terminal-viewport::-webkit-scrollbar-thumb {
  background: rgba(229, 9, 20, 0.35);
  border-radius: 5px;
  border: 2px solid #080808;
}

.terminal-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 36, 52, 0.5);
}

.terminal-viewport::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5rem;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, #080808 0%, rgba(8, 8, 8, 0.85) 40%, transparent 100%);
}

.terminal-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(0, 0, 0, 0.035) 2px,
      rgba(0, 0, 0, 0.035) 3px
    ),
    linear-gradient(to top, rgba(8, 8, 8, 0.35) 0%, transparent 10%);
}

.terminal-scroll {
  padding: 2rem clamp(1.75rem, 3.5vw, 2.75rem) 2.5rem;
}

.terminal-line {
  margin: 0 0 0.65rem;
  font-family: var(--font-terminal);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.48;
  color: var(--gold);
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.terminal-line--prompt {
  color: var(--warm);
  margin-bottom: 0.35rem;
}

.terminal-line--meta {
  color: var(--amber);
  opacity: 0.85;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.terminal-line--eof {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(229, 9, 20, 0.25);
}

.t-prompt {
  color: var(--amber);
  margin-right: 0.4em;
  font-weight: 400;
}

.story-chapter {
  margin: 0 0 clamp(3rem, 5.5vw, 4.25rem);
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
  border-bottom: 1px solid rgba(229, 9, 20, 0.07);
  scroll-margin-top: 1.5rem;
}

.story-chapter:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 2rem;
}

.story-chapter p {
  margin: 0;
}

.story-chapter .terminal-line {
  color: #ebe4b8;
  line-height: 1.68;
  font-size: clamp(1.25rem, 1.85vw, 1.55rem);
  letter-spacing: 0.02em;
  max-width: none;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.story-chapter .t-prompt {
  display: inline-block;
  min-width: 2.75em;
  color: var(--amber);
  opacity: 0.9;
}

.terminal-footer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem clamp(1.15rem, 2.5vw, 1.75rem);
  background: rgba(229, 9, 20, 0.04);
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
}

.terminal-footer-prompt {
  color: var(--amber);
}

.terminal-footer-cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--gold);
  animation: cursor-blink 1s steps(1) infinite;
}

.terminal-footer-hint {
  margin-left: auto;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-sidebar {
  display: none !important;
}

.story-sidebar .story-ch-num {
  grid-row: 1 / 3;
  margin-bottom: 0;
}

.story-sidebar .story-ch-label {
  grid-column: 2;
  margin: 0;
}

.story-sidebar .story-pull {
  grid-column: 2;
}

.story-sidebar .story-dots {
  grid-column: 3;
  grid-row: 1 / 3;
  flex-direction: row;
  margin: 0;
  padding: 0;
  border: none;
}

.story-sidebar .story-progress {
  grid-column: 2;
}

.story-ch-num {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: rgba(229, 9, 20, 0.2);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.story-ch-label {
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.5rem;
}

.story-pull-label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-pull p:not(.story-pull-label) {
  font-family: var(--font-terminal);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.3;
  color: var(--warm);
  margin: 0 0 0.2rem;
  font-weight: 400;
}

.story-dots {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.story-dot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.story-dot:hover {
  color: var(--warm);
  background: rgba(229, 9, 20, 0.06);
}

.story-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.story-dot.is-active {
  color: var(--gold);
}

.story-dot.is-active::before {
  background: var(--amber);
  transform: scale(1.25);
}

.story-progress-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.story-progress-track {
  height: 3px;
  background: rgba(255, 36, 52, 0.12);
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.2s var(--ease);
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.scroll-hint:hover {
  color: var(--warm);
}

.scroll-hint-prefix {
  color: var(--amber);
  font-weight: 600;
}

.scroll-hint::after {
  content: "↓";
  color: var(--gold);
  animation: bob 2s ease-in-out infinite;
}

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

/* ── Identity bar ── */

.identity-bar {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.6);
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.identity-block {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem);
  border-right: 1px solid var(--border);
  transition: background 0.35s var(--ease), box-shadow 0.35s;
}

.identity-block:last-child {
  border-right: none;
}

.identity-block:hover {
  background: var(--accent-dim);
  box-shadow: inset 0 0 30px rgba(229, 9, 20, 0.06);
}

.identity-block strong {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.identity-block span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Section headers ── */

.section {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
}

.section--compact-top {
  padding-top: var(--section-pad-compact);
}

.section--tight-bottom {
  padding-bottom: var(--section-pad-compact);
}

.section-intro--compact {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-intro {
  margin-bottom: clamp(3rem, 7vw, 5rem);
  max-width: 52rem;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2.4vw, 1.5rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0.75rem 0 0;
}

.title-line {
  display: block;
  overflow: hidden;
}

.title-line--accent em {
  font-style: normal;
  color: var(--warm);
}

/* ── Numbered blocks ── */

.numbered-list {
  display: flex;
  flex-direction: column;
}

.numbered-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--border);
  align-items: start;
  transition: background 0.3s;
}

.numbered-item:hover {
  background: rgba(255, 36, 52, 0.02);
}

.numbered-item:last-child {
  border-bottom: 1px solid var(--border);
}

.item-num {
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  color: var(--amber);
  line-height: 1;
  min-width: 3.5ch;
}

.item-body h3 {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0.01em;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.item-body p {
  margin: 0;
  color: var(--muted);
  max-width: 52rem;
  font-size: clamp(1.02rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

/* ── Experience ── */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--border);
  will-change: clip-path;
  transition: background 0.3s;
}

.experience-card:hover {
  background: rgba(229, 9, 20, 0.02);
}

.experience-card:last-child {
  border-bottom: 1px solid var(--border);
}

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 3.5ch;
}

.exp-num {
  font-family: var(--font-pixel);
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  color: var(--amber);
  line-height: 1;
}

.exp-content header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.exp-content h3 {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--text);
}

.exp-dates {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  font-family: var(--font-body);
}

.exp-role {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.exp-location {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.skill-tags span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  background: rgba(10, 10, 10, 0.8);
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.skill-tags span:hover {
  border-color: var(--amber);
  color: var(--warm);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.2);
}

.exp-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.exp-content li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 48rem;
}

.exp-content li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 600;
}

/* ── Value props ── */

.value-props .numbered-item {
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}

.value-props .item-body p {
  color: var(--text);
}

/* ── Skills by category ── */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.skills-category {
  background: var(--bg);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  transition: background 0.35s var(--ease);
}

.skills-category:hover {
  background: var(--bg-elevated);
}

.skills-category-title {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--gold);
}

.skills-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.skills-list li {
  font-size: 0.95rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
  transition: color 0.25s;
}

.skills-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 600;
}

.skills-category:hover .skills-list li {
  color: var(--text);
}

.education-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.education-body h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 600;
  color: var(--text);
}

.education-degree {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--warm);
  letter-spacing: 0.02em;
}

.education-text {
  margin: 0 0 1rem;
  font-size: clamp(1.02rem, 1.4vw, 1.1rem);
  line-height: 1.75;
  color: var(--text);
  max-width: 52rem;
}

.education-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.education-points li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.education-points li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 600;
}

/* ── Contact CTA ── */

.contact {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 14vw, 10rem) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.1rem, 4.5vw, 2.2rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  overflow: hidden;
}

.contact-title-inner {
  display: block;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.contact-links a,
.contact-links .btn {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--border-strong);
  background: rgba(10, 10, 10, 0.6);
  transition: border-color 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}

.contact-links a:hover,
.contact-links .btn:hover {
  border-color: var(--gold);
  background: var(--accent-dim);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.25);
}

.resume-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0 0 1.25rem;
}

.resume-options .btn,
.btn-resume {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  border: 1px dashed var(--border-strong);
  background: rgba(10, 10, 10, 0.6);
  color: var(--muted);
}

.btn-resume:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 2rem 0 3rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */

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

  .skills-grid .skills-category:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(10px);
    padding: 1.5rem var(--gutter);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.4s;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .identity-grid {
    grid-template-columns: 1fr 1fr;
  }

  .identity-block:nth-child(2) {
    border-right: none;
  }

  .identity-block:nth-child(1),
  .identity-block:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .numbered-item,
  .experience-card,
  .education-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid .skills-category:last-child {
    grid-column: auto;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-objective-text {
    font-size: clamp(1.25rem, 11vw, 3rem);
  }

  .story-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .terminal-viewport {
    height: clamp(460px, 68vh, 640px);
  }

  .terminal-chrome {
    grid-template-columns: auto 1fr;
  }

  .terminal-status {
    display: none;
  }

  .brand-name {
    font-size: clamp(0.6rem, 4.5vw, 1rem);
  }
}

@media (max-width: 480px) {
  .identity-grid {
    grid-template-columns: 1fr;
  }

  .identity-block {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .identity-block:last-child {
    border-bottom: none;
  }
}

/* ── Print / PDF ── */

@media print {
  .scanlines,
  .crt-glow,
  .site-header,
  .hero-canvas,
  .hero-overlay,
  .scroll-hint,
  .nav-toggle,
  .contact-links .btn {
    display: none !important;
  }

  .terminal-viewport {
    height: auto !important;
    overflow: visible !important;
  }

  body {
    background: #fff;
    color: #111;
    cursor: auto;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-headline,
  .section-title,
  .contact-title,
  .item-num,
  .exp-num {
    color: #111 !important;
    text-shadow: none !important;
  }

  .hero-summary,
  .item-body p,
  .exp-content li,
  .muted {
    color: #333 !important;
  }

  .section,
  .contact {
    padding: 2rem 0;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint::after { animation: none; }
  .brand-cursor { animation: none; opacity: 1; }
  .hero-objective-text.is-fading { opacity: 1; transform: none; }
  .hero-type-cursor { animation: none; opacity: 1; }
  .hero-film-grain { animation: none; }
  .hero-boot-sweep { display: none; }
  .hero-summary::after { display: none; }
  .hero.is-title-glitch .hero-objective-text.is-ready { transform: scaleX(0.9); }
  #hero-fx-layer { display: none; }

  .hero-crt-frame__pill,
  .hero-crt-frame__scanlines {
    animation: none !important;
  }

  .hero-crt-frame__bezel,
  .hero-crt-frame__pixel,
  .hero-crt-frame__scanlines,
  .hero-crt-frame__titlebar,
  .hero-crt-frame__footer,
  .hero-crt-frame__rail {
    transform: none !important;
  }

  .hero.is-crt-pulse .hero-crt-frame__bezel {
    animation: none !important;
  }

  .terminal-viewport { scroll-behavior: auto; }
  .section-rule { --rule-scale: 1; }
  .experience-card { will-change: auto; }
  .scanlines { opacity: 0.25; }
}

/* Red phosphor preview: same composition, alternate signal color. */
.hero-crt-frame__rule--mid {
  display: none;
}

.hero-summary {
  max-width: 48rem;
  font-size: clamp(0.78rem, 1.25vw, 1rem);
  line-height: 1.9;
  letter-spacing: clamp(0.08em, 0.35vw, 0.18em);
  text-transform: uppercase;
  font-weight: 500;
}

.hero-summary__line {
  display: block;
}

.hero-summary__line:first-child {
  color: #ff6975;
  font-size: 0.82em;
  letter-spacing: 0.24em;
}

.hero-summary__line + .hero-summary__line {
  color: var(--text);
}


/* Compact profile + digital blackletter identity */
.brand-name {
  font-family: "Grenze Gotisch", Georgia, serif;
  font-size: clamp(1.75rem, 2.6vw, 2.45rem);
  font-weight: 800;
  line-height: 1;
  padding-bottom: 0.12em;
  letter-spacing: 0.02em;
  text-transform: none;
  color: transparent;
  -webkit-text-stroke: 0.35px rgba(255, 77, 90, 0.72);
  background: repeating-linear-gradient(
    to bottom,
    #ff6975 0 1px,
    #ff2434 1px 5px,
    rgba(255, 36, 52, 0.5) 5px 5.25px,
    transparent 5.25px 6px
  );
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 7px rgba(229, 9, 20, 0.38));
}

.profile-system {
  position: relative;
  overflow: hidden;
}

.profile-system__heading {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.profile-system__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: stretch;
}

.profile-narrative {
  position: relative;
  padding: clamp(1.4rem, 2.5vw, 2.25rem);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  background: linear-gradient(145deg, rgba(229, 9, 20, 0.075), rgba(5, 5, 5, 0.86) 48%);
  box-shadow: inset 0 0 0 1px rgba(255, 36, 52, 0.045);
}

.profile-narrative p {
  max-width: 58ch;
}

.profile-command {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0.055em;
}

.profile-command span,
.profile-direction {
  color: var(--gold);
}

.profile-direction {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-terminal);
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  line-height: 1.38;
}

.profile-capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.profile-capability {
  min-width: 0;
  padding: clamp(1.25rem, 2.3vw, 2rem);
  background: rgba(8, 8, 8, 0.96);
}

.profile-capability__num {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--amber);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
}

.profile-capability h3 {
  margin-bottom: 0.65rem;
  color: var(--text);
}

.profile-capability p {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* LINE becomes the one place where a physical workflow is visualized as data. */
.line-system {
  position: relative;
  overflow: hidden;
}

.line-system > .container {
  position: relative;
  z-index: 1;
}

.line-system__signal {
  position: absolute;
  top: 10%;
  right: -4%;
  width: min(44vw, 680px);
  height: auto;
  opacity: 0.11;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(229, 9, 20, 0.3));
}

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

  .line-system__signal {
    width: 72vw;
    right: -18%;
    opacity: 0.065;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: clamp(1.45rem, 7.2vw, 2rem);
  }

  .profile-capabilities {
    grid-template-columns: 1fr;
  }

  .line-system__signal {
    display: none;
  }
}
