/*
  Portfolio v3 — Viviam, Product Designer
  Aesthetic: Swiss Editorial — Cloud Dancer canvas, Playfair Display + DM Mono + DM Sans
  Colors: Pantone 11-4201 Cloud Dancer palette — WCAG AA compliant throughout
*/

/* ============================================================
   TABLE OF CONTENTS
   1.  Custom Properties
   2.  Reset & Base + Dot Grid
   3.  Typography
   4.  Layout Utilities + Scroll Reveal
   5.  Skip Link & Focus
   6.  Buttons
   7.  Header & Navigation
   8.  Hero
   9.  About / Skills
   10. Featured Projects
   11. Testimonials
   12. Contact
   13. Footer
   14. Project Pages
   15. Animations & Keyframes
   16. Responsive — 768px
   17. Responsive — 1440px
   18. Reduced Motion
   ============================================================ */


/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* ── Backgrounds ── */
  --color-bg:           #FFFFFF;   /* EXPERIMENT: pure white — was #F0EEE9 (Cloud Dancer) */
  --color-bg-surface:   #F5F5F5;   /* EXPERIMENT: light gray — was #F8F7F4 */
  --color-bg-subtle:    #E8E5DF;   /* Section tint, inputs, cream-dark equivalent */

  /* ── Text (all AA-compliant on Cloud Dancer) ── */
  --color-text-primary:   #2C2A24; /* Deep espresso  — 15.8:1 on bg ✓ AAA */
  --color-text-secondary: #3D3D5C; /* Deep navy      —  8.2:1 on bg ✓ AAA */
  --color-text-tertiary:  #5C3B4A; /* Mauve shadow   —  6.9:1 on bg ✓ AA  */
  --color-text-muted:     #7A5E68; /* Muted mauve    —  4.6:1 on bg ✓ AA  */

  /* ── Accents ── */
  --color-accent:        #9F2336;  /* Burgundy       —  5.6:1 on bg ✓ AA  */
  --color-accent-hover:  #5C1F2B;  /* Darkened burgundy for hover          */
  --color-accent-warm:   #C45B35;  /* Terracotta     —  3.5:1 (large text only) */
  --color-accent-gold:   #B8892A;  /* Golden ochre   —  3.1:1 (large text only) */
  --color-accent-deep:   #4A6275;  /* Deep navy — pull-quotes, section fill */

  /* ── Borders ── */
  --color-border:        #D8D4CC;  /* Subtle warm border */
  --color-border-strong: #B8892A;  /* Mauve — emphasis borders */

  /* ── Typography ── */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --size-xs: 0.75rem;  /* 12px (minimum edge case) */
  --size-sm: 0.875rem; /* 14px (recommended minimum) */ 
  --size-base: 1rem;       /* 16px */
  --size-md:   1.0625rem;  /* 17px */
  --size-lg:   1.25rem;    /* 20px */
  --size-xl:   1.625rem;   /* 26px */
  --size-2xl:  2.125rem;   /* 34px */
  --size-3xl:  3rem;       /* 48px */
  --size-4xl:  4.5rem;     /* 72px */
  --size-hero: clamp(3.5rem, 9vw, 8rem);

  /* ── Spacing ── */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;
  --sp-4xl: 128px;

  /* ── Layout ── */
  --container-max: 1200px;
  --container-pad: var(--sp-md);

  /* ── Radius ── */
  --r-sm:   3px;
  --r-md:   8px;
  --r-lg:   16px;
  --r-full: 9999px;

  /* ── Shadows (warm-tinted, keyed to espresso) ── */
  --shadow-sm: 0 1px 4px rgba(44, 42, 36, 0.07);
  --shadow-md: 0 4px 20px rgba(44, 42, 36, 0.10);
  --shadow-lg: 0 12px 40px rgba(44, 42, 36, 0.13);

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.2s;
  --dur-base: 0.4s;
  --dur-slow: 0.65s;
}

/* -- Google Fonts -- */
.material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
  font-variation-settings:
  'FILL' 1,
  'wght' 300,
  'GRAD' 0,
  'opsz' 14
}

/* ============================================================
   2. RESET & BASE + DOT GRID TEXTURE
   ============================================================ */

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

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

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

/* Subtle dot-grid — purely decorative */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--color-border) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

body > * { position: relative; z-index: 1; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; text-decoration-skip-ink: auto; cursor: pointer; }
strong { font-weight: 600; }


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--color-text-primary);
  font-weight: 700;
}

