:root {
  --bg: #07071a;
  --bg-elev: #0d0d24;
  --ink: #ffffff;
  --ink-dim: #888888;
  --ink-faint: #2a2a2a;
  --accent: #0000FF;
  --accent-bright: #2d2dff;
  --line: #181818;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  mix-blend-mode: screen;
}

/* Pulsing blue glow in background */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(circle, rgba(0,0,255,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

::selection { background: var(--accent); color: var(--ink); }

/* ---------- SCROLL PROGRESS BAR ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  z-index: 101;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--accent-bright);
  pointer-events: none;
}

/* ---------- SNAKE (right side of about section) ---------- */
.snake-wrap {
  position: absolute;
  top: 2rem;
  right: 2rem;
  bottom: 2rem;
  width: 180px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.snake-wrap.visible { opacity: 1; }

.snake-img-wrap {
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.snake-wrap.visible .snake-img-wrap {
  opacity: 1;
  transform: translateY(0);
}

.snake-float {
  animation: snake-float 7s ease-in-out infinite;
  animation-delay: 1.4s;
}
@keyframes snake-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.snake-sway {
  animation: snake-sway 5s ease-in-out infinite;
  animation-delay: 1.6s;
  transform-origin: 50% 50%;
}
@keyframes snake-sway {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.snake-rotate {
  animation: snake-rotate 9s ease-in-out infinite;
  animation-delay: 1.8s;
  transform-origin: 50% 30%;
}
@keyframes snake-rotate {
  0%, 100% { transform: rotate(0deg); }
  33% { transform: rotate(-2deg); }
  66% { transform: rotate(2deg); }
}

.snake-svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  overflow: visible;
}
.snake-body {
  fill: url(#snakeGradient);
  stroke: #000044;
  stroke-width: 2;
  stroke-linejoin: round;
}
.snake-halo {
  fill: #0000FF;
  opacity: 0.4;
  filter: blur(12px);
  transform-origin: center;
  animation: snake-pulse 4s ease-in-out infinite;
  animation-delay: 2s;
}
@keyframes snake-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.02); }
}

.snake-wrap.exiting {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@media (max-width: 900px) {
  .snake-wrap { width: 80px; right: 0.75rem; top: 1rem; bottom: 1rem; }
  @keyframes snake-sway {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
  }
}

/* ---------- CUSTOM CURSOR (desktop only) ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-bright);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}
.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid #fff;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              opacity 0.3s ease;
}
body.cursor-hover .cursor-ring {
  width: 64px;
  height: 64px;
  border-color: var(--accent-bright);
}
body.cursor-hover .cursor-dot {
  width: 0;
  height: 0;
}
.cursor-dot, .cursor-ring { opacity: 0; }
body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring { opacity: 1; }

@media (hover: none), (max-width: 900px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- NAV ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background: rgba(7, 7, 26, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 12px var(--accent);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.3s;
}
.nav-links a::before {
  content: counter(nav-counter, decimal-leading-zero) ' / ';
  counter-increment: nav-counter;
  color: var(--ink-dim);
}
.nav-links { counter-reset: nav-counter; }
.nav-links a:hover { opacity: 0.6; }
.burger { display: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  padding: 8rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 4rem;
}
.hero-meta .blink {
  color: var(--accent-bright);
  animation: blink 1.5s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

h1.hero-title {
  font-size: clamp(4rem, 14vw, 16rem);
  line-height: 0.85;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variation-settings: 'opsz' 144;
  position: relative;
}
h1.hero-title .italic {
  font-style: italic;
  font-weight: 600;
  color: var(--accent-bright);
}
h1.hero-title .stroke {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
  font-weight: 700;
  paint-order: stroke fill;
}

/* Brand name */
.glitch {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 40%, #0d00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  font-weight: 500;
  animation: tape-roll 2.00s cubic-bezier(0.12, 1, 0.3, 1) both;
}
@keyframes tape-roll {
  0%   { transform: translateX(-140px); filter: blur(14px); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateX(0);     filter: blur(0);    opacity: 1; }
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-top: 4rem;
}
.hero-tagline {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 28ch;
  font-style: italic;
}
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.hero-stats span { color: var(--ink); font-size: 1.5rem; font-family: 'Fraunces'; }
.scroll-cue {
  text-align: right;
  justify-self: end;
  grid-column: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.scroll-cue .arrow {
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--accent-bright);
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  background: var(--bg-elev);
  position: relative;
  z-index: 1;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--ink-dim);
  line-height: 1;
}
.marquee-group {
  display: flex;
  flex-shrink: 0;
  gap: 4rem;
  padding-right: 4rem;
}
.marquee-group span { display: flex; align-items: center; gap: 1rem; white-space: nowrap; }
.marquee-group span::after {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background: url('images/snake1.png') center / contain no-repeat;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- VIEW COUNTER STATS ---------- */
.stats {
  padding: 6rem 2.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.stats-headline {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 1.5rem 0 5rem;
  max-width: 22ch;
}
.stats-headline em {
  font-style: italic;
  color: var(--accent-bright);
}

.total-views {
  display: block;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px dashed var(--ink-faint);
}
.total-views .total-num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent-bright);
  font-variation-settings: 'opsz' 144;
  margin-bottom: 1.25rem;
}
.total-views .total-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  text-transform: uppercase;
  line-height: 1.6;
  max-width: 60ch;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.platform {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--ink-faint);
  position: relative;
  overflow: hidden;
}
.platform:last-child { border-right: none; }
.platform::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.platform-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.platform-name svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-bright);
  flex-shrink: 0;
}
.platform-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 1rem;
  line-height: 1;
}
.platform-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink);
  letter-spacing: 0.1em;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.platform-meta .arrow-up {
  color: var(--accent-bright);
  font-size: 0.75rem;
}

