/* ============================================================
   Mihir Bathani — Portfolio (Stage)
   Premium minimalist. Palette / type / cursor preserved exactly.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --fg: #f2ece1;
  --fg-dim: #8a847a;
  --line: rgba(242, 236, 225, 0.08);
  --line-2: rgba(242, 236, 225, 0.16);
  --accent: #e8f26b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: "Space Grotesk", sans-serif; }
/* No CSS smooth-scroll — Lenis owns smoothing; having both causes double work/jank. */
body { overflow-x: hidden; cursor: none; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.mono { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-dim); }

/* Accessibility helpers */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 10000;
  background: var(--accent); color: #0a0a0b; padding: 10px 16px; border-radius: 4px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.06em;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Custom cursor */
.cursor {
  position: fixed; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--fg); pointer-events: none; z-index: 9999; mix-blend-mode: difference;
  transform: translate(-50%, -50%); transition: width 0.25s, height 0.25s, background 0.25s;
  will-change: transform;
}
.cursor.grow { width: 64px; height: 64px; background: var(--accent); mix-blend-mode: normal; }
.cursor-label {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #0a0a0b;
  opacity: 0; transition: opacity 0.2s;
}
.cursor-label.on { opacity: 1; }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 32px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav .logo { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; display: inline-flex; align-items: center; }
nav .logo img { height: 52px; width: auto; display: block; transition: opacity 0.25s; }
nav .logo img:hover { opacity: 0.8; }
nav ul { display: flex; gap: 28px; list-style: none; }
nav ul a { font-size: 13px; color: var(--fg); opacity: 0.8; }
nav ul a:hover { opacity: 1; }
.avail {
  display: inline-flex; align-items: center; gap: 8px; font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.avail .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 242, 107, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(232, 242, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 242, 107, 0); }
}
.nav-toggle { display: none; background: none; border: 0; color: var(--fg); font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Hero */
.hero {
  min-height: 100vh; padding: 146px 32px 32px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
/* Cinematic background slot */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg .media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg.media-ready .media-fill { opacity: 0.5; }
.hero-bg .ph-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 70% 0%, rgba(232,242,107,0.06), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 14px, rgba(255,255,255,0) 14px 28px),
    linear-gradient(180deg, #141417 0%, #0a0a0b 70%);
}
/* heroDrift animation removed — a continuously-scaling full-screen gradient was the hero's jank source. */
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.25) 40%, rgba(10,10,11,0.85) 100%);
}
.hero > *:not(.hero-bg) { position: relative; z-index: 1; }

.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hero-meta { display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
.hero-meta .mono { color: var(--fg-dim); }
.hero-meta p { font-size: 15px; line-height: 1.5; color: var(--fg); opacity: 0.9; }
.hero-meta .accent { color: var(--accent); }
.hero-name {
  font-weight: 500; line-height: 0.85; letter-spacing: -0.045em;
  font-size: clamp(80px, 18vw, 280px);
  margin-top: auto;
}
.hero-name .italic { font-style: italic; font-weight: 300; color: var(--fg-dim); }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 32px; gap: 32px; flex-wrap: wrap; }
.hero-role { font-size: 18px; letter-spacing: -0.01em; max-width: 460px; line-height: 1.45; }
.hero-role .accent { color: var(--accent); }

/* Hero CTAs */
.hero-ctas { display: flex; gap: 14px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 100px;
  font-size: 14px; letter-spacing: -0.005em; font-weight: 500; border: 1px solid var(--line-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn .arrow { transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #0a0a0b; border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-hint .line { width: 1px; height: 48px; background: var(--fg-dim); position: relative; overflow: hidden; }
.scroll-hint .line::after { content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--fg); animation: scrollLine 2s infinite; }
@keyframes scrollLine { 0% { top: -50%; } 100% { top: 100%; } }

/* Stats bar (static, under the hero) */
.stats-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 32px; }
.stats-bar-track { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; max-width: 960px; margin: 0 auto; }
.stats-bar-item { display: flex; align-items: baseline; gap: 10px; }
.stats-bar-num { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }
.stats-bar-label { color: var(--fg-dim); white-space: nowrap; }
.stats-bar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(232,242,107,0.6); animation: pulse 2.4s infinite; }
.stats-bar-sep { width: 1px; height: 26px; background: var(--line-2); }

/* Section */
section { padding: 120px 32px; position: relative; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 64px; gap: 24px; }
.section-title { font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.03em; font-weight: 500; }
.section-title .italic { font-style: italic; font-weight: 300; color: var(--fg-dim); }
.section-index { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fg-dim); white-space: nowrap; }

