/* ==========================================================================
   y(u/xi)ng — base portfolio template
   Old-lined-paper: cloud milk background, stone grey text, mist grey
   fills, and a cool breeze / breeze secondary accent pair. The red
   margin line is the one holdover from the old palette. Built with
   plain HTML/CSS/JS — no build step.
   ========================================================================== */

:root {
  /* text */
  --stone: #5d5a53;

  /* box fills / muted accents */
  --mist: #959595;
  --ink-soft: #6b6862; /* small label text — 4.5:1+ on cream and white */
  --fill-1: color-mix(in srgb, var(--mist) 18%, var(--cloud));
  --fill-2: color-mix(in srgb, var(--mist) 32%, var(--cloud));

  /* main accent — outlines, and a deepened readable variant for titles */
  --breeze: #95c8cc;
  --breeze-deep: #2d5e76;
  /* mid teal for large accent text (the name): 3.6:1 on the page, where
     --breeze itself is only 1.6:1 */
  --breeze-mid: #3f8791;
  /* secondary accent — button fills, flourishes */
  --breeze-soft: #b9cece;
  /* pale yellow — active-state highlight, tag accents */
  --pale-yellow: #f5e8b8;

  /* page background — lightened toward white but still warm paper, not stark */
  --cloud: #f1efea;
  /* box/card fill — white (near-white) surface, distinct from the page itself */
  --surface: #fbfaf8;

  /* kept only for the notebook-paper red margin line */
  --red-line: #7a2331;

  --radius-blob: 40% 60% 56% 44% / 46% 40% 60% 54%;
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 3px 0 rgba(93, 90, 83, 0.16);
  --shadow-pop: 0 4px 0 rgba(93, 90, 83, 0.24);

  /* ---- motion system ----
     Two easings and one base duration, used for every transition on the site.
     --ease is the workhorse; --ease-swoop hangs back then rushes, for things
     that should feel like they *arrive* (reveals, panels, presses). */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-swoop: cubic-bezier(0.6, 0, 0, 1);
  --dur: 0.35s;
  --dur-fast: 0.18s;

  --ff-display: "Unbounded", "Syne", system-ui, sans-serif;
  --ff-body: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ff-mono: "Space Mono", "Courier New", monospace;

  --nav-h: 76px;

  /* x-position of the red notebook margin line */
  --margin-x: 63px;
}
@media (max-width: 700px) {
  /* on phones 63px lands in the middle of the text — tuck it into the gutter */
  :root { --margin-x: 6px; }
}

* { box-sizing: border-box; }
/* scroll-padding keeps #anchor jumps from landing underneath the sticky nav */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--stone);
  background: var(--cloud);
  /* old-school ruled paper: horizontal rule lines + a red margin line */
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      color-mix(in srgb, var(--breeze-soft) 55%, transparent) 31px,
      color-mix(in srgb, var(--breeze-soft) 55%, transparent) 32px
    ),
    linear-gradient(
      to right,
      transparent var(--margin-x),
      color-mix(in srgb, var(--red-line) 30%, transparent) var(--margin-x),
      color-mix(in srgb, var(--red-line) 30%, transparent) calc(var(--margin-x) + 2px),
      transparent calc(var(--margin-x) + 2px)
    );
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
section { position: relative; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--stone);
  color: var(--cloud);
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  z-index: 999;
  font-family: var(--ff-mono);
  font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--breeze);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--fill-1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--breeze);
}

.section-head {
  max-width: 640px;
  margin: 0 0 44px;
}
.section-head h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 10px 0 12px;
  color: var(--stone);
}
.section-head p { color: var(--stone); font-size: 1.05rem; margin: 0; }

.chrome-text {
  font-weight: 700;
  color: var(--stone);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--breeze);
  background: var(--surface);
  color: var(--stone);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-pop);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(93, 90, 83, 0.28); }
.btn-primary {
  background: var(--breeze-soft);
}
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--stone); }
.btn-ghost:hover { background: var(--fill-1); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  /* Solid --stone — the site's existing grey, and nothing else. Fully
     opaque on purpose: any transparency here lets a saturate() backdrop-
     filter pull color off whatever scrolls underneath (the teal marquee,
     stickers), which is almost certainly the "green" that kept showing up. */
  background: var(--stone);
  border-bottom: 1px solid color-mix(in srgb, black 20%, var(--stone));
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-family: var(--ff-display);
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
  white-space: nowrap;
  color: var(--cloud);
}
.logo .logo-accent {
  color: var(--pale-yellow);
}
.logo .logo-spark {
  font-size: 0.75em;
  color: color-mix(in srgb, var(--cloud) 70%, transparent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cloud);
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { background: color-mix(in srgb, var(--cloud) 18%, transparent); color: var(--cloud); }
.nav-links a.is-active { background: var(--pale-yellow); color: var(--stone); font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 14px; }

/* "Back home" / ghost buttons read dark-on-light everywhere else; inside the
   header they need the same light-on-dark flip as the rest of the nav. */
.site-nav .btn-ghost { color: var(--cloud); border-color: var(--cloud); }
.site-nav .btn-ghost:hover { background: color-mix(in srgb, var(--cloud) 18%, transparent); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cloud);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cloud);
  position: relative;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
