/* ============================================================
   YASH SOHAL — cinematic scroll portfolio
   Palette: ink black / emerald accent / cream type
   ============================================================ */
:root {
  --ink: #070907;
  --ink-2: #0d110e;
  --emerald: #19e68c;
  --emerald-dim: rgba(25, 230, 140, 0.14);
  --cream: #f2ecdd;
  --cream-dim: rgba(242, 236, 221, 0.55);
  --display: 'Anton', sans-serif;
  --body: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--ink); }
body {
  font-family: var(--body);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--emerald); color: var(--ink); }

.accent { color: var(--emerald); }
.dot { color: var(--emerald); }

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; flex-direction: column; gap: 28px;
  align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader__mark { font-family: var(--display); font-size: clamp(48px, 8vw, 96px); letter-spacing: 0.02em; }
.loader__bar { width: min(320px, 60vw); height: 2px; background: rgba(242,236,221,0.12); overflow: hidden; }
.loader__fill { height: 100%; width: 0%; background: var(--emerald); transition: width 0.3s ease; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 4vw, 56px);
  mix-blend-mode: normal;
}
.nav__logo {
  font-family: var(--display); font-size: 26px; color: var(--cream);
  text-decoration: none; letter-spacing: 0.03em;
}
.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); align-items: center; }
.nav__links a {
  color: var(--cream-dim); text-decoration: none; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--emerald); }
.nav__cta {
  border: 1px solid rgba(25,230,140,0.5); border-radius: 100px;
  padding: 9px 20px; color: var(--emerald) !important;
}
.nav__cta:hover { background: var(--emerald); color: var(--ink) !important; }

/* ============ HERO ============ */
.hero { position: relative; }
.hero__pin {
  height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero__stage { position: absolute; inset: 0; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: none;
}
.hero__video.active { display: block; }

/* portrait fallback — cinematic treatment of the still photo */
.hero__portrait {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.portrait__card {
  position: relative; z-index: 3;
  width: clamp(300px, 40vw, 560px);
  aspect-ratio: 1 / 1.15;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 80px rgba(25,230,140,0.12);
  transform-style: preserve-3d;
}
.portrait__card img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  filter: grayscale(0.25) contrast(1.1) brightness(0.94) saturate(1.05);
}
.portrait__card::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,9,7,0) 40%, rgba(7,9,7,0.85) 100%),
    linear-gradient(100deg, rgba(25,230,140,0.16), transparent 45%, transparent 65%, rgba(25,230,140,0.18));
  mix-blend-mode: multiply;
}
.portrait__glow {
  position: absolute; z-index: 1;
  width: clamp(340px, 46vw, 640px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25,230,140,0.22) 0%, rgba(25,230,140,0.06) 40%, transparent 70%);
  filter: blur(20px);
}
.portrait__ring {
  position: absolute; z-index: 2;
  width: clamp(320px, 42vw, 600px); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(25,230,140,0.25);
  border-left-color: transparent; border-right-color: transparent;
  transform: rotateX(72deg);
}
.hero__vignette {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(7,9,7,0.9) 100%);
}

/* hero typography */
.hero__type {
  position: absolute; inset: 0; z-index: 5;
  text-align: center; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%;
  padding-top: 30vh; /* drop the name to chest height so the face stays clear */
}
.hero__name {
  font-family: var(--display);
  font-size: clamp(72px, 16vw, 240px);
  line-height: 0.88; letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero__line { display: block; }
.hero__line--accent { -webkit-text-stroke: 2px var(--emerald); color: transparent; }
.hero__name .ch { display: inline-block; will-change: transform, opacity; }
.hero__sub {
  margin-top: 26px; max-width: 520px;
  color: var(--cream-dim); font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 300; letter-spacing: 0.02em; line-height: 1.6;
  padding: 0 24px;
}
.hero__scrollcue {
  position: absolute; bottom: 4vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.4em; color: var(--cream-dim);
}
.hero__scrollcue span {
  display: block; width: 1px; height: 48px;
  background: linear-gradient(180deg, var(--emerald), transparent);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden; padding: 34px 0;
  border-top: 1px solid rgba(242,236,221,0.08);
  border-bottom: 1px solid rgba(242,236,221,0.08);
  background: var(--ink-2);
}
.marquee__track {
  display: flex; white-space: nowrap; will-change: transform;
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 96px);
  color: transparent; -webkit-text-stroke: 1px rgba(242,236,221,0.25);
  text-transform: uppercase;
}
.marquee__track span { flex-shrink: 0; }

/* ============ STATS ============ */
.stats { padding: clamp(80px, 14vh, 160px) clamp(20px, 6vw, 80px); }
.stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(32px, 5vw, 64px); max-width: 1200px; margin: 0 auto;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 120px);
  color: var(--emerald); line-height: 1;
}
.stat__label {
  margin-top: 12px; font-size: 13px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--cream-dim);
}

/* ============ SECTION TAG ============ */
.section-tag {
  font-size: 12px; letter-spacing: 0.5em; color: var(--emerald);
  margin-bottom: clamp(24px, 4vh, 48px); font-weight: 600;
}