.stats-footnote {
  margin-top: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--ink);
  text-transform: uppercase;
  text-align: right;
}

/* ---------- ABOUT ---------- */
.about-snake-img {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-snake-img img {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.about {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

/* ===== PHONE PARALLAX SCENE ===== */
.about-scene {
  position: relative;
  min-height: 220vh;
}

.about-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---- Phone ---- */
.snake-parallax {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  will-change: transform, opacity;
}

.snake-parallax-img {
  width: clamp(120px, 18vw, 220px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 30px rgba(45,45,255,0.3));
}

/* ---- About float ---- */
.about-float {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 80px));
  width: min(640px, 90vw);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.about-float.unlocked { pointer-events: auto; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-bright);
}
.about-content {
  position: relative;
  z-index: 10;
  margin: 0 auto;
}
.about > .section-label {
  position: relative;
  z-index: 10;
}
.about-content h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  max-width: 22ch;
}
.about-content h2 em {
  color: var(--accent-bright);
  font-weight: 600;
}
.about-content p {
  margin-top: 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 55ch;
}
.skill-list {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  list-style: none;
  max-width: 500px;
}
.skill-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--ink-faint);
  display: flex;
  justify-content: space-between;
}
.skill-list li span { color: var(--accent-bright); font-size: 0.7rem; }

/* ---------- WORK / REEL ---------- */
.work {
  padding: 8rem 2.5rem 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 4rem;
}
.work-header h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.work-header h2 em {
  font-style: italic;
  color: var(--accent-bright);
}
.work-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.reel-list {
  display: flex;
  flex-direction: column;
}
.reel-item {
  display: grid;
  grid-template-columns: 60px 1fr 200px 200px 60px;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0.5rem;
  border-top: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reel-item:last-child { border-bottom: 1px solid var(--line); }

.reel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}
.reel-item:hover::before { opacity: 1; }
.reel-item:hover { padding-left: 1.5rem; padding-right: 1.5rem; }