/* Open state: middle bar hides, top/bottom bars rotate into an X — the
   button itself confirms the toggle worked, not just the menu appearing. */
.nav-toggle--open span { background: transparent; }
.nav-toggle--open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle--open span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    background: var(--stone);
    border-bottom: 1px solid color-mix(in srgb, black 20%, var(--stone));
    padding: 14px;
    gap: 4px;
    transform: translateY(-130%);
    transition: transform var(--dur) var(--ease-swoop);
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { display: block; padding: 13px 16px; }
  .nav-right .btn-primary.btn-sm { padding: 9px 16px; }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--breeze-soft);
  border-block: 2px solid var(--stone);
  padding: 10px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
  margin-right: 2.5rem;
}
.marquee-track span em {
  font-style: normal;
  color: var(--breeze-deep);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(60px, 10vw, 110px) 0 50px;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 0; text-align: center; }

.hero-sticker {
  position: absolute;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(20,18,16,0.18));
}
.hero-sticker.s1 { top: 0%; left: 1%; width: 95px; animation-delay: 0s; }
.hero-sticker.s2 { top: 6%; right: 2%; width: 80px; animation-delay: 1.2s; }
.hero-sticker.s3 { top: 35%; left: 0%; width: 80px; animation-delay: 2s; }
.hero-sticker.s4 { top: 48%; right: 0%; width: 90px; animation-delay: 0.6s; }
.hero-sticker.s5 { bottom: 8%; left: 0%; width: 55px; animation-delay: 1.8s; }
.hero-sticker.s6 { bottom: 6%; right: 10%; width: 150px; animation-delay: 0.9s; }
.hero-sticker.s7 { bottom: 4%; right: 3%; width: 60px; animation-delay: 1.5s; }
.hero-sticker.s8 { top: 0%; left: 7%; width: 130px; animation-delay: 2.3s; }
.hero-sticker.s9 { top: 0%; right: 7%; width: 130px; animation-delay: 1.1s; }
.hero-sticker.s10 { top: 64%; left: 12%; width: 80px; animation-delay: 0.4s; }

/* ---------- floating stickers used outside the hero ----------
   Sit behind section content (z-index:-1) so they only ever show in the
   open space around the title or below the cards/panel — never appear
   "in front of" content, even where their box overlaps it. */
.section-sticker {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(20,18,16,0.18));
}

/* About */
.about-sticker-1 { top: 15%; left: 30%; width: 130px; z-index: 2; animation-delay: 0.3s; }
.about-sticker-2 { top: 8%; right: 5%; width: 130px; animation-delay: 1.1s; }
.about-sticker-4 { top: 86%; left: 6%; width: 80px; animation-delay: 2.2s; }
.about-sticker-5 { top: 85%; left: 34%; width: 115px; animation-delay: 0.7s; }
.about-sticker-6 { top: 91%; right: 6%; width: 85px; animation-delay: 1.8s; }
.about-sticker-7 { top: 95%; left: 12%; width: 65px; animation-delay: .5s; }
.about-sticker-8 { top: 8%; left: 5%; width: 110px; animation-delay: 1.7s; }

/* Hobbies */
.currently-sticker-2 { top: 1%; left: 62%; width: 100px; animation-delay: 1.4s; }
.currently-sticker-3 { top: 5%; right: 4%; width: 90px; animation-delay: 1.9s; }
.currently-sticker-4 { top: 0%; right: 15%; width: 80px; animation-delay: 0.9s; }
.currently-sticker-5 { bottom: 72%; right: 5%; width: 172px; animation-delay: 2.1s; }