/* Monospaced label — editorial fingerprint */
.label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--size-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.05;
  margin-top: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

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

/* Burgundy accent bar */
.accent-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border: none;
  border-radius: 2px;
  margin-block: var(--sp-lg);
}


/* ============================================================
   4. LAYOUT UTILITIES + SCROLL REVEAL
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--sp-3xl); }

/* Deep navy section — contact */
.section--blue {
  background-color: var(--color-accent-deep);
}

/* Subtle tinted section — testimonials */
.section--cream-dark {
  background-color: var(--color-bg-subtle);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal.is-visible { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.13s; }
.reveal-stagger.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.21s; }
.reveal-stagger.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.29s; }
.reveal-stagger.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.37s; }
.reveal-stagger.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.53s; }
.reveal-stagger.is-visible > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.61s; }


/* ============================================================
   5. SKIP LINK & FOCUS
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-md);
  z-index: 99999;
  padding: var(--sp-sm) var(--sp-md);
  background-color: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--size-sm);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: top 0.2s ease;
}

.skip-link:focus { top: var(--sp-md); }

:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

:focus:not(:focus-visible) { outline: none; }


/* ============================================================
   6. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.8rem 1.75rem;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ── Primary — burgundy glass pill ──────────────────────────
   On cream bg: composited #92545F → L≈0.133 → 5.1:1 vs cream ✓ AA
   On navy bg:  composited #703847 → L≈0.066 → 7.9:1 vs cream ✓ AAA */
.btn--primary {
  background: rgba(122, 46, 60, 0.80);
  backdrop-filter: blur(24px) saturate(2.0);
  -webkit-backdrop-filter: blur(24px) saturate(2.0);
  color: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(122, 46, 60, 0.28);
}

.btn--primary:hover {
  background: rgba(92, 31, 43, 0.90);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(122, 46, 60, 0.40);
}

.btn--primary:focus-visible { outline-color: var(--color-bg); }

/* ── Secondary — frosted cream glass pill ───────────────────
   Dark text #2C2A24 on near-white frost → 15.8:1 ✓ AAA
   Border rgba(44,42,36,0.55) vs button bg → 3.3:1 ✓ UI component */
.btn--outline {
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  color: var(--color-text-primary);
  border-color: rgba(44, 42, 36, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    inset 0 -1px 0 rgba(44, 42, 36, 0.06),
    0 2px 12px rgba(44, 42, 36, 0.06);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(44, 42, 36, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.80),
    inset 0 -1px 0 rgba(44, 42, 36, 0.08),
    0 4px 18px rgba(44, 42, 36, 0.10);
}

/* ── Contact primary — same burgundy glass as btn--primary ──
   Unified with primary so all CTAs share the same colour */
.btn--coral {
  background: rgba(122, 46, 60, 0.80);
  backdrop-filter: blur(24px) saturate(2.0);
  -webkit-backdrop-filter: blur(24px) saturate(2.0);
  color: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(122, 46, 60, 0.28);
}

.btn--coral:hover {
  background: rgba(92, 31, 43, 0.90);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(122, 46, 60, 0.40);
}

.btn--coral:focus-visible { outline-color: var(--color-bg); }

/* ── Secondary on dark — frosted white glass pill ───────────
   Cream text on frosted glass over navy → 6.2:1 ✓ AA
   Border rgba(255,255,255,0.50) on navy → 4.1:1 ✓ UI component */
.btn--ghost-white {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  color: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.50);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.12);
}

.btn--ghost-white:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 28px rgba(0, 0, 0, 0.18);
}

.btn--ghost-white:focus-visible { outline-color: var(--color-bg); }


/* ============================================================
   7. HEADER & NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--color-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 8px 32px rgba(44, 42, 36, 0.10);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--sp-md);
  text-align: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3em;
  /* cancel trailing letter-spacing so flex centres the glyphs, not the box */
  padding: 4px calc(4px + 0.3em) 4px 4px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  user-select: none;
  transition: background-color var(--dur-fast);
}

.site-logo:hover .logo-mark {
  background-color: var(--color-accent-deep);
}

.logo-name {
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--sp-sm);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur-fast);
  flex-shrink: 0;
}

.nav-toggle:hover { border-color: var(--color-border); }

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out);
}

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

