/* ============================================================
   SHUBHAM YADAV — cinematic scroll portfolio
   charcoal/ink · electric-cyan accent · editorial type
   ============================================================ */

:root {
  --ink: #08090c;          /* page background */
  --char: #101218;         /* slot placeholder base */
  --paper: #eceae2;        /* primary text */
  --muted: #8b8f99;        /* secondary text */
  --accent: #4fe0ff;       /* electric cyan */
  --cobalt: #2b4bff;       /* cobalt secondary */
  --hairline: rgba(236, 234, 226, 0.14);
  --font-display: "Anton", Impact, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

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

html { scrollbar-width: thin; scrollbar-color: #2a2d36 var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--ink); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #262a33; border-radius: 8px; }

.mono {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
em { font-family: var(--font-serif); font-style: italic; }

/* ---------- chrome: progress hairline, grain, nav ---------- */

.progress-hair {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cobalt), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
}

.grain {
  position: fixed; inset: -50%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.07;
  /* background-image set from JS (generated noise tile) */
  mix-blend-mode: overlay;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 4vw, 56px);
  z-index: 55;
  mix-blend-mode: difference;
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 0.04em; color: #fff;
}
.nav__brand span { font-family: var(--font-body); font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; margin-left: 6px; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a {
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
  opacity: 0.75; transition: opacity 0.25s ease;
}
.nav__links a:hover { opacity: 1; }

/* ---------- pinned sections & media slots ---------- */

.pin-section {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.media-slot { position: absolute; inset: 0; background: var(--char); }
.media-slot canvas { width: 100%; height: 100%; display: block; }
.media-slot video { display: none; } /* frames are drawn to canvas */

.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,9,12,0.55) 0%, rgba(8,9,12,0) 30%, rgba(8,9,12,0) 55%, rgba(8,9,12,0.82) 100%);
}
.section-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,9,12,0.6), rgba(8,9,12,0.25) 40%, rgba(8,9,12,0.6));
}
.section-scrim--heavy { background: rgba(8, 9, 12, 0.68); }

.rail {
  position: absolute; top: clamp(84px, 12vh, 120px); left: clamp(20px, 4vw, 56px);
  color: var(--accent); z-index: 3;
}

/* ---------- hero ---------- */

.hero__content {
  position: absolute; left: clamp(20px, 4vw, 56px); bottom: clamp(28px, 7vh, 72px);
  z-index: 3;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 14.5vw, 240px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--paper);
}
.hero__name .line { display: block; overflow: hidden; padding-block: 0.02em; }
.hero__name .line--2 { color: transparent; -webkit-text-stroke: 2px var(--paper); margin-left: clamp(24px, 8vw, 160px); }
.hero__name .ltr { display: inline-block; will-change: transform; }

.hero__sub {
  margin-top: clamp(14px, 2.5vh, 26px);
  font-size: clamp(15px, 1.6vw, 22px);
  color: var(--muted);
  max-width: 32ch;
}
.hero__sub em { color: var(--accent); font-size: 1.15em; }

.hero__meta {
  position: absolute; right: clamp(20px, 4vw, 56px); bottom: clamp(28px, 7vh, 72px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 16px;
  z-index: 3;
}
.hero__deg {
  font-size: 13px; color: var(--accent);
  border: 1px solid rgba(79, 224, 255, 0.35);
  padding: 8px 14px; border-radius: 999px;
  min-width: 74px; text-align: center;
}
.hero__hint { color: var(--muted); display: flex; align-items: center; gap: 12px; }
.hint-bar {
  display: inline-block; width: 42px; height: 1px; background: var(--muted);
  position: relative; overflow: visible;
}
.hint-bar::after {
  content: ""; position: absolute; left: 0; top: -1.5px; width: 12px; height: 4px;
  background: var(--accent); animation: hintSlide 1.6s ease-in-out infinite;
}
@keyframes hintSlide { 0%,100% { left: 0; } 50% { left: 30px; } }

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
  background: var(--ink);
  position: relative; z-index: 2;
}
.marquee__track { display: inline-block; animation: marquee 22s linear infinite; will-change: transform; }
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: 0.06em;
  color: var(--paper); opacity: 0.9;
}
.marquee__track i { font-style: normal; color: var(--accent); margin: 0 18px; font-size: 0.7em; vertical-align: middle; }
.marquee--alt .marquee__track { animation-direction: reverse; }
.marquee--alt .marquee__track span { color: transparent; -webkit-text-stroke: 1px rgba(236,234,226,0.55); }

/* ---------- stats ---------- */