/* Contact */
.contact-sticker-1 { top:5%; left: 20%; width: 150px; animation-delay: 0.8s; }
.contact-sticker-2 { top:4%; right: 15%; width: 180px; animation-delay: 1.7s; }
.contact-sticker-3 { top:29%; left: 12%; width: 70px; animation-delay: 2s; }
.contact-sticker-4 { bottom: 30%; left: 20%; width: 120px; animation-delay: 0.5s; }
.contact-sticker-5 { bottom: 10%; right: 20%; width: 70px; animation-delay: 1.5s; }
.contact-sticker-6 { bottom: 39%; right: 15%; width: 100px; animation-delay: 2.3s; }
.contact-sticker-7 { bottom: 5%; left: 15%; width: 120px; animation-delay: 1s; }
.contact-sticker-8 { bottom: 18%; right: 8%; width: 100px; animation-delay: .5s; }

/* Small screens have no spare room for most stickers. They're loading="lazy"
   in the HTML, so the hidden ones are never downloaded either. Four small
   hero stickers stay: two tucked into the hero's top padding, two either
   side of the scroll cue — clear of the text in both spots. */
@media (max-width: 900px) {
  .hero-sticker, .section-sticker { display: none; }
  .hero-sticker.s1, .hero-sticker.s2, .hero-sticker.s3, .hero-sticker.s7 { display: block; }
  .hero-sticker.s1 { top: -38px; left: 0; width: 42px; }
  .hero-sticker.s2 { top: -36px; right: 0; width: 40px; }
  .hero-sticker.s3 { top: auto; bottom: 4px; left: 5%; width: 44px; }
  .hero-sticker.s7 { bottom: 0; right: 5%; width: 40px; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

.hero-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 30px 0 34px;
  text-wrap: balance;
  color: var(--stone);
}
.hero-title .title-accent {
  color: var(--breeze-mid);
}
.hero-title .title-spark {
  display: inline-block;
  font-size: 0.55em;
  vertical-align: super;
  color: var(--mist);
}
.hero-tagline {
  font-family: var(--ff-body);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--stone);
  margin: 0 auto 22px;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--stone);
  font-size: 1.02rem;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  margin: 56px auto 0;
  width: fit-content;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-mouse::after {
  content: "";
  width: 4px;
  height: 11px;
  border-radius: 2px;
  background: var(--breeze-soft);
  animation: scroll-dot 1.6s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% { opacity: 1; transform: translateY(0); }
  65% { opacity: 0.3; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- about ---------- */
.about { padding: 50px 0; }
.about .wrap {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 780px) {
  .about .wrap { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; margin-inline: auto; }
}

.about-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-blob);
  background: var(--surface);
  border: 3px solid var(--breeze);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-body p { font-size: 1.05rem; color: var(--stone); }
.about-body h2 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.6rem); margin-top: 0; color: var(--stone); }
.about-body h2 .name-accent { color: var(--breeze-mid); }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.fact-grid li {
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.fact-grid .label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tag-chip {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--breeze);
  background: var(--fill-2);
  color: var(--stone);
}
.tag-chip:nth-child(3n+2) { background: var(--pale-yellow); color: var(--stone); }
.tag-chip:nth-child(3n) { background: var(--breeze-soft); color: var(--stone); }
.tag-chip:nth-child(4) { background: var(--pale-yellow); color: var(--stone); }
.tag-chip:nth-child(5) { background: var(--fill-2); color: var(--stone); }

/* ---------- work ---------- */
.work { padding: 50px 0; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}

.project-card {
  display: block;
  text-decoration: none;
  color: var(--stone);
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease-swoop), box-shadow var(--dur) var(--ease);
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 8px 0 rgba(93, 90, 83, 0.22); }
.project-card.is-pressed { animation: card-press var(--dur) var(--ease-swoop); }
@keyframes card-press {
  0% { transform: translateY(-6px) scale(1); }
  35% { transform: translateY(3px) scale(0.97); }
  100% { transform: translateY(-6px) scale(1); }
}

/* small star-burst spawned on click — see spawnStarBurst() in script.js */
.click-star {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 13px;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  animation: click-star-pop 0.5s var(--ease) forwards;
}
@keyframes click-star-pop {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(0.4) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1) rotate(160deg); opacity: 0; }
}

.project-thumb {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.project-thumb::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--mist) 12%, transparent) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.6;
}
.project-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

