:root {
  --bg: #FAFAFA;
  --bg-alt: #F0F0F0;
  --card: #FFFFFF;
  --text: #1B1730;
  --text-muted: #6B6684;
  --primary: #7FB2F0;
  --secondary: #E28FD0;
  --accent: #1B4C7A;
  --heading: #1B4C7A;
  --btn-color: #BDE3FF;
  --btn-text: #17142A;
  --border: rgba(27,23,48,0.08);
  --font-display: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

p, li { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .orb { animation: none !important; }
  .hero-aurora::before { animation: none !important; }
}

/* Nav */
.site-header {
  position: sticky;
  top: 20px;
  z-index: 50;
  padding: 0 24px;
  margin-bottom: -76px; /* pulls hero up under the floating capsule */
}

.nav-capsule {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 10px 10px 22px;
  box-shadow: 0 12px 30px rgba(27,23,48,0.08);
}

.logo {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.logo .dot { color: var(--secondary); }

.nav-links { display: flex; align-items: center; gap: 22px; }

.nav-links a {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  background: var(--btn-color);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Logo / company marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  padding: 36px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 28px;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

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

/* Hero */
main { position: relative; }
.hero { position: relative; padding: 112px 0 80px; }

.hero .wrap { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }

/* Soft, blurred color-mesh backdrop, drifting right to left in a seamless
   loop. Fixed to the viewport (not just sized to the hero) so it sits behind
   the entire page as you scroll, not only the first section or two — a
   negative z-index keeps it behind every normal-flow section regardless of
   DOM stacking order, so opaque section backgrounds simply paint over it;
   sections without their own opaque background (or with a translucent one,
   like .section-alt and the marquee's glass effect) let it show through.
   Tiled via background-repeat rather than a duplicated element (unlike
   .marquee-track) since it's one continuous gradient, not discrete content. */
.hero-aurora {
  position: fixed; inset: 0;
  z-index: -1; overflow: hidden; pointer-events: none;
}
.hero-aurora::before {
  content: '';
  position: absolute; inset: -10% -10%;
  background-image:
    radial-gradient(circle at 8% 55%, rgba(35,150,150,0.9) 0%, transparent 26%),
    radial-gradient(circle at 30% 15%, rgba(10,12,18,0.85) 0%, transparent 22%),
    radial-gradient(circle at 55% 75%, rgba(230,80,35,0.9) 0%, transparent 28%),
    radial-gradient(circle at 78% 25%, rgba(242,160,65,0.9) 0%, transparent 30%),
    radial-gradient(circle at 100% 65%, rgba(248,222,182,0.95) 0%, transparent 32%);
  background-repeat: repeat-x;
  background-size: 1800px 100%;
  filter: blur(45px);
  opacity: 0.85;
  animation: aurora-drift 36s linear infinite;
}

@keyframes aurora-drift {
  from { background-position: 0 0; }
  to { background-position: -1800px 0; }
}

.profile-photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--card);
  box-shadow: 0 8px 24px rgba(27,23,48,0.12);
  margin-bottom: 24px;
  object-fit: cover;
}

.eyebrow-bar {
  width: 52px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 20px;
}

.kicker {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  color: var(--heading);
  margin-bottom: 18px;
}

/* The rotating role word (Designer / Thinker / Marketeer / Strategist /
   All-Rounder). JS in script.js swaps .swap on and off around each text
   change; the transition gives it a quick fade + slight rise. */
.role-word {
  display: inline-block;
  text-align: left;
  vertical-align: top;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.role-word.swap {
  opacity: 0;
  transform: translateY(6px);
}
@media (prefers-reduced-motion: reduce) {
  .role-word { transition: none; }
}

.tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.15s ease; border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-primary {
  background: var(--btn-color);
  color: var(--btn-text);
  box-shadow: 0 10px 24px rgba(189,227,255,0.5);
}
.btn-outline {
  background: var(--card);
  color: var(--text);
  border-color: var(--btn-color);
}
.btn-outline:hover { border-color: var(--accent); }
.btn.big { font-size: 1.1rem; padding: 18px 36px; }

/* Chat card */
.orb {
  position: absolute;
  top: -130px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(189,227,255,0.95) 0%, rgba(189,227,255,0.45) 45%, rgba(189,227,255,0) 72%);
  pointer-events: none;
  animation: orb-pulse 6s ease-in-out infinite;
  z-index: 0;
}

/* Pulses (scale/opacity) and drifts (translate) at once, so the orb both
   breathes and wanders gently rather than staying pinned in place. */
@keyframes orb-pulse {
  0%, 100% { transform: translate(-50%, 0) scale(1); opacity: 0.85; }
  25% { transform: translate(calc(-50% + 16px), -12px) scale(1.06); opacity: 0.95; }
  50% { transform: translate(calc(-50% - 10px), 8px) scale(1.1); opacity: 1; }
  75% { transform: translate(calc(-50% + 12px), 10px) scale(1.05); opacity: 0.95; }
}

.chat-card {
  width: 100%;
  max-width: 720px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.6);
  border-top-color: rgba(255,255,255,0.85);
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(27,23,48,0.14), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .chat-card { background: var(--card); }
}
.chat-content { position: relative; z-index: 1; padding-top: 64px; text-align: left; }
.chat-card-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.chat-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--heading);
  box-shadow: 0 0 12px rgba(27,76,122,0.6);
  flex-shrink: 0;
}
.chat-card-header h2 { font-size: 1.05rem; text-transform: none; }
.chat-log {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px;
}
.chat-msg p { margin: 0; padding: 12px 16px; border-radius: 14px; font-size: 0.92rem; line-height: 1.55; max-width: 92%; }
.chat-msg-bot p { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg-user { display: flex; justify-content: flex-end; }
.chat-msg-user p {
  background: var(--btn-color);
  color: var(--btn-text); font-weight: 600; border-bottom-right-radius: 4px;
}
.chat-form { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 12px 18px; color: var(--text); font-family: var(--font-body); font-size: 0.92rem;
}
.chat-form input::placeholder { color: var(--text-muted); }
.chat-form input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chat-send { padding: 12px 22px; font-size: 0.9rem; white-space: nowrap; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  font-size: 0.78rem; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; font-family: var(--font-body);
}
.chip:hover, .chip:focus-visible { border-color: var(--accent); color: var(--text); }

/* Sections */
.section { padding: 88px 0; }
/* Translucent (not solid) so the fixed aurora backdrop tints through rather
   than being fully blocked. */
.section-alt { background: rgba(240,240,240,0.6); }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 16px; }
.section-lede { color: var(--text-muted); max-width: 560px; margin: 0 0 40px; font-size: 1.02rem; }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.stat-item { border-top: 3px solid var(--accent); padding-top: 16px; }
.stat-item:nth-child(2) { border-top-color: var(--secondary); }
.stat-item:nth-child(3) { border-top-color: var(--primary); }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.stat-label { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }

/* Scroll-reveal: stats stay hidden until the grid scrolls into view, then
   cascade in one at a time. Gated behind .js-ready so content never gets
   stuck hidden if JS fails to run (progressive enhancement). */
.js-ready .stat-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-ready .stat-grid.in-view .stat-item { opacity: 1; transform: translateY(0); }
.js-ready .stat-grid.in-view .stat-item:nth-child(1) { transition-delay: 0s; }
.js-ready .stat-grid.in-view .stat-item:nth-child(2) { transition-delay: 0.18s; }
.js-ready .stat-grid.in-view .stat-item:nth-child(3) { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .js-ready .stat-item { opacity: 1; transform: none; transition: none; }
}

/* Work preview / case cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }
/* Only cards with a real case-study link (not the plain summary cards on
   resume.html) get the pointer cursor and the focus-visible border cue. */
.project-card:has(.project-link) { cursor: pointer; }
.project-card:has(.project-link:focus-visible) { border-color: var(--accent); }
.project-thumb { height: 130px; position: relative; }
.project-thumb-lock {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.92); color: var(--text);
  padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
}
.project-thumb-lock svg { width: 13px; height: 13px; }
.thumb-1 { background: var(--primary); }
.thumb-2 { background: var(--secondary); }
.thumb-3 { background: var(--accent); }
.thumb-4 { background: var(--primary); }
.thumb-5 { background: var(--secondary); }

