/* ============================================================
   JOEL FERNANDEZ — PORTFOLIO
   styles.css  ·  v2 Refined
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Gilda+Display&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=switzer@300,400,500,600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* ── Light background, editorial feel ── */
  --bg:              #F5F3EF;
  --surface:         #ECEAE4;
  --surface-2:       #E3E0DA;
  --text:            #1A1A1A;
  --text-muted:      #6A6460;
  --text-subtle:     #9B9490;
  --accent:          #B8914A;   /* deep amber-gold — used sparingly */
  --border:          #DDD9D2;
  --border-2:        #E8E4DE;

  /* ── Password Gate stays dark ── */
  --gate-bg:         #0C0C0C;
  --gate-text:       #F2EFE9;
  --gate-muted:      #888;
  --gate-subtle:     #444;
  --gate-border:     #222;
  --gate-surface:    #131313;
  --gate-surface-2:  #1A1A1A;

  /* ── Type ── */
  --font-display:    'Gilda Display', Georgia, serif;
  --font-body:       'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Layout ── */
  --nav-h:           68px;
  --max-w:           1400px;
  --prose-w:         680px;
  --container-w:     1000px;

  /* ── Motion ── */
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.76, 0, 0.24, 1);
  --ease-reveal:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Hero Infinite Grid Background ───────────────────────── */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid__base,
.hero-grid__reveal {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(var(--text) 1px, transparent 1px),
    linear-gradient(90deg, var(--text) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: heroGridScroll 1.4s linear infinite;
  will-change: transform;
}

.hero-grid__base {
  opacity: 0.04;
}

.hero-grid__reveal {
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(280px circle at var(--grid-x, -400px) var(--grid-y, -400px), black 0%, transparent 100%);
  mask-image: radial-gradient(280px circle at var(--grid-x, -400px) var(--grid-y, -400px), black 0%, transparent 100%);
}

@keyframes heroGridScroll {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, 40px); }
}

.hero-grid__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  transform: translateZ(0);
  will-change: transform;
}

.hero-grid__blob--warm {
  width: 42%;
  height: 42%;
  top: -18%;
  right: -8%;
  background: rgba(184, 145, 74, 0.22);
}

.hero-grid__blob--cool {
  width: 38%;
  height: 38%;
  bottom: -18%;
  left: -8%;
  background: rgba(90, 110, 160, 0.12);
}

.hero > *:not(.hero-grid) {
  position: relative;
  z-index: 1;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ── Utility ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 52px;
}

.container--narrow {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 52px;
}

/* ── Page Wrapper ─────────────────────────────────────────── */
.page-wrapper {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.page-wrapper.is-visible { opacity: 1; }

/* ── Reading Progress Bar (case studies) ──────────────────── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1001;
  pointer-events: none;
}
.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.08s linear;
  will-change: transform;
}

/* ── Scroll Reveal (IntersectionObserver) ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-reveal), transform 0.75s var(--ease-reveal);
}
.reveal.is-revealed {
  opacity: 1;
  transform: none;
}
.reveal--delay-1 { transition-delay: 0.06s; }
.reveal--delay-2 { transition-delay: 0.12s; }
.reveal--delay-3 { transition-delay: 0.18s; }
.reveal--delay-4 { transition-delay: 0.24s; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 52px;
  transition: background 0.4s var(--ease-out),
              backdrop-filter 0.4s var(--ease-out),
              border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(245, 243, 239, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border-2);
}

.nav__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 44px;
}

.nav__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav__link:hover,
.nav__link--active { color: var(--text); }
.nav__link:hover::after,
.nav__link--active::after { width: 100%; }

.nav__back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  min-height: 44px;
}
.nav__back:hover { color: var(--text); }
.nav__back svg { transition: transform 0.2s var(--ease-out); }
.nav__back:hover svg { transform: translateX(-3px); }

/* ── Hamburger ────────────────────────────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 910;
  position: relative;
}
.nav__hamburger-line {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out), opacity 0.3s, width 0.3s var(--ease-out);
}
.nav__hamburger-line:nth-child(1) { width: 22px; }
.nav__hamburger-line:nth-child(2) { width: 16px; }
.nav__hamburger.is-open .nav__hamburger-line:nth-child(1) {
  width: 20px;
  transform: translateY(3.25px) rotate(45deg);
}
.nav__hamburger.is-open .nav__hamburger-line:nth-child(2) {
  width: 20px;
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav__menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 899;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.nav__menu-overlay.is-open {
  opacity: 1;
}
.nav__menu-overlay .nav__link {
  font-size: 14px;
  letter-spacing: 0.18em;
}
.nav__menu-overlay .nav__back {
  font-size: 12px;
  letter-spacing: 0.18em;
}

/* ── Hero (Home) ──────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 52px 88px;
  position: relative;
  overflow: hidden;
}

.hero__eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.375rem, 6vw, 3.625rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
  overflow-wrap: break-word;
  color: var(--text);
  margin-bottom: 32px;
}

.hero__name-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;  /* prevent descender clipping */
}