/* ---------- poster-style cover cards (in-code, no image asset) ---------- */
.cover-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 22px;
  overflow: hidden;
  isolation: isolate;
}
.cover-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}
.cover-card__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.cover-card__title {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  max-width: 80%;
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.14;
  font-size: clamp(1.15rem, 3.4vw, 1.7rem);
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.cover-card__tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cover-card__tags span {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(2px);
}

/* ---------- single hero screenshot — shared by all covers, one real shot each ---------- */
.cover-card__deco {
  position: absolute;
  z-index: 0;
}
.mock-screen {
  width: auto;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f5f7;
  box-shadow: 0 14px 30px rgba(3, 10, 25, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
}
.mock-screen__chrome {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  height: 12%;
  min-height: 10px;
  padding: 0 8%;
  background: #fff;
  border-bottom: 1px solid #ecebe8;
}
.mock-screen__chrome span { width: 5px; height: 5px; border-radius: 50%; background: #dcdad5; }
.mock-screen__chrome .mock-logo { margin-left: auto; width: 22%; height: 38%; border-radius: 3px; background: #f7941d; }
.mock-screen__shot {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* Phison — navy + brand orange, one clean browser-window screen.
   16:9 mirrors the 1920×1080 MacBook Pro viewport the real screenshot was captured at. */
.cover-card--phison {
  background: linear-gradient(135deg, #16345a 0%, #132951 55%, #0d1f3d 100%);
}
.cover-card--phison .cover-card__title { max-width: 58%; }
.cover-card--phison .cover-card__deco { right: 6%; bottom: 8%; height: 38%; }
.cover-card--phison .mock-screen { aspect-ratio: 16 / 9; }
.cover-card--phison .cover-card__tags span:first-child { background: #f7941d; border-color: #f7941d; color: #16345a; font-weight: 700; }

/* Carolina Cupboard — Carolina blue, one clean portrait app screen.
   393:852 mirrors the iPhone 15 point size the real screenshot was captured at. */
.cover-card--cupboard {
  background: linear-gradient(135deg, #6fa3d8 0%, #4b86c4 55%, #35659c 100%);
}
.cover-card--cupboard .cover-card__deco { right: 8%; bottom: 7%; height: 48%; }
.cover-card--cupboard .mock-screen { border-radius: 16px; aspect-ratio: 393 / 852; }
.cover-card--cupboard .cover-card__tags span:first-child { background: #f5e8b8; border-color: #f5e8b8; color: #35659c; font-weight: 700; }

/* Vanguard — maroon + near-black, one clean dashboard screen.
   5:4 mirrors the real dashboard/tablet screenshot pulled from the redesign. */
.cover-card--vanguard {
  background: linear-gradient(135deg, #8a1017 0%, #6e0d12 55%, #3d070a 100%);
}
.cover-card--vanguard .cover-card__deco { right: 6%; bottom: 7%; height: 42%; }
.cover-card--vanguard .mock-screen { aspect-ratio: 5 / 4; }
.cover-card--vanguard .cover-card__tags span:first-child { background: #96151b; border-color: #96151b; color: #fff; font-weight: 700; }

/* MediaHub — navy + Carolina-blue, real brand palette instead of a screenshot
   (no exported mockups yet; swapped for real screens whenever those land). */
.cover-card--mediahub {
  background: linear-gradient(135deg, #23394e 0%, #1c2e40 55%, #12202e 100%);
}
.cover-card--mediahub .cover-card__deco {
  right: 8%;
  bottom: 8%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.cover-card--mediahub .mh-mark {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 10px 16px;
}
.cover-card--mediahub .mh-swatches { display: flex; gap: 8px; }
.cover-card--mediahub .mh-swatches span {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.cover-card--mediahub .cover-card__tags span:first-child { background: #5da6d7; border-color: #5da6d7; color: #23394e; font-weight: 700; }

/* three-line summary at the top of each case study, for skimmers */
.case-tldr {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 8px;
  text-align: left;
}
@media (max-width: 760px) { .case-tldr { grid-template-columns: 1fr; } }
.case-tldr > div {
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-left: 6px solid var(--breeze-deep);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.case-tldr__label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--breeze-deep);
  font-weight: 700;
  margin-bottom: 6px;
}
.case-tldr p { margin: 0; font-size: 0.93rem; color: var(--stone); }

/* larger cover-card variant used as the case-study hero figure */
.case-figure .cover-card { padding: 40px 44px; }
.case-figure .cover-card__title { font-size: clamp(1.8rem, 4.6vw, 2.7rem); }

.project-info { padding: 22px; }
.project-info h3 { font-family: var(--ff-display); font-weight: 700; font-size: 1.35rem; margin: 0 0 8px; color: var(--stone); }
.project-info p { margin: 0 0 14px; color: var(--stone); font-size: 0.95rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.project-meta span {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--fill-1);
  color: var(--stone);
}
.project-result {
  margin: 0 0 12px;
  padding: 7px 10px;
  border-left: 4px solid var(--breeze-deep);
  border-radius: 0 8px 8px 0;
  background: var(--fill-1);
  font-size: 0.82rem;
  line-height: 1.4;
}
.project-result span {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--breeze-deep);
  font-weight: 700;
}
.project-link {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-card:hover .project-link { text-decoration: underline; }

/* compact cards for the three-across homepage grid */
.work-grid .cover-card { padding: 16px 18px; }
.work-grid .cover-card__eyebrow { font-size: 0.58rem; }
.work-grid .cover-card__title { font-size: clamp(1rem, 1.7vw, 1.3rem); margin-top: 6px; }
.work-grid .cover-card__tags span { font-size: 0.62rem; padding: 3px 9px; }
.work-grid .project-info { padding: 16px 18px 18px; }
.work-grid .project-info h3 { font-size: 1.1rem; margin-bottom: 6px; }
.work-grid .project-info p { font-size: 0.85rem; margin-bottom: 10px; }
.work-grid .project-meta { gap: 6px; margin-bottom: 10px; }
.work-grid .project-meta span { font-size: 0.66rem; padding: 3px 8px; }
.work-grid .project-link { font-size: 0.82rem; }

/* ---------- currently — three small cards, everything visible at once ---------- */
.currently { padding: 36px 0; }
.currently .section-head { max-width: none; margin-bottom: 22px; }
.currently .section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 6px; }
.currently .section-head p { font-size: 0.95rem; }

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .hobby-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}
.hobby-card {
  min-width: 0;
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px 18px;
}
.hobby-card__label {
  display: inline-block;
  margin: 0 0 14px;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--pale-yellow);
  border: 1px solid var(--breeze);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

/* on repeat — a cassette, with a link out to the track */
.song-row { display: flex; flex-direction: column; gap: 10px; }

/* playing & watching — four covers in a row */
.hobby-covers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.hobby-covers img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--breeze);
}
.hobby-covers p {
  margin: 6px 0 0;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--stone);
  hyphens: auto;
  overflow-wrap: break-word;
}
.hobby-covers span {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  color: var(--ink-soft);
}

/* ---- cassette tape ---- */
.cassette {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--fill-1);
  border: 2px solid var(--stone);
  border-radius: 10px;
}
.cassette-reel {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--stone);
  position: relative;
  animation: reel-spin 2s linear infinite;
  animation-play-state: paused;
}
.cassette-reel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px dashed var(--mist);
}
.cassette-reel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--stone);
}
/* the reels turn while you're hovering or focused on the card */
.song-row:hover .cassette-reel, .song-row:focus-within .cassette-reel { animation-play-state: running; }
@keyframes reel-spin { to { transform: rotate(360deg); } }

.song-info {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: 6px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 14px,
    color-mix(in srgb, var(--breeze) 40%, transparent) 14px,
    color-mix(in srgb, var(--breeze) 40%, transparent) 15px
  );
}
.song-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.song-title { font-family: var(--ff-display); font-weight: 700; font-size: 0.9rem; margin: 2px 0 0; color: var(--stone); }
.song-artist { color: var(--stone); margin: 0; font-size: 0.78rem; }

/* ---- Spotify player for the track ---- */
.song-embed { display: block; width: 100%; border: 0; border-radius: 12px; }

/* camera roll — one horizontally swipeable row. Each photo is a share of the
   card's width (two and a bit fit, so the next one peeks in) and is cropped
   to the same 3:4 shape, so photos of any size line up identically. */
.gallery-wrap { position: relative; }
.gallery-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px;
  scrollbar-width: none;
}
.gallery-row::-webkit-scrollbar { display: none; }

.gallery-card {
  position: relative;
  flex: 0 0 42%;
  margin: 0;
  scroll-snap-align: start;
  border: 2px solid var(--breeze);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--fill-1);
}
.gallery-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
/* optional caption: a small label over the foot of the photo, so a card is
   the same size with or without one. Empty captions don't show at all. */
.gallery-caption {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 8px;
  border: 1px solid var(--breeze);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  line-height: 1.3;
  text-align: center;
  color: var(--stone);
}
.gallery-caption:empty { display: none; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--breeze);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--stone);
  z-index: 2;
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur-fast) var(--ease);
}
.gallery-arrow:hover { transform: translateY(-50%) scale(1.08); }
.gallery-arrow.prev { left: -14px; }
.gallery-arrow.next { right: -14px; }