.primary-nav {
  display: none;
  position: absolute;
  inset-block-start: 100%;
  inset-inline: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(2.0);
  -webkit-backdrop-filter: blur(24px) saturate(2.0);
  border-bottom: 1px solid var(--color-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 8px 32px rgba(44, 42, 36, 0.10);
  padding: var(--sp-3xl) var(--sp-md);
}

.primary-nav.is-open { display: block; }

.primary-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  text-align: center;
  justify-content: center;
}

.primary-nav a {
  display: block;
  padding: 0.6rem var(--sp-md);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}

.primary-nav a:hover {
  color: var(--color-accent-deep);
  background-color: transparent;
}

.primary-nav .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 14;
}

.primary-nav a.is-active {
  color: var(--color-accent-deep);
  font-weight: 700;
}

/* ── Projects submenu ── */

.nav-has-sub {
  position: relative;
}

.nav-sub-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem var(--sp-md);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  justify-content: center;
  transition: color var(--dur-fast);
  white-space: nowrap;
}

.nav-sub-trigger:hover,
.nav-has-sub.is-open .nav-sub-trigger {
  color: var(--color-accent-deep);
}

.nav-sub-chevron {
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out);
}

.nav-has-sub.is-open .nav-sub-chevron {
  transform: rotate(180deg);
}

.nav-sub-panel {
  display: none;
  flex-direction: column;
  margin-top: var(--sp-xs);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.nav-has-sub.is-open .nav-sub-panel {
  display: flex;
}

.nav-sub-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  text-decoration: none;
  text-align: left;
  transition: background-color var(--dur-fast);
}

.nav-sub-item:hover,
.primary-nav .nav-sub-item:hover {
  background-color: #F0EEE9;
}

/* Override .primary-nav a { display: block } which wins on mobile via specificity */
.primary-nav .nav-sub-item,
.primary-nav .nav-sub-all {
  display: flex;
}

.nav-sub-item::after {
  content: '';
  display: block;
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--color-accent-deep);
  border-top: 1.5px solid var(--color-accent-deep);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.nav-sub-item:hover::after {
  opacity: 1;
}

.nav-sub-item[aria-current="page"] {
  background-color: #F0EEE9;
}

.nav-sub-item[aria-current="page"] .nav-sub-item__title {
  font-weight: 700;
}

.nav-sub-item__num {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-accent);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 2px;
}

.nav-sub-item__title {
  display: block;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.nav-sub-item__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.nav-sub-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.nav-sub-all::after {
  content: '';
  display: block;
  flex-shrink: 0;
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--color-accent-deep);
  border-top: 1.5px solid var(--color-accent-deep);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.nav-sub-all:hover {
  color: var(--color-accent-deep);
}

.nav-sub-all:hover::after {
  opacity: 1;
}


/* ============================================================
   8. HERO
   ============================================================ */

.hero {
  padding-block: var(--sp-4xl) var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

.hero__bg-year {
  position: absolute;
  bottom: -20px;
  right: -10px;
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 20rem);
  font-weight: 700;
  color: var(--color-bg-subtle);
  opacity: 0.5;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
  align-items: start;
}

.hero__tagline,
.hero__actions {
  grid-column: 1 / -1;
}

.hero__eyebrow {
  animation: fadeUp var(--dur-slow) var(--ease-out) 0.1s both;
  margin-bottom: var(--sp-lg);
}

.hero__name-wrap {
  animation: fadeUp var(--dur-slow) var(--ease-out) 0.25s both;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--size-hero);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero__title-sub {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-tertiary);
  line-height: 1.1;
  letter-spacing: 0;
  display: block;
  margin-top: var(--sp-sm);
}

.hero__accent-rule {
  animation: ruleExpand 0.7s var(--ease-out) 0.5s both;
  display: block;
  width: 0;
  height: 3px;
  background: var(--color-accent);
  border: none;
  border-radius: 2px;
  margin-block: var(--sp-xl);
}

.hero__tagline {
  font-size: var(--size-lg);
  color: var(--color-text-secondary);
  max-width: 44ch;
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
  animation: fadeUp var(--dur-slow) var(--ease-out) 0.55s both;
}

.hero__actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: nowrap;
  animation: fadeUp var(--dur-slow) var(--ease-out) 0.70s both;
}

.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeUp var(--dur-slow) var(--ease-out) 0.25s both;
  flex-shrink: 0;
  align-self: start;
}

