/* =========================================================
   Alaz — Portfolio
   Design system + layout. Single typeface (Geist).
   ========================================================= */

/* Self-hosted Geist (variable, OFL — assets/fonts/) */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/Geist-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/GeistMono-Variable.woff2') format('woff2');
}

:root {
  --bg: #F5F5F4;               /* warm stone-100 */
  --bg-2: #E7E5E4;             /* warm stone-200 */
  --text: #292524;             /* warm near-black */
  --text-soft: #44403C;        /* warm — body paragraphs */
  --muted: #79716B;            /* warm — decorative + large muted text */
  --muted-text: #57534E;       /* warm gray — secondary/body text, AA (~6.7:1) */
  --border: #D6D3D1;           /* warm stone-300 */
  --select: #FFE24E;           /* metin seçimi, koyu metinle ~15:1 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 56px);
  --section-y: clamp(70px, 9vw, 112px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  position: relative; /* anchors .grid-accents to the full document height */
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--select); color: var(--text); }

/* Faint column guides, aligned to the content width */
.bg-grid {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--maxw));
  padding: 0 var(--pad);
  box-sizing: border-box;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 0, var(--border) 1px, transparent 1px),
    linear-gradient(to left, var(--border) 0, var(--border) 1px, transparent 1px);
  background-origin: content-box;
  background-clip: content-box;
  background-size: calc(100% / 6) 100%, 100% 100%;
  background-repeat: repeat, no-repeat;
  opacity: 0.35;
}
/* Tiny random square accents on the column lines — anchored to the page, scroll with content */
.grid-accents {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--maxw));
  padding: 0 var(--pad);
  box-sizing: border-box;
  z-index: -1;
  pointer-events: none;
}
.grid-accents span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--border);
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.grid-accents span.in { opacity: 1; }
::-moz-selection { background: var(--select); color: var(--text); }

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section-head {
  display: inline-block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(11px, 1.2vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-text);
  background: #F0EFED; /* subtle warm tint, between --bg and --bg-2 */
  padding: 5px 10px;
  margin-bottom: clamp(40px, 6vw, 68px);
}
.section-head:has(+ .section-intro) { margin-bottom: 14px; }

.section-intro {
  font-weight: 300;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-soft);
  max-width: 34ch;
  text-wrap: balance; /* even lines, no orphaned last word */
  margin-bottom: clamp(28px, 4vw, 48px);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent; /* appears only on scroll */
}
.nav.scrolled {
  background: rgba(245, 245, 244, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
}
.logo-mark {
  height: 38px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 38px);
  align-items: center;
}
.nav-links a {
  font-weight: 400;
  font-size: 15px;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

/* hamburger — Lucide "menu", same stroke language as the arrows */
.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none;
  color: var(--text);
  cursor: pointer;
  z-index: 110;
}
.burger svg,
.menu-close svg { width: 24px; height: 24px; display: block; }

/* The open menu covers the nav (z 105 over 100), so the burger can't double as the
   dismiss control — the menu carries its own close button, sat exactly on top of it. */