/* A real case-study photo, reused as both the home-page card thumbnail and the
   case-study page's full-bleed banner. url() here resolves relative to this
   stylesheet's own location (project root), not the including page — so this one
   rule works correctly from both index.html and work/*.html without adjustment. */
.thumb-purecs-hero {
  background-image: url('assets/purecs/hero.png');
  background-size: cover;
  background-position: center;
}
.thumb-jugnu-hero {
  background-image: url('assets/jugnu/hero.png');
  background-size: cover;
  background-position: center;
}
.thumb-mualim-hero {
  background-image: url('assets/mualim/hero.png');
  background-size: cover;
  background-position: center;
}
.thumb-kahunas-hero {
  background-image: url('assets/kahunas/hero.png');
  background-size: cover;
  background-position: center;
}
/* Card thumbnails (short, cropped strip) align every hero shot to the top so
   the mockup isn't cut off mid-frame. The full-bleed case-study banner keeps
   a centered crop by default — Kahunas's banner is top-aligned too since its
   tablet mockup sits high in the frame with a hand at the very bottom. */
.project-thumb.thumb-purecs-hero,
.project-thumb.thumb-jugnu-hero,
.project-thumb.thumb-kahunas-hero,
.case-hero-image.thumb-kahunas-hero {
  background-position: top;
}
/* Mualim's hero has a band of empty gradient above the laptop mockup, so a
   plain top crop shows mostly blank space on the short card thumbnail —
   nudge the crop window down past it instead of all the way to the top. */
.project-thumb.thumb-mualim-hero {
  background-position: center 22%;
}
.project-body { padding: 22px; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 8px; text-transform: none; }
.project-body p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 16px; }
.project-link { font-weight: 700; color: var(--text); font-size: 0.88rem; }
.project-link .arrow { color: var(--accent); margin-left: 4px; transition: margin-left 0.15s ease; }
/* Stretches the case-study link over the whole card so the entire card is
   clickable, while keeping exactly one real <a> per card (no nested links).
   .project-link itself stays position:static so this ::after's absolute
   positioning resolves against .project-card (position:relative) instead. */
.project-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.project-card:hover .project-link .arrow { margin-left: 8px; }

/* Tags */
.tags { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.tags span {
  font-size: 0.75rem; font-weight: 700; color: #4A6FA5;
  background: rgba(127,178,240,0.15); padding: 4px 10px; border-radius: 999px;
}

/* How I Work — a vertical run of "bubbles" that pop in one at a time as each
   scrolls into view (see the per-step IntersectionObserver in script.js). */
.how-steps {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 88px; margin-top: 8px;
}
.how-steps::before {
  content: ''; position: absolute; left: 50%; top: 8px; bottom: 8px; width: 2px;
  background: var(--border); transform: translateX(-50%); z-index: 0;
}
.how-step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 460px; position: relative; z-index: 1;
}
.how-bubble {
  display: flex; align-items: center; justify-content: center;
  width: 116px; height: 116px; border-radius: 50%; flex-shrink: 0;
  background: var(--card); border: 2px solid var(--accent);
  box-shadow: 0 16px 32px rgba(20, 20, 40, 0.08);
  margin-bottom: 22px;
}
.how-bubble-number {
  font-family: var(--font-display); font-weight: 700; color: var(--accent);
  font-size: 2rem; line-height: 1;
}
.how-text h3 { font-size: 1.3rem; text-transform: none; margin-bottom: 10px; }
.how-text p { color: var(--text-muted); font-size: 0.95rem; }