.hero__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.hero__title {
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 400;
  color: var(--text);
  max-width: 640px;
  line-height: 1.55;
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hero__scroll-line {
  width: 1px;
  height: 56px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2s var(--ease-in-out) infinite;
  animation-delay: 1.5s;
}
@keyframes scrollLine {
  0%   { top: -100%; }
  50%  { top: 100%; }
  100% { top: 100%; }
}
.hero__scroll-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
  writing-mode: vertical-rl;
}

/* ── Work Index ───────────────────────────────────────────── */
.work {
  padding: 120px 0 160px;
}

.work__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 52px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.work__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.work__count {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-subtle);
}

/* Work Item */
.work-item {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 44px 52px;
  border-bottom: 1px solid var(--border-2);
  cursor: pointer;
  transition: background 0.3s var(--ease-out),
              opacity 0.3s,
              transform 0.3s var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.work-item:hover { background: #F5F3EF; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05); }

.work-item__num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-subtle);
  flex-shrink: 0;
  min-width: 72px;
}

.work-item__body { flex: 1; padding-right: 48px; }

.work-item__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 16px;
  transition: color 0.2s;
}
.work-item:hover .work-item__title { color: var(--accent); }

.work-item__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
}

.work-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
  width: 200px;
}

.work-item__thumb {
  flex-shrink: 0;
  width: 260px;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border-2);
  margin-left: 32px;
}

.work-item__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  opacity: 0.85;
}

.work-item:hover .work-item__thumb-img {
  transform: scale(1.06);
  opacity: 1;
}
.work-item__tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.work-item__company {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.work-item__year {
  font-size: 11px;
  color: var(--text-subtle);
}
.work-item__arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-subtle);
  transition: color 0.2s, transform 0.3s var(--ease-out);
  margin-top: 28px;
}
.work-item:hover .work-item__arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* Card hover lift */
.work-item {
  transition: background 0.3s var(--ease-out),
              opacity 0.3s,
              transform 0.3s var(--ease-out);
}
.work-item:hover {
  transform: translateY(-2px);
}

/* ── About Page ───────────────────────────────────────────── */
.about-hero {
  padding-top: calc(var(--nav-h) + 100px);
  padding-bottom: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}