.menu-close {
  position: absolute;
  top: 20px;              /* (72px nav height − 32px button) / 2 */
  right: var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.open .menu-close { opacity: 1; transition-delay: 0.15s; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 105;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: var(--pad);
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-size: clamp(34px, 9vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-menu.open a { opacity: 1; transform: translateY(0); }
/* nth-of-type, not nth-child: .menu-close is the menu's first child. */
.mobile-menu.open a:nth-of-type(1) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-of-type(2) { transition-delay: 0.22s; }
.mobile-menu.open a:nth-of-type(3) { transition-delay: 0.29s; }
.mobile-menu.open a:nth-of-type(4) { transition-delay: 0.36s; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* 72px nav + a gap that shrinks on small screens: 80px from ~1000px up (the original
     desktop value), easing down to 32px on phones so the canvas isn't pushed off-screen. */
  padding-top: calc(72px + clamp(32px, 8vw, 80px));
  padding-bottom: var(--section-y); /* match the inter-section gap (Hero→Work = 2·section-y) */
}
.hero-dots {
  position: absolute;
  top: 0;
  right: var(--pad);
  bottom: 0;
  width: min(980px, 72%);
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: clamp(24px, 3vw, 34px);
}
.hero .subline {
  font-weight: 300;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  max-width: 30ch;
  margin-bottom: clamp(28px, 4vw, 40px);
}
/* 404 reuses the hero box. Its eyebrow is followed by the h1 rather than a
   .section-intro, so the :has() rule can't tighten it — match the 14px here. */
.notfound .section-head { margin-bottom: 14px; }
/* No footer on the 404, so the page fills the viewport and the block sits centred
   rather than stranding the content above a tall empty gap. */
.notfound {
  min-height: 100vh;
  min-height: 100svh; /* ignores the mobile address bar where supported */
  display: grid;
  align-items: center;
}
.loc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-text);
}
.about-text .loc { margin-top: clamp(28px, 4vw, 40px); }

.hero-cta { margin-top: clamp(28px, 4vw, 40px); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  font-size: 15px;
  font-weight: 400;
  padding: 13px 22px;
  border-radius: 0; /* sharp corners, matching the logo squares */
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn:hover { background: var(--text); color: var(--bg); }
.arrow { width: 1em; height: 1em; flex-shrink: 0; }
.loc-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: -1px;
}

.headshot {
  aspect-ratio: 4 / 5;
  background-color: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.headshot img {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  will-change: transform;
}
.headshot img.loaded { opacity: 1; }

/* ---------- BLOCKS ---------- */
section.block { padding: var(--section-y) 0; }
#work { background: var(--bg); } /* solid band so the column grid doesn't show through Work */

/* ---------- WORK ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px);
}
.project {
  display: block;
  cursor: pointer;
  padding: 12px;
  margin: -12px; /* cancels padding so layout is unchanged; bg panel extends around content */
  transition: background 0.3s var(--ease);
}
.project:hover,
.project:focus-visible {
  background: #FAFAF9; /* near-white panel on hover */
  /* In: short intent delay, then a slow unhurried fade. Out: base 0.3s, no delay. */
  transition: background 0.55s var(--ease) 0.25s;
}
.thumb {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-meta { padding-top: 18px; }
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.project-tags span {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
  border: 1px solid var(--border);
  padding: 3px 11px;
}
.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: clamp(21px, 2.2vw, 26px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.project-title .arrow { display: none; }
.project-desc {
  font-weight: 300;
  font-size: 16px;
  color: var(--muted-text);
  line-height: 1.55;
}

/* ---------- TEACHING ---------- */
.teach-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.topics { list-style: none; }
.topic {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(22px, 3vw, 30px) 0;
  border-top: 1px solid var(--border);
}
.topic:last-child { border-bottom: 1px solid var(--border); }
.topic .t-num {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted-text);
  padding-top: 4px;
}
.topic h3 {
  font-weight: 500;
  font-size: clamp(19px, 2vw, 23px);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.topic p {
  font-weight: 300;
  font-size: 16px;
  color: var(--muted-text);
  line-height: 1.55;
  max-width: 48ch;
}
/* Where the course was taught — mono label layer, same role as .case-meta .k */
.topic .t-org {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--muted-text);
  margin-bottom: 10px;
}
.aside {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
}
.aside p + p { margin-top: 18px; }
.aside .who { color: var(--text); }
.aside a.email {
  color: var(--text);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
  transition: border-color 0.3s var(--ease);
}
.aside a.email:hover { border-color: var(--text); }

/* ---------- ABOUT + CONTACT ---------- */
/* The intro line lives inside .about-grid so the portrait top-aligns with it, not just
   with the body copy. That puts .about-grid after the eyebrow, so the :has(+ .section-intro)
   rule can't fire — match its 14px here. */
#about .section-head { margin-bottom: 14px; }
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start; /* text top-aligns with the portrait; centering pushed a phantom gap under the intro */
}
.about-story p {
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
}
.about-story p + p { margin-top: 20px; }

/* ---------- FOOTER ---------- */
footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: var(--section-y) 0 clamp(40px, 6vw, 64px);
  scroll-margin-top: 90px;
}
.grid-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
footer .wrap {
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(56px, 9vw, 100px);
}
.footer-talk {
  font-weight: 700;
  font-size: clamp(52px, 11vw, 132px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.footer-talk .dot { color: var(--muted); }
.footer-contact { text-align: right; }
.footer-contact a.big {
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease);
}
.footer-contact a.big:hover { border-color: var(--text); }
.footer-socials {
  display: flex;
  gap: 22px;
  justify-content: flex-end;
  margin-top: 22px;
}
.footer-socials a {
  font-size: 15px;
  color: var(--muted-text);
  transition: color 0.3s var(--ease);
}
.footer-socials a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted-text);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 14px;
  color: var(--muted-text);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.to-top .arrow {
  transition: transform 0.3s var(--ease);
}
.to-top:hover .arrow { transform: translateY(-3px); }