.reel-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.reel-title {
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.3s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reel-title em { font-style: italic; }
.reel-title-main { font-size: 1.4em; }
.reel-title-accent { color: var(--accent-bright); }
.reel-title-sub { font-size: 0.6em; opacity: 0.7; }
.reel-item:hover .reel-title {
  color: var(--accent-bright);
  transform: translateX(8px);
}
.reel-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.reel-arrow {
  text-align: right;
  font-size: 1.5rem;
  color: var(--ink-faint);
  transition: color 0.3s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reel-item:hover .reel-arrow {
  color: var(--accent-bright);
  transform: rotate(-45deg);
}

/* ---------- GROUP / EXPANDABLE ITEMS ---------- */
.reel-item[data-group] .reel-arrow {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}
.reel-item[data-group]:hover .reel-arrow {
  transform: none;
}
.reel-item[data-group].group-open .reel-arrow {
  transform: rotate(90deg);
  color: var(--accent-bright);
}

.reel-subitems {
  grid-column: 1 / -1;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 0px solid var(--ink-faint);
}
.reel-item.group-open .reel-subitems {
  max-height: 800px;
  border-top: 1px solid var(--ink-faint);
}

.reel-sub-item {
  display: grid;
  grid-template-columns: 40px 1fr 180px 100px 40px;
  gap: 1.5rem;
  padding: 1.1rem 1.5rem 1.1rem 3rem;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.3s;
  position: relative;
}
.reel-sub-item:last-child { border-bottom: none; }
.reel-sub-item:hover { background: rgba(13,0,255,0.06); }

.reel-sub-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.reel-sub-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-dim);
  transition: color 0.3s;
}
.reel-sub-item:hover .reel-sub-title { color: var(--accent-bright); }
.reel-sub-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.reel-sub-arrow {
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-align: right;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.reel-sub-item:hover .reel-sub-arrow {
  color: var(--accent-bright);
  transform: rotate(-45deg);
}

/* Hover preview thumbnail */
.reel-thumb {
  position: fixed;
  width: 320px;
  height: 200px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85) translate(-50%, -50%);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
  border: 1px solid var(--accent);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: 0 0 40px rgba(0,0,255,0.4);
}
.reel-thumb.active {
  opacity: 1;
  transform: scale(1) translate(-50%, -50%);
}
.reel-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--bg);
}
.reel-thumb .thumb-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
}
.reel-thumb .thumb-title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-style: italic;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.reel-thumb .thumb-title em {
  color: var(--accent-bright);
  font-style: italic;
}
.reel-thumb .thumb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--accent-bright);
  letter-spacing: 2px;
  align-self: flex-start;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.reel-thumb .thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #000000 0%, #0000FF 100%);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}
.reel-thumb.no-video .thumb-fallback { opacity: 1; }

/* ---------- VIDEO MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.open { display: flex; opacity: 1; }

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.open .modal-inner {
  transform: scale(1) translateY(0);
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.modal-meta .modal-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
}
.modal-meta .modal-title em {
  font-style: italic;
  color: var(--accent-bright);
}
.modal-meta .modal-tag::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.6rem;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--accent);
  animation: blink 1.5s infinite;
}

.modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--accent);
  box-shadow: 0 0 60px rgba(0, 0, 255, 0.3);
  overflow: hidden;
}
.modal-frame video,
.modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  background: rgba(0, 0, 255, 0.1);
}

.modal-hint {
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
  text-align: center;
}
.modal-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  margin: 0 2px;
  font-family: inherit;
  color: var(--ink);
}

.modal-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, #000000 0%, #000033 100%);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.modal-fallback .glyph {
  font-size: 2rem;
  color: var(--accent-bright);
}
.modal-fallback .small {
  color: var(--ink-dim);
  font-size: 0.7rem;
  max-width: 32ch;
  text-align: center;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0.05em;
}

body.modal-open { overflow: hidden; }

@media (max-width: 700px) {
  .modal { padding: 1rem; }
  .modal-meta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .modal-close { top: -2.75rem; }
}

/* ---------- TIMELINE / PROCESS ---------- */
.timeline-section {
  padding: 8rem 2.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  position: relative;
  z-index: 1;
}
.timeline-section h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 4rem;
  max-width: 25ch;
}
.timeline-section h2 em { color: var(--accent-bright); }