.gallery-hint {
  display: none;
  margin: 10px 0 0;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  text-align: center;
}

/* Mobile: swipe replaces the arrow buttons entirely */
@media (max-width: 640px) {
  .gallery-arrow { display: none; }
  .gallery-hint { display: block; }
}

/* ---------- contact ---------- */
.contact {
  padding: 50px 0 120px;
  text-align: center;
}
.contact h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 12px 0 14px;
  color: var(--stone);
}
.contact p.sub { color: var(--stone); max-width: 480px; margin: 0 auto 34px; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.social-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.social-row a {
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  text-decoration: none;
  border: 2px solid var(--breeze);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  background: var(--surface);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.social-row a:hover { background: var(--fill-1); transform: translateY(-2px); }

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 2px solid var(--breeze);
  padding: 26px 0;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer p {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--stone);
  margin: 0;
}
.to-top {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  text-decoration: none;
  border: 2px solid var(--breeze);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
}

/* ---------- sparkle cursor trail ---------- */
.sparkle-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 14px;
  animation: sparkle-fade 0.7s ease-out forwards;
}
@keyframes sparkle-fade {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.4) translateY(-18px); }
}
@media (prefers-reduced-motion: reduce), (hover: none) {
  .sparkle-trail { display: none; }
}

/* ---------- scroll reveals ----------
   .reveal-words splits a heading into words (see script.js) and brings them
   in on a short stagger, so a headline reads as authored rather than just
   present. .reveal-up is the same idea for whole blocks. Both are opt-in via
   a class, and both no-op under prefers-reduced-motion. */
