@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --bg: #0b0b0e;
  --surface: #141419;
  --surface-2: #1b1b22;
  --text: #f0efea;
  --muted: #94929c;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #e8a33d;
  --accent-soft: rgba(232, 163, 61, 0.14);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #0b0b0e; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.tc {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- playhead progress ---------- */
.playhead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: transparent;
}
.playhead-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(232, 163, 61, 0.6);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(11, 11, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.nav-logo {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav-logo-dot { color: var(--accent); }
.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: center;
  font-size: 0.95rem;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  transition: border-color 0.25s, background 0.25s;
}
.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse 80% 55% at 70% 15%, rgba(232, 163, 61, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 45% at 20% 90%, rgba(120, 110, 255, 0.05), transparent 60%);
}
.hero-inner { max-width: 1200px; margin: 0 auto; width: 100%; }
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(3.2rem, 12.5vw, 9.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero-cursor {
  display: inline-block;
  width: 0.07em;
  height: 0.78em;
  margin-left: 0.06em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-tag {
  margin-top: 2rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 36rem;
}

.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s var(--ease) forwards;
}
.hero-title .reveal-line:nth-child(1) > span { animation-delay: 0.15s; }
.hero-title .reveal-line:nth-child(2) > span { animation-delay: 0.28s; }
.hero-kicker > span { animation-delay: 0.05s; }
.hero-tag > span { animation-delay: 0.45s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-meta {
  position: absolute;
  top: 5.2rem;
  right: clamp(1.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
}
.rec-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e0483e;
  animation: blink 1.6s steps(1) infinite;
}
.hero-scroll {
  position: absolute;
  bottom: 3.4rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 44px;
  background: var(--muted);
  animation: drop 1.8s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drop {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-ruler {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 18px;
  border-top: 1px solid var(--line);
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px 12px
  );
  mask-image: linear-gradient(to bottom, black 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  background: var(--surface);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scroll-x 60s linear infinite;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track b {
  font-weight: 500;
  color: var(--text);
}
.marquee-track .sep { color: var(--accent); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem); }
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.8rem;
}
h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* ---------- about ---------- */
.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.about-photo {
  position: relative;
}
.about-photo img {
  width: 100%;
  border-radius: 10px;
  filter: grayscale(28%) contrast(1.04);
  border: 1px solid var(--line);
}
.about-photo figcaption {
  position: absolute;
  bottom: 0.8rem;
  left: 0.9rem;
  background: rgba(11, 11, 14, 0.65);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
}
.about-text h2 { margin-bottom: 1.4rem; }
.about-text > p:not(.section-label) {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 34rem;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.8rem;
}
.tools li {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.tools li:hover { border-color: var(--accent); color: var(--text); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1.2rem;
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-num::after { content: '+'; color: var(--accent); font-weight: 400; }
.stats dd {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------- work ---------- */
.work { max-width: 1280px; margin: 0 auto; }
.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 2rem;
  margin-bottom: 3rem;
}
.work-head .section-label { width: 100%; margin-bottom: 0.4rem; }
.work-hint { margin-left: auto; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.4rem;
}
.show-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  display: block;
  width: 100%;
}
.show-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
  filter: saturate(0.85) brightness(0.9);
}
.show-card:hover img,
.show-card:focus-visible img { transform: scale(1.06); filter: saturate(1) brightness(1); }
.show-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.07);
  background: repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.015) 18px 36px);
}
.show-card-fallback svg { width: 72px; height: 72px; }
.show-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 11, 0.92) 8%, rgba(8, 8, 11, 0.35) 45%, rgba(8, 8, 11, 0.12) 70%);
}
.show-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
}
.show-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.net-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 0.28rem 0.6rem;
  border-radius: 5px;
  background: rgba(11, 11, 14, 0.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  color: var(--text);
}
.show-card-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(11, 11, 14, 0.55);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.show-card-arrow svg { width: 15px; height: 15px; }
.show-card:hover .show-card-arrow,
.show-card:focus-visible .show-card-arrow { opacity: 1; transform: none; }
.show-card h3 {
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.show-card-sub {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.1rem;
}
.show-card-count {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: 0.55rem;
  text-transform: uppercase;
}

/* ---------- contact ---------- */
.contact {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--line);
}
.contact-big {
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin-top: 0.5rem;
}
.contact-big span { color: var(--accent); }
.contact .section-label::before { display: none; }
.contact-actions {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.contact-mail {
  font-size: clamp(1.15rem, 3.2vw, 1.8rem);
  font-weight: 500;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--accent);
  border-radius: 99px;
  color: var(--accent);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.contact-mail:hover {
  background: var(--accent);
  color: #0b0b0e;
  transform: translateY(-2px);
}
.contact-phone {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color 0.25s;
}
.contact-phone:hover { color: var(--text); }
.contact-social {
  margin-top: 2.6rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.contact-social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.25s;
}
.contact-social a:hover { color: var(--text); }
.contact-social svg { width: 19px; height: 19px; }

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer a { transition: color 0.25s; }
.footer a:hover { color: var(--text); }

/* ---------- overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.overlay[hidden] { display: none; }
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s;
}
.overlay.open .overlay-backdrop { opacity: 1; }
.overlay-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: 88svh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  transform: translateY(60px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.overlay.open .overlay-panel { transform: none; opacity: 1; }
.overlay-close {
  position: sticky;
  top: 0;
  float: right;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: border-color 0.25s, transform 0.25s;
}
.overlay-close:hover { border-color: var(--accent); transform: rotate(90deg); }
.overlay-close svg { width: 16px; height: 16px; }
.overlay-head { padding-right: 3.5rem; }
.overlay-meta { margin-bottom: 0.7rem; color: var(--accent); }
.overlay-head h3 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.overlay-sub { color: var(--muted); margin-top: 0.35rem; }
.ep-list {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.ep-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.25s;
}
a.ep-row:hover { background: var(--surface-2); }
.ep-thumb {
  width: 104px;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}
.ep-thumb-empty {
  width: 104px;
  aspect-ratio: 2 / 1;
  border-radius: 6px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.ep-thumb-empty svg { width: 18px; height: 18px; opacity: 0.6; }
.ep-title {
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.3;
}
.ep-info {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}
.ep-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ep-role {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.ep-link-ico { color: var(--muted); }
.ep-link-ico svg { width: 16px; height: 16px; }
a.ep-row:hover .ep-link-ico { color: var(--accent); }

/* ---------- scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

body.lock { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .hero-meta { display: none; }
  .ep-row { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 0.7rem; }
  .ep-thumb, .ep-thumb-empty { width: 84px; }
}
@media (max-width: 520px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .ep-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ep-thumb, .ep-thumb-empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-line > span { opacity: 1; transform: none; }
}
