/* ============================================================
   Rashmi Kumari — UX Portfolio
   Custom stylesheet. No frameworks.
   Type scale is fluid (clamp): body 18–22px, display up to 8rem.
   Spacing follows an 8pt rhythm (0.5rem steps).
   ============================================================ */

:root {
  --bg: #0b0c10;
  --bg-raised: #12141a;
  --bg-card: #14161d;
  --line: rgba(236, 233, 225, 0.1);
  --line-strong: rgba(236, 233, 225, 0.18);
  --ink: #ece9e1;
  --ink-soft: #b9b5aa;
  --ink-faint: #8a8679;
  --accent: #e2b458;
  --accent-soft: rgba(226, 180, 88, 0.14);
  --violet: #9d8cff;
  --violet-soft: rgba(157, 140, 255, 0.14);
  --teal: #6fd3c7;
  --teal-soft: rgba(111, 211, 199, 0.12);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-gap: clamp(5rem, 12vh, 9rem);
  /* ONE shared shell width for every page (index + all case studies) */
  --container-max: 1200px;

  /* Fluid type scale — body 18→22px, display headers up to 8rem */
  --step--1: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);  /* 15 → 17 */
  --step-0: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);   /* 18 → 22 */
  --step-1: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);     /* 22 → 28 */
  --step-2: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);        /* 28 → 40 */
  --step-3: clamp(2.25rem, 1.75rem + 2.4vw, 3.75rem);      /* 36 → 60 */
  --step-4: clamp(2.75rem, 2rem + 3.8vw, 5.25rem);         /* 44 → 84 */
  --step-5: clamp(3.25rem, 2.25rem + 6.5vw, 8rem);         /* 52 → 128 */
  --step-giant: clamp(5.5rem, 4rem + 16vw, 15rem);         /* story years */

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

/* Lenis drives smooth scrolling when active; native smooth would fight it */
html.lenis {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #14120a;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #14120a;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Interactive background canvas ---------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-static {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(157, 140, 255, 0.09), transparent 60%),
    radial-gradient(ellipse 65% 50% at 15% 108%, rgba(226, 180, 88, 0.07), transparent 60%);
}

.page {
  position: relative;
  z-index: 1;
}

/* ---------- Custom cursor ---------- */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(236, 233, 225, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.28s var(--ease-out), height 0.28s var(--ease-out),
    border-color 0.28s var(--ease-out), background-color 0.28s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-ring .cursor-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #14120a;
  opacity: 0;
  transition: opacity 0.2s;
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
  background: rgba(226, 180, 88, 0.12);
}

body.cursor-view .cursor-ring {
  width: 74px;
  height: 74px;
  border-color: transparent;
  background: var(--accent);
}

body.cursor-view .cursor-ring .cursor-label {
  opacity: 1;
}

body.cursor-view .cursor-dot {
  opacity: 0 !important;
}

body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

body.has-custom-cursor {
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}

.site-header.scrolled {
  background: rgba(11, 12, 16, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header.hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand .brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  white-space: nowrap;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 99px;
  transition: color 0.2s, background-color 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(236, 233, 225, 0.07);
}

.site-nav a.nav-cta {
  color: #14120a;
  background: var(--accent);
  font-weight: 600;
  margin-left: 0.5rem;
}

.site-nav a.nav-cta:hover {
  background: #f0c66e;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
}

@media (max-width: 1120px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--gutter);
    left: auto;
    width: min(340px, calc(100vw - var(--gutter) * 2));
    background: #14161d;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    display: none;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
  }

  .site-nav a.nav-cta {
    margin: 0.5rem 0 0;
    text-align: center;
  }
}

/* ---------- Layout primitives ---------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Case-study pages share the exact same shell width as the home page;
   readability is preserved by ch-based caps on the prose itself. */
.container--narrow {
  max-width: var(--container-max);
}