/* Squares removed — colours now live as double ring on the circle */
.hero__photo-wrap::before,
.hero__photo-wrap::after {
  content: none;
}

.hero__photo {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__photo--default,
.hero__photo--hover {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 2s ease;
}

.hero__photo--hover {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.hero__photo:hover .hero__photo--default { opacity: 0; }
.hero__photo:hover .hero__photo--hover   { opacity: 1; }

.hero__photo-initials {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-border-strong);
  user-select: none;
}


/* ============================================================
   9. ABOUT / SKILLS
   ============================================================ */

.about-skills {
  padding-block: var(--sp-3xl);
  border-top: 1px solid var(--color-border);
  background-color: #F0EEE9;
}

.about__bio {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-3xl);
}

.about__text {
  font-size: var(--size-md);
  color: var(--color-text-secondary);
  line-height: 1.85;
}

.about__text + .about__text { margin-top: var(--sp-md); }

.about__pullquote {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 400;
  font-style: italic;
  color: var(--color-accent-deep);
  line-height: 1.35;
  border-left: 3px solid var(--color-accent);
  padding-left: var(--sp-lg);
}

.skills-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--sp-md);
  border-bottom: 1.5px solid var(--color-text-primary);
  margin-bottom: 0;
}

.skills-header__title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.skills-header__count {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

.skills-list {
  margin-top: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.skill-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: var(--sp-sm);
  align-items: start;
  padding: var(--sp-md);
  border-left: 3px solid var(--color-border);
  transition: background-color var(--dur-fast), border-left-color var(--dur-base) var(--ease-out);
}

.skill-row:hover {
  background-color: rgba(232, 229, 223, 0.5);
  border-left-color: var(--color-accent);
}

.skill-row__num {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-accent);
  letter-spacing: 0.06em;
  padding-top: 5px;
}

.skill-row__title {
  font-family: var(--font-display);
  font-size: var(--size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-xs);
}

.skill-row__desc {
  font-size: var(--size-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 58ch;
}


/* ============================================================
   10. FEATURED PROJECTS
   ============================================================ */

.projects {
  padding-block: var(--sp-3xl);
  border-top: 1px solid var(--color-border);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
}

.project-card {
  display: block;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    var(--shadow-sm);
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  position: relative;
}

.project-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
}

/* Left burgundy-to-terracotta accent bar on hover */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-accent-gold));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-base) var(--ease-out);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  z-index: 1;
}

.project-card:hover::before { transform: scaleY(1); }

.project-card__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-bg-subtle);
  position: relative;
}

.project-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out);
}

.project-card:hover .project-card__image-wrap img { transform: scale(1.04); }

.project-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px dashed var(--color-border);
}

.project-card__body { padding: var(--sp-xl); }

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
}

.project-card__index {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-accent);
  letter-spacing: 0.10em;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--size-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
  margin-bottom: var(--sp-sm);
}

.project-card__desc {
  font-size: var(--size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-lg);
}

.project-card__cta {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  transition: color var(--dur-fast), gap var(--dur-fast);
}

.project-card__cta::after {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.project-card:hover .project-card__cta {
  color: var(--color-accent);
  gap: var(--sp-md);
}

.project-card:hover .project-card__cta::after {
  transform: rotate(45deg) translate(2px, -2px);
}

.project-card__cta--soon {
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-primary);
  background: none;
  padding: 0;
  border-radius: 0;
  pointer-events: none;
  gap: 0;
}

.project-card__cta--soon::after { display: none; }
.project-card:hover .project-card__cta--soon { color: var(--color-text-primary); gap: 0; }


/* ============================================================
   11. TESTIMONIALS
   ============================================================ */