.reveal-words .rw {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
}
.reveal-words.is-in .rw {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease-swoop);
  transition-delay: calc(var(--rw-i) * 55ms);
}

.reveal-up {
  opacity: 0;
  transform: translateY(18px);
}
.reveal-up.is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-swoop);
  transition-delay: var(--ru-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-words .rw, .reveal-up { opacity: 1 !important; transform: none !important; }
}

/* ---------- case study page ---------- */
.case-hero {
  padding: 70px 0 60px;
  text-align: center;
}
.case-hero h1 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 14px 0 16px;
  color: var(--stone);
}
.case-hero .sub { color: var(--stone); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
/* course / collaborator credit under the hero summary */
.case-credit {
  max-width: 600px;
  margin: 14px auto 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 720px) {
  .case-meta { grid-template-columns: repeat(2, 1fr); }
}
.case-meta li {
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
}
.case-meta .label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.case-figure {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  border: 2px solid var(--breeze);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono);
  color: var(--stone);
  margin: 28px 0;
  overflow: hidden;
}
.case-figure img { width: 100%; height: 100%; object-fit: cover; }

/* real case-study screenshots — natural aspect ratio, optional caption.
   Capped so a screenshot never blows up past a readable size on wide screens. */
.case-shot {
  max-width: 560px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--breeze);
  background: var(--surface);
  overflow: hidden;
  margin: 28px auto;
}
.case-shot img { display: block; width: 100%; height: auto; }
.case-shot figcaption {
  padding: 10px 16px;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  border-top: 2px solid var(--breeze);
}
.case-gallery .case-shot { margin: 0; max-width: none; }

.case-section { padding: 50px 0; }
.case-section h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 14px;
  color: var(--stone);
}
.case-section p { color: var(--stone); font-size: 1.02rem; max-width: 760px; }

/* one-line aside under a section heading, e.g. "done as a group project" */
.case-section .case-note { margin: 0 0 4px; font-style: italic; font-size: 0.92rem; color: var(--ink-soft); }

/* boxed narrative paragraph — white card so text stays legible next to inline
   screenshots instead of sitting straight on the lined-paper background */
.case-text {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 16px 20px;
  margin: 16px 0;
  color: var(--stone);
  font-size: 1.02rem;
  max-width: 760px;
}
.case-text u { text-decoration-color: var(--breeze-deep); text-decoration-thickness: 2px; }

/* colored pill used to label a named finding/feature within a section */
.case-section .case-label {
  display: inline-block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--breeze-deep);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin: 0 0 8px;
}

/* generic card — white surface, border, shadow — for structured content blocks */
.case-card {
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
}
.case-card .case-list { background: none; box-shadow: none; padding-left: 0; margin: 10px 0 0; }

/* custom bulleted / numbered lists — boxed, with bubbled numbers or star bullets */
.case-list {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 16px 20px 16px 0;
  margin: 16px 0;
  list-style: none;
  max-width: 760px;
}
.case-list li {
  position: relative;
  padding: 6px 14px 6px 46px;
  color: var(--stone);
  line-height: 1.5;
}
.case-list li + li { margin-top: 2px; }
.case-list--bullets li::before {
  content: "★";
  position: absolute;
  left: 16px; top: 7px;
  color: var(--breeze-deep);
  font-size: 0.85rem;
}
.case-list--numbers { counter-reset: case-num; }
.case-list--numbers li { counter-increment: case-num; }
.case-list--numbers li::before {
  content: counter(case-num);
  position: absolute;
  left: 12px; top: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--breeze-deep);
  color: #fff;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* image + text pair — same-size thumbnail(s) sitting next to the finding they support */