/* ---------- PROJECT DETAIL PAGE ---------- */
.case {
  padding-top: 112px; /* 72px nav + 40px gap */
  padding-bottom: 0; /* .case-next's own padding carries the box down to the footer */
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted-text);
  margin-bottom: clamp(28px, 4vw, 40px);
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.back-link:hover { gap: 12px; color: var(--text); }
.case-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.case-tags span {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400; font-size: 11px;
  text-transform: lowercase; letter-spacing: 0.04em;
  color: var(--muted-text);
  border: 1px solid var(--border);
  padding: 3px 11px;
}
.case h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 16ch; /* measured in the h1's own font; long titles wrap, short ones stay on one line */
  text-wrap: balance;
}
.case-sub {
  font-weight: 300;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.5;
  color: var(--muted-text);
  max-width: 44ch;
  margin-top: clamp(14px, 2vw, 18px);
}
.case-hero {
  aspect-ratio: 16 / 9;
  margin: clamp(24px, 3.5vw, 40px) 0 clamp(28px, 4vw, 44px);
}
img.case-hero { width: 100%; object-fit: cover; }
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  justify-items: center;
  text-align: center;
  padding: clamp(24px, 3.5vw, 34px) clamp(16px, 2.5vw, 28px); /* equal top/bottom: content sits centered */
  border: 1px solid var(--border); /* full box: sides align with the outer grid lines */
  margin-bottom: clamp(64px, 8vw, 96px);
  background: var(--bg); /* solid inside so the column grid doesn't run through */
}
.case-meta .item .k {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 400; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-text);
  margin-bottom: 8px;
}
.case-meta .item .v { font-weight: 400; font-size: 16px; text-wrap: balance; }
.case-body > h2,
.case-body > p {
  max-width: 64ch;
}
.case-body h2 {
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  margin: clamp(64px, 8vw, 96px) 0 16px;
}
.case-body h2:first-child { margin-top: 0; }
.case-body p {
  font-weight: 300;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-soft);
  text-wrap: pretty; /* avoids single-word orphans on the last line */
}
.case-body p + p { margin-top: 18px; }
.case-next {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: clamp(72px, 10vw, 120px);
  /* Equal top/bottom padding (same total height as before): content sits centered in the box */
  padding-top: calc((clamp(32px, 4vw, 44px) + var(--section-y)) / 2);
  padding-left: clamp(16px, 2.5vw, 28px);
  padding-right: clamp(16px, 2.5vw, 28px);
  padding-bottom: calc((clamp(32px, 4vw, 44px) + var(--section-y)) / 2);
  border: 1px solid var(--border);
  border-bottom: 0; /* the footer's top rule closes the box */
  background: var(--bg);
}
.case-next .label { font-size: 14px; color: var(--muted-text); margin-bottom: 6px; }
.case-next a.next-title {
  display: inline-block;
  position: relative;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
}
/* Arrow hangs outside the layout box: centering is computed on the title text only */
.case-next a.next-title .arrow {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- CASE MEDIA ---------- */
/* Drop these between .case-body text blocks, or as direct children of it.
   Use <img> for real assets; .ph divs are gradient placeholders for previewing. */
.case-figure,
.case-duo,
.case-trio {
  margin: clamp(32px, 5vw, 48px) 0; /* same rhythm as .case-cols/.case-personas */
}
.case-figure img,
.case-figure .ph,
.case-duo img,
.case-duo .ph,
.case-trio img,
.case-trio .ph {
  display: block;
  width: 100%;
  height: auto;
}

.case-duo,
.case-trio {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
}
.case-duo { grid-template-columns: repeat(2, 1fr); }
.case-trio { grid-template-columns: repeat(3, 1fr); }

/* Optional: keep side-by-side images visually aligned when source ratios differ */
.case-duo.fit img,
.case-duo.fit .ph { aspect-ratio: 4 / 3; object-fit: cover; }
.case-trio.fit img,
.case-trio.fit .ph { aspect-ratio: 1 / 1; object-fit: cover; }

.case-figure figcaption,
.case-duo figcaption,
.case-trio figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-text);
}

/* Portrait media (phone screens) */
.case-duo.portrait img,
.case-duo.portrait .ph,
.case-trio.portrait img,
.case-trio.portrait .ph { aspect-ratio: 9 / 19; object-fit: cover; }

/* Screen + annotation block (image with a short rationale beside it) */
.case-shot {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: clamp(16px, 2.4vw, 32px);
  align-items: center;
  margin: clamp(32px, 5vw, 48px) 0;
}
.case-shot.flip { grid-template-columns: minmax(220px, 300px) 1fr; }
.case-shot.flip figure { order: 2; }
.case-shot figure { margin: 0; }
.case-shot img,
.case-shot .ph {
  display: block;
  width: 100%;
  height: auto;
}
.case-shot figure.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 20px);
}
.case-shot .ph { aspect-ratio: 4 / 3; }
/* Phone shots: bound BOTH columns explicitly (no 1fr) so sizing is
   deterministic under width:fit-content — a fr track's contribution is
   ambiguous there and was making the image balloon and the text drop below it. */