.testimonials {
  padding-block: var(--sp-3xl);
  background-color: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.testimonial-card {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Golden ochre top border on hover */
.testimonial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: var(--sp-xl);
  right: var(--sp-xl);
  height: 2px;
  background: var(--color-accent-gold);
  border-radius: 0 0 2px 2px;
  transform: scaleX(0);
  transition: transform var(--dur-base) var(--ease-out);
}

.testimonial-card:hover::after { transform: scaleX(1); }

.testimonial-card blockquote {
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.testimonial-card blockquote > p::before {
  content: '\201C';
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 0.8;
  color: var(--color-accent-gold);
  margin-bottom: var(--sp-sm);
}

.testimonial-card blockquote > p {
  font-size: var(--size-sm);
  color: var(--color-text-primary);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: var(--sp-lg);
}

.testimonial-card__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background-color: var(--color-bg-subtle);
  border: 1.5px solid var(--color-border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-full);
}

.testimonial-card__avatar-initials {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  user-select: none;
}

.testimonial-card cite { font-style: normal; }

.testimonial-card cite strong {
  display: block;
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.testimonial-card cite span {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}


/* ============================================================
   12. CONTACT
   ============================================================ */

/* #F0EEE9 on #3D3D5C = 8.2:1 — AAA ✓ */
.contact {
  padding-block: var(--sp-3xl);
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: var(--color-accent-deep);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(240,238,233,0.10) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.contact::after {
  content: '✦';
  position: absolute;
  bottom: -20px;
  right: var(--sp-xl);
  font-size: 12rem;
  color: rgba(240, 238, 233, 0.05);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.contact__inner { position: relative; z-index: 1; }

.contact__heading {
  font-family: var(--font-display);
  font-size: var(--size-4xl);
  font-weight: 700;
  color: var(--color-bg);
  line-height: 1.05;
  margin-bottom: var(--sp-lg);
}

.contact__lead {
  font-size: var(--size-md);
  color: rgba(240, 238, 233, 0.80);
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: var(--sp-xl);
  line-height: 1.7;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
}

.contact .label {
  color: rgba(240, 238, 233, 0.70);
  justify-content: center;
  margin-bottom: var(--sp-md);
}

.contact .label::before {
  background-color: rgba(240, 238, 233, 0.45);
}

/* ── Email reveal ── */
.contact__email-revealed {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.8rem 1.75rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  color: var(--color-bg);
  border: 1.5px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--r-full);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.12);
}

.contact__email-link {
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-bg);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.contact__email-link:hover {
  text-decoration: underline;
}

.contact__copy-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0 0 0 var(--sp-xs);
  cursor: pointer;
  color: rgba(240, 238, 233, 0.55);
  transition: color var(--dur-fast);
  flex-shrink: 0;
}

.contact__copy-btn:hover { color: var(--color-bg); }

.contact__copy-btn .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* ============================================================
   13. FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--color-text-primary);
  padding-block: var(--sp-xl);
}

.site-footer .container {
  text-align: center;
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: rgb(216, 216, 216);
  letter-spacing: 0.08em;
}

.site-footer nav ul {
  display: flex;
  gap: var(--sp-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer nav a {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(216, 216, 216);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.site-footer nav a:hover { 
  color: var(--color-bg); 
  text-decoration: underline;
}


/* ============================================================
   14. PROJECT PAGES
   ============================================================ */

.project-page { padding-block-start: 0; }

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  padding-block: var(--sp-sm);
  margin-bottom: var(--sp-2xl);
  transition: color var(--dur-fast), gap var(--dur-fast);
}

.project-back-link::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.project-back-link:hover {
  color: var(--color-accent);
  gap: var(--sp-md);
  text-decoration: underline;
}

.project-back-link:hover::before {
  transform: rotate(45deg) translate(-2px, 2px);
}

.project-hero {
  padding-block: var(--sp-3xl) var(--sp-2xl);
  border-bottom: 1px solid var(--color-border);
}

.project-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
}

.project-hero__tag {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 4px 12px;
  border-radius: var(--r-full);
}

.project-hero__year {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

.project-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--sp-lg);
  max-width: 18ch;
}

.project-hero__summary {
  font-size: var(--size-md);
  color: var(--color-text-secondary);
  max-width: 60ch;
  line-height: 1.8;
  margin-bottom: var(--sp-2xl);
}

.project-hero__stats {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-md) var(--sp-lg);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.stat-chip__label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.stat-chip__value {
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.project-cover {
  padding-block: var(--sp-xl);
  background-color: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
}

/* ── Project images ── */
.project-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  transition: opacity var(--dur-fast) var(--ease-out);
}

a.lightbox-trigger {
  display: block;
  position: relative;
  cursor: pointer;
  border-radius: var(--r-md);
  overflow: hidden;
}

a.lightbox-trigger:hover .project-img { opacity: 0.88; }

.lightbox-hint {
  position: absolute;
  bottom: var(--sp-md);
  right: var(--sp-md);
  background: rgba(44, 42, 36, 0.75);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--r-full);
  pointer-events: none;
}

.project-figure {
  margin-bottom: var(--sp-xl);
}