/* Scroll-reveal: each bubble stays hidden until its step scrolls into view
   (see the per-step IntersectionObserver in script.js — the same one that
   was already triggering these one at a time), then "shoots" into place
   like a basketball arcing into a hoop: held low, arcs up and over with an
   overshoot, dips past its landing spot, rebounds slightly, and settles.
   The step's title/description fade in just after it lands. Gated behind
   .js-ready so everything renders visible immediately if JS fails
   (progressive enhancement), matching the stat-grid reveal pattern above. */
.js-ready .how-bubble { opacity: 0; }
.js-ready .how-step.in-view .how-bubble {
  animation: how-bubble-shoot 0.9s cubic-bezier(0.3, 1, 0.6, 1) forwards;
}

.js-ready .how-text {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.45s ease 0.4s, transform 0.45s ease 0.4s;
}
.js-ready .how-step.in-view .how-text { opacity: 1; transform: translateY(0); }

@keyframes how-bubble-shoot {
  0%   { opacity: 0; transform: translate(-64px, 86px) scale(0.42) rotate(-28deg); }
  40%  { opacity: 1; }
  58%  { transform: translate(18px, -36px) scale(1.14) rotate(12deg); }
  76%  { transform: translate(-6px, 10px) scale(0.93) rotate(-5deg); }
  90%  { transform: translate(2px, -4px) scale(1.03) rotate(2deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .how-bubble,
  .js-ready .how-text {
    opacity: 1; transform: none; animation: none; transition: none;
  }
}

/* What Makes Different */
.diff-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px; text-align: center;
}
.diff-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--card); border: 1px solid var(--border);
  color: var(--accent);
}
.diff-icon svg { width: 26px; height: 26px; }
.diff-item h3 { font-size: 1.1rem; text-transform: none; margin-bottom: 10px; }
.diff-item p { color: var(--text-muted); font-size: 0.92rem; }

/* Testimonials */
.testimonial-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.testimonial-card {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 30px;
}
.testimonial-quote-mark {
  font-family: var(--font-display); font-size: 2.6rem; line-height: 1;
  color: var(--accent);
  /* The glyph's own font metrics leave a lot of empty space beneath it before
     the next flex item, on top of the card's own gap — pull it in so the
     mark reads as attached to the quote instead of floating above it. */
  margin-bottom: -22px;
}
.testimonial-text { color: var(--text); font-size: 1rem; line-height: 1.6; flex-grow: 1; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
/* Placeholder avatar (flat color, like .profile-photo/.about-photo elsewhere on
   the site) until real photos are dropped into assets/testimonials/ — swap each
   for <img class="testimonial-photo" src="assets/testimonials/name.jpg" alt="Name">
   and this rule's background no longer matters. */
.testimonial-photo {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary); object-fit: cover;
}
/* .testimonial-name/-title are <p> tags, which carry a browser default
   top/bottom margin — reset it so the name and title sit tight together
   as one block instead of spaced like separate paragraphs. */