section {
  padding: calc(var(--section-gap) / 2) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.section-head .index {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-head h2 {
  font-size: var(--step-3);
  line-height: 1.08;
  margin: 0;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--accent);
}

/* ---------- Hero (layered 3D stage) ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  padding-bottom: 4rem;
  position: relative;
  perspective: 1200px;
}

.hero-stage {
  position: relative;
  transform-style: preserve-3d;
}

.hero-layer {
  will-change: transform;
}

.hero-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(10rem, 32vw, 26rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 233, 225, 0.07);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-layer--back {
  position: absolute;
  inset: 0;
  transform: translateZ(-140px) scale(1.12);
  pointer-events: none;
}

.hero-layer--mid {
  position: relative;
  transform: translateZ(0);
}

.hero-layer--front {
  position: relative;
  transform: translateZ(60px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.hero-kicker .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(111, 211, 199, 0.5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(111, 211, 199, 0);
  }
}

.hero h1 {
  font-size: var(--step-5);
  font-weight: 480;
  line-height: 1.05;
  margin-bottom: 0.35em;
  max-width: 12em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 380;
  color: var(--accent);
}

.hero-sub {
  max-width: 40ch;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Portrait — living hero element. The frame is positioned by the hero
   layer system (GSAP animates the figure itself); the pointer-driven
   tilt/parallax lives on .portrait-inner so the two never fight. */
.portrait-frame {
  /* Centered WITHOUT translateY so GSAP can own the transform safely */
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto 0;
  transform: translateZ(30px);
  width: min(30vw, 400px);
  height: min(37.5vw, 500px);
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: radial-gradient(120% 90% at 60% 18%, #181b23, #0d0e13 72%);
  perspective: 900px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.portrait-frame[hidden] {
  display: none;
}

.portrait-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Slight overscan so the counter-parallax never exposes an edge */
  transform: scale(1.08);
  will-change: transform;
  /* Photo is graded at the asset level (warm charcoal blend); keep only
     a light unifying pass here so skin stays natural */
  filter: saturate(0.96) contrast(1.02);
}

/* Soft moving highlight, driven by JS via CSS custom properties */
.portrait-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--glare-o, 0);
  mix-blend-mode: screen;
  background: radial-gradient(
    42% 34% at var(--glare-x, 60%) var(--glare-y, 30%),
    rgba(236, 233, 225, 0.32),
    rgba(226, 180, 88, 0.1) 55%,
    transparent 75%
  );
  will-change: opacity;
}

/* Vignette that melts the photo's dark background into the page */
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 64px 18px rgba(11, 12, 16, 0.55);
  background: linear-gradient(180deg, transparent 68%, rgba(11, 12, 16, 0.5));
}

/* Reserve room for the portrait so the headline never runs under it */
@media (min-width: 981px) {
  .hero-layer--mid,
  .hero-layer--front {
    padding-right: min(32vw, 430px);
  }

  .hero h1 {
    font-size: clamp(3rem, 2rem + 4.6vw, 6rem);
  }
}

@media (max-width: 980px) {
  .portrait-frame {
    position: relative;
    top: auto;
    bottom: auto;
    transform: none;
    width: min(70vw, 340px);
    height: auto;
    margin: 2.5rem 0 0;
  }
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
}

.hero-scroll .line {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--ink-faint), transparent);
  overflow: hidden;
  position: relative;
}

.hero-scroll .line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--accent), transparent);
  animation: scroll-drip 2s infinite var(--ease-out);
}

@keyframes scroll-drip {
  to {
    top: 100%;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}

.btn-primary {
  background: var(--accent);
  color: #14120a;
}

.btn-primary:hover {
  background: #f0c66e;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn .arrow {
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-faint);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.marquee span::after {
  content: "✳";
  font-style: normal;
  color: var(--accent);
  font-size: 0.8rem;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .hero-kicker .pulse,
  .hero-scroll .line::after {
    animation: none;
  }
}

/* ---------- Story (scroll-pinned career timeline) ----------
   Default = plain stacked sections (no-JS / reduced-motion path).
   JS adds .story--pinned for the cinematic scrubbed version. */

.story {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.story-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(2rem, 6vh, 4rem);
}

.story-top .eyebrow {
  margin-bottom: 0;
}

.story-progress {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  color: var(--ink-faint);
  margin: 0;
}

.story-progress [data-story-current] {
  color: var(--accent);
  font-size: 1.6em;
}

.story-panels {
  position: relative;
}

.story-panel {
  position: relative;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 8vh, 5rem) 0;
  border-bottom: 1px dashed var(--line);
}

.story-panel:last-child {
  border-bottom: none;
}

.story-year {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: var(--step-giant);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(226, 180, 88, 0.55);
  margin: 0 0 1rem;
  user-select: none;
}