/* ============ PILLARS ============ */
.pillars { position: relative; }
.pillars__pin { height: 100vh; position: relative; overflow: hidden; }
.pillars__media { position: absolute; inset: 0; }
.pillars__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: none; opacity: 0.55;
}
.pillars__video.active { display: block; }
.pillars__fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 30%, rgba(25,230,140,0.10), transparent),
    radial-gradient(ellipse 50% 60% at 20% 75%, rgba(25,230,140,0.06), transparent),
    var(--ink-2);
}
.pillars__fallback::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(25,230,140,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,230,140,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.pillars__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,9,7,0.92) 0%, rgba(7,9,7,0.55) 55%, rgba(7,9,7,0.2) 100%);
}
.pillars__content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 8vw, 120px);
}
.pillars__content .section-tag { position: absolute; top: 14vh; }
.pillar { position: absolute; max-width: 640px; opacity: 0; }
.pillar__index {
  font-size: 14px; letter-spacing: 0.3em; color: var(--emerald); margin-bottom: 16px;
}
.pillar__title {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.92; text-transform: uppercase; margin-bottom: 22px;
}
.pillar__desc {
  color: var(--cream-dim); font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.65; font-weight: 300; max-width: 460px;
}

/* ============ WORK ============ */
.work { position: relative; padding: clamp(100px, 16vh, 200px) clamp(20px, 6vw, 80px); }
.work__media { position: absolute; inset: 0; overflow: hidden; }
.work__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: none; opacity: 0.35;
}
.work__video.active { display: block; }
.work__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(7,9,7,0.82) 30%, rgba(7,9,7,0.82) 70%, var(--ink) 100%);
}
.work__inner { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; }
.work__heading {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 140px);
  text-transform: uppercase; line-height: 0.92;
  margin-bottom: clamp(48px, 8vh, 96px);
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.card {
  position: relative;
  border: 1px solid rgba(242,236,221,0.1);
  border-radius: 20px;
  padding: clamp(28px, 3.5vw, 44px);
  background: rgba(13,17,14,0.72);
  backdrop-filter: blur(8px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s, background 0.45s;
  cursor: pointer; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(25,230,140,0.1), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-10px);
  border-color: rgba(25,230,140,0.45);
  background: rgba(13,17,14,0.9);
}
.card__num { font-size: 13px; letter-spacing: 0.3em; color: var(--emerald); margin-bottom: 40px; }
.card__title {
  font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px);
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 14px;
}
.card__pitch { color: var(--cream-dim); line-height: 1.6; font-weight: 300; font-size: 15px; margin-bottom: 28px; }
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.card__tags span {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid rgba(242,236,221,0.15); color: var(--cream-dim);
}
.card__arrow {
  position: absolute; top: clamp(24px, 3vw, 40px); right: clamp(24px, 3vw, 40px);
  font-size: 24px; color: var(--emerald);
  transform: translateX(-8px); opacity: 0;
  transition: transform 0.4s, opacity 0.4s;
}
.card:hover .card__arrow { transform: translateX(0); opacity: 1; }

/* ============ FINALE ============ */
.finale {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; position: relative;
  padding: clamp(100px, 14vh, 160px) clamp(20px, 6vw, 80px) 0;
}
.finale__inner { max-width: 1240px; margin: 0 auto; width: 100%; text-align: center; }
.finale__title {
  font-family: var(--display);
  font-size: clamp(52px, 10.5vw, 168px);
  line-height: 0.95; text-transform: uppercase;
}
.finale__row { display: block; overflow: hidden; }
.finale__actions {
  margin-top: clamp(40px, 7vh, 72px);
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--body); font-weight: 600; font-size: 15px;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  padding: 18px 40px; border-radius: 100px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}
.btn--solid { background: var(--emerald); color: var(--ink); }
.btn--solid:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(25,230,140,0.35); }
.btn--ghost { border: 1px solid rgba(242,236,221,0.3); color: var(--cream); }
.btn--ghost:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-3px); }

/* ============ FOOTER ============ */
.footer {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 40px 0;
  border-top: 1px solid rgba(242,236,221,0.08);
  max-width: 1240px; margin-left: auto; margin-right: auto; width: 100%;
}
.footer__left { color: var(--cream-dim); font-size: 13px; letter-spacing: 0.06em; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a {
  color: var(--cream-dim); text-decoration: none; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.25s;
}
.footer__links a:hover { color: var(--emerald); }

/* ============ GRAIN ============ */
.grain {
  position: fixed; inset: -100%; z-index: 150; pointer-events: none;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-5%,-10%); }
  20% { transform: translate(-15%,5%); } 30% { transform: translate(7%,-25%); }
  40% { transform: translate(-5%,25%); } 50% { transform: translate(-15%,10%); }
  60% { transform: translate(15%,0%); } 70% { transform: translate(0%,15%); }
  80% { transform: translate(3%,35%); } 90% { transform: translate(-10%,10%); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .pillar { max-width: 100%; }
}