.testimonial-name { font-weight: 700; font-size: 0.95rem; margin: 0 0 2px; }
.testimonial-title { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Closing CTA glow */
.section-glow { position: relative; overflow: hidden; }
.section-glow::before {
  content: '';
  position: absolute; left: 50%; bottom: -220px; transform: translateX(-50%);
  width: 900px; height: 420px; max-width: 160%;
  background: radial-gradient(ellipse at center, rgba(127,178,240,0.3), transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.section-glow .wrap { position: relative; z-index: 1; }

/* About */
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.about-photo {
  width: 220px; height: 220px; border-radius: 24px;
  background: var(--primary);
}
.about-text p { color: var(--text-muted); max-width: 640px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; }
.skills li {
  background: var(--card); border: 1px solid var(--border); padding: 8px 16px;
  border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--text);
}

/* Resume page */
.resume-inner {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.resume-note { color: var(--text-muted); font-size: 0.85rem; }
.resume-note code { background: var(--card); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }

/* Case study pages */
.case-hero-image { height: 420px; }
.case-hero { padding: 56px 0 40px; }
.breadcrumb { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 20px; display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb:hover { color: var(--accent); }
.case-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.case-meta span {
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px;
}
.case-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); text-transform: none; margin-bottom: 14px; }
.case-summary { color: var(--text-muted); font-size: 1.05rem; max-width: 680px; }

.case-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 40px 0; }
.case-stats .stat-number { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }

.case-body { padding-top: 8px; padding-bottom: 64px; }
.case-body h2 { font-size: 1.4rem; text-transform: none; margin: 40px 0 14px; }
.case-body h2:first-child { margin-top: 0; }
/* Sub-heading for items grouped under a case-body h2 (e.g. the three demos
   under "AI learning for kids"). One size down from h2, same weight. */
.case-body h3 { font-size: 1.1rem; text-transform: none; margin: 28px 0 12px; }
.case-body p { color: var(--text-muted); margin: 0 0 18px; font-size: 1rem; }
.case-body ul { color: var(--text-muted); padding-left: 20px; margin: 0 0 18px; }
.case-body li { margin-bottom: 8px; }
.case-prose { max-width: 720px; }

.case-callout {
  background: var(--card); border-left: 3px solid var(--accent);
  border-radius: 4px 16px 16px 4px; padding: 20px 24px; margin: 28px 0;
  font-size: 1rem; color: var(--text);
  max-width: 720px;
}

/* Case study visual placeholders — before/after comparisons and screen
   galleries. Neutral (not accent-colored) so they read clearly as "swap in
   a real screenshot here" rather than as intentional decoration. */
.case-compare {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin: 24px 0 40px;
}
.case-compare-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px;
}
.case-compare-shot {
  height: 300px; border-radius: 16px;
  background: var(--bg-alt); border: 1px dashed var(--border);
}
.case-compare-img {
  display: block; width: 100%; height: auto;
  border-radius: 16px; border: 1px solid var(--border);
}

/* In-case-study video demo (e.g. the Mualim parent dashboard walkthrough).
   Same card treatment as .case-compare-img so it reads as part of the same
   visual family as the still screenshots. */
.case-video {
  display: block; width: 100%; height: auto;
  border-radius: 16px; border: 1px solid var(--border);
  background: var(--bg-alt);
  margin: 20px 0 40px;
}
/* Two (or more) videos shown side by side — e.g. the pair of AI-learning
   demo clips. Collapses to one column on narrow screens. */
.case-video-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin: 20px 0 40px;
}
.case-video-grid .case-video { margin: 0; }

/* Wide reference images (e.g. a full design-system sheet) — scale to fit on
   desktop, but hold a legible minimum size on mobile so detail doesn't
   shrink into mush; the container scrolls horizontally instead. */
.case-design-system {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 40px;
}
.case-design-system img {
  display: block; width: 100%; height: auto;
  border-radius: 16px; border: 1px solid var(--border);
}

.case-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 20px 0 40px;
}
.case-gallery-shot {
  height: 200px; border-radius: 14px;
  background: var(--bg-alt); border: 1px dashed var(--border);
}

/* Real-image grid (e.g. early exploration screens) — unlike .case-gallery's
   dashed placeholder boxes, these are actual <img> tags. */
.case-exploration-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 20px 0 40px;
}
.case-exploration-grid img {
  display: block; width: 100%; height: auto;
  border-radius: 14px; border: 1px solid var(--border);
}