/* Showreel */
.reel-wrap {
  position: relative; width: 100%; aspect-ratio: 21/9; overflow: hidden; border-radius: 2px;
  background: var(--bg-2); cursor: none;
}
.reel-wrap .media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s ease; }
.reel-wrap.media-ready .media-fill { opacity: 1; }
.reel-wrap .reel-cta {
  position: absolute; left: 32px; bottom: 28px; z-index: 2;
  display: flex; align-items: center; gap: 16px;
}
.reel-wrap .reel-cta .label { font-size: 15px; letter-spacing: -0.01em; }
.reel-wrap .reel-cta .sub { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-dim); }
.reel-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }

/* Placeholder visual */
.ph {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 12px, rgba(255,255,255,0) 12px 24px),
    linear-gradient(180deg, #1a1a1d 0%, #0f0f11 100%);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 16px; bottom: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-dim);
}
.ph::before {
  content: ''; position: absolute; inset: 16px;
  border: 1px solid var(--line-2);
}
.ph .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, border-color 0.3s;
}
.ph .play::after {
  content: ''; width: 0; height: 0;
  border-left: 10px solid var(--fg); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.reel-wrap:hover .play { background: var(--accent); border-color: var(--accent); }
.reel-wrap:hover .play::after { border-left-color: #0a0a0b; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px 24px; }
.project {
  position: relative; overflow: hidden; border-radius: 2px;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project .thumb {
  position: relative; width: 100%; overflow: hidden; background: var(--bg-2);
}
.project .thumb-inner {
  position: absolute; inset: 0; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project .thumb .media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; z-index: 1; }
.project .thumb.media-ready .media-fill { opacity: 1; }
.project:hover .thumb-inner { transform: scale(1.04); }
.project .info { padding: 18px 4px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.project h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.project .info-right { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.project .tags { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.project .tag { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.project.big { grid-column: span 7; }
.project.small { grid-column: span 3; }
.project.full { grid-column: span 12; }
.project.half { grid-column: span 6; }
.project .thumb { aspect-ratio: 16/10; }
.project.small .thumb { aspect-ratio: 4/5; }
.project.full .thumb { aspect-ratio: 21/9; }
.project .featured-flag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #0a0a0b; background: var(--accent);
  padding: 5px 10px; border-radius: 100px;
}

/* About */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; }
.about h2 { font-size: clamp(40px, 6vw, 88px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 500; }
.about h2 .italic { font-style: italic; font-weight: 300; color: var(--fg-dim); }
.about p { font-size: 18px; line-height: 1.6; margin-bottom: 24px; color: var(--fg); opacity: 0.9; }
.about .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.about .stat .num { font-size: 48px; font-weight: 500; letter-spacing: -0.02em; }
.about .stat .lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); margin-top: 4px; }
/* About background image (sits behind the section; text overlays it) */
#about { position: relative; overflow: hidden; }
.about-bg { position: absolute; inset: 0; z-index: 0; }
.about-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.72; }
/* White-bg scans: invert so figures glow and the white background blends into the dark page. */
.about-bg.invert img { filter: invert(1) contrast(1.08); opacity: 0.85; mix-blend-mode: screen; }
/* Readability overlay over the image, darker toward the edges where the text sits. */
.about-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(135% 115% at 50% 42%, rgba(10,10,11,0.18) 0%, rgba(10,10,11,0.72) 100%); }
.about-bg:not(.invert)::after { background: rgba(10,10,11,0.78); }
#about .section-header, #about .about { position: relative; z-index: 1; }

/* Tools / Skills */
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.tool-group { padding: 32px 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding-right: 24px; padding-left: 0; }
.tool-group:last-child { border-right: 0; }
.tool-group .mono { margin-bottom: 16px; display: block; color: var(--accent); }
.tool-group ul { list-style: none; }
.tool-group li { font-size: 17px; padding: 6px 0; letter-spacing: -0.005em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool-group li .learning { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--accent); opacity: 0.8; }

.skill-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.skill-cloud span {
  padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 100px;
  font-size: 13px; letter-spacing: -0.005em; transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.skill-cloud span:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Process */
.process { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.proc-step { background: var(--bg); padding: 28px 20px; position: relative; transition: background 0.3s; }
.proc-step:hover { background: var(--bg-2); }
.proc-step .num { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.proc-step h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin: 18px 0 8px; }
.proc-step p { font-size: 12px; color: var(--fg-dim); line-height: 1.5; }

/* Currently exploring */
.exploring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.explore-card { padding: 24px; border: 1px solid var(--line); border-radius: 2px; transition: background 0.3s; position: relative; }
.explore-card:hover { background: var(--bg-2); }
.explore-card .mono { color: var(--accent); margin-bottom: 16px; display: block; }
.explore-card h4 { font-size: 19px; font-weight: 500; letter-spacing: -0.005em; margin-bottom: 8px; }
.explore-card p { font-size: 13px; color: var(--fg-dim); line-height: 1.5; }

/* Timeline (experience as achievements) */
.timeline { display: flex; flex-direction: column; }
.tl-row {
  display: grid; grid-template-columns: 150px 1fr 2.2fr 160px; gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line); align-items: start;
  transition: padding-left 0.4s;
}
.tl-row:hover { padding-left: 16px; }
.tl-row:last-child { border-bottom: 1px solid var(--line); }
.tl-row .tl-date { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fg-dim); }
.tl-row .tl-role { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.tl-row .tl-role .badge { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--accent); margin-left: 10px; vertical-align: middle; }
.tl-row .tl-company { font-size: 15px; color: var(--fg-dim); margin-top: 4px; }
.tl-row .tl-loc { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-dim); text-align: right; text-transform: uppercase; }
.tl-achievements { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tl-achievements li { font-size: 15px; line-height: 1.45; padding-left: 18px; position: relative; color: var(--fg); opacity: 0.9; }
.tl-achievements li::before { content: '▪'; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 2px; }
.tl-achievements .fill { color: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 12px; }

/* Education */
.edu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.edu-card { padding: 24px; border: 1px solid var(--line); border-radius: 2px; transition: background 0.3s; }
.edu-card:hover { background: var(--bg-2); }
.edu-card .mono { margin-bottom: 16px; display: block; }
.edu-card h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.005em; margin-bottom: 6px; line-height: 1.3; }
.edu-card p { font-size: 13px; color: var(--fg-dim); }

/* Technical Expertise (services) */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.service { padding: 40px 32px; background: var(--bg); transition: background 0.3s; }
.service:hover { background: var(--bg-2); }
.service .num { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.service h4 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin: 16px 0 12px; }
.service p { font-size: 14px; color: var(--fg-dim); line-height: 1.5; }

/* Contact */
.contact {
  padding: 120px 32px; text-align: center; position: relative;
  border-top: 1px solid var(--line);
}
.contact .mono { margin-bottom: 24px; }
.contact h2 {
  font-size: clamp(48px, 9vw, 150px); line-height: 0.9; letter-spacing: -0.04em;
  font-weight: 500;
}
.contact h2 .italic { font-style: italic; font-weight: 300; color: var(--fg-dim); }
.contact .contact-btn { margin-top: 48px; }
.contact .email {
  display: inline-block; margin-top: 28px; font-size: 18px; border-bottom: 1px solid var(--line-2);
  padding-bottom: 4px; transition: border-color 0.3s; color: var(--fg-dim);
}
.contact .email:hover { border-color: var(--accent); color: var(--accent); }
.contact-links { display: flex; justify-content: center; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.contact-links a { font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.contact-links a:hover { color: var(--fg); }

/* Contact form */
.contact-form { max-width: 640px; margin: 48px auto 0; text-align: left; }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .cf-field { display: block; margin-bottom: 16px; }
.contact-form .cf-label {
  display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
}
.contact-form .cf-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 2px; padding: 14px 16px; font: inherit; font-size: 15px;
  color: var(--fg); transition: border-color 0.25s, background 0.25s;
}
.contact-form .cf-input::placeholder { color: var(--fg-dim); opacity: 0.7; }
.contact-form .cf-input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.contact-form .cf-textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.contact-form .cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .contact-btn { margin-top: 24px; text-align: center; }
.contact-form button[type="submit"]:disabled { opacity: 0.55; cursor: default; }
.contact-form .cf-status { min-height: 20px; margin-top: 18px; text-align: center; font-size: 14px; color: var(--fg-dim); }
.contact-form .cf-status.ok { color: var(--accent); }
.contact-form .cf-status.err { color: #ff6b6b; }
.email-fallback { margin-top: 32px; font-size: 12px; letter-spacing: 0.06em; color: var(--fg-dim); }
.email-copy { color: var(--fg); border-bottom: 1px solid var(--line-2); cursor: pointer; transition: color 0.25s, border-color 0.25s; }
.email-copy:hover, .email-copy:focus { color: var(--accent); border-color: var(--accent); outline: none; }
@media (max-width: 640px) { .contact-form .cf-row { grid-template-columns: 1fr; gap: 0; } }

footer {
  padding: 24px 32px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--fg-dim); letter-spacing: 0.08em; text-transform: uppercase; gap: 16px; flex-wrap: wrap;
}

/* (parallax helper removed — thumbs are static now; no per-element compositor layers) */

/* ============================================================
   Writing (homepage section) + Article pages
   ============================================================ */
.writing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--bg-2); transition: border-color 0.3s, transform 0.4s; }
.article-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.article-card-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--bg); }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1); }
.article-card:hover .article-card-thumb img { transform: scale(1.04); }
.article-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card-meta { display: flex; gap: 6px; align-items: center; }
.article-card-meta .dot { color: var(--accent); }
.article-card h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.article-card-body p { font-size: 14px; color: var(--fg-dim); line-height: 1.55; flex: 1; }
.article-card-cta { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.article-card:hover .article-card-cta .arrow { transform: translateX(3px); }
.article-card-cta .arrow { transition: transform 0.3s; }

/* Article page */
.article-page nav .avail-link { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg); opacity: 0.85; }
.article { max-width: 760px; margin: 0 auto; padding: 166px 32px 80px; }
.article-head { margin-bottom: 40px; }
.article-back { display: inline-block; color: var(--fg-dim); margin-bottom: 28px; }
.article-back:hover { color: var(--accent); }
.article-meta { display: flex; gap: 8px; align-items: center; color: var(--fg-dim); margin-bottom: 18px; }
.article-meta .dot { color: var(--accent); }
.article-title { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; }
.article-excerpt { font-size: 19px; color: var(--fg-dim); line-height: 1.5; margin-top: 18px; }
.article-cover { margin: 8px 0 48px; border-radius: 2px; overflow: hidden; }
.article-cover img { width: 100%; display: block; }