.about-hero__text {
  flex: 1;
  min-width: 0;
}
.about-hero__photo {
  flex-shrink: 0;
}
.about-hero__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 32px;
}
.about-hero__heading {
  font-family: var(--font-display);
  font-size: clamp(52px, 6.5vw, 104px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.about-hero__heading em {
  font-style: italic;
  color: var(--accent);
}
/* ── Continuous Airplane Flight ─────────────────────────── */
/* Each letter in "LA … NY" needs position:relative so
   z-index comparisons work within the same stacking context. */
.flight-path {
  position: relative;
  display: inline;
}

/* Individual letter spans */
.fl {
  display: inline-block;
  position: relative;
}

/* Letters the plane flies BEHIND (sit on top of the plane) */
.fl-A,
.fl-Y { z-index: 3; }

/* Letters the plane flies IN FRONT OF (sit below the plane) */
.fl-L,
.fl-N { z-index: 1; }

/* The airplane span */
.plane-travel {
  display: inline-block;
  font-style: normal;
  vertical-align: middle;
  color: var(--text);
  position: relative;
  /* Matches 0% keyframe — avoids a jump on first paint */
  transform: translateX(-130px) translateY(2px);
  animation:
    plane-pos   14s linear     infinite,
    plane-depth 14s step-start infinite;
}

/* SVG gets its own animation for direction flipping */
.plane-svg {
  display: block;
  transform: rotate(90deg);
  animation: plane-face 14s step-start infinite;
}

/* ── Position path ───────────────────────────────────────
   0–50 %  forward (left → right), gentle upward arc
   50–100% return  (right → left), gentle downward arc   */
@keyframes plane-pos {
  0%   { transform: translateX(-130px) translateY(2px);  }
  15%  { transform: translateX(-45px)  translateY(-8px); }
  25%  { transform: translateX(-10px)  translateY(-10px);}
  35%  { transform: translateX(30px)   translateY(-8px); }
  50%  { transform: translateX(120px)  translateY(2px);  }
  65%  { transform: translateX(30px)   translateY(10px); }
  75%  { transform: translateX(-10px)  translateY(12px); }
  85%  { transform: translateX(-45px)  translateY(10px); }
  100% { transform: translateX(-130px) translateY(2px);  }
}

/* ── Z-index snaps (step-start) ──────────────────────────
   Forward:  in front of L → behind A → in front of N → behind Y
   Return:   behind every letter the whole way back            */
@keyframes plane-depth {
  0%  { z-index: 2; }   /* in front of L            */
  12% { z-index: 0; }   /* duck behind A             */
  21% { z-index: 2; }   /* re-emerge, in front of N  */
  40% { z-index: 0; }   /* duck behind Y + full return trip */
}

/* ── Direction flip at the midpoint ─────────────────────  */
@keyframes plane-face {
  0%,  49.9% { transform: rotate(90deg);  }   /* → pointing right */
  50%, 100%  { transform: rotate(-90deg); }   /* ← pointing left  */
}

.about-grid {
  display: block;
  padding: 100px 0 160px;
  border-top: 1px solid var(--border);
}

.portrait-circle {
  width: 146px !important;
  height: 146px;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center center;
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.portrait-placeholder__label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.about-bio {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 48px;
}
.about-details {
  border-top: 1px solid var(--border-2);
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}
.about-detail__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding-top: 2px;
}
.about-detail__value {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Case Study Hero ──────────────────────────────────────── */
.cs-hero {
  padding-top: calc(var(--nav-h) + 100px);
  padding-bottom: 88px;
  border-bottom: 1px solid var(--border);
}
.cs-hero__eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.cs-hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 100px);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 36px;
  max-width: 900px;
}
.cs-hero__hook {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 620px;
  font-weight: 300;
  margin-bottom: 56px;
}
.cs-hero__meta {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.cs-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cs-hero__meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.cs-hero__meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Case Study Overview Card ─────────────────────────────── */
.cs-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin: 80px 0;
}
.cs-overview__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.cs-overview__value {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Case Study Body ──────────────────────────────────────── */
.cs-body {
  padding: 100px 0 160px;
}

.cs-section {
  margin-bottom: clamp(80px, 10vw, 140px);
}

/* Section label — tracked-out eyebrow */
.cs-section__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-2);
  display: block;
}

/* Section heading — display */
.cs-section__heading {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 36px;
  max-width: var(--prose-w);
}

/* Sub-heading within a section */
.cs-section__subhead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 64px;
  margin-bottom: 20px;
  max-width: var(--prose-w);
}

/* Body prose */
.cs-body p {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.82;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: var(--prose-w);
}
.cs-body p strong {
  color: var(--text);
  font-weight: 600;
}

/* Unordered list */
.cs-body ul {
  margin: 0 0 28px 0;
  padding-left: 0;
  max-width: var(--prose-w);
}
.cs-body ul li {
  position: relative;
  padding-left: 24px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.82;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.cs-body ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 400;
}

/* ── Image Placeholder ────────────────────────────────────── */
.img-placeholder {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 56px 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}
.img-placeholder:hover {
  transform: scale(1.01);
}

.img-placeholder::before { content: ''; display: block; width: 100%; }
.img-placeholder--landscape::before { padding-top: 56.25%; }
.img-placeholder--tall::before       { padding-top: 77%; }
.img-placeholder--wide::before       { padding-top: 38%; }
.img-placeholder--square::before     { padding-top: 100%; }

