/* =========================================================================
   STYLES v3 — dark hero / light work / dark story, gradient transitions.
   Design tokens up top; one block per section below.
   ========================================================================= */

:root {
  --black: #000;
  --white: #fff;
  --ink: #0a0a0a;
  --muted-dark: rgba(255, 255, 255, 0.6);
  --muted-light: rgba(0, 0, 0, 0.5);
  --line-dark: rgba(255, 255, 255, 0.18);
  --line-light: rgba(0, 0, 0, 0.1);
  --green: #11f590;
  --grad: linear-gradient(90deg, #8bf19d 9%, #28bd9c 37%, #13abcb 61%, #0040b9 91%);
  --radius: 12px;
  --display: 'Instrument Sans', 'Inter', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--black);
  color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: 900px; margin: 0 auto; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 85;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

/* ---------- Pill nav ---------- */
.nav-shell { position: fixed; top: 6px; left: 6px; right: 6px; z-index: 50; display: flex; justify-content: center; }
.nav-pill {
  width: 100%; max-width: 924px; height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 12px;
  /* initial state (above the fold): transparent with a hairline below */
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: rgba(133, 133, 133, 0.25);
  border-radius: 0;
  backdrop-filter: blur(0px);
  transition: background 0.35s ease, border-color 0.35s ease,
              border-radius 0.35s ease, backdrop-filter 0.35s ease;
}
/* after scrolling past the header: glass pill */
.nav-pill.scrolled {
  background: rgba(31, 31, 31, 0.9);
  border-color: rgba(133, 133, 133, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 12px; }
.nav-links-mid { display: flex; align-items: center; gap: 24px; }
.nav-pill a.link {
  position: relative; text-decoration: none;
  /* Inter Display cut: opsz maxed on the Inter variable font */
  font-weight: 400; font-size: 16px; line-height: 24px; letter-spacing: -0.16px;
  font-variation-settings: 'opsz' 32;
  color: var(--muted-dark);
  transition: color 0.15s;
}
.nav-pill a.link:hover, .nav-pill a.link.active { color: var(--white); }
.nav-pill a.link::after {
  content: ""; position: absolute; left: 50%; bottom: -3px;
  width: 2px; height: 2px; border-radius: 24px; background: var(--green);
  opacity: 0; transition: opacity 0.15s;
}
.nav-pill a.link:hover::after, .nav-pill a.link.active::after { opacity: 1; }
.nav-sep { width: 1px; height: 24px; background: rgba(133, 133, 133, 0.35); }
.nav-compass { display: block; width: 26px; height: 26px; }
.compass { width: 100%; height: 100%; display: block; }
.compass-stack { position: relative; display: block; width: 26px; height: 26px; }
.compass-stack .compass { position: absolute; inset: 0; }
.compass-arrow {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform-origin: 50% 50%;
  animation: needle-drift 7s ease-in-out infinite alternate;
}
.needle { transform-origin: 13px 13px; animation: needle-drift 7s ease-in-out infinite alternate; }
@keyframes needle-drift { from { transform: rotate(-160deg); } to { transform: rotate(25deg); } }
.nav-socials { display: flex; align-items: center; gap: 10px; }
.nav-socials a { width: 16px; height: 16px; color: var(--muted-dark); transition: color 0.15s; }
.nav-socials a:hover { color: var(--white); }
.nav-socials svg { width: 100%; height: 100%; display: block; }

/* ---------- Hero (dark) ---------- */
.hero { padding: 150px 0 80px; position: relative; overflow: visible; }
.hero-status {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted-dark); font-size: 1rem; margin-bottom: 16px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(#5cffc0, #00c479);
  box-shadow: 0 0 10px rgba(17, 245, 144, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }
.hero h1 { font-size: clamp(3.4rem, 11vw, 7.5rem); letter-spacing: -0.02em; line-height: 0.9; }
.hero-sub { margin-top: 20px; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--muted-dark); max-width: 30em; line-height: 1.4; }

/* floating tilted glass cards — scattered band like the reference */
.hero-cards { position: relative; height: 440px; margin-top: 72px; }
/* outer shell: positioned + JS-animated (fly-in / scroll fan-out) */
.float-card {
  position: absolute; display: block; text-decoration: none;
  width: 340px; will-change: transform;
}
.float-card:nth-child(1) { left: 8px;    top: 70px;  transform: rotate(-3deg);  z-index: 1; }
.float-card:nth-child(2) { left: 50%;    top: -8px;  margin-left: -185px; transform: rotate(-12deg); z-index: 2; }
.float-card:nth-child(3) { right: -16px; top: 44px;  transform: rotate(12deg);  z-index: 3; }
.float-card:hover { z-index: 5; }
/* inner: the visible glass card (hover lift lives here so it doesn't
   fight the JS transform on the shell) */
.fc-inner {
  display: flex; flex-direction: column; position: relative;
  border-radius: 12px; overflow: hidden;
  background: rgba(201, 201, 201, 0.12);
  border: 1px solid rgba(181, 181, 181, 0.25);
  backdrop-filter: blur(16px);
  box-shadow: rgba(0, 0, 0, 0.35) 0 13px 16px;
  transition: transform 0.3s ease;
}
.float-card:hover .fc-inner { transform: translateY(-8px); }
.fc-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.09), transparent 38%);
}
.float-card .fc-head {
  height: 46px; display: flex; align-items: center; padding: 0 16px;
  font-weight: 600; color: var(--white); font-size: 1.1rem; letter-spacing: -0.02em;
  background: rgba(201, 201, 201, 0.05); border-bottom: 1px solid rgba(181, 181, 181, 0.2);
}
.float-card .fc-body { height: 320px; position: relative; overflow: hidden; }