.story-caption {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.05;
  font-weight: 480;
  margin: 0 0 0.75rem;
  max-width: 14em;
}

.story-caption em {
  font-style: italic;
  color: var(--accent);
}

.story-detail {
  font-size: var(--step-0);
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 0 1rem;
}

.story-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.story-stat .n {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--teal);
  line-height: 1;
}

.story-stat .l {
  font-size: var(--step--1);
  color: var(--ink-faint);
  max-width: 18ch;
  line-height: 1.35;
}

.story-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.story-link:hover {
  text-decoration: underline;
}

/* Pinned (cinematic) mode — applied by JS only when motion is allowed */
.story--pinned .story-shell {
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.story--pinned .story-panels {
  flex: 1;
  position: relative;
}

.story--pinned .story-panel {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-bottom: none;
  padding: 0;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-lede {
  font-size: var(--step-2);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

.about-lede em {
  color: var(--accent);
  font-style: italic;
}

.about-body {
  color: var(--ink-soft);
}

.about-body p {
  max-width: 58ch;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}

.fact-list .k {
  color: var(--ink-faint);
}

.fact-list .v {
  text-align: right;
  color: var(--ink);
}

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

/* ---------- Work cards ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.badge--real {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(226, 180, 88, 0.3);
}

.badge--concept {
  background: var(--violet-soft);
  color: var(--violet);
  border: 1px solid rgba(157, 140, 255, 0.32);
}

.badge--live {
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid rgba(111, 211, 199, 0.35);
}

.badge--neutral {
  background: rgba(236, 233, 225, 0.06);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.case-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, background-color 0.3s;
  will-change: transform;
}

.case-card:hover {
  border-color: var(--line-strong);
  background: #171a22;
}

.case-card .card-visual {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.case-card .card-visual svg {
  width: 100%;
  height: 100%;
}

.case-card .card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.case-card h3 {
  font-size: var(--step-2);
  line-height: 1.12;
  margin: 1rem 0 0.5rem;
}

.case-card .card-desc {
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.55;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.card-tags li {
  font-size: 0.8rem;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
}

.card-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.case-card:hover .card-link .arrow {
  transform: translateX(5px);
}

.card-link .arrow {
  transition: transform 0.25s var(--ease-out);
}

.case-card--flagship {
  grid-template-columns: 1fr 1.1fr;
}

.work-stack {
  display: grid;
  gap: 1.5rem;
}

.side-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.side-projects-grid .case-card {
  grid-template-columns: 1fr;
  align-content: start;
}

.side-projects-grid .card-visual {
  aspect-ratio: 16 / 9;
}

@media (max-width: 900px) {
  .case-card,
  .case-card--flagship {
    grid-template-columns: 1fr;
  }

  .side-projects-grid {
    grid-template-columns: 1fr;
  }
}

.concept-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed rgba(157, 140, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(157, 140, 255, 0.05);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.concept-note strong {
  color: var(--violet);
}

/* ---------- Experience timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 3rem 2.75rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline .t-period {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.timeline h3 {
  font-size: var(--step-1);
  margin-bottom: 0.25rem;
}

.timeline .t-org {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.timeline ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  max-width: 60ch;
}

.timeline ul li {
  padding: 0.25rem 0;
}

.timeline ul li::before {
  display: none;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.skill-group h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.skill-group h3 .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.skill-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-group li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: rgba(236, 233, 225, 0.05);
  border: 1px solid var(--line);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
}

/* ---------- Certifications & education ---------- */

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cert-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.cert-list .c-name {
  font-weight: 500;
  font-size: var(--step--1);
}

.cert-list .c-date {
  color: var(--ink-faint);
  font-size: 0.9rem;
  white-space: nowrap;
}

.cert-list .c-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
  background: rgba(236, 233, 225, 0.05);
  border: 1px solid var(--line);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cert-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.cert-intro {
  color: var(--ink-soft);
  max-width: 50ch;
}

.edu-card {
  margin-top: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.edu-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.edu-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.edu-card .e-period {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.contact h2 {
  font-size: var(--step-5);
  line-height: 1.05;
  margin-bottom: 0.4em;
}

.contact h2 em {
  font-style: italic;
  color: var(--accent);
}

.contact p {
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 auto 2.5rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Case study pages ---------- */

.cs-hero {
  padding-top: clamp(9rem, 20vh, 13rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
}

.cs-hero h1 {
  font-size: var(--step-4);
  line-height: 1.06;
  max-width: 16em;
  margin-top: 1.25rem;
}

.cs-hero .cs-sub {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 40ch;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
  margin: 2.5rem 0 0;
}

.cs-meta div h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.cs-meta div p {
  margin: 0;
  font-size: var(--step--1);
}

.cs-body h2 {
  font-size: var(--step-3);
  line-height: 1.08;
  margin-top: 2em;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.cs-body h2 .idx {
  font-size: 0.5em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.cs-body h3 {
  font-size: var(--step-1);
  margin-top: 1.75em;
}

.cs-body p,
.cs-body li {
  color: var(--ink-soft);
}

.cs-body p {
  max-width: 62ch;
}

/* Keep bullet lists at reading measure now that the shell is full width */
.cs-body > ul,
.cs-body > ol {
  max-width: 62ch;
}

.cs-body strong {
  color: var(--ink);
  font-weight: 600;
}

.cs-figure {
  margin: 2.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.cs-figure svg,
.cs-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.cs-figure figcaption {
  padding: 0.9rem 1.35rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

/* Real product screenshot in a browser-style frame */
.shot-frame {
  position: relative;
  padding-top: 2.25rem;
  background: #191c24;
}

.shot-frame::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 1.15rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(236, 233, 225, 0.22);
  box-shadow: 16px 0 0 rgba(236, 233, 225, 0.14), 32px 0 0 rgba(236, 233, 225, 0.08);
}

.shot-frame::after {
  content: attr(data-url);
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  background: rgba(236, 233, 225, 0.05);
  border: 1px solid var(--line);
  padding: 0.15rem 0.9rem;
  border-radius: 99px;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.35rem 1.6rem;
  margin: 2.25rem 0;
}

.cs-callout--concept {
  border-left-color: var(--violet);
  background: var(--violet-soft);
}

.cs-callout p {
  margin: 0;
  color: var(--ink);
}

.cs-callout p + p {
  margin-top: 0.6em;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.outcome-card .big {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--accent);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.outcome-card p {
  margin: 0;
  font-size: var(--step--1);
}

.persona-card {
  border: 1px dashed rgba(157, 140, 255, 0.45);
  border-radius: var(--radius);
  padding: 1.75rem 1.85rem;
  margin: 2rem 0;
  background: rgba(157, 140, 255, 0.04);
}

.persona-card h3 {
  margin-top: 0;
}

.persona-card .persona-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  display: block;
  margin-bottom: 0.75rem;
}

/* Four-role strip (biller case study) */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}

.role-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  color: var(--accent);
}

.role-card p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.cs-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding-top: 2rem;
}

.cs-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cs-nav a:hover {
  color: var(--accent);
}

/* ---------- Horizontal gallery (pin + xPercent) ----------
   Default = native horizontal scroll with snap (mobile / reduced motion
   / no-JS). JS adds .gallery--pinned for the scrubbed cinematic pass. */

.gallery {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.gallery-shell {
  padding: clamp(2.5rem, 7vh, 4.5rem) 0;
}

.gallery-head {
  max-width: var(--container-max);
  margin: 0 auto clamp(1.5rem, 4vh, 2.5rem);
  padding: 0 var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gallery-head h2 {
  font-size: var(--step-3);
  margin: 0;
}

.gallery-hint {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.gallery-track {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.gallery-slide {
  flex: 0 0 min(80vw, 880px);
  scroll-snap-align: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.gallery-slide img {
  width: 100%;
  height: auto;
}

.gallery-slide figcaption {
  padding: 0.9rem 1.35rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

.gallery-slide figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.gallery--pinned .gallery-shell {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.gallery--pinned .gallery-track {
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
  will-change: transform;
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .case-card,
  [data-tilt],
  [data-parallax],
  .hero-layer,
  .story-panel,
  .gallery-track,
  .portrait-inner {
    transform: none !important;
  }

  /* Static portrait: keep the overscan crop but kill motion + glare */
  .portrait-inner img {
    transform: scale(1.08) !important;
  }

  .portrait-glare {
    opacity: 0 !important;
  }
}

/* ---------- Print ---------- */

@media print {
  #bg-canvas,
  .cursor-dot,
  .cursor-ring,
  .site-header,
  .hero-scroll {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }
}