.case-pair {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 18px 0;
  flex-wrap: wrap;
}
.case-pair__imgs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.case-thumb {
  width: 150px;
  height: 112px;
  border-radius: var(--radius-md);
  border: 2px solid var(--breeze);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.case-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-pair__text { flex: 1 1 260px; min-width: 240px; }
.case-pair__text .case-text { margin-top: 0; }
@media (max-width: 640px) {
  .case-thumb { width: 120px; height: 90px; }
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 700px) { .case-gallery { grid-template-columns: 1fr; } }
.case-gallery--tri { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .case-gallery--tri { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .case-gallery--tri { grid-template-columns: 1fr; } }
.case-gallery--tri .case-shot h4,
.case-gallery--tri .case-shot p {
  padding: 12px 14px 0;
  margin: 0;
}
.case-gallery--tri .case-shot p { padding-bottom: 14px; font-size: 0.92rem; }
.case-gallery--tri .case-shot img { height: 140px; object-fit: cover; object-position: top; }
.case-shot h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--stone);
}

/* a row of phone screenshots, each with a one-line caption */
.case-screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 20px 0 28px;
}
@media (max-width: 900px) { .case-screens { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .case-screens { grid-template-columns: repeat(2, 1fr); } }
.case-screens .case-shot { margin: 0; max-width: none; }
/* the screenshots differ by a few px in height — crop to one shape so captions line up */
.case-screens .case-shot img { aspect-ratio: 480 / 1038; object-fit: cover; object-position: top; }
.case-screens .case-shot figcaption { padding: 8px 10px; font-size: 0.68rem; }

/* colored inline emphasis — used instead of bold/underline within body text,
   so titles/subtitles stay the only bolded thing on the page */
.case-em { color: var(--breeze-deep); font-weight: 600; }

/* pull-quote — verbatim usability-test quotes */
.case-quote {
  margin: 20px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--breeze-deep);
  background: var(--fill-1);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 500;
  color: var(--stone);
  font-size: 1.02rem;
  line-height: 1.5;
}
.case-quote + .case-quote { margin-top: -6px; }

/* Figma prototype embeds */
.case-embed {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  border: 2px solid var(--breeze);
  overflow: hidden;
  background: var(--surface);
}
.case-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* wide/panoramic diagrams (flow charts) — scroll horizontally rather than
   squashing down to unreadable text */
.case-diagram {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  border: 2px solid var(--breeze);
  background: var(--surface);
  overflow-x: auto;
  padding: 18px;
}
.case-diagram img { display: block; height: 260px; width: auto; max-width: none; }

.case-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 0 90px;
  border-top: 2px solid var(--breeze);
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   CASE STUDY INTERACTIVE MODULES
   Side rail, scroll-activated milestones, count-up stats, a draggable
   before/after compare, and clickable annotation hotspots. All degrade
   gracefully: without JS you still get readable, ordered content.
   ========================================================================== */

/* ---------- side rail ----------
   Pinned vertical label naming the section you're currently in. Hidden on
   narrow screens where there's no spare horizontal room. */
.side-rail {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 40px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--nav-h) + 24px) 0 24px;
  pointer-events: none;
}
.side-rail span {
  writing-mode: vertical-rl;
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}
.side-rail .rail-current { color: var(--breeze-deep); font-weight: 700; }
.side-rail .rail-progress {
  width: 2px;
  flex: 1;
  margin: 14px 0;
  background: color-mix(in srgb, var(--mist) 35%, transparent);
  position: relative;
  border-radius: 2px;
}
.side-rail .rail-progress::after {
  content: "";
  position: absolute;
  left: 0; top: 0; width: 100%;
  height: var(--rail-progress, 0%);
  background: var(--breeze-deep);
  border-radius: 2px;
}
/* homepage has the scrolling banner under the nav — start the rail below it */
.side-rail--home { padding-top: calc(var(--nav-h) + 72px); }
@media (max-width: 1100px) { .side-rail { display: none; } }

/* ---------- count-up stat row ---------- */
.statline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 30px 0 8px;
  padding: 0;
  list-style: none;
}
.statline li {
  background: var(--surface);
  border: 2px solid var(--breeze);
  border-radius: var(--radius-md);
  padding: 18px 16px;
}
.statline .stat-num {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
  color: var(--breeze-deep);
  font-variant-numeric: tabular-nums;
}
.statline .stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--stone);
}

