/* =========================================================
   Sai Kokiwar portfolio — liquid glass + motion layer
   Loaded after the page's own styles; overrides where needed.
   ========================================================= */
:root {
  --glass-1: rgba(255, 255, 255, .10);
  --glass-2: rgba(255, 255, 255, .03);
  --pink: #8E8E96;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.45, .5, 1);
  color-scheme: dark;
}

html { overflow-x: clip; }
body { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
section, header.hero { scroll-margin-top: 90px; }
::selection { background: var(--violet); color: #fff; }
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- ambient aurora + grain (gives the glass something to bend) ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; will-change: transform; }
.aurora .a1 { background: radial-gradient(circle, rgba(200, 200, 206, .11), transparent 62%); left: -22vmax; top: -18vmax; animation: au1 26s ease-in-out infinite alternate; }
.aurora .a2 { background: radial-gradient(circle, rgba(236, 236, 240, .06), transparent 62%); right: -26vmax; top: 18vh; animation: au2 31s ease-in-out infinite alternate; }
.aurora .a3 { background: radial-gradient(circle, rgba(120, 120, 128, .16), transparent 62%); left: 18vw; bottom: -36vmax; animation: au3 35s ease-in-out infinite alternate; }
@keyframes au1 { to { transform: translate(28vw, 34vh) scale(1.15); } }
@keyframes au2 { to { transform: translate(-30vw, 26vh) scale(.85); } }
@keyframes au3 { to { transform: translate(24vw, -38vh) scale(1.2); } }
.grain {
  position: fixed; inset: -8%; z-index: 90; pointer-events: none; opacity: .06; will-change: transform;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }

/* ---------- liquid glass primitive ---------- */
:where(.lg) { position: relative; }
.lg {
  isolation: isolate;
  background: linear-gradient(135deg, var(--glass-1), var(--glass-2) 50%, rgba(255, 255, 255, .06));
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -1px 0 rgba(255, 255, 255, .08),
    inset 1px 0 0 rgba(255, 255, 255, .12),
    inset 0 0 22px rgba(255, 255, 255, .05),
    0 18px 44px -18px rgba(0, 0, 0, .6);
}
.lg::before, .card::after, .posters a::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.6), rgba(255,255,255,.05) 32%, rgba(255,255,255,0) 58%, rgba(200, 200, 206,.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.lg::before { z-index: -1; }
.lg::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .22), transparent 60%);
  opacity: .5; transition: opacity .4s var(--ease);
}
.lg:hover::after { opacity: 1; }

/* ---------- nav: floating glass pill ---------- */
nav {
  position: fixed; top: 12px; left: 50%; width: min(1120px, calc(100% - 24px));
  transform: translateX(-50%); border-radius: 999px; border-bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 50%, rgba(255,255,255,.07));
  transition: transform .7s var(--ease), width .7s var(--ease);
}
nav.is-hidden { transform: translate(-50%, -150%); }
nav.is-scrolled { width: min(940px, calc(100% - 24px)); }
nav .wrap { max-width: none; height: 60px; padding: 0 8px 0 22px; }
nav ul { position: relative; gap: 4px; }
nav ul a { position: relative; z-index: 1; display: block; padding: 8px 14px; border-radius: 999px; }
.nav-pill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; pointer-events: none; opacity: 0;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .5s var(--spring), width .5s var(--spring), opacity .3s;
}
nav .btn { padding: 11px 20px; }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 120; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink)); }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; will-change: transform;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.12), 0 10px 30px rgba(200, 200, 206,.35); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .9s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn.ghost { background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  border: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px -14px rgba(0,0,0,.6); }
.btn:hover { transform: none; }

/* ---------- hero ---------- */
header.hero { position: relative; padding-top: 150px; }
.hero-spot { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--hx, 70%) var(--hy, 30%), rgba(200, 200, 206, .16), transparent 70%); }
.eyebrow.lg { border: 0; padding: 7px 16px; color: var(--text); }
h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
h1 .wi { display: inline-block; will-change: transform; }
h1 em .wi { background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink), var(--violet)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: hue 8s linear infinite; }
h1 em { background: none; -webkit-text-fill-color: currentColor; }
@keyframes hue { to { background-position: -300% 0; } }


