/* =========================================================
   BHAWNA JOSHI — Portfolio
   Design system + global styles
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--accent); color: #0b0b0c; }

/* ---------- Tokens ---------- */
:root{
  --bg:        #0a0a0b;
  --bg-2:      #0f0f11;
  --surface:   #141417;
  --surface-2: #1b1b1f;
  --text:      #ECE9E2;
  --text-dim:  #b6b2aa;
  --muted:     #807c74;
  --line:      rgba(236,233,226,0.11);
  --line-2:    rgba(236,233,226,0.06);
  --accent:    #C8FF3D;   /* electric lime */
  --accent-d:  #a6dd1f;
  --accent-2:  #6b5cff;   /* secondary accent */
  --coral:     #ff6b4a;

  --ff-sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ff-serif: "Instrument Serif", Georgia, serif;
  --ff-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1440px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 18px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-2: cubic-bezier(0.65, 0.05, 0, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: auto; }
body{
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  font-feature-settings: "ss01","cv01";
}
body.lock { overflow: hidden; }

/* Grain overlay */
.grain{
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.container{ width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.row{ display: flex; }
section{ position: relative; }

.eyebrow{
  font-family: var(--ff-mono);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before{ content:""; width: 26px; height: 1px; background: var(--accent); display:inline-block; }

.serif{ font-family: var(--ff-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.accent{ color: var(--accent); }

/* ---------- Typographic scale ---------- */
h1,h2,h3{ font-weight: 600; line-height: 0.98; letter-spacing: -0.03em; }
.display{
  font-size: clamp(3.2rem, 12.5vw, 13rem);
  font-weight: 600; line-height: 0.86; letter-spacing: -0.045em;
}
.h-xl{ font-size: clamp(2.4rem, 6.5vw, 6rem); letter-spacing: -0.04em; line-height: 0.95;}
.h-lg{ font-size: clamp(1.9rem, 4.4vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.0;}
.h-md{ font-size: clamp(1.4rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.08;}
.lead{ font-size: clamp(1.1rem, 1.7vw, 1.5rem); color: var(--text-dim); line-height: 1.45; font-weight: 400; }

/* ============================================================
   CURSOR
   ============================================================ */
.cursor, .cursor-dot{ position: fixed; top:0; left:0; z-index: 9999; pointer-events:none; border-radius: 50%; will-change: transform; }
.cursor{ width: 38px; height: 38px; border: 1px solid rgba(236,233,226,0.5); margin:-19px 0 0 -19px; transition: width .35s var(--ease), height .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), opacity .3s; }
.cursor-dot{ width: 5px; height: 5px; background: var(--accent); margin:-2.5px 0 0 -2.5px; transition: opacity .3s; }
.cursor.hover{ width: 70px; height: 70px; margin:-35px 0 0 -35px; background: rgba(200,255,61,0.1); border-color: transparent; }
.cursor.hover-text::after{ content: attr(data-label); position:absolute; inset:0; display:grid; place-items:center; font-family: var(--ff-mono); font-size: 9px; letter-spacing:.1em; text-transform:uppercase; color: var(--accent); }
@media (pointer: coarse){ .cursor,.cursor-dot{ display:none; } }

/* ============================================================
   NAV
   ============================================================ */
.nav{
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display:flex; align-items:center; justify-content:space-between;
  padding: 22px var(--pad);
  transition: padding .4s var(--ease), background .4s var(--ease), backdrop-filter .4s;
  mix-blend-mode: difference;
}
.nav.solid{
  mix-blend-mode: normal;
  background: rgba(10,10,11,0.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
  padding-top: 16px; padding-bottom: 16px;
}
.nav .brand{ font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; display:flex; align-items:center; gap:9px; }
.nav .brand .dot{ width: 9px; height: 9px; border-radius:50%; background: var(--accent); display:inline-block; }
.nav-links{ display:flex; gap: 34px; align-items:center; }
.nav-links a{ font-size: 0.9rem; color: var(--text); position: relative; }
.nav-links a:not(.nav-cta)::after{ content:""; position:absolute; left:0; bottom:-4px; width:0; height:1px; background: currentColor; transition: width .4s var(--ease); }
.nav-links a:not(.nav-cta):hover::after{ width:100%; }
.nav-cta{ border: 1px solid var(--line); padding: 9px 18px; border-radius: 100px; transition: background .3s, color .3s, border-color .3s; }
.nav-cta:hover{ background: var(--accent); color:#0b0b0c; border-color: var(--accent); }
.nav-toggle{ display:none; flex-direction:column; gap:5px; }
.nav-toggle span{ width: 26px; height: 1.6px; background: var(--text); transition: .3s; }

/* mobile menu */
.m-menu{ position: fixed; inset: 0; z-index: 999; background: var(--bg); transform: translateY(-100%); transition: transform .7s var(--ease); display:flex; flex-direction:column; justify-content:center; padding: var(--pad); gap: 6px; }
.m-menu.open{ transform: translateY(0); }
.m-menu a{ font-size: clamp(2.2rem, 9vw, 4rem); font-weight: 600; letter-spacing: -0.03em; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.m-menu .m-meta{ margin-top: 40px; color: var(--muted); font-family: var(--ff-mono); font-size: .8rem; }

@media (max-width: 820px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero{ min-height: 100svh; display:flex; flex-direction:column; justify-content:center; padding: 140px var(--pad) 60px; position: relative; overflow: hidden; }
.hero-glow{ position:absolute; border-radius:50%; filter: blur(120px); opacity:.5; pointer-events:none; }
.hero-glow.g1{ width: 520px; height: 520px; background: radial-gradient(circle, rgba(107,92,255,.5), transparent 70%); top:-120px; right:-80px; }
.hero-glow.g2{ width: 420px; height: 420px; background: radial-gradient(circle, rgba(200,255,61,.28), transparent 70%); bottom:-120px; left:-60px; }

.hero-top{ display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:16px; margin-bottom: clamp(30px, 6vh, 70px); }
.hero-top .status{ display:flex; align-items:center; gap:10px; font-family: var(--ff-mono); font-size:.78rem; color: var(--text-dim); letter-spacing:.04em; }
.hero-top .status .live{ width:8px; height:8px; border-radius:50%; background: var(--accent); box-shadow:0 0 0 0 rgba(200,255,61,.5); animation: pulse 2.4s infinite; }
@keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(200,255,61,.5);} 70%{box-shadow:0 0 0 12px rgba(200,255,61,0);} 100%{box-shadow:0 0 0 0 rgba(200,255,61,0);} }
.hero-top .loc{ text-align:right; font-family: var(--ff-mono); font-size:.78rem; color: var(--muted); }

.hero h1{ position: relative; z-index: 2; }
.hero h1 .line{ display:block; overflow:hidden; }
.hero h1 .line .inner{ display:block; }
.hero h1 .line:nth-child(2){ padding-left: clamp(0px, 18vw, 280px); }
.hero h1 .tail{ font-family: var(--ff-serif); font-style:italic; font-weight:400; color: var(--accent); letter-spacing:-0.02em; }

.hero-bottom{ display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap: 30px; margin-top: clamp(36px, 8vh, 90px); position:relative; z-index:2; }
.hero-bottom .blurb{ max-width: 460px; }
.hero-scroll{ font-family: var(--ff-mono); font-size:.74rem; letter-spacing:.14em; text-transform:uppercase; color: var(--muted); display:flex; align-items:center; gap:10px; }
.hero-scroll .arr{ width:18px; height:18px; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; animation: bob 2s var(--ease) infinite; }
@keyframes bob{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(4px);} }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding: 22px 0; overflow:hidden; white-space:nowrap; }
.marquee-track{ display:inline-flex; gap: 56px; will-change: transform; }
.marquee-track span{ font-size: clamp(1.4rem,3vw,2.4rem); font-weight:500; letter-spacing:-0.02em; color: var(--text); display:inline-flex; align-items:center; gap:56px; }
.marquee-track span::after{ content:"✶"; color: var(--accent); font-size: .7em; }

/* ============================================================
   SECTION HEAD
   ============================================================ */
.sec-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:30px; flex-wrap:wrap; margin-bottom: clamp(40px, 7vw, 90px); }
.sec-head .num{ font-family: var(--ff-mono); font-size:.8rem; color: var(--muted); }

/* ============================================================
   ABOUT
   ============================================================ */
.about{ padding: clamp(90px,12vw,170px) 0; }
.about-grid{ display:grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 100px); align-items:start; }
.about-statement{ font-size: clamp(1.6rem, 3.3vw, 3rem); line-height: 1.12; letter-spacing:-0.025em; font-weight: 500; }
.about-statement .dim{ color: var(--muted); }
.about-side p{ color: var(--text-dim); margin-bottom: 20px; font-size: 1.02rem; }
.about-side .label{ font-family: var(--ff-mono); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color: var(--muted); margin-bottom: 14px; }
.chips{ display:flex; flex-wrap:wrap; gap:9px; margin-top: 8px; }
.chip{ border:1px solid var(--line); border-radius: 100px; padding: 7px 15px; font-size:.82rem; color: var(--text-dim); transition: border-color .3s, color .3s; }
.chip:hover{ border-color: var(--accent); color: var(--text); }

@media(max-width: 820px){ .about-grid{ grid-template-columns: 1fr; } }

/* ============================================================
   WORK
   ============================================================ */
.work{ padding: clamp(40px,6vw,80px) 0 clamp(90px,12vw,160px); }
.work-list{ display:flex; flex-direction:column; }
.work-item{ display:block; border-top:1px solid var(--line); padding: clamp(28px,3.4vw,52px) 0; position:relative; }
.work-item:last-child{ border-bottom:1px solid var(--line); }
.work-row{ display:grid; grid-template-columns: 60px 1fr auto; gap: clamp(16px,3vw,48px); align-items:center; }
.work-row .wnum{ font-family: var(--ff-mono); font-size:.82rem; color: var(--muted); }
.work-main{ display:flex; flex-direction:column; gap:12px; }
.work-title{ font-size: clamp(1.9rem, 5vw, 4.2rem); font-weight:600; letter-spacing:-0.03em; line-height:.98; transition: transform .5s var(--ease), color .4s; }
.work-meta{ display:flex; gap:10px; flex-wrap:wrap; }
.work-tag{ font-family: var(--ff-mono); font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color: var(--text-dim); border:1px solid var(--line); border-radius:100px; padding: 5px 12px; }
.work-arrow{ width: 60px; height:60px; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; transition: background .4s var(--ease), transform .5s var(--ease), border-color .4s; flex-shrink:0; }
.work-arrow svg{ width:20px; height:20px; transition: transform .5s var(--ease); }
.work-item:hover .work-title{ transform: translateX(18px); color: var(--accent); }
.work-item:hover .work-arrow{ background: var(--accent); border-color: var(--accent); color:#0b0b0c; transform: rotate(0deg); }
.work-item:hover .work-arrow svg{ transform: translate(3px,-3px); }

/* floating preview image that follows cursor */
.work-preview{ position: fixed; top:0; left:0; width: 340px; height: 240px; border-radius: 12px; overflow:hidden; pointer-events:none; z-index: 900; opacity:0; transform: translate(-50%,-50%) scale(.85); transition: opacity .4s var(--ease), transform .5s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.work-preview img{ width:100%; height:100%; object-fit:cover; }
.work-preview.show{ opacity:1; transform: translate(-50%,-50%) scale(1); }
@media(max-width: 900px){
  .work-row{ grid-template-columns: 1fr auto; }
  .work-row .wnum{ display:none; }
  .work-preview{ display:none; }
}

/* ============================================================
   STATS
   ============================================================ */
.stats{ padding: clamp(70px,9vw,130px) 0; border-top:1px solid var(--line); }
.stats-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap: clamp(20px,3vw,40px); }
.stat .n{ font-size: clamp(2.6rem, 6vw, 5.5rem); font-weight:600; letter-spacing:-0.04em; line-height:1; }
.stat .n .u{ color: var(--accent); }
.stat .l{ color: var(--muted); margin-top: 12px; font-size:.95rem; max-width: 220px; }
@media(max-width: 900px){ .stats-grid{ grid-template-columns: repeat(2,1fr); gap: 40px 24px; } }

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp{ padding: clamp(80px,11vw,150px) 0; }
.exp-item{ display:grid; grid-template-columns: 140px 1fr auto; gap: clamp(16px,3vw,40px); padding: clamp(24px,2.6vw,38px) 0; border-top:1px solid var(--line); align-items:baseline; }
.exp-item:last-child{ border-bottom:1px solid var(--line); }
.exp-item .yr{ font-family: var(--ff-mono); font-size:.85rem; color: var(--muted); }
.exp-item .role{ font-size: clamp(1.2rem,2.2vw,1.7rem); font-weight:600; letter-spacing:-0.02em; }
.exp-item .co{ color: var(--accent); }
.exp-item .desc{ color: var(--text-dim); margin-top:8px; max-width: 620px; font-size:.98rem; }
.exp-item .place{ font-family: var(--ff-mono); font-size:.78rem; color: var(--muted); text-align:right; white-space:nowrap; }
@media(max-width: 760px){ .exp-item{ grid-template-columns: 1fr; } .exp-item .place{ text-align:left; } }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact{ padding: clamp(90px,13vw,190px) 0 60px; border-top:1px solid var(--line); position:relative; overflow:hidden; }
.contact .big{ font-size: clamp(3rem, 13vw, 12rem); font-weight:600; letter-spacing:-0.04em; line-height:.86; }
.contact .big a{ display:inline-flex; align-items:center; gap:.2em; transition: color .4s; }
.contact .big a:hover{ color: var(--accent); }
.contact-sub{ display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:30px; margin-top: clamp(40px,7vw,80px); }
.contact-links{ display:flex; gap: 26px; flex-wrap:wrap; }
.contact-links a{ position:relative; color: var(--text-dim); transition: color .3s; }
.contact-links a:hover{ color: var(--text); }
.contact-links a::after{ content:"↗"; font-size:.8em; margin-left:5px; color: var(--accent); }
.footer-bar{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; margin-top: clamp(60px,9vw,110px); padding-top: 26px; border-top:1px solid var(--line-2); color: var(--muted); font-family: var(--ff-mono); font-size:.76rem; }

/* ============================================================
   REVEAL UTILITIES
   ============================================================ */
[data-reveal]{ opacity:0; transform: translateY(28px); }
[data-split] .word{ display:inline-block; overflow:hidden; }
[data-split] .word > span{ display:inline-block; will-change: transform; }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  [data-reveal]{ opacity:1 !important; transform:none !important; }
}

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */
.progress-bar{ position: fixed; top:0; left:0; height: 3px; width:0; background: var(--accent); z-index: 1001; }

.cs-hero{ min-height: 92svh; display:flex; flex-direction:column; justify-content:flex-end; padding: 140px var(--pad) clamp(50px,7vw,90px); position:relative; overflow:hidden; }
.cs-hero .glow{ position:absolute; width:600px; height:600px; border-radius:50%; filter:blur(140px); top:-160px; right:-120px; pointer-events:none; }
.cs-back{ position:absolute; top: 96px; left: var(--pad); font-family:var(--ff-mono); font-size:.8rem; color:var(--text-dim); display:inline-flex; gap:8px; align-items:center; transition:color .3s; z-index:3;}
.cs-back:hover{ color: var(--accent); }
.cs-hero .tags{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 26px; }
.cs-hero h1{ font-size: clamp(2.6rem, 8.5vw, 8.5rem); font-weight:600; letter-spacing:-0.04em; line-height:.9; max-width: 16ch; }
.cs-hero h1 .serif{ color: var(--accent); }
.cs-hero .sub{ margin-top: 30px; max-width: 620px; }

.cs-meta{ display:grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding: clamp(40px,5vw,64px) 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.cs-meta .k{ font-family:var(--ff-mono); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-bottom:10px; }
.cs-meta .v{ font-size: 1.02rem; color: var(--text); }
@media(max-width:820px){ .cs-meta{ grid-template-columns: repeat(2,1fr); gap:32px 20px; } }

/* hero cover image */
.cs-cover{ margin: clamp(50px,7vw,90px) 0; border-radius: var(--radius); overflow:hidden; border:1px solid var(--line); background: var(--surface); }
.cs-cover img{ width:100%; }

/* chapter block */
.chapter{ padding: clamp(60px,9vw,130px) 0; border-top:1px solid var(--line-2); }
.chapter-grid{ display:grid; grid-template-columns: 0.34fr 1fr; gap: clamp(30px,5vw,80px); align-items:start; }
.chapter-label{ position: sticky; top: 110px; }
.chapter-label .step{ font-family:var(--ff-mono); font-size:.78rem; color: var(--accent); letter-spacing:.1em; }
.chapter-label h2{ font-size: clamp(1.8rem,3.6vw,3rem); margin-top: 14px; letter-spacing:-0.03em; }
.chapter-body > p{ font-size: clamp(1.05rem,1.5vw,1.35rem); line-height:1.6; color: var(--text-dim); margin-bottom: 24px; max-width: 70ch; }
.chapter-body > p strong{ color: var(--text); font-weight:600; }
.chapter-body h3{ font-size: 1.3rem; margin: 38px 0 16px; letter-spacing:-0.01em; }
.chapter-body ul.bullets{ display:flex; flex-direction:column; gap: 14px; margin: 20px 0 28px; }
.chapter-body ul.bullets li{ position:relative; padding-left: 26px; color: var(--text-dim); line-height:1.55; max-width: 68ch; }
.chapter-body ul.bullets li::before{ content:""; position:absolute; left:0; top:.6em; width:8px; height:8px; background: var(--accent); border-radius:2px; }
.chapter-body ul.bullets li strong{ color: var(--text); }
@media(max-width:820px){ .chapter-grid{ grid-template-columns:1fr; } .chapter-label{ position:static; } }

/* figure */
figure.fig{ margin: 30px 0; border-radius: var(--radius); overflow:hidden; border:1px solid var(--line); background: var(--surface); }
figure.fig img{ width:100%; }
figure.fig figcaption{ padding: 14px 20px; font-family:var(--ff-mono); font-size:.76rem; color: var(--muted); border-top:1px solid var(--line-2); }
.fig-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin: 30px 0; }
.fig-grid figure.fig{ margin:0; }
@media(max-width:680px){ .fig-grid{ grid-template-columns:1fr; } }

/* full-bleed figure */
.fig-wide{ margin: clamp(40px,6vw,80px) 0; }
.fig-wide img{ width:100%; border-radius: var(--radius); border:1px solid var(--line); }
.fig-wide figcaption{ margin-top:14px; font-family:var(--ff-mono); font-size:.76rem; color:var(--muted); }

/* pull quote */
.pull{ padding: clamp(50px,8vw,110px) 0; border-top:1px solid var(--line-2); }
.pull blockquote{ font-size: clamp(1.7rem,4.2vw,3.4rem); font-weight:500; letter-spacing:-0.03em; line-height:1.14; max-width: 22ch; margin:0 auto; text-align:center; }
.pull blockquote .accent{ color: var(--accent); }
.pull .who{ display:block; text-align:center; margin-top:30px; font-family:var(--ff-mono); font-size:.82rem; color:var(--muted); }

/* metric strip */
.metrics{ display:grid; grid-template-columns: repeat(3,1fr); gap: clamp(20px,3vw,40px); padding: clamp(50px,7vw,90px) 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.metrics .m .n{ font-size: clamp(2.4rem,5.5vw,4.6rem); font-weight:600; letter-spacing:-0.04em; line-height:1; }
.metrics .m .n .u{ color: var(--accent); }
.metrics .m .l{ color: var(--muted); margin-top:10px; font-size:.95rem; }
@media(max-width:820px){ .metrics{ grid-template-columns:1fr; gap:36px; } }

/* next project */
.next{ padding: clamp(80px,11vw,150px) 0; }
.next a{ display:block; }
.next .lbl{ font-family:var(--ff-mono); font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:22px; }
.next .t{ font-size: clamp(2.4rem,8vw,7rem); font-weight:600; letter-spacing:-0.04em; line-height:.92; transition: color .4s, transform .5s var(--ease); }
.next a:hover .t{ color: var(--accent); transform: translateX(16px); }