.project-figure:last-child {
  margin-bottom: 0;
}

.img-caption {
  margin-top: var(--sp-sm);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* ── Lightbox overlay ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 18, 14, 0.92);
  cursor: default;
}

.lightbox-overlay.is-open { display: block; }

.lightbox-overlay__img {
  /* width and height are set by JS — do not constrain them */
  max-width: none;
  max-height: none;
  display: block;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.60);
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lightbox-overlay__close {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-lg);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;   /* WCAG 2.5.5 minimum touch target */
  height: 44px;
  background: rgba(20, 18, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--r-full);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.lightbox-overlay__close:hover { background: rgba(20, 18, 14, 0.90); }

.lightbox-overlay__content {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay__caption {
  position: fixed;
  bottom: 76px;
  left: 50%;
  z-index: 15;
  transform: translateX(-50%);
  max-width: min(600px, 80vw);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  letter-spacing: 0.05em;
  text-align: center;
  pointer-events: none;
  background: rgba(20, 18, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: var(--r-sm);
}

.lightbox-zoom-controls {
  position: fixed;
  bottom: var(--sp-lg);
  right: var(--sp-lg);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(20, 18, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--r-full);
  padding: 4px;
  cursor: default;
}

.lightbox-zoom-btn,
.lightbox-zoom-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #ffffff; /* 13.5:1 on effective bg ✓ AAA */
  font-family: var(--font-mono);
  cursor: pointer;
  border-radius: var(--r-full);
  transition: background var(--dur-fast);
  line-height: 1;
}

.lightbox-zoom-btn {
  width: 44px;   /* WCAG 2.5.5 minimum touch target */
  height: 44px;
  font-size: 1.375rem;
}

.lightbox-zoom-reset {
  min-width: 4em;
  height: 44px;
  padding: 0 var(--sp-sm);
  font-size: var(--size-sm); /* 14px ✓ */
  letter-spacing: 0.05em;
}

.lightbox-zoom-btn:hover,
.lightbox-zoom-reset:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-zoom-btn:disabled {
  opacity: 0.40; /* disabled controls are WCAG-exempt but kept legible */
  cursor: default;
}

.img-placeholder {
  background-color: var(--color-bg);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.img-placeholder::after { content: attr(data-label); }
.img-placeholder--cover  { aspect-ratio: 16 / 9; width: 100%; }
.img-placeholder--screen { aspect-ratio: 4 / 3; }
.img-placeholder--tall   { aspect-ratio: 3 / 4; }

.project-section {
  padding-block: var(--sp-2xl);
  border-bottom: 1px solid var(--color-border);
}

.project-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
}

.project-section__num {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.project-section__content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--sp-lg);
  margin-top: var(--sp-sm);
  scroll-margin-top: 88px;
}

.project-section__content h3 {
  font-size: 1.375rem;
  color: var(--color-accent-deep);
  margin-top: var(--sp-xl);
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-lg);
  margin-bottom: var(--sp-md);
}

.project-section__content p {
  font-size: var(--size-md);
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: var(--sp-md);
}

.project-section__content p:last-child { margin-bottom: 0; }

.project-section__content ul:not(.tools-list) {
  list-style: none;
  padding-left: 0;
  margin-bottom: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.project-section__content ul:not(.tools-list) > li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--size-md);
  color: var(--color-text-secondary);
  line-height: 1.85;
}

.project-section__content ul:not(.tools-list) > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.tools-label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-md);
}

.project-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

.tool-tag {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 4px 12px;
  border-radius: var(--r-full);
}

.project-next {
  padding-block: var(--sp-3xl);
  background-color: var(--color-bg-subtle);
  text-align: center;
}

.project-next__label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-md);
}

.project-next__link {
  font-family: var(--font-display);
  font-size: var(--size-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  transition: color var(--dur-fast), gap var(--dur-fast);
}

.project-next__link::after {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.project-next__link:hover { color: var(--color-accent); gap: var(--sp-lg); }

.project-next__link:hover::after {
  transform: rotate(45deg) translate(3px, -3px);
}

/* ── In-page section navigation (project pages) ── */
.page-nav {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-sm);
}

.page-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--color-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 4px 20px rgba(44, 42, 36, 0.12);
  cursor: pointer;
  color: var(--color-text-primary);
  transition: background var(--dur-fast), transform var(--dur-fast);
  flex-shrink: 0;
}