.case-flow-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.case-flow-tags button {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  background: var(--card); border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px;
  cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.case-flow-tags button:hover { border-color: var(--accent); color: var(--text); }
.case-flow-tags button[aria-selected="true"] {
  color: var(--text); border-color: var(--accent); background: var(--bg-alt);
}

.case-flow-panel[hidden] { display: none; }
.case-flow-columns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 4px;
}
.case-flow-col-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px;
}
.case-flow-shots {
  display: flex; flex-wrap: nowrap; gap: 14px;
  overflow-x: auto; padding-bottom: 4px;
}
.case-flow-shots img {
  height: 260px; width: auto; flex-shrink: 0; display: block;
  border-radius: 14px; border: 1px solid var(--border);
}

.case-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; padding-bottom: 64px;
  border-top: 1px solid var(--border); flex-wrap: wrap; gap: 16px;
}

/* Research-heavy case-study components: sticky-note findings grid, empathy
   map quadrant, customer journey table, step-flow diagram, and alternating
   problem/solution panels. */
.case-note-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 24px 0 40px;
}
.case-note {
  background: #FDE9B6; color: #4A3B12;
  border-radius: 10px; padding: 18px 20px;
  font-size: 0.92rem; font-weight: 700; line-height: 1.4;
}

.journey-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 24px 0 40px;
}
.journey-flow .step {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 18px; font-size: 0.85rem; font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.journey-flow .arrow { color: var(--text-muted); font-size: 1.1rem; }

.empathy-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; margin: 24px 0 40px;
}
.empathy-quad { background: var(--card); padding: 24px 26px; }
.empathy-quad h4 {
  font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--heading); margin: 0 0 12px; font-weight: 400;
}
.empathy-quad ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.9rem; }
.empathy-quad li { margin-bottom: 6px; }

.journey-table-wrap { overflow-x: auto; margin: 24px 0 40px; }
.journey-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.journey-table th, .journey-table td {
  border: 1px solid var(--border); padding: 14px 16px; text-align: left;
  font-size: 0.86rem; vertical-align: top; color: var(--text-muted);
}
.journey-table th { background: var(--bg-alt); font-weight: 700; color: var(--text); }
.journey-table td:first-child, .journey-table th:first-child {
  font-weight: 700; background: var(--bg-alt); white-space: nowrap; color: var(--text);
}

.ps-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 16px; overflow: hidden; margin: 0 0 20px;
}
.ps-problem, .ps-solution { padding: 28px 26px; }
.ps-problem { background: var(--bg-alt); }
/* Hardcoded (not var(--accent)) so this stays purple regardless of the
   sitewide accent color — this case study's problem/solution panels are
   meant to keep their original purple even where --accent changes. */
.ps-solution { background: #A78BFA; color: #fff; }
.ps-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; margin-bottom: 8px; }
.ps-title { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 10px; }
.ps-problem p { color: var(--text-muted); margin: 0 0 16px; font-size: 0.92rem; }
.ps-solution p { color: rgba(255,255,255,0.92); margin: 0 0 16px; font-size: 0.92rem; }

/* Real app screenshots inside a problem/solution panel — the full slide as
   uploaded (background, heading, and phone included), filling the column
   rather than cropped down to an isolated phone cutout. */
.ps-shot {
  display: block; width: 100%; height: auto;
  border-radius: 10px; margin: 0 0 16px;
}
.ps-solution .ps-shot { border: 1px solid rgba(255,255,255,0.25); }
.ps-problem .ps-shot { border: 1px solid var(--border); }

/* Wider before/after screenshot pairs (two phones side by side) used in the
   UI-revamp section. */
.case-shot-pair {
  display: block; width: 100%; max-width: 560px; height: auto;
  border-radius: 14px; border: 1px solid var(--border);
  margin: 4px 0 32px;
}

.case-format-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; }
.case-format-tags span {
  font-size: 0.78rem; font-weight: 700; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px;
}

/* Hardcoded (not var(--accent)) for the same reason as .ps-solution above —
   this case study's closing banner keeps its original purple. */