.img-placeholder__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
}
.img-placeholder__icon { color: var(--text-subtle); opacity: 0.5; }
.img-placeholder__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.img-placeholder__sublabel {
  font-size: 11px;
  color: var(--text-subtle);
  opacity: 0.6;
  text-align: center;
}

.img-placeholder-caption {
  font-size: 10px !important;
  color: var(--text-subtle);
  margin-top: -12px;
  margin-bottom: 48px;
  padding-left: 2px;
  font-style: italic;
  letter-spacing: 0.01em;
  max-width: 100% !important;
}

.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 56px 0;
}
.img-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Full-width image (breaks prose constraint) */
.img-wide { max-width: 100%; }

/* ── Case Study Real Images & Video ──────────────────────── */
.cs-img-real {
  display: block;
  width: 100%;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.5s ease;
  margin-bottom: 16px;
}
.cs-img-real.is-loaded {
  opacity: 1;
}

.cs-video {
  display: block;
  width: 100%;
  border-radius: 4px;
  margin-top: 24px;
  margin-bottom: 16px;
}

/* ── Pull Quote ───────────────────────────────────────────── */
.pull-quote {
  margin: 80px 0;
  padding: 0 0 0 36px;
  border-left: 3px solid var(--accent);
  position: relative;
  /* Break out of prose width — uses full container width */
  max-width: 100%;
  width: 100%;
}
.pull-quote::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 0.7;
  color: var(--accent);
  opacity: 0.18;
  display: block;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}
.pull-quote__text {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 24px;
}
.pull-quote__attribution {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ── Metrics Row ──────────────────────────────────────────── */
.metrics {
  background: var(--text);
  color: var(--bg);
  padding: 60px 52px;
  margin: 80px 0;
  width: 100%;
}
.metrics__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.5);
  margin-bottom: 48px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(245, 243, 239, 0.12);
}
.metrics__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 48px 32px;
}
.metric__value {
  font-family: var(--font-display);
  font-size: clamp(52px, 5.5vw, 80px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--bg);
  margin-bottom: 12px;
}
.metric__delta {
  font-size: 0.55em;
  vertical-align: middle;
  color: var(--accent);
  font-weight: 400;
}
.metric__label {
  font-size: 13px;
  color: rgba(245, 243, 239, 0.55);
  line-height: 1.5;
  max-width: 180px;
  font-weight: 400;
}

/* ── Step Blocks ──────────────────────────────────────────── */
.steps {
  margin: 48px 0;
  display: flex;
  flex-direction: column;
  max-width: var(--prose-w);
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-2);
}
.step:first-child { border-top: 1px solid var(--border-2); }
.step__num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent);
  padding-top: 4px;
  font-weight: 600;
}
.step__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.step__body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

/* ── Reflection Block ─────────────────────────────────────── */
.reflection {
  background: var(--surface);
  border-left: 3px solid var(--border);
  padding: 48px 48px 48px 44px;
  margin: 48px 0;
  max-width: var(--prose-w);
}
.reflection p {
  font-size: 16px !important;
  color: var(--text-muted) !important;
  line-height: 1.8 !important;
  margin-bottom: 16px !important;
}
.reflection p:last-child { margin-bottom: 0 !important; }

/* ── Next Project ─────────────────────────────────────────── */
.next-project {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.next-project__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.next-project__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text);
  transition: color 0.2s;
  line-height: 1.1;
}
.next-project__link {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: color 0.2s;
  min-width: 0;
}
.next-project__link:hover .next-project__title { color: var(--accent); }
.next-project__arrow {
  width: 60px;
  height: 60px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease-out);
}
.next-project__link:hover .next-project__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translate(5px, -5px);
}

/* ── PASSWORD GATE — stays dark ──────────────────────────── */
.password-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--gate-bg);
  color: var(--gate-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.password-gate.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
}