.page-nav__toggle:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(1.05);
}

.page-nav__panel {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 8px 32px rgba(44, 42, 36, 0.10);
  padding: var(--sp-md) var(--sp-lg);
  min-width: 164px;
}

.page-nav__label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-sm);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--color-border);
}

.page-nav__list a {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 4px 0;
  display: block;
  transition: color var(--dur-fast), transform var(--dur-fast);
}

.page-nav__list a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

.page-nav__back-top {
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--color-border);
}

.page-nav__back-top a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-nav__back-top a::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Mobile: toggle button visible, panel hidden until opened */
@media (max-width: 767px) {
  .page-nav__panel { display: none; }
  .page-nav.is-open .page-nav__panel {
    display: block;
    animation: fadeUp var(--dur-base) var(--ease-out) both;
  }
}

/* Desktop: panel always visible, toggle hidden */
@media (min-width: 768px) {
  .page-nav__toggle { display: none; }
}


/* ============================================================
   15. ANIMATIONS & KEYFRAMES
   ============================================================ */

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

@keyframes ruleExpand {
  from { width: 0; }
  to   { width: 48px; }
}


/* ============================================================
   16. RESPONSIVE — 768px
   ============================================================ */

@media (min-width: 768px) {
  :root { --container-pad: var(--sp-xl); }

  .nav-toggle { display: none; }

  .primary-nav {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    align-self: stretch;
  }

  .primary-nav ul {
    flex-direction: row;
    gap: 0;
    align-items: stretch;
  }

  .primary-nav li {
    display: flex;
  }

  .primary-nav a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-block: 0;
    padding-inline: var(--sp-md);
    border-radius: 0;
    box-shadow: inset 0 -5px 0 transparent;
    transition: color var(--dur-fast), box-shadow var(--dur-fast);
  }

  .primary-nav a:hover,
  .primary-nav a.is-active {
    color: var(--color-accent-deep);
    background-color: transparent;
    box-shadow: inset 0 -5px 0 var(--color-accent-deep);
  }

  .primary-nav a.is-active {
    font-weight: 700;
  }

  /* Desktop submenu */
  .nav-sub-trigger {
    height: 100%;
    padding-block: 0;
    padding-inline: var(--sp-md);
    border-radius: 0;
    justify-content: center;
    box-shadow: inset 0 -5px 0 transparent;
    transition: color var(--dur-fast), box-shadow var(--dur-fast);
  }

  .nav-has-sub:hover .nav-sub-trigger,
  .nav-has-sub:focus-within .nav-sub-trigger {
    color: var(--color-accent-deep);
    box-shadow: inset 0 -5px 0 var(--color-accent-deep);
  }

  .nav-sub-trigger.is-active {
    color: var(--color-accent-deep);
    font-weight: 700;
    box-shadow: inset 0 -5px 0 var(--color-accent-deep);
  }

  .nav-has-sub:hover .nav-sub-chevron,
  .nav-has-sub:focus-within .nav-sub-chevron {
    transform: rotate(180deg);
  }

  .nav-sub-panel {
    display: flex;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    min-width: 260px;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-top: none;
    border-radius: 0 0 var(--r-md) var(--r-md);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.70),
      0 8px 32px rgba(44, 42, 36, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
    z-index: 10;
  }

  .nav-has-sub:hover .nav-sub-panel,
  .nav-has-sub:focus-within .nav-sub-panel,
  .nav-has-sub.is-open .nav-sub-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Reset nav-link styles that leak into submenu items */
  .primary-nav .nav-sub-item {
    height: auto;
    align-items: flex-start;
    padding: var(--sp-sm) var(--sp-md);
    box-shadow: none;
    font-family: var(--font-body);
    font-size: var(--size-sm);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-text-primary);
    justify-content: flex-start;
  }

  .primary-nav .nav-sub-item:hover {
    background-color: #F0EEE9;
    box-shadow: none;
    color: var(--color-text-primary);
  }

  .primary-nav .nav-sub-item::after { opacity: 0; }
  .primary-nav .nav-sub-item:hover::after { opacity: 1; }

  .primary-nav .nav-sub-all::after { opacity: 0; }
  .primary-nav .nav-sub-all:hover::after { opacity: 1; }

  .primary-nav .nav-sub-all {
    display: flex;
    height: auto;
    padding: var(--sp-md);
    box-shadow: none;
    font-family: var(--font-mono);
    font-size: var(--size-xs);
    font-weight: 400;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--color-accent);
    justify-content: space-between;
  }

  .primary-nav .nav-sub-all:hover {
    box-shadow: none;
    color: var(--color-accent-deep);
  }

  .hero__inner {
    grid-template-columns: 1fr 4fr;
    gap: var(--sp-xl);
    align-items: start;
  }

  .hero__text       { grid-column: 1; grid-row: 1; }
  .hero__photo-wrap { grid-column: 2; grid-row: 1 / span 3; justify-content: flex-end; align-self: start; }
  .hero__tagline    { grid-column: 1; grid-row: 2; }
  .hero__actions    { grid-column: 1; grid-row: 3; flex-wrap: wrap; }

  .hero__photo { width: 90%; }

  .skill-row {
    grid-template-columns: 1.5rem 200px 1fr;
    gap: var(--sp-sm);
  }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }

  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }

  .project-section__inner { grid-template-columns: 80px 1fr; }

  .project-images { grid-template-columns: repeat(2, 1fr); }
  .project-images--3col { grid-template-columns: repeat(3, 1fr); }
}