/* card body: 3D word pills */
.pill {
  position: absolute; padding: 17px 32px; border-radius: 20px;
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 85;
  font-size: 2.4rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap;
}
.pill-green {
  background: #62ecb5; color: #11a885;
  text-shadow: 0 1px 0 #a3ffd0, 0 -1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 2px 2px #abffdf, inset 0 -2px 1px rgba(59, 246, 177, 0.5),
              inset 0 -4px 2.6px #009e81, 0 12px 16px rgba(0, 0, 0, 0.25);
}
.pill-teal {
  background: #1395a1; color: #51d7db;
  text-shadow: 0 1px 0 #b8fff5, 0 -1px 1px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3), inset 0 2px 2px rgba(33, 237, 255, 0.5),
              inset 0 -4px 2.5px #035770, 0 12px 16px rgba(0, 0, 0, 0.25);
}
.pill-blue {
  background: #1537b3; color: #6c89eb;
  text-shadow: 0 1px 0 #8db8f0, 0 -1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3), inset 0 2px 2px rgba(33, 196, 255, 0.5),
              inset 0 -4px 2.5px #07136e, 0 8px 16px rgba(0, 0, 0, 0.25);
}

/* card body: journey squiggle + polaroids */
.squiggle { position: absolute; inset: 0; width: 100%; height: 100%; }
.polaroid {
  position: absolute; background: var(--white); padding: 5px 5px 18px; border-radius: 5px;
  box-shadow: 0 10px 12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.map-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #6f6f6f; }

/* photo placeholders — gradient fills that read as photos until real
   images are added (swap each .photo-* background for a real <img>) */
.ph { border-radius: 3px; }
.photo-a { background: linear-gradient(170deg, #cdbb9b 0%, #8d7b62 45%, #4e463a 100%); }   /* sepia */
.photo-b { background: linear-gradient(180deg, #b9f2c8 0%, #7fc89a 38%, #28352e 72%, #11160f 100%); } /* portrait */
.photo-c { background: linear-gradient(180deg, #c2d6e8 0%, #8aa7c0 36%, #3d4b56 62%, #181d20 100%); } /* street */
.caption {
  display: block; text-align: center; margin-top: 5px;
  font-family: 'Caveat', cursive; font-size: 1.1rem; font-weight: 600; color: #161616;
}

.ipod-img {
  position: absolute; width: 110px; height: auto; z-index: 2;
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.45));
}

/* retro music player (Life off-screen card) */
.ipod {
  position: absolute; width: 98px; height: 198px; border-radius: 14px; z-index: 2;
  background: linear-gradient(160deg, #f5e070 0%, #dcba3c 55%, #ba951f 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.75), inset 0 -3px 4px rgba(0, 0, 0, 0.3),
              0 14px 16px rgba(0, 0, 0, 0.45);
}
.ipod-screen {
  position: absolute; top: 11px; left: 10px; right: 10px; height: 80px; border-radius: 6px;
  background:
    radial-gradient(7px 7px at 22% 28%, #ff5f57 96%, transparent),
    radial-gradient(7px 7px at 50% 28%, #ffbd2e 96%, transparent),
    radial-gradient(7px 7px at 78% 28%, #28c840 96%, transparent),
    radial-gradient(7px 7px at 22% 62%, #4aa3ff 96%, transparent),
    radial-gradient(7px 7px at 50% 62%, #c97bff 96%, transparent),
    radial-gradient(7px 7px at 78% 62%, #2ee6d6 96%, transparent),
    #11161b;
  box-shadow: inset 0 0 0 2px #2a3036, inset 0 2px 6px rgba(0, 0, 0, 0.7);
}
.ipod-wheel {
  position: absolute; bottom: 13px; left: 50%; width: 64px; height: 64px; margin-left: -32px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fbf0b8, #e5ca5e 72%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}
.ipod-wheel::after {
  content: ""; position: absolute; inset: 21px; border-radius: 50%;
  background: #d9b83a; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ---------- Gradient transition strips ---------- */
.divider { height: 260px; position: relative; overflow: hidden; background: var(--white); }
/* colored haze: blurred gradient, dissolved into the white by a long
   multi-stop mask so the color melts out instead of banding */
.divider::before {
  content: ""; position: absolute; inset: -180px -70px 0;
  background: var(--grad); filter: blur(44px);
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 38%, rgba(0, 0, 0, 0.55) 64%, rgba(0, 0, 0, 0.18) 82%, transparent 96%);
  mask-image: linear-gradient(to bottom,
    #000 0%, #000 38%, rgba(0, 0, 0, 0.55) 64%, rgba(0, 0, 0, 0.18) 82%, transparent 96%);
}
/* black bleed from the dark section above */
.divider::after {
  content: ""; position: absolute; inset: -280px -170px 168px;
  background: var(--black); filter: blur(38px);
}
.divider.flip { transform: rotate(180deg); }

/* ---------- Light sections ---------- */
.light { background: var(--white); color: var(--ink); padding: 70px 0; position: relative; z-index: 1; }
/* sub-section headings — 56px tier */
.light h2 { font-size: clamp(2.1rem, 5.5vw, 3.5rem); line-height: 0.9; color: var(--ink); max-width: 14em; }
/* major section headings — 96px tier (matches reference h2/86px LH);
   480px cap breaks "Where I drive / revenue" onto two lines */
h2.h-display { font-size: clamp(3rem, 9.5vw, 6rem); line-height: 0.9; max-width: 480px; }
.light .intro { margin-top: 18px; font-size: 18px; color: var(--muted-light); max-width: 620px; line-height: 1.4; }

/* stat columns */
.stats { display: flex; gap: 32px; margin-top: 56px; align-items: stretch; }
.stat { flex: 1; }
.stat + .stat { border-left: 1px solid; border-image: linear-gradient(#dadada, #fff) 1; padding-left: 32px; }
.stat-icon {
  width: 40px; height: 40px; border-radius: 8px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(17, 17, 17, 0.01);
  box-shadow: rgba(0, 0, 0, 0.08) 0 0 0 1px, rgba(0, 0, 0, 0.12) 0 2px 4px;
}
.stat-icon svg { width: 26px; height: 26px; color: var(--ink); }
.stat h3 { font-family: var(--body); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; }
.stat p { margin-top: 10px; color: var(--muted-light); font-size: 1rem; line-height: 1.45; }

/* skills: accordion list + knob */
.skills { margin-top: 90px; }
.skills-grid { display: flex; gap: 40px; align-items: flex-start; margin-top: 40px; }
/* min-height ≈ list with one row open, so switching rows doesn't move
   the section below; knob stays put instead of re-centering */
.skill-list { flex: 1; min-width: 0; min-height: 400px; }
.knob-wrap { margin-top: 10px; }
.skill-row { padding: 22px 0; border-bottom: 1px solid var(--line-light); cursor: pointer; }
.skill-row:first-child { border-top: 1px solid var(--line-light); }
.skill-row h3 { font-family: var(--body); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
/* grid-rows 0fr→1fr animates to the row's exact height — no max-height guess */
.skill-desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s ease; }
.skill-row.open .skill-desc { grid-template-rows: 1fr; }
.skill-desc p {
  min-height: 0; overflow: hidden; margin: 0; padding-top: 0;
  color: var(--muted-light); line-height: 1.5; font-size: 18px; letter-spacing: -0.01em;
  transition: padding-top 0.45s ease;
}
.skill-row.open .skill-desc p { padding-top: 10px; }

/* the dial: tick ring + numbers + dark bezel + brushed-metal face.
   The face (with its green dot) rotates 90° per active row. */
.knob-wrap { position: relative; width: 380px; height: 380px; flex: 0 0 auto; cursor: pointer; user-select: none; }
.knob-ticks { position: absolute; inset: 0; width: 100%; height: 100%; }
.knob-num {
  position: absolute; font-size: 18px; color: var(--ink);
  /* centered on the diagonal axis, just beyond the long tick's outer end */
  transform: translate(-50%, -50%);
  opacity: 0.25; transition: opacity 0.4s ease, font-weight 0.2s;
}
.knob-num.active { opacity: 1; font-weight: 600; }
.knob-bezel {
  position: absolute; inset: 48px; border-radius: 50%;
  background: #17181a;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.35),
              inset 0 2px 3px rgba(255, 255, 255, 0.3),
              inset 0 -4px 8px rgba(0, 0, 0, 0.65);
}
.knob-face {
  position: absolute; inset: 15px; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0.04) 1px 3px),
    conic-gradient(from 0deg,
      #f6f6f6 0deg, #a6a6a6 25deg, #e3e3e3 55deg, #8e8e8e 90deg,
      #fafafa 115deg, #9c9c9c 150deg, #ececec 180deg, #949494 215deg,
      #f3f3f3 240deg, #898989 275deg, #e5e5e5 305deg, #a2a2a2 335deg, #f6f6f6 360deg);
  transition: transform 0.65s cubic-bezier(0.3, 1.3, 0.4, 1);
}
.knob-dot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  bottom: 17%; left: 17%;
  background: #21c87a; box-shadow: 0 0 6px rgba(33, 200, 122, 0.8);
}

/* ---------- Work cards (light) ---------- */
#work { padding-top: 20px; }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.work-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border-radius: 12px; overflow: hidden;
  background: rgba(17, 17, 17, 0.01);
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.06) 0 4px 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: rgba(0, 0, 0, 0.12) 0 0 0 1px, rgba(0, 0, 0, 0.12) 0 14px 28px; }
.work-card .wc-head {
  padding: 12px 16px; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em;
  background: rgba(0, 0, 0, 0.02); border-bottom: 1px solid var(--line-light);
}
.work-card .wc-body { padding: 26px 16px; }
.work-card .wc-emoji { font-size: 3rem; line-height: 1; margin-bottom: 14px; }
.work-card .wc-desc { color: var(--muted-light); font-size: 0.95rem; line-height: 1.5; }
.work-card .wc-industry { padding: 0 16px 14px; color: rgba(0, 0, 0, 0.4); font-size: 0.9rem; }

.work-card .wc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* logo art: tilt + light sweep on hover */
.wc-art { position: relative; overflow: hidden; }
.wc-img {
  display: block; width: 100%; aspect-ratio: 1.22 / 1; object-fit: cover;
  transition: transform 0.5s ease;
}
.work-card:hover .wc-img { transform: rotate(3deg) scale(1.05); }
.wc-sheen {
  position: absolute; inset: -20%; pointer-events: none;
  mix-blend-mode: overlay;
  background: linear-gradient(118deg,
    transparent 32%, rgba(255, 255, 255, 0.85) 44%,
    rgba(255, 255, 255, 0.85) 52%, transparent 64%);
  transform: translateX(-130%);
}
.work-card:hover .wc-sheen {
  transform: translateX(130%);
  transition: transform 0.7s ease;
}
.wc-lock { font-size: 0.78rem; font-weight: 500; color: rgba(0, 0, 0, 0.35); white-space: nowrap; }
.work-card.locked .wc-head span:first-child { color: rgba(0, 0, 0, 0.45); }
.work-card.locked .wc-emoji { filter: grayscale(1); opacity: 0.5; }

/* ---------- Testimonials (light) ---------- */
.t-center { text-align: center; margin-left: auto; margin-right: auto; }
/* stacked deck: cards pile behind the top one; drag the top card to cycle */
.quote-deck { position: relative; width: min(566px, 100%); height: 320px; margin: 56px auto 0; }
.quote-card {
  position: absolute; inset: 0;
  background: var(--white); border-radius: 12px; padding: 24px;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.06) 3px 5px 5px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  transition: transform 0.45s cubic-bezier(0.3, 1.2, 0.4, 1), opacity 0.28s ease;
  user-select: none; touch-action: none;
}
.quote-card.top { cursor: grab; }
.quote-card.top:active { cursor: grabbing; }
.quote-card blockquote { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; line-height: 1.4; }
.quote-card figcaption { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.quote-card figcaption em { font-style: normal; color: var(--muted-light); font-size: 0.85rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: var(--white); font-weight: 600; font-size: 0.8rem;
}

/* ---------- Life photo wall (light) ---------- */
.photo-wall { columns: 3; column-gap: 20px; margin-top: 48px; }
.photo {
  height: var(--h, 260px); margin-bottom: 20px; border-radius: 8px; overflow: hidden;
  break-inside: avoid; box-shadow: var(--white) 0 0 0 4px, rgba(0, 0, 0, 0.3) 0 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, #f4f4f3, #f4f4f3 12px, #ececeb 12px, #ececeb 24px);
  color: rgba(0, 0, 0, 0.35); font-size: 0.85rem; padding: 12px;
}

/* ---------- Story (dark) ---------- */
.story { background: var(--black); padding: 90px 0 110px; position: relative; z-index: 1; }
/* 520px cap breaks "How I found / my way in" onto two lines */
.story h2 { font-size: clamp(3rem, 9.5vw, 6rem); color: var(--white); max-width: 520px; line-height: 1.04; }
/* chapters left, sticky collage right */
.story-grid { display: flex; gap: 32px; align-items: flex-start; }
.story-left { flex: 1; min-width: 0; }
.story-right { width: 460px; flex: 0 0 auto; align-self: stretch; }
.story-sticky { position: sticky; top: 230px; height: 500px; }
.collage {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transform: translateY(30px) scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.collage.active { opacity: 1; transform: none; }
.sc-item { position: absolute; }
.sc-loose { height: auto; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.45)); border-radius: 6px; }
.sc-ph { background: linear-gradient(160deg, #3c4654, #171c22); border-radius: 4px; }

.chapter { padding: 70px 0; }
.chapter + .chapter { border-top: 1px solid; border-image: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 100%) 1; }
.chapter h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--white); line-height: 1.15; }
.chapter p { margin-top: 18px; color: var(--muted-dark); font-size: 1.1rem; max-width: 36em; line-height: 1.45; letter-spacing: -0.01em; }

/* ---------- CTA (radial gradient) ---------- */
/* white above melts straight into green, darkening to black at the
   bottom — giant radial centered far below the section */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: 230px 32px 130px;
  background: radial-gradient(115% 115% at 50% 106%,
    #000 0%, #000 16%, #061024 30%, #0a223f 38%, #0f445d 46%,
    #267176 54%, #3ea790 62%, #95eabb 73%, #c4fad5 81%, #e2fee9 88%, #fff 97%);
}
/* 620px cap breaks "Let's build / something" onto two lines */
.cta h2 { font-size: clamp(3.2rem, 11vw, 7.5rem); color: var(--white); margin: 0 auto; max-width: 620px; line-height: 0.9; }
/* dark glass card overlapping the headline; its transform is scroll-driven
   (rides up from below and tilts to -12° as the section enters) */
.cta-btn {
  display: inline-block; margin-top: -28px; position: relative; z-index: 1;
  text-decoration: none;
  font-family: var(--body); font-weight: 600; font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: var(--white); letter-spacing: -0.02em;
  padding: 24px 36px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(28px);
  box-shadow: rgba(0, 0, 0, 0.25) 0 12px 24px;
  transform: rotate(-12deg);
  transition: transform 0.18s ease-out, background 0.25s;
  will-change: transform;
}
.cta-btn:hover { transform: rotate(0deg) scale(1.05) !important; transition: transform 0.25s ease, background 0.25s; background: rgba(255, 255, 255, 0.16); }
.cta-footnote { margin-top: 180px; color: rgba(255, 255, 255, 0.5); font-size: 1rem; }
.cta-logos {
  margin-top: 26px; display: flex; justify-content: center; align-items: center;
  gap: 44px; flex-wrap: wrap; opacity: 0.55;
}
/* split-flap window: items slide up and out, next rises from below */
.logo-slot { position: relative; display: block; width: 160px; height: 40px; overflow: hidden; }
.logo-item {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(130%); opacity: 0;
  transition: transform 0.55s cubic-bezier(0.35, 1.1, 0.45, 1), opacity 0.4s ease;
}
.logo-item.in { transform: none; opacity: 1; }
.logo-item.out { transform: translateY(-130%); opacity: 0; }
.logo-item img { height: 34px; width: auto; display: block; }
.logo-word {
  font-weight: 600; font-size: 1.5rem; color: var(--white);
  letter-spacing: -0.02em; white-space: nowrap;
}

/* ---------- Footer: transparent, sits inside the CTA gradient's black bottom ---------- */
footer {
  background: transparent; border: none;
  margin-top: -86px; position: relative; z-index: 1;
  padding: 0 0 26px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.45);
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted-dark); text-decoration: none; margin-left: 18px; }
footer a:hover { color: var(--white); }

/* ---------- Case study overlay ---------- */
.cs-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  overflow-y: auto; overflow-x: hidden;
  opacity: 0; transition: opacity 0.35s ease;
  pointer-events: none;
}
.cs-overlay.open { opacity: 1; pointer-events: auto; }
body.cs-open { overflow: hidden; }
.cs-close {
  position: fixed; top: 24px; right: 28px; z-index: 101;
  width: 40px; height: 40px; border: none; background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.6); transition: color 0.15s;
}
.cs-close:hover { color: var(--white); }
.cs-close svg { width: 100%; height: 100%; }
.cs-inner {
  max-width: 900px; margin: 80px auto 60px; padding: 0 32px;
}
.cs-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px; overflow: hidden;
  padding: 56px 48px 48px;
}
.cs-name {
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 85;
  font-size: clamp(3rem, 9vw, 5.5rem); letter-spacing: -0.03em; line-height: 0.95;
  color: var(--white);
}
.cs-meta { margin-top: 16px; color: rgba(255, 255, 255, 0.45); font-size: 1rem; line-height: 1.6; }
.cs-screenshot {
  margin-top: 40px; width: 100%; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.2); font-size: 0.9rem;
}
.cs-screenshot img { width: 100%; display: block; }
.cs-divider { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 48px 0; }
.cs-headline {
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 85;
  font-size: clamp(2rem, 5.5vw, 3rem); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--white); white-space: pre-line;
}
.cs-summary { margin-top: 18px; color: rgba(255, 255, 255, 0.55); font-size: 1.1rem; line-height: 1.5; max-width: 640px; }
.cs-sections { margin-top: 48px; }
.cs-section + .cs-section { margin-top: 40px; }
.cs-section h4 {
  font-family: var(--body); font-weight: 600; font-size: 1.15rem;
  color: var(--white); letter-spacing: -0.02em; margin-bottom: 10px;
}
.cs-section p { color: rgba(255, 255, 255, 0.55); font-size: 1.05rem; line-height: 1.5; max-width: 640px; }

.cs-contact { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 100px; padding-bottom: 80px; }
.cs-contact .cs-headline { font-size: clamp(2.6rem, 8vw, 4.5rem); }
.cs-contact .cs-summary { max-width: 480px; margin-left: auto; margin-right: auto; }
.cs-contact-links { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 400px; margin: 0 auto; }
.cs-contact-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; text-decoration: none; color: var(--white);
  font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.15s;
}
.cs-contact-link:first-child { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.cs-contact-link:hover { color: var(--green); }
.cs-contact-link svg { color: rgba(255, 255, 255, 0.3); transition: color 0.15s; }
.cs-contact-link:hover svg { color: var(--green); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */

/* horizontal padding for all wraps on smaller screens */
@media (max-width: 960px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero-cards { height: auto; display: flex; flex-direction: column; align-items: center; gap: 36px; }
  .float-card { position: static; margin-left: 0 !important; width: min(340px, 88vw); }
  .float-card:nth-child(1) { transform: rotate(-4deg); }
  .float-card:nth-child(2) { transform: rotate(3deg); }
  .float-card:nth-child(3) { transform: rotate(-3deg); }
  .story-right { display: none; }
  .skills-grid { flex-direction: column; align-items: center; }
  .knob-wrap { transform: scale(0.78); transform-origin: center top; margin-bottom: -80px; }
  .skill-list { width: 100%; }
  .work-grid { grid-template-columns: 1fr; }
  .cta { padding: 160px 24px 100px; }
  .cta-logos { gap: 24px; }
}

@media (max-width: 720px) {
  .cs-inner { margin-top: 60px; padding: 0 16px; }
  .cs-card { padding: 36px 24px 32px; }
  .cs-name { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .cs-close { top: 16px; right: 16px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .photo-wall { columns: 2; }
  .quote-deck { height: 380px; }
  .quote-card blockquote { font-size: 17px; }
  .nav-links-mid, .nav-socials, .nav-right .nav-sep { display: none; }
  .hero { padding: 110px 0 50px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4.5rem); }
  .hero-sub { font-size: 1.05rem; }
  .stats { flex-direction: column; gap: 28px; }
  .stat + .stat { border-left: none; padding-left: 0; border-top: 1px solid var(--line-light); padding-top: 28px; }
  .skills { margin-top: 60px; }
  .knob-wrap { transform: scale(0.65); margin-bottom: -120px; }
  .chapter { padding: 48px 0; }
  .cta { padding: 120px 20px 80px; }
  .cta h2 { font-size: clamp(2.6rem, 12vw, 5rem); }
  .cta-btn { font-size: clamp(1.4rem, 5vw, 2.2rem); padding: 20px 28px; }
  .cta-footnote { margin-top: 120px; }
  .cta-logos { gap: 16px; }
  .logo-slot { width: 120px; height: 36px; }
  .logo-word { font-size: 1.2rem; }
  footer .wrap { flex-direction: column; text-align: center; gap: 10px; }
}

@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 100px 0 40px; }
  .hero h1 { font-size: clamp(2.2rem, 13vw, 3.5rem); }
  .float-card { width: min(300px, 92vw); }
  .float-card .fc-body { height: 260px; }
  .pill { font-size: 1.8rem; padding: 14px 24px; }
  .photo-wall { columns: 1; }
  .quote-deck { height: 420px; }
  .quote-card { padding: 20px; }
  .quote-card blockquote { font-size: 16px; }
  .knob-wrap { display: none; }
  .skills-grid { gap: 0; }
  h2.h-display { font-size: clamp(2.2rem, 10vw, 4rem); }
  .story h2 { font-size: clamp(2.2rem, 10vw, 4rem); }
  .chapter h3 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .cta { padding: 100px 16px 70px; }
  .cta-logos { flex-direction: column; gap: 12px; }
  .divider { height: 180px; }
}