.article-body { font-size: 18px; line-height: 1.75; color: var(--fg); opacity: 0.95; }
.article-body > * + * { margin-top: 22px; }
.article-body h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; margin-top: 48px; line-height: 1.2; }
.article-body h3 { font-size: 23px; font-weight: 500; letter-spacing: -0.01em; margin-top: 36px; }
.article-body h4 { font-size: 19px; font-weight: 600; margin-top: 28px; }
.article-body a { color: var(--accent); border-bottom: 1px solid var(--line-2); transition: border-color 0.25s; }
.article-body a:hover { border-color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-top: 8px; }
.article-body li::marker { color: var(--accent); }
.article-body img { max-width: 100%; height: auto; border-radius: 2px; margin: 12px 0; }
.article-body blockquote { border-left: 2px solid var(--accent); padding-left: 20px; color: var(--fg-dim); font-style: italic; }
.article-body code { font-family: "JetBrains Mono", monospace; font-size: 0.88em; background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
.article-body pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 18px; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }

/* Scroll reveal (GSAP fallback uses .in) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.2,0.8,0.2,1), transform 0.9s cubic-bezier(0.2,0.8,0.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Case study modal
   ============================================================ */
.cs-modal {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease;
  overflow-y: auto; cursor: none;
}
.cs-modal.open { opacity: 1; visibility: visible; }
.cs-close {
  position: fixed; top: 20px; right: 32px; z-index: 1003; background: var(--bg-2);
  border: 1px solid var(--line-2); color: var(--fg); width: 48px; height: 48px; border-radius: 50%;
  font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, color 0.3s;
}
.cs-close:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); }
.cs-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0; z-index: 1004; transition: width 0.1s linear; }