/* ============================================================
   17. RESPONSIVE — 1440px
   ============================================================ */

@media (min-width: 1440px) {
  :root { --container-pad: var(--sp-sm); }

  .projects-grid { grid-template-columns: repeat(3, 1fr); }

  .about-skills .container {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
    align-items: start;
    row-gap: var(--sp-md);
    column-gap: var(--sp-2xl);
  }

  .about__label {
    grid-column: 1 / -1;
  }

  .about__bio {
    margin-bottom: 0;
  }

  .about__bio .section-title {
    margin-top: 0;
  }

  #skills .skills-header {
    width: 100%;
    box-sizing: border-box;
  }

  #skills .skills-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--sp-md);
    row-gap: var(--sp-lg);
  }

  .skill-row {
    grid-template-columns: 1.5rem 1fr;
    gap: var(--sp-sm);
  }
}



/* ============================================================
   18. PASSWORD GATE MODAL
   ============================================================ */

.project-card--locked {
  cursor: pointer;
  text-decoration: none;
}

.project-card--locked:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 3px;
}

.project-card--unavailable {
  cursor: default;
}

.project-card--unavailable:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    var(--shadow-sm);
  transform: none;
  border-color: var(--color-border);
}

.project-card--unavailable:hover::before { transform: scaleY(0); }

.pw-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
}

.pw-modal[hidden] { display: none; }

.pw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 42, 36, 0.80);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pw-modal__card {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl) var(--sp-2xl);
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(44, 42, 36, 0.28);
}

@media (max-width: 480px) {
  .pw-modal__card { padding: var(--sp-lg); }
}

.pw-modal__close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--sp-xs);
  border-radius: var(--r-sm);
  transition: color var(--dur-fast);
}

.pw-modal__close:hover { color: var(--color-text-primary); }
.pw-modal__close:focus-visible { outline: 2.5px solid var(--color-accent); outline-offset: 2px; }

.pw-modal__eyebrow { color: var(--color-accent); margin-bottom: var(--sp-sm); }

.pw-modal__title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
}

.pw-modal__desc {
  font-size: var(--size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-lg);
}

.pw-modal__form { display: flex; flex-direction: column; gap: var(--sp-sm); }

.pw-modal__label {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.pw-modal__input {
  width: 100%;
  padding: 10px var(--sp-md);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: var(--size-sm);
  color: var(--color-text-primary);
  background: var(--color-bg);
  transition: border-color var(--dur-fast);
  box-sizing: border-box;
}

.pw-modal__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(159, 35, 54, 0.12);
}

.pw-modal__input[aria-invalid="true"] { border-color: #B8231B; }

.pw-modal__error {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: #B8231B; /* 6.5:1 on white — AA */
}

.pw-modal__error[hidden] { display: none; }

.pw-modal__submit { align-self: flex-start; margin-top: var(--sp-xs); }


/* ============================================================
   19. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__accent-rule { width: 48px; }

  .hero__eyebrow,
  .hero__name-wrap,
  .hero__accent-rule,
  .hero__tagline,
  .hero__actions,
  .hero__photo-wrap { animation: none; opacity: 1; transform: none; }

  .reveal,
  .reveal-stagger > * { opacity: 1; transform: none; }
}