.case-banner {
  background: #A78BFA; color: #fff; padding: 72px 0; margin: 8px 0 0;
}
.case-banner .eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.85;
}
.case-banner h2 {
  font-size: clamp(2.2rem, 7vw, 4rem); color: #fff; margin: 8px 0 0;
  text-transform: uppercase; line-height: 1.05;
}

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }
.socials { display: flex; gap: 22px; }
.socials a { font-weight: 700; color: var(--text-muted); font-size: 0.88rem; transition: color 0.2s ease; }
.socials a:hover { color: var(--accent); }

/* Locked case study modal. #lock-modal appears twice: on index.html it opens
   only when a .project-card.locked link is clicked; on the Jugnu case-study
   page it opens automatically on load (script.js checks its data-auto-open
   attribute) and sends every dismissal back to the homepage instead of
   revealing the page underneath. */
.lock-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lock-modal[hidden] { display: none; }
.lock-modal-backdrop { position: absolute; inset: 0; background: rgba(27,23,48,0.55); }
.lock-modal-card {
  position: relative; z-index: 1; max-width: 380px; width: 100%;
  background: var(--card); border-radius: 24px; border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(20,20,40,0.25);
  padding: 36px 32px; text-align: center;
}
.lock-modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 50%; border: none; background: var(--bg-alt); color: var(--text-muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center;
}
.lock-modal-close:hover { color: var(--text); }
.lock-modal-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--bg-alt); color: var(--accent);
}
.lock-modal-icon svg { width: 26px; height: 26px; }
.lock-modal-card h3 { font-size: 1.3rem; text-transform: none; margin-bottom: 10px; }
.lock-modal-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }

/* Responsive */
@media (max-width: 760px) {
  .site-header { top: 14px; margin-bottom: -70px; padding: 0 16px; }
  .nav-capsule { flex-wrap: nowrap; padding: 8px 8px 8px 16px; gap: 8px; }
  .logo { font-size: 0.95rem; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.68rem; letter-spacing: 0.02em; }
  .nav-cta { display: none; }
  .hero { padding-top: 100px; }
  /* Force the rotating word onto its own line, always — "I'm Hafsah, the"
     stays together on line 1 no matter which word is showing. Without this,
     shorter words wrap onto line 1 with "the" and longer ones don't, so the
     heading's line break moves around as the word rotates. display:block
     takes it out of the inline flow entirely so it always starts a new line;
     margin:auto centers its fixed-width box (set by script.js) under the
     centered line above, and text-align:center keeps the word itself
     centered inside that box instead of flush against its left edge. */
  .role-word {
    display: block;
    margin: 4px auto 0;
    text-align: center;
  }
  .profile-photo { width: 84px; height: 84px; margin-bottom: 18px; }
  .marquee { padding: 20px 0; }
  .chat-card { padding: 24px; }
  .orb { width: 200px; height: 200px; top: -90px; }
  .chat-content { padding-top: 46px; }
  .case-hero-image { height: 220px; }
  .case-compare-shot { height: 220px; }
  .case-design-system img { width: auto; height: 480px; max-width: none; }
  .case-gallery-shot { height: 150px; }
  .case-flow-columns { grid-template-columns: 1fr; gap: 24px; }
  .case-flow-shots img { height: 220px; }
  .empathy-grid { grid-template-columns: 1fr; }
  .ps-pair { grid-template-columns: 1fr; }
  .journey-flow .step { font-size: 0.78rem; padding: 10px 14px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: 140px; height: 140px; }
  .chat-form { flex-wrap: wrap; }
  .chat-send { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .how-steps { gap: 64px; }
  .how-steps::before { display: none; }
  .how-bubble { width: 96px; height: 96px; }
  .how-bubble-number { font-size: 1.6rem; }
  .section-glow::before { width: 600px; height: 300px; bottom: -140px; }
}

@media (max-width: 360px) {
  .nav-links { gap: 7px; }
  .nav-links a { font-size: 0.62rem; }
}