.stats { padding: clamp(70px, 12vh, 130px) clamp(20px, 4vw, 56px); background: var(--ink); }
.stats__label { color: var(--accent); margin-bottom: 42px; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.stat { border-top: 1px solid var(--hairline); padding-top: 22px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(52px, 6.5vw, 108px);
  line-height: 1; color: var(--paper);
}
.stat__num em { font-style: normal; color: var(--accent); font-size: 0.6em; vertical-align: 0.35em; }
.stat p { margin-top: 10px; color: var(--muted); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- pillars ---------- */

.pillars__stack { position: absolute; inset: 0; z-index: 3; }
.pillar {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(20px, 6vw, 96px);
  opacity: 0; visibility: hidden;
}
.pillar__ghost {
  position: absolute; right: clamp(8px, 4vw, 64px); top: 50%; transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(180px, 34vw, 560px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(79, 224, 255, 0.22);
  pointer-events: none;
  user-select: none;
}
.pillar__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9.5vw, 168px);
  line-height: 0.9; letter-spacing: 0.01em;
  text-transform: uppercase; color: var(--paper);
  max-width: 8ch;
}
.pillar__copy {
  margin-top: 26px;
  font-size: clamp(16px, 1.8vw, 24px);
  color: var(--muted); max-width: 44ch;
}
.pillar__copy em { color: var(--accent); }

/* ---------- work ---------- */

.work__head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: clamp(84px, 12vh, 120px) clamp(20px, 4vw, 56px) 0;
}
.work__head .rail { position: static; }
.work__count { color: var(--muted); }

.work__list {
  position: absolute; left: 0; right: 0; bottom: clamp(20px, 6vh, 64px); z-index: 3;
  list-style: none;
  padding: 0 clamp(20px, 4vw, 56px);
}
.work-row {
  display: grid;
  grid-template-columns: 64px 1.4fr 1.6fr auto;
  align-items: baseline; gap: clamp(12px, 3vw, 40px);
  padding: clamp(14px, 2.4vh, 24px) 8px;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 0.3s ease, padding-left 0.3s ease;
}
.work-row:last-child { border-bottom: 1px solid var(--hairline); }
.work-row:hover { background: rgba(79, 224, 255, 0.05); padding-left: 20px; }
.work-row__idx { color: var(--accent); }
.work-row__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 52px);
  line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  transition: color 0.3s ease;
}
.work-row:hover .work-row__title { color: var(--accent); }
.work-row__pitch { color: var(--muted); font-size: clamp(13px, 1.3vw, 16px); }
.work-row__meta { color: var(--muted); opacity: 0.8; }