.timeline-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.step-wrapper {
  position: relative;
  border-right: 1px solid var(--ink-faint);
}
.step-wrapper:last-child { border-right: none; }
.timeline-step {
  padding: 2.5rem 1.5rem;
  position: relative;
  background: var(--bg-elev);
  transform: translateX(-40px);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease;
}
.timeline-track.steps-visible .step-wrapper:nth-child(1) .timeline-step { transform: none; opacity: 1; }
.timeline-track.steps-visible .step-wrapper:nth-child(2) .timeline-step { transform: none; opacity: 1; transition-delay: 0.15s; }
.timeline-track.steps-visible .step-wrapper:nth-child(3) .timeline-step { transform: none; opacity: 1; transition-delay: 0.3s; }
.timeline-track.steps-visible .step-wrapper:nth-child(4) .timeline-step { transform: none; opacity: 1; transition-delay: 0.45s; }
.timeline-step::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 1.5rem;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent-bright);
}
.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}
.step-desc {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-dim);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

/* ---------- CONTACT ---------- */
.contact {
  padding: 8rem 2.5rem 4rem;
  position: relative;
  z-index: 1;
}
.contact-headline {
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 2rem 0 4rem;
}
.contact-headline em {
  font-style: italic;
  color: var(--accent-bright);
}
.contact-headline .stroke {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
  paint-order: stroke fill;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  margin-top: 2rem;
}
.contact-info dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-top: 2rem;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd {
  font-size: 1.4rem;
  margin-top: 0.5rem;
  font-weight: 600;
}
.contact-info a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  transition: border-color 0.3s, color 0.3s;
  padding-bottom: 2px;
}
.contact-info a:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

/* Form */
form { display: flex; flex-direction: column; gap: 1.75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { position: relative; }
.field label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.field label::before { content: '— '; color: var(--accent-bright); }
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-faint);
  padding: 0.6rem 0;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--ink);
  transition: border-color 0.3s;
  outline: none;
}
.field select { cursor: pointer; }
.field select option { background: var(--bg); color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent-bright);
}
.field textarea { resize: vertical; min-height: 100px; }

button.submit {
  margin-top: 1rem;
  align-self: flex-start;
  padding: 1.2rem 2.5rem;
  background: var(--accent);
  color: var(--ink);
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
}
button.submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
button.submit:hover::before { transform: translateY(0); }
button.submit span { position: relative; z-index: 1; }
button.submit:hover { color: var(--bg); }