.case-shot.phone {
  grid-template-columns: minmax(200px, 340px) minmax(180px, 320px);
  width: fit-content;
  max-width: 100%;
  margin-left: clamp(16px, 14vw, 180px);
}
.case-shot.phone.flip { grid-template-columns: minmax(180px, 320px) minmax(200px, 340px); }
/* No grid-column overrides here: the inherited .case-shot.flip figure { order: 2 }
   handles the swap. Explicit column-without-row placement pushed the aside to row 2. */
.case-shot.phone .ph { aspect-ratio: 9 / 19; }
.case-shot h3 {
  font-weight: 500;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
/* Sub-heading for multi-screen groups (e.g. a flow shown as a grid) */
.case-body h3.group-head {
  font-weight: 500;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: -0.01em;
  margin: clamp(56px, 7vw, 88px) 0 10px; /* big gap above: separates from the previous figure */
  max-width: 64ch;
}
/* The group's own figure sits close, so ownership reads instantly */
.case-body .group-head + p + figure {
  margin-top: clamp(16px, 2vw, 24px);
}
.case-shot aside { max-width: 34ch; }
.case-shot aside p {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-soft);
}
.case-shot aside p + p { margin-top: 12px; }

/* Two-column list block (pain points etc.) */
.case-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin: clamp(32px, 5vw, 48px) 0;
}
.case-cols h3 {
  font-weight: 500;
  font-size: 17px;
  margin-bottom: 12px;
}
.case-cols ul { list-style: none; }
.case-cols li {
  position: relative;
  padding-left: 18px;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.case-cols li:last-child { margin-bottom: 0; }
.case-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--muted);
}

/* Persona cards — stacked, photo on alternating sides */
.case-personas {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2vw, 24px);
  margin: clamp(32px, 5vw, 48px) 0;
}
.case-body h2 + .case-cols { margin-top: 0; } /* same heading gap as h2 + p */
.case-body h2 + .group-head { margin-top: 0; } /* h2 directly followed by its first sub-head */
.case-body h2 + .case-personas { margin-top: 23px; } /* beats the collapsed 16px; 16 + ~7px half-leading = optically equal to h2 + p */
.persona {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  align-items: flex-start;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: clamp(20px, 2.5vw, 32px);
}
.persona:nth-child(even) { flex-direction: row-reverse; }
.persona img,
.persona .ph {
  width: clamp(110px, 14vw, 160px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  flex-shrink: 0;
}
.persona .p-name {
  font-weight: 500;
  font-size: 17px;
  margin-bottom: 10px;
}
.persona .p-desc {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
}
.persona .p-goals {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-text);
  margin: 16px 0 4px;
}

/* Gradient placeholders (remove once real images land) */
.case-figure .ph { aspect-ratio: 16 / 9; }
.case-duo .ph,
.case-trio .ph { aspect-ratio: 4 / 3; } /* default so empty placeholders don't collapse; .fit/.portrait override */
.ph {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--border) 100%);
}
.ph.a { background: linear-gradient(135deg, #E4E1DA 0%, #D6D2C8 100%); }
.ph.b { background: linear-gradient(135deg, #DEDCE4 0%, #CFCBD8 100%); }
.ph.c { background: linear-gradient(135deg, #E1E4DD 0%, #CDD2C7 100%); }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
/* Case pages are a long read: a quick, shallow entrance so it never feels laggy or empty */
.case .reveal {
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .headshot { max-width: 340px; }
  .teach-grid, .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .hero-grid { gap: clamp(20px, 5vw, 32px); }
  .hero-dots {
    position: static;
    width: 100%;
    height: clamp(170px, 42vw, 240px);
    opacity: 1;
  }
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-trio { grid-template-columns: repeat(2, 1fr); }
  .case-cols, .case-personas { grid-template-columns: 1fr; }
  .case-shot, .case-shot.flip { grid-template-columns: 1fr; }
  .case-shot.flip figure { order: 0; }
  .case-shot.phone,
  .case-shot.phone.flip { width: auto; margin-left: 0; grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .footer-contact { text-align: left; }
  .footer-socials { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .case-duo, .case-trio { grid-template-columns: 1fr; }
  .persona, .persona:nth-child(even) { flex-direction: column; }
}

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