/* ============================================================
   JOSE ROMERO DESIGN — MAIN STYLESHEET
   Design system v2.0 — Final approved direction
   
   Typography:  Fraunces (display) + Outfit (UI/body)
   Colours:     Amber-gold (interactive) + Teal (informational)
   Modes:       Dark default + Light mode via [data-theme="light"]
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS — DARK MODE (default)
   ------------------------------------------------------------ */
:root {
  /* Backgrounds */
  --bg-base:          #090908;
  --bg-surface:       #111110;
  --bg-surface-2:     #181816;
  --bg-hover:         #1E1E1B;

  /* Borders */
  --border-subtle:    #1E1E1B;
  --border-default:   #2A2A27;
  --border-strong:    #3A3A36;

  /* Text */
  --text-primary:     #F2EEE6;
  --text-secondary:   #D4CFC6;
  --text-tertiary:    #5C5955;
  --text-inverse:     #090908;

  /* Gold — amber, interactive elements only */
  --gold:             #E8955A;
  --gold-bright:      #F0A870;
  --gold-dim:         #9A5A28;
  --gold-tint:        rgba(232, 149, 90, 0.10);
  --gold-tint-strong: rgba(232, 149, 90, 0.18);

  /* Teal — informational / structural / decorative */
  --teal:             #4BBFB2;
  --teal-bright:      #6DD4C8;
  --teal-dim:         #2A7A72;
  --teal-tint:        rgba(75, 191, 178, 0.08);
  --teal-tint-strong: rgba(75, 191, 178, 0.15);
  --teal-text:        #66D4C8; /* text-on-dark: ~5.2:1 on bg-surface */

  /* Typography */
  --font-display:     'Fraunces', Georgia, serif;
  --font-body:        'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:        'DM Mono', 'Fira Code', monospace;

  /* Type scale — 16px base, 12px floor */
  --text-xs:    0.875rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   2rem;
  --text-4xl:   2.75rem;
  --text-5xl:   3.75rem;
  --text-6xl:   5.25rem;

  /* Spacing */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;
  --sp-24:  6rem;
  --sp-32:  8rem;
  --sp-40:  10rem;

  /* Layout */
  --max-width:   1200px;
  --gutter:      clamp(1.5rem, 5vw, 4rem);
  --nav-height:  72px;

  /* Radii */
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   12px;

  /* Transitions */
  --ease-fast:   180ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-base:   280ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   420ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ------------------------------------------------------------
   3. LIGHT MODE TOKENS
   ------------------------------------------------------------ */
[data-theme="light"] {
  --bg-base:          #F7F4EF;
  --bg-surface:       #EDEAE4;
  --bg-surface-2:     #E4E0D9;
  --bg-hover:         #DDD9D2;

  --border-subtle:    #DDD9D2;
  --border-default:   #C8C3BB;
  --border-strong:    #B0ABA2;

  --text-primary:     #1A1917;
  --text-secondary:   #2E2B28;
  --text-tertiary:    #8A8680;
  --text-inverse:     #F7F4EF;

  /* Gold — darker for contrast on light backgrounds */
  --gold:             #B85520;
  --gold-bright:      #D06030;
  --gold-dim:         #8A3E14;
  --gold-tint:        rgba(184, 85, 32, 0.08);
  --gold-tint-strong: rgba(184, 85, 32, 0.14);

  /* Teal — darker for contrast on light backgrounds */
  --teal:             #1F8A80;
  --teal-bright:      #2AA898;
  --teal-dim:         #145E58;
  --teal-tint:        rgba(31, 138, 128, 0.08);
  --teal-tint-strong: rgba(31, 138, 128, 0.14);
  --teal-text:        #0E5750; /* text-on-light: ~5.8:1 on bg-surface */
}

/* System preference fallback (no JS required) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-base:          #F7F4EF;
    --bg-surface:       #EDEAE4;
    --bg-surface-2:     #E4E0D9;
    --bg-hover:         #DDD9D2;
    --border-subtle:    #DDD9D2;
    --border-default:   #C8C3BB;
    --border-strong:    #B0ABA2;
    --text-primary:     #1A1917;
    --text-secondary:   #2E2B28;
    --text-tertiary:    #8A8680;
    --text-inverse:     #F7F4EF;
    --gold:             #B85520;
    --gold-bright:      #D06030;
    --gold-dim:         #8A3E14;
    --gold-tint:        rgba(184, 85, 32, 0.08);
    --gold-tint-strong: rgba(184, 85, 32, 0.14);
    --teal:             #1F8A80;
    --teal-bright:      #2AA898;
    --teal-dim:         #145E58;
    --teal-tint:        rgba(31, 138, 128, 0.08);
    --teal-tint-strong: rgba(31, 138, 128, 0.14);
    --teal-text:        #0E5750;
  }
}

/* ------------------------------------------------------------
   4. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--ease-base), color var(--ease-base);
}

/* Grain texture — dark mode only */
:root:not([data-theme="light"]) body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

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

::selection {
  background: var(--teal-tint-strong);
  color: var(--teal-bright);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-dim); }

/* ------------------------------------------------------------
   5. TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h5, h6 {
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

p + p { margin-top: var(--sp-4); }

strong { font-weight: 500; color: var(--text-primary); }

/* Italic accent in headlines — uses gold */
.accent-italic {
  font-style: italic;
  color: var(--gold);
}

/* Eyebrow label — teal, uppercase */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow::after {
  content: '';
  display: block;
  height: 1px;
  width: 36px;
  background: var(--teal-dim);
  flex-shrink: 0;
}

/* Eyebrow without line (for tight spaces) */
.eyebrow--bare::after { display: none; }

/* Body large */
.body-lg {
  font-size: var(--text-lg);
  line-height: 1.85;
}

/* Lead / intro paragraph */
.lead {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   6. LAYOUT
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 760px; }
.container--wide   { max-width: 1400px; }

.section {
  padding-block: clamp(var(--sp-12), 6vw, var(--sp-20));
}

.section--sm {
  padding-block: clamp(var(--sp-8), 4vw, var(--sp-12));
}

.section--hero {
  min-height: 100dvh;
  padding-top: calc(var(--nav-height) + clamp(3rem, 6vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 6rem);
}

.section--spacious {
  min-height: 70dvh;
  padding-block: clamp(5rem, 10vw, 8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.grid-2   { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--sp-6); }

.divider {
  width: 100%; height: 1px;
  background: var(--border-default);
  border: none;
}

.divider--teal {
  background: linear-gradient(90deg, var(--teal-dim) 0%, transparent 100%);
  height: 1px; border: none;
}

/* ------------------------------------------------------------
   7. NAVIGATION
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--ease-base);
}

/* Glass effect on pseudo-element so backdrop-filter doesn't create a
   containing block for position:fixed children (the mobile nav overlay) */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg-base) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: background var(--ease-base);
}

.nav.scrolled { border-bottom-color: var(--border-default); }
.nav.scrolled::before { background: color-mix(in srgb, var(--bg-base) 94%, transparent); }

/* Wordmark — full name italic in Fraunces */
.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  transition: color var(--ease-fast);
  letter-spacing: 0.01em;
}

.nav-logo .logo-surname {
  font-style: italic;
}

.nav-logo:hover { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color var(--ease-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--teal);
  transition: width var(--ease-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Contact CTA — gold, interactive */
.nav-cta {
  font-size: var(--text-sm) !important;
  font-weight: 500 !important;
  color: var(--gold) !important;
  border: 1.5px solid var(--gold-dim) !important;
  padding: var(--sp-2) var(--sp-5) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--gold-tint) !important;
  transition: background var(--ease-fast), border-color var(--ease-fast) !important;
  letter-spacing: 0.05em !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--gold-tint-strong) !important;
  border-color: var(--gold) !important;
  color: var(--gold-bright) !important;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  border: 1px solid var(--border-default);
  transition: color var(--ease-fast), border-color var(--ease-fast), background var(--ease-fast);
  font-size: var(--text-base);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--teal);
  border-color: var(--teal-dim);
  background: var(--teal-tint);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
}

.nav-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--text-primary);
  transition: transform var(--ease-base), opacity var(--ease-base);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0; bottom: 0;
    background: var(--bg-base);
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-8);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease-base);
    border-top: 1px solid var(--border-subtle);
  }

  .nav-links.open { opacity: 1; pointer-events: all; }

  .nav-links a {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
  }

  .nav-cta {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-family: var(--font-display) !important;
    font-size: var(--text-2xl) !important;
  }
}

/* ------------------------------------------------------------
   8. FOOTER
   ------------------------------------------------------------ */
.footer {
  padding-block: var(--sp-16) var(--sp-12);
  border-top: 1px solid var(--border-default);
  margin-top: var(--sp-32);
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-12);
  align-items: start;
  margin-bottom: var(--sp-12);
}

.footer-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.footer-name span { font-style: italic; }

.footer-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-end;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--ease-fast);
}

.footer-nav a:hover { color: var(--gold); }

.footer-copy {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-6);
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); }
}

/* ------------------------------------------------------------
   9. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all var(--ease-base);
  white-space: nowrap;
}

/* Primary — gold, interactive */
.btn-primary {
  border: 1.5px solid var(--gold-dim);
  color: var(--gold);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-sm);
  background: var(--gold-tint);
}

.btn-primary:hover {
  background: var(--gold-tint-strong);
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

/* Ghost — no border */
.btn-ghost {
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-ghost .arrow { transition: transform var(--ease-base); }

.btn-ghost:hover {
  color: var(--gold);
}

.btn-ghost:hover .arrow { transform: translateX(5px); }

/* ------------------------------------------------------------
   10. CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--ease-base), transform var(--ease-slow), box-shadow var(--ease-slow);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px var(--gold-tint);
}

.card:hover .arrow { color: var(--gold); }

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 0 0 1px var(--gold-tint-strong);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--bg-surface-2);
  container-type: inline-size;
}

.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}

.card:hover .card-image img { transform: scale(1.03); }

.card-body {
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

/* Tags — teal for informational labels */
.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: 2px;
  padding: 2px var(--sp-2);
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

.tag--teal {
  color: var(--teal-text);
  border-color: var(--teal-tint-strong);
  background: var(--teal-tint);
}

/* Gold tag — for interactive/current items */
.tag--gold {
  color: var(--gold);
  border-color: var(--gold-tint-strong);
  background: var(--gold-tint);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.card-summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
  flex: 1;
}

.card-footer {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-client {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------
   11. PROJECT COVER PLACEHOLDERS
   Concentric-circle system — measurements from Pencil spec (576×324 canvas)
   ------------------------------------------------------------ */
.cover-placeholder {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--bg-surface); /* #111110 — matches card bg */
}

.cover-visual {
  position: absolute;
  inset: 0;
  /* Scale from icon center (60px from left, 55px from bottom) */
  transform-origin: 60px calc(100% - 55px);
  scale: calc(100cqw / 576);
}

/* Circle center at (60, 269) in 576×324 card → left:-43px bottom:-48px */
.cover-visual::before {
  content: '';
  position: absolute;
  width: 206px; height: 206px;
  border-radius: 50%;
  background: var(--bg-surface-2); /* innermost: #181816 */
  left: -43px;
  bottom: -48px;
  box-shadow:
    0 0 0 85px  color-mix(in srgb, var(--teal) 20%, var(--bg-surface-2)), /* inner ring  #2a413f */
    0 0 0 188px color-mix(in srgb, var(--teal) 10%, var(--bg-surface-2)), /* middle ring #202f2d */
    0 0 0 290px color-mix(in srgb, var(--teal)  5%, var(--bg-surface));   /* outer ring  #192120 */
  pointer-events: none;
}

/* Icon centered at circle origin — left:33px bottom:28px at 576×324 */
.cover-icon {
  position: absolute;
  left: 33px;
  bottom: 28px;
  width: 54px; height: 54px;
  z-index: 1;
  stroke: var(--teal);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

/* Number — fixed at spec size (100px), scaled via container query */
.cover-number {
  position: absolute;
  top: 0;
  right: 24px;
  left: auto;
  transform: none;
  /* Scale from top-right corner, stays anchored to card's top-right */
  transform-origin: top right;
  scale: calc(100cqw / 576);
  font-family: var(--font-display);
  font-size: 6.25rem; /* 100px at spec — container query handles all scaling */
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  /* Subtler than before: mostly background, hint of foreground */
  color: color-mix(in srgb, var(--bg-surface-2) 75%, var(--text-primary));
  opacity: 1;
  pointer-events: none;
  user-select: none;
}

/* Hero stats strip — persistent glass treatment */
.hero-stats {
  border-top: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  padding: var(--sp-8) 0;
  margin-top: auto;
}

/* ------------------------------------------------------------
   12. STATS / METRICS
   ------------------------------------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-3);
}

.stat-item {
  padding: clamp(var(--sp-5), 3vw, var(--sp-8)) var(--sp-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  transition: border-color var(--ease-base), transform var(--ease-slow);
}

.stat-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Stat values — teal (informational) */
.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 300;
  color: var(--teal);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   13. PULL QUOTE
   ------------------------------------------------------------ */
.pull-quote {
  padding: var(--sp-6) var(--sp-8);
  border-left: 2px solid var(--gold);
  margin-block: var(--sp-10);
  background: var(--gold-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ------------------------------------------------------------
   14. SECTION HEADER
   ------------------------------------------------------------ */
.section-header { margin-bottom: clamp(var(--sp-10), 5vw, var(--sp-16)); }
.section-header .eyebrow { margin-bottom: var(--sp-4); }
.section-header h2 { font-family: var(--font-display); font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); font-weight: 400; }
.section-header p { margin-top: var(--sp-5); max-width: 52ch; font-size: var(--text-lg); }

/* ------------------------------------------------------------
   15. HOMEPAGE HERO
   ------------------------------------------------------------ */
.home-hero {
  min-height: 100svh; /* excludes mobile browser chrome */
  min-height: 100vh;  /* fallback for older browsers */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* nav clearance + 80px breathing room above eyebrow */
  padding-top: calc(var(--nav-height) + var(--sp-20));
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

/* 80px breathing room between last button and stats strip */
.home-hero > .container {
  padding-bottom: var(--sp-20);
}

/* Teal architectural grid — right half */
.home-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%; height: 100%;
  background-image:
    linear-gradient(var(--teal-tint) 1px, transparent 1px),
    linear-gradient(90deg, var(--teal-tint) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(135deg, transparent 25%, rgba(0,0,0,0.5) 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(135deg, transparent 25%, rgba(0,0,0,0.5) 65%, transparent 100%);
  pointer-events: none;
}

/* Ambient teal glow */
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, var(--teal-tint) 0%, transparent 60%);
  pointer-events: none;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--sp-8);
}

.hero-headline em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  max-width: 52ch;
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-10);
  font-weight: 300;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: var(--sp-8); right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0.35;
}

.hero-scroll span {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  writing-mode: vertical-rl;
}

.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--teal-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ------------------------------------------------------------
   16. WORK INDEX PAGE
   ------------------------------------------------------------ */
.work-list { display: flex; flex-direction: column; gap: 2px; }

.work-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  transition: border-color var(--ease-base), background var(--ease-base), transform var(--ease-slow);
  cursor: pointer;
}

.work-list-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.work-list-item:hover .wli-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.wli-client {
  font-size: var(--text-xs);
  color: var(--teal-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
  font-weight: 600;
}

.wli-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  font-weight: 400;
}

.wli-tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.wli-arrow {
  color: var(--text-tertiary);
  font-size: var(--text-xl);
  transition: color var(--ease-base), transform var(--ease-slow);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   17. CASE STUDY PAGES
   ------------------------------------------------------------ */
.breadcrumb {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.breadcrumb a { color: var(--text-tertiary); transition: color var(--ease-fast); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--text-secondary); }

.cs-hero {
  padding-top: calc(var(--nav-height) + var(--sp-16));
  padding-bottom: var(--sp-16);
}

.cs-details-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  margin-block: var(--sp-10);
}

.cs-detail { display: flex; flex-direction: column; gap: var(--sp-1); }

.cs-detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--teal-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cs-detail-value {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 400;
}

.cs-cover {
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: var(--sp-16);
  border: 1px solid var(--border-default);
}

.cs-section {
  padding-block: var(--sp-12);
  border-top: 1px solid var(--border-subtle);
}

.cs-section .eyebrow { margin-bottom: var(--sp-4); }

.cs-section h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--sp-6);
}

/* Next project link */
.next-project {
  margin-top: var(--sp-24);
  padding: var(--sp-10) var(--sp-8);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--ease-base), transform var(--ease-slow);
}

.next-project:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.next-project:hover .arrow { color: var(--gold); }

.next-project-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.next-project-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   18. THINKING PAGE
   ------------------------------------------------------------ */
.thinking-piece {
  padding-block: var(--sp-16);
  border-top: 1px solid var(--border-default);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.thinking-number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 300;
  font-style: italic;
  color: var(--border-strong);
  line-height: 1;
  padding-top: var(--sp-3);
}

.thinking-piece h2 {
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: 300;
  margin-bottom: var(--sp-6);
  line-height: 1.2;
}

.thinking-piece p {
  font-size: var(--text-lg);
  line-height: 1.85;
  margin-bottom: var(--sp-4);
}

@media (max-width: 768px) {
  .thinking-piece { grid-template-columns: 1fr; gap: var(--sp-4); }
  .thinking-number { font-size: var(--text-3xl); }
}

/* ------------------------------------------------------------
   19. ABOUT PAGE
   ------------------------------------------------------------ */
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(var(--sp-12), 6vw, var(--sp-24));
  align-items: start;
  padding-top: calc(var(--nav-height) + var(--sp-16));
  padding-bottom: var(--sp-16);
}