.char-count {
  display: block;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-dim);
  margin-top: 0.25rem;
}
.char-count.near-limit { color: #ff9900; }
.char-count.at-limit { color: #ff3333; }

.form-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-bright);
  margin-top: 0.5rem;
  min-height: 1em;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 3rem 2.5rem 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
footer .right { display: flex; gap: 2rem; }
footer a { color: inherit; text-decoration: none; transition: color 0.3s; }
footer a:hover { color: var(--accent-bright); }

/* ---------- ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- MOBILE PREVIEW (injected via JS) ---------- */
.reel-mobile-preview {
  display: none;
}

@media (max-width: 900px) {
  nav {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
  }
  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
    margin-left: auto;
  }
  .burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
  }
  nav.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.nav-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  nav.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 1.25rem 0 1rem;
    gap: 0;
    border-top: 1px solid var(--ink-faint);
    margin-top: 0.75rem;
  }
  nav.nav-open .nav-links { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--ink-faint); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .nav-links a::before { display: none; }
  .marquee-track { animation-duration: 22s; }
  .hero {
    padding: 6rem 1.25rem 3rem;
    min-height: auto;
    justify-content: flex-start;
    gap: 2.5rem;
  }
  .hero-stats span { display: block; }
  .hero-bottom { grid-template-columns: 1fr; gap: 2rem; }
  .scroll-cue { text-align: left; }
  .work, .timeline-section, .contact { padding: 5rem 1.25rem; }
  .timeline-step {
    transform: none !important;
    opacity: 1 !important;
  }
  .step-wrapper { border-right: none; border-bottom: 1px solid var(--ink-faint); }
  .step-wrapper:last-child { border-bottom: none; }
  .timeline-track { grid-template-columns: 1fr; }
  .about { display: block; padding: 0; }
  .about-scene { min-height: auto; }
  .about-sticky {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1.25rem 3rem;
    overflow: visible;
  }
  .about-float {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    width: 100%;
    pointer-events: auto;
    order: 1;
    top: auto;
    left: auto;
  }
  .snake-parallax {
    position: static;
    transform: none !important;
    order: 2;
    margin-top: 2.5rem;
    text-align: center;
  }
  .snake-parallax-img { width: clamp(80px, 28vw, 140px); }
  .work-header { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .reel-thumb { display: none !important; }

  .reel-list { gap: 0; }

  .reel-item {
    display: block;
    grid-template-columns: none;
    gap: 0;
    padding: 1.75rem 0 2.5rem;
    border-top: 1px solid var(--line);
  }
  .reel-item:hover { padding-left: 0; padding-right: 0; }
  .reel-item:hover::before { opacity: 0; }

  .reel-num {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.7rem;
  }
  .reel-title {
    display: block;
    font-size: 1.2rem !important;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    transform: none !important;
  }
  .reel-item:hover .reel-title { color: var(--ink); transform: none !important; }

  .reel-mobile-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #000033 100%);
    border: 1px solid var(--ink-faint);
    margin: 0.5rem 0 1rem;
  }
  .reel-mobile-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
  }
  .reel-mobile-preview .mp-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.75rem;
  }
  .reel-mobile-preview .mp-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--accent-bright);
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  }
  .reel-mobile-preview .mp-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 0 20px rgba(0,0,255,0.6);
  }
  .reel-mobile-preview .mp-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--ink-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }
  .reel-mobile-preview .mp-fallback .glyph {
    font-size: 1.5rem;
    color: var(--accent-bright);
  }

  .reel-meta {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.65rem;
  }
  .reel-arrow { display: none; }

  .reel-item[data-group="true"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .reel-item[data-group="true"] .reel-num,
  .reel-item[data-group="true"] .reel-title,
  .reel-item[data-group="true"] .reel-mobile-preview,
  .reel-item[data-group="true"] .reel-subitems {
    flex: 0 0 100%;
  }
  .reel-item[data-group="true"] .reel-meta {
    flex: 0 0 auto;
  }
  .reel-item[data-group="true"] .reel-arrow {
    display: block;
    flex: 0 0 auto;
    margin-left: auto;
    margin-bottom: 0.25rem;
    font-size: 0;
    transform: none !important;
  }
  .reel-item[data-group="true"] .reel-arrow::after {
    content: '▸ TAP TO EXPAND';
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--accent-bright);
    border: 1px solid var(--accent-bright);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
  }
  .reel-item[data-group="true"].group-open .reel-arrow::after {
    content: '▾ TAP TO CLOSE';
  }

  .timeline-track { gap: 0; }

  .stats { padding: 4rem 1.25rem; }
  .stats-headline {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    margin: 1.5rem 0 3rem;
  }
  .total-views {
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
  }
  .total-views .total-num {
    font-size: clamp(3.5rem, 18vw, 6rem);
    line-height: 1;
    margin-bottom: 1rem;
  }
  .total-views .total-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    line-height: 1.6;
  }
  .platform-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--ink-faint);
    border-bottom: 1px solid var(--ink-faint);
  }
  .platform {
    border-right: none;
    border-bottom: 1px solid var(--ink-faint);
  }
  .platform:last-child { border-bottom: none; }
  .platform-num {
    font-size: clamp(1.5rem, 7vw, 2.25rem);
    word-break: break-word;
  }
  .stats-footnote {
    text-align: left;
    font-size: 0.6rem;
    line-height: 1.5;
  }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; }
}