.cs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; max-width: 1280px; margin: 0 auto; padding: 80px 32px 120px; }
.cs-nav { position: sticky; top: 80px; align-self: start; height: max-content; }
.cs-nav .cs-eyebrow { display: block; margin-bottom: 20px; }
.cs-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cs-nav a {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-dim); padding: 6px 0 6px 14px; border-left: 1px solid var(--line); display: block;
  transition: color 0.25s, border-color 0.25s;
}
.cs-nav a:hover { color: var(--fg); }
.cs-nav a.active { color: var(--accent); border-color: var(--accent); }

.cs-content { min-width: 0; }
.cs-hero { font-size: clamp(28px, 4vw, 48px); line-height: 1.0; letter-spacing: -0.03em; font-weight: 500; margin-bottom: 14px; }
.cs-hero .italic { font-style: italic; font-weight: 300; color: var(--fg-dim); }
.cs-sub { font-size: 16px; color: var(--fg-dim); margin-bottom: 40px; max-width: 640px; line-height: 1.5; }
.cs-section { padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.cs-section:first-of-type { border-top: 0; padding-top: 0; }
.cs-section h3 { font-size: 13px; font-family: "JetBrains Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.cs-section p { font-size: 17px; line-height: 1.6; color: var(--fg); opacity: 0.9; max-width: 720px; margin-bottom: 16px; }
.cs-section ul { list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.cs-section ul li { font-size: 16px; line-height: 1.5; padding-left: 18px; position: relative; opacity: 0.9; }
.cs-section ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.cs-media { aspect-ratio: 16/9; margin-bottom: 24px; position: relative; overflow: hidden; border-radius: 2px; background: var(--bg-2); }
.cs-media .media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.cs-media .cs-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-media.media-ready .media-fill { opacity: 1; }
.cs-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 720px; }
.cs-meta-grid .k { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 6px; }
.cs-meta-grid .v { font-size: 16px; }
.cs-renders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cs-renders .cs-media { aspect-ratio: 4/3; margin-bottom: 0; }
.cs-note { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--accent); opacity: 0.85; letter-spacing: 0.04em; margin-top: 8px; }

/* Before / After slider */
.ba { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 2px; user-select: none; background: var(--bg-2); }
.ba .ba-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.ba .media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba-before .media-fill, .ba .ba-before .ph { width: 100%; }
.ba .ba-after { z-index: 1; }
.ba .ba-before { z-index: 2; overflow: hidden; }
.ba .ba-before .ba-inner { position: absolute; inset: 0; width: 100%; height: 100%; }
.ba .ba-label { position: absolute; bottom: 14px; z-index: 4; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg); background: rgba(10,10,11,0.6); padding: 4px 8px; border-radius: 3px; }
.ba .ba-label.left { left: 14px; }
.ba .ba-label.right { right: 14px; }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 3; left: 50%; cursor: ew-resize; }
.ba .ba-handle::after {
  content: '⇄'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #0a0a0b;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 5; margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .tools { grid-template-columns: repeat(2, 1fr); }
  .tool-group { border-right: 0; padding-right: 0; }
  .process { grid-template-columns: repeat(4, 1fr); }
  .exploring { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .edu { grid-template-columns: repeat(2, 1fr); }
  .writing-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 860px) {
  body { cursor: auto; }
  .cursor, .cursor-label { display: none; }
  /* No blend on mobile — it made the dropdown look see-through over the hero. */
  nav { mix-blend-mode: normal; }
  nav ul { display: none; position: absolute; top: calc(100% + 6px); right: 16px; flex-direction: column; gap: 16px; background: var(--bg); padding: 22px 26px; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,0.6); z-index: 200; min-width: 180px; }
  nav.menu-open ul { display: flex; }
  nav .avail { display: none; }
  .nav-toggle { display: block; }
  .stats-bar { padding: 22px 20px; }
  .stats-bar-track { flex-direction: column; gap: 14px; }
  .stats-bar-sep { display: none; }
  section { padding: 80px 20px; }
  .hero { padding: 126px 20px 24px; }
  .work-grid { gap: 16px; }
  .project.big, .project.half, .project.full { grid-column: span 12; }
  .project.small { grid-column: span 6; }  /* half width on mobile, so "small" is actually small */
  .project.small .thumb { aspect-ratio: 4/5; }
  .tl-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .tl-row .tl-loc { text-align: left; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .cs-layout { grid-template-columns: 1fr; gap: 24px; padding: 72px 20px 80px; }
  .cs-nav { position: static; top: auto; }
  .cs-nav ul { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cs-nav a { border-left: 0; border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px; }
  .cs-nav a.active { background: rgba(232,242,107,0.08); }
  .cs-renders { grid-template-columns: 1fr; }
  .contact-links { gap: 20px; }
  .writing-grid { grid-template-columns: 1fr; }
  .article { padding: 136px 20px 64px; }
}
@media (max-width: 520px) {
  .tools { grid-template-columns: 1fr; }
  .exploring, .services, .edu, .cs-meta-grid { grid-template-columns: 1fr; }
  .about .stats { grid-template-columns: 1fr; }
  .hero-ctas { width: 100%; }
  .btn { flex: 1 1 auto; justify-content: center; }
  footer { justify-content: center; text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-bg .ph-bg { animation: none; }
}