.portrait-frame {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  position: relative;
}

/* Portrait placeholder — teal tinted */
.portrait-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--teal) 8%, var(--bg-surface-2)) 0%,
    var(--bg-surface-2) 100%);
  display: flex; align-items: center; justify-content: center;
}

.portrait-placeholder::before {
  content: '';
  position: absolute; inset: 20%;
  border: 1px solid var(--teal-tint-strong);
  border-radius: 50%;
}

.portrait-caption {
  margin-top: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
  letter-spacing: 0.06em;
}

.role-block {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-10);
}

.role-meta { padding-top: var(--sp-1); }

.role-company {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.role-period {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-top: var(--sp-1);
}

.role-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--teal-dim);
  margin-top: var(--sp-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-location {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--sp-2);
}

.role-body p {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-secondary);
}

.role-body p + p { margin-top: var(--sp-3); }

.role-sub-project {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: 2px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.role-sub-project h6 {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--teal);
  margin-bottom: var(--sp-3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.skill-item {
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--ease-base);
}

.skill-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.skill-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.skill-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 900px) {
  .about-intro-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
  .role-block { grid-template-columns: 1fr; gap: var(--sp-4); }
}

/* ------------------------------------------------------------
   20. SCROLL REVEAL ANIMATIONS
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-animate { animation: fadeUp 0.8s ease forwards; opacity: 0; }
.hero-animate:nth-child(1) { animation-delay: 0.10s; }
.hero-animate:nth-child(2) { animation-delay: 0.22s; }
.hero-animate:nth-child(3) { animation-delay: 0.36s; }
.hero-animate:nth-child(4) { animation-delay: 0.50s; }
.hero-animate:nth-child(5) { animation-delay: 0.64s; }

/* ------------------------------------------------------------
   21. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .cs-details-bar { gap: var(--sp-4); }
  .hero-headline { font-size: clamp(2.75rem, 11vw, 4rem); }
  .work-list-item { grid-template-columns: 1fr; }
  .wli-arrow { display: none; }
}

@media (max-width: 480px) {
  :root { --gutter: 1.25rem; }
}

/* ------------------------------------------------------------
   22. ACCESSIBILITY
   ------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------
   23. EXPERIENCE LIST STYLES
   ------------------------------------------------------------ */