/* ---------- scroll-activated milestones ---------- */
.milestones { margin: 26px 0 0; padding: 0; list-style: none; position: relative; }
.milestones::before {
  content: "";
  position: absolute;
  left: 15px; top: 8px; bottom: 8px;
  width: 2px;
  background: color-mix(in srgb, var(--breeze) 60%, transparent);
}
.milestone { position: relative; padding: 0 0 22px 48px; }
.milestone__dot {
  position: absolute;
  left: 8px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--breeze);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease-swoop);
}
.milestone.is-active .milestone__dot {
  background: var(--breeze-deep);
  border-color: var(--breeze-deep);
  transform: scale(1.35);
}
.milestone__when {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}
.milestone.is-active .milestone__when { color: var(--breeze-deep); }
.milestone__what {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 4px 0 4px;
  color: var(--stone);
}
.milestone__detail { margin: 0; font-size: 0.93rem; color: var(--stone); }

/* ---------- before / after compare slider ---------- */
.compare {
  position: relative;
  border: 2px solid var(--breeze);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 26px 0 10px;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  background: var(--surface);
}
.compare img {
  display: block;
  width: 100%;
  height: auto;
  /* Images are draggable by default — that native "pick up and drag out"
     gesture hijacks pointer tracking mid-drag, so the custom slider below
     never gets a chance to run. Kill it at every layer that matters. */
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos, 50%));
}
.compare__after img { height: 100%; object-fit: cover; }
.compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--stone) 45%, transparent);
  pointer-events: none;
}
.compare__grip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--stone);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--stone);
  box-shadow: var(--shadow-soft);
}
.compare__tag {
  position: absolute;
  top: 12px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--cloud) 88%, transparent);
  border: 1px solid var(--breeze);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  pointer-events: none;
}
.compare__tag--before { left: 12px; }
.compare__tag--after { right: 12px; }

/* ---------- clickable annotation hotspots ---------- */
.annotated { display: block; margin: 26px 0 10px; }
/* Hotspots are positioned against the image frame only — NOT the whole block,
   which also contains the note panel and would skew every percentage. */
.annotated__frame { position: relative; display: block; }
.annotated__frame > img {
  width: 100%; height: auto; display: block;
  border: 2px solid var(--breeze);
  border-radius: var(--radius-lg);
}
.hotspot {
  position: absolute;
  width: 30px; height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--cloud);
  background: var(--breeze-deep);
  color: var(--cloud);
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  transition: transform var(--dur) var(--ease-swoop), background var(--dur) var(--ease);
}
.hotspot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--breeze-deep);
  opacity: 0;
  animation: hotspot-pulse 2.6s var(--ease) infinite;
}
@keyframes hotspot-pulse {
  0%   { opacity: .55; transform: scale(.75); }
  70%  { opacity: 0;   transform: scale(1.25); }
  100% { opacity: 0;   transform: scale(1.25); }
}
.hotspot:hover { transform: translate(-50%, -50%) scale(1.15); }
.hotspot[aria-expanded="true"] { background: var(--red-line); }
.hotspot[aria-expanded="true"]::after { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hotspot::after { animation: none; } }

.hotspot-note {
  margin: 14px 0 0;
  border: 2px solid var(--breeze);
  border-left: 6px solid var(--breeze-deep);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 18px;
  min-height: 76px;
}
.hotspot-note h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--breeze-deep);
}
.hotspot-note p { margin: 0; font-size: 0.93rem; }
.hotspot-note .hint { color: var(--ink-soft); font-style: italic; }

/* small headings + captions used inside case-study sections */
.milestones-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 38px 0 6px;
  color: var(--stone);
}
.figcap-lead {
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

/* Phone-shaped annotated screens shouldn't stretch to full column width. */
.annotated--phone {
  max-width: 340px;
  margin-inline: auto;
}
.annotated--phone .annotated__frame > img { border-radius: 22px; }

/* ---------- click-to-zoom lightbox ----------
   Built in script.js (initLightbox) for .case-thumb and .case-shot images. */
.is-zoomable { cursor: zoom-in; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
  overflow: visible;
  cursor: zoom-out;
}
.lightbox::backdrop { background: rgba(40, 38, 34, 0.88); }
.lightbox figure { margin: 0; }
.lightbox img {
  display: block;
  margin-inline: auto;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 82vh;
  border-radius: var(--radius-md);
  background: #fff;
}
.lightbox figcaption {
  margin-top: 10px;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  text-align: center;
  color: var(--cloud);
}
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--cloud);
  background: var(--stone);
  color: var(--cloud);
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- 404 page ---------- */
.notfound { padding: clamp(70px, 12vw, 130px) 0 120px; text-align: center; }
.notfound .sub { max-width: 460px; margin: 0 auto 34px; font-size: 1.05rem; }