.work-preview {
  position: fixed; top: 0; left: 0; z-index: 40;
  width: 230px; height: 300px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-3deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(236, 234, 226, 0.18);
}
.work-preview__initials {
  font-family: var(--font-display);
  font-size: 84px; color: var(--ink); line-height: 1;
}
.work-preview__tag { color: rgba(8, 9, 12, 0.6); }
.work-preview[data-grad="1"] { background: linear-gradient(160deg, var(--accent), #7ef2c8); }
.work-preview[data-grad="2"] { background: linear-gradient(160deg, #9fb6ff, var(--cobalt)); }
.work-preview[data-grad="3"] { background: linear-gradient(160deg, #ffd66e, #ff8e5a); }
.work-preview[data-grad="4"] { background: linear-gradient(160deg, #e6e2d8, #9aa1ad); }
.work-preview[data-grad="5"] { background: linear-gradient(160deg, #c99bff, #6a5bff); }

/* ---------- finale ---------- */

.finale__content {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 20px;
}
.finale__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7.5vw, 128px);
  line-height: 1; letter-spacing: 0.01em; text-transform: uppercase;
}
.finale__title .fw { display: inline-block; will-change: transform; }
.finale__title em { color: var(--accent); text-transform: none; letter-spacing: 0; }

.finale__ctas { display: flex; gap: 18px; margin-top: clamp(30px, 5vh, 54px); flex-wrap: wrap; justify-content: center; }
.btn {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 18px 38px; border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: #7deaff; }
.btn--ghost { border: 1px solid rgba(236, 234, 226, 0.4); color: var(--paper); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */

.footer {
  padding: 56px clamp(20px, 4vw, 56px) 40px;
  display: flex; flex-direction: column; gap: 26px;
  border-top: 1px solid var(--hairline);
  background: var(--ink);
}
.footer__links { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.footer__links a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); transition: color 0.25s ease;
}
.footer__links a:hover { color: var(--accent); }
.footer__line { color: var(--muted); opacity: 0.6; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .work-row { grid-template-columns: 40px 1fr; }
  .work-row__pitch { grid-column: 2; }
  .work-row__meta { grid-column: 2; }
  .work-preview { display: none; }
  .hero__meta { right: 20px; bottom: 20px; }
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .about__portrait { position: relative; top: 0; max-width: 360px; }
  .preloader__count { font-size: clamp(40px, 14vw, 90px); }
}

/* ---------- preloader ---------- */

.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
}
.preloader__name {
  font-family: var(--font-display);
  font-size: clamp(34px, 8vw, 120px);
  line-height: 0.9; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--paper); text-align: center;
}
.preloader__name .pw { display: inline-block; overflow: hidden; }
.preloader__name .pw:last-child { color: transparent; -webkit-text-stroke: 1.5px var(--paper); }
.preloader__tag { color: var(--accent); opacity: 0; }
.preloader__count {
  position: absolute; right: clamp(20px, 4vw, 56px); bottom: clamp(20px, 5vh, 48px);
  font-size: clamp(48px, 9vw, 132px); font-weight: 500; letter-spacing: 0;
  color: var(--paper); font-family: var(--font-display);
}
.preloader__wipe {
  position: absolute; inset: 0; background: var(--ink);
  transform: translateY(100%); pointer-events: none;
}
html.loaded .preloader { pointer-events: none; }

/* ---------- custom cursor ---------- */

.cursor { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor__dot {
  position: absolute; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
}
.cursor__ring {
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65); transform: translate(-50%, -50%);
  transition: width 0.28s ease, height 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}
html.has-cursor .cursor { display: block; }
html.has-cursor,
html.has-cursor a,
html.has-cursor .btn,
html.has-cursor .work-row,
html.has-cursor [data-cursor] { cursor: none; }
.cursor.is-hover .cursor__ring { width: 66px; height: 66px; background: rgba(79, 224, 255, 0.12); border-color: var(--accent); }
.cursor.is-hover .cursor__dot { opacity: 0; }

/* ---------- about / manifesto ---------- */

.about { padding: clamp(80px, 14vh, 170px) clamp(20px, 4vw, 56px); background: var(--ink); position: relative; }
.rail--static { position: static; display: block; margin-bottom: clamp(30px, 5vh, 56px); }

.about__grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) 1.4fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.about__portrait {
  position: sticky; top: 12vh;
  aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background: linear-gradient(155deg, #1a1e28, #0b0c10);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.about__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.about__portrait:hover .about__img { transform: scale(1.035); }
.about__img[data-missing] { display: none; }
/* soft scrim so the caption stays legible over the photo */
.about__portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 9, 12, 0.85), rgba(8, 9, 12, 0) 42%);
}
/* monogram is a FALLBACK only — shown when the photo is missing */
.about__mono {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: clamp(120px, 22vw, 240px);
  color: transparent; -webkit-text-stroke: 1.5px rgba(79, 224, 255, 0.4);
}
.about__img[data-missing] ~ .about__mono { display: flex; }
.about__cap {
  position: absolute; left: 18px; bottom: 16px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  color: var(--paper); opacity: 0.92;
}
.about__cap::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); flex: none;
}

.about__statement {
  font-family: var(--font-serif); font-style: normal;
  font-size: clamp(28px, 4.4vw, 68px); line-height: 1.08; letter-spacing: -0.01em;
  color: var(--paper); max-width: 20ch;
}
.about__statement em { color: var(--accent); font-style: italic; }
.about__para {
  margin-top: clamp(20px, 3vh, 34px);
  font-size: clamp(15px, 1.5vw, 19px); line-height: 1.65; color: var(--muted); max-width: 52ch;
}
.about__para em { color: var(--paper); font-family: var(--font-body); font-style: normal; font-weight: 500; }
.about__sign { margin-top: clamp(28px, 4vh, 44px); display: flex; flex-direction: column; gap: 8px; }
.about__signature { font-family: var(--font-serif); font-style: italic; font-size: clamp(34px, 4vw, 52px); color: var(--paper); }
.about__role { color: var(--accent); }

/* reveal helpers (driven by GSAP; visible by default if JS/off) */
html:not(.reduced-motion) .reveal,
html:not(.reduced-motion) .reveal-lines { will-change: transform, opacity; }

/* ---------- reduced motion: show everything, no pins ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .hint-bar::after { animation: none; }
}
html.reduced-motion .pillar { position: relative; opacity: 1; visibility: visible; }
html.reduced-motion .pin-section { height: auto; min-height: 100vh; }