.role-body ul, .role-sub-project ul {
  list-style-type: disc;
  padding-left: var(--sp-5);
  margin-bottom: var(--sp-3);
}

.role-body li, .role-sub-project li {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--sp-2);
}

.role-tools {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-2);
}

/* ------------------------------------------------------------
   24. LUCIDE ICONS
   ------------------------------------------------------------ */
.icon {
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
  vertical-align: -0.125em;
  display: inline-block;
  flex-shrink: 0;
}

.icon--xs {
  width: 0.75em;
  height: 0.75em;
  stroke-width: 1.5;
  vertical-align: -0.05em;
}

/* ------------------------------------------------------------
   26. WORK INDEX PAGE — work.html
   ------------------------------------------------------------ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(300px, 30vw, 400px), 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-16);
}

.work-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease-base), transform var(--ease-slow), box-shadow var(--ease-slow);
}

.work-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.work-card:hover .arrow { color: var(--gold); }

[data-theme="light"] .work-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}

.work-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  position: relative;
  overflow: hidden;
  container-type: inline-size;
}

.work-card-content {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.work-card-tags {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

.work-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.25;
}

.work-card-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  flex: 1;
}

/* Shorter engagements grid */
.short-engagements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.short-card {
  padding: var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--ease-base), transform var(--ease-slow);
}

.short-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.short-card-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.short-card-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA section (work.html, about.html, thinking.html) */
.cta-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(var(--sp-10), 5vw, var(--sp-16)) clamp(var(--sp-8), 4vw, var(--sp-16));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.cta-section h2 {
  font-size: clamp(var(--text-xl), 3.5vw, var(--text-3xl));
  max-width: 24ch;
}

.cta-section h2 em {
  font-style: italic;
  color: var(--gold);
}

.cta-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .cta-section { flex-direction: column; align-items: flex-start; }
}

/* Work card footer — mirrors .card-footer */
.work-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.work-card-client {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

/* Arrow spans in buttons and CTAs */
.arrow { display: inline-flex; align-items: center; margin-left: var(--sp-1); }

/* ------------------------------------------------------------
   27. THINKING PAGE
   ------------------------------------------------------------ */
.article-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-12);
}

.article-toc a {
  font-size: var(--text-xs);
  color: var(--teal-text);
  border: 1px solid var(--teal-tint-strong);
  background: var(--teal-tint);
  border-radius: 2px;
  padding: var(--sp-2) var(--sp-3);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background var(--ease-fast), border-color var(--ease-fast);
}

.article-toc a:hover {
  background: var(--teal-tint-strong);
  border-color: var(--teal-dim);
}

.article-block {
  max-width: 720px;
  margin: 0 auto clamp(var(--sp-12), 10vw, var(--sp-24));
  border-left: 2px solid var(--border-default);
  padding-left: clamp(var(--sp-4), 4vw, var(--sp-8));
  transition: border-color var(--ease-base);
}

.article-block:hover {
  border-left-color: var(--gold);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
  line-height: 1.25;
}

.article-body p {
  margin-bottom: var(--sp-4);
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-body p:last-child {
  margin-bottom: 0;
}

.update-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-8);
  max-width: 720px;
  margin: 0 auto;
}

/* ------------------------------------------------------------
   25. PRINT
   ------------------------------------------------------------ */
@media print {
  .nav, .footer, .hero-scroll, .theme-toggle { display: none; }
  body { background: white; color: black; }
}