.password-gate__inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
}
.password-gate__logo {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gate-subtle);
  margin-bottom: 88px;
}
.password-gate__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gate-muted);
  margin-bottom: 16px;
}
.password-gate__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--gate-text);
  margin-bottom: 8px;
}
.password-gate__subtitle {
  font-size: 14px;
  color: var(--gate-muted);
  margin-bottom: 52px;
  line-height: 1.65;
}
.password-gate__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.password-gate__input-wrap {
  position: relative;
}
.password-gate__input {
  width: 100%;
  background: var(--gate-surface);
  border: 1px solid var(--gate-border);
  color: var(--gate-text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 18px 20px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  border-radius: 0;
  min-height: 56px;
}
.password-gate__input::placeholder { color: var(--gate-subtle); }
.password-gate__input:focus { border-color: var(--accent); }

.password-gate__submit {
  background: var(--gate-text);
  color: var(--gate-bg);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 18px 32px;
  cursor: pointer;
  border: 1px solid var(--gate-text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  min-height: 56px;
}
.password-gate__submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.password-gate__error {
  font-size: 12px;
  color: #E05A5A;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
  margin-top: -2px;
}
.password-gate__error.is-visible { opacity: 1; }

.password-gate__shake {
  animation: gateShake 0.4s var(--ease-out);
}
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.password-gate__divider {
  width: 40px;
  height: 1px;
  background: var(--gate-border);
  margin: 52px 0;
}
.password-gate__note {
  font-size: 12px;
  color: var(--gate-subtle);
  line-height: 1.65;
}
.password-gate__note a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  padding: 40px 52px;
  border-top: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: 12px;
  color: var(--text-subtle);
}
.footer__links {
  display: flex;
  gap: 36px;
}
.footer__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__link:hover { color: var(--accent); }

/* ── Misc ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container, .container--narrow { padding: 0 36px; }
  .nav { padding: 0 36px; }
  .hero { padding: 0 36px 72px; }
  .work__header { padding: 0 36px; }
  .work-item { padding: 36px; grid-template-columns: 56px 1fr 160px; }
  .footer { padding: 32px 36px; }
  .cs-overview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-grid__blob { filter: blur(60px); }

  .nav { padding: 0 24px; }
  .nav__links { display: none; } /* hidden; hamburger replaces */
  .nav__hamburger { display: flex; }

  .container, .container--narrow { padding: 0 24px; }

  .hero { padding: 0 24px 56px; }
  .hero__name { font-size: clamp(2rem, 9.5vw, 3rem); line-height: 1.08; }
  .hero__name-line { display: inline; overflow: visible; padding-bottom: 0; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero__scroll { display: none; }

  .work__header { padding: 0 24px; }
  .work-item {
    padding: 28px 24px;
  }
  .work-item__meta { display: none; }
  .work-item__thumb { display: none; }
  .work-item__title { font-size: clamp(24px, 6vw, 36px); }

  .about-hero { flex-direction: column; align-items: flex-start; gap: 40px; padding-bottom: 64px; }
  .about-grid { padding: 64px 0 100px; }
  .portrait-placeholder { aspect-ratio: 4/3; }

  .cs-overview { grid-template-columns: repeat(2, 1fr); padding: 32px 24px; gap: 28px; }
  .cs-hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 56px; }

  .metrics { padding: 40px 24px; }
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }

  .pull-quote { padding-left: 24px; }

  .next-project { flex-direction: column; align-items: flex-start; padding: 64px 0; }

  .footer { padding: 28px 24px; flex-direction: column; align-items: flex-start; }

  .img-grid, .img-grid--3 { grid-template-columns: 1fr; }
  .cs-section { margin-bottom: clamp(56px, 8vw, 80px); }
  .cs-overview { grid-template-columns: 1fr 1fr; }
  .steps { max-width: 100%; }
  .reflection { max-width: 100%; }
}

@media (max-width: 480px) {
  .metrics__grid { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 1fr; }
  .work-item__num { display: none; }
  .cs-overview { grid-template-columns: 1fr; }
  .about-detail { grid-template-columns: 1fr; gap: 4px; }
  .cs-hero__meta { gap: 24px; }
  .hero__meta { border-top: none; padding-top: 20px; }
}

/* ── Touch target minimum ─────────────────────────────────── */
@media (max-width: 768px) {
  .nav__link, .footer__link { min-height: 44px; display: flex; align-items: center; }
  .password-gate__input, .password-gate__submit { min-height: 52px; }
}