.reel-stage { perspective: 1400px; margin-top: 56px; }
.reel { margin-top: 0; transform-origin: 50% 0; will-change: transform; }
.reel .unmute { border: 0; background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px -10px rgba(0,0,0,.6); }

/* ---------- skills band ---------- */
.band-wrap { position: relative; height: 150px; margin: 10px 0 -20px; overflow: hidden; }
.band { position: absolute; left: -5%; width: 110%; top: 40px; height: 72px; display: flex; align-items: center; overflow: hidden; border-radius: 0; transform: rotate(-2deg); }
.band-track { display: flex; white-space: nowrap; will-change: transform; }
.band-track span { font: 800 clamp(24px, 3vw, 38px) var(--head); letter-spacing: -.5px; padding-right: .6em; }
.band-track b { font-weight: 400; margin: 0 .35em; background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- cards become glass ---------- */
.card {
  position: relative; isolation: isolate; border: 0;
  background: linear-gradient(140deg, rgba(255,255,255,.075), rgba(255,255,255,.02) 55%, rgba(255,255,255,.045));
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 30px 60px -32px rgba(0,0,0,.75);
}
.card::after { z-index: 3; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(255,255,255,.1), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease); }
.card:hover::before { opacity: 1; }
.tag { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }

.posters a { position: relative; isolation: isolate; border: 0; background: linear-gradient(140deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform-style: preserve-3d; transition: box-shadow .3s; will-change: transform; }
.posters a::after { z-index: 3; }
.posters a:hover { transform: none; }
.posters .glare, .svc .glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.28), transparent 55%); mix-blend-mode: soft-light; }
.posters a:hover .glare, .svc:hover .glare { opacity: 1; }

.site-shot .frame img { will-change: transform; }
.browser { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }
.site-open { border: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.12); }

.svc { will-change: transform; transform-style: preserve-3d; }
.svc .ico { box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }

/* ---------- process timeline ---------- */
.process { position: relative; padding-top: 8px; }
.process-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.process-line i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink)); box-shadow: 0 0 18px rgba(236, 236, 240,.6); }
.step { border-top: 0; background: linear-gradient(180deg, rgba(200, 200, 206,.06), transparent); transition: background .5s, transform .5s var(--ease); }
.step::before { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 99px; margin-bottom: 4px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.1); transition: background .5s, color .5s, box-shadow .5s; }
.step.on { background: linear-gradient(180deg, rgba(200, 200, 206,.16), transparent); }
.step.on::before { background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #fff; box-shadow: 0 0 22px rgba(200, 200, 206,.6); }

/* ---------- contact ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; border: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(200, 200, 206,.28), transparent 70%), linear-gradient(140deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); }
.contact .ring { position: absolute; inset: -40%; z-index: -2; pointer-events: none; opacity: .35;
  background: conic-gradient(from 0deg, transparent, rgba(200, 200, 206,.6), transparent 30%, rgba(236, 236, 240,.5), transparent 60%, rgba(120, 120, 128,.45), transparent);
  animation: spin 14s linear infinite; filter: blur(40px); }
@keyframes spin { to { transform: rotate(1turn); } }
.contact h2 { font-size: clamp(34px, 5vw, 60px); }

footer .big { display: block; font: 800 clamp(48px, 13vw, 200px) var(--head); letter-spacing: -.05em; line-height: .9; margin-bottom: 26px; white-space: nowrap; overflow: hidden; padding-bottom: .04em; }
footer .big span { display: inline-block; padding-right: .02em;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.06)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }


/* ---------- reveal helpers (only hidden once JS confirms motion) ---------- */
.fx .rv { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  nav .wrap { padding-left: 18px; }
}
@media (max-width: 560px) {
  header.hero { padding-top: 112px; }
  nav .wrap { height: 54px; }
  .band-wrap { height: 110px; }
  .band { height: 56px; top: 28px; }
}

/* ---------- lite mode: phones, tablets, narrow windows ---------- */
html.lite .grain { display: none; }
html.lite .aurora span { animation: none; }
html.lite .lg::after, html.lite .card::before { display: none; }
html.lite .card, html.lite .posters a { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(140deg, rgba(24, 24, 27,.92), rgba(14, 14, 16,.92)); }
html.lite .band { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(22, 22, 25,.85); }
html.lite .contact .ring { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .aurora span, .grain, .contact .ring, h1 em .wi { animation: none !important; }
  .fx .rv { opacity: 1 !important; }
}


/* =========================================================
   PREMIUM DARK THEME — graphite, champagne gold, copper, ivory
   ========================================================= */
.btn.ghost { color: var(--text); }
.site-shot:hover .site-open { background: rgba(200, 200, 206, .92); color: #0B0B0C; }
.step.on::before { color: #0B0B0C; }
.brand span, h1 em .wi { filter: saturate(1.05); }
.tag.spec { color: #E4E4E7; border-color: rgba(228, 228, 231, .32); }
.eyebrow i { background: #D4D4D8; box-shadow: 0 0 10px #D4D4D8; }
.contact .ring { opacity: .28; }


/* =========================================================
   iOS-STYLE LIQUID GLASS
   Clear, not frosted: the refraction map bends the content at
   the rim, the centre stays sharp, and layered specular edges
   give the bevel. Frosted blur is only the fallback for
   browsers without SVG backdrop filters.
   ========================================================= */
.lg.is-liquid, html.lite .lg {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015) 60%, rgba(255,255,255,.04));
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,.75),          /* top specular line */
    inset 1.5px 1.5px 1px -1px rgba(255,255,255,.65),  /* top-left bevel catch */
    inset -1px -1px 1px -0.5px rgba(255,255,255,.28), /* bottom-right return */
    inset 0 -8px 16px -12px rgba(255,255,255,.18),     /* inner bottom glow */
    inset 0 10px 18px -14px rgba(255,255,255,.22),     /* inner top glow */
    0 1px 2px rgba(0,0,0,.25),
    0 14px 32px -12px rgba(0,0,0,.55);
}
.lg.is-liquid::before, html.lite .lg::before {
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.18) 22%, rgba(255,255,255,0) 45%,
              rgba(255,255,255,0) 60%, rgba(236, 236, 240,.35) 82%, rgba(255,255,255,.6) 100%);
}
.lg.is-liquid::after {
  background: radial-gradient(180px circle at var(--mx, 30%) var(--my, -20%), rgba(255,255,255,.16), transparent 62%);
  opacity: .35;
}
nav.lg.is-liquid, html.lite nav.lg { background: linear-gradient(180deg, rgba(12, 12, 14,.28), rgba(12, 12, 14,.16)); }
.contact.lg.is-liquid, html.lite .contact.lg { background: radial-gradient(600px 300px at 50% 0%, rgba(200, 200, 206,.20), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); }
.btn.ghost.is-liquid, .unmute.is-liquid, .site-open.is-liquid,
html.lite .btn.ghost, html.lite .unmute, html.lite .site-open {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,.75), inset 1.5px 1.5px 1px -1px rgba(255,255,255,.6),
              inset -1px -1px 1px -0.5px rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 26px -10px rgba(0,0,0,.6);
}
.band.lg.is-liquid { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }

/* cards: lighter frosting so the glass reads as clear rather than milky */
.card, .posters a {
  -webkit-backdrop-filter: blur(8px) saturate(160%) brightness(1.04);
  backdrop-filter: blur(8px) saturate(160%) brightness(1.04);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,.35), inset 1px 1px 1px -0.5px rgba(255,255,255,.25),
              inset -1px -1px 1px -0.5px rgba(255,255,255,.12), 0 30px 60px -32px rgba(0,0,0,.8);
}

/* phones: refraction is off for speed, so keep the glass clear with a light blur */
html.lite .lg, html.lite .btn.ghost, html.lite .unmute, html.lite .site-open {
  -webkit-backdrop-filter: blur(6px) saturate(170%) brightness(1.08);
  backdrop-filter: blur(6px) saturate(170%) brightness(1.08);
}
html.lite nav.lg { -webkit-backdrop-filter: blur(10px) saturate(170%); backdrop-filter: blur(10px) saturate(170%); }
