/* ============================================================
   MELVYN CROSS — PORTFOLIO
   Editorial / Warm Solar / Motion-rich
   ============================================================ */

/* ============== TOKENS ============== */
:root {
  /* Palette — warm solar */
  --ink: #0A1628;         /* deep navy */
  --ink-soft: #1a2942;
  --cream: #F5EDE0;       /* off-white cream */
  --cream-deep: #EAE0CE;
  --amber: #F4A547;       /* solar amber */
  --amber-deep: #D88416;
  --paper-text: #2A2419;  /* body text on cream */
  --paper-mute: #6B5F4C;  /* muted body on cream */
  --ink-text: #E8E0D0;    /* body text on navy */
  --ink-mute: #8694A8;    /* muted on navy */
  --rule: rgba(10, 22, 40, 0.12);
  --rule-ink: rgba(245, 237, 224, 0.15);

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing */
  --pad-x: clamp(1.5rem, 4vw, 4rem);
  --section: clamp(5rem, 10vw, 12rem);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============== DARK MODE ============== */
/*
 * Strategy: flip --ink to a light colour so every element using
 * color:var(--ink) becomes readable automatically. Do NOT change
 * --cream — it is used as text colour on the navy sections (number,
 * built, bring) and must stay light. Instead, override section
 * backgrounds directly with hardcoded dark values.
 */
[data-theme="dark"] {
  --ink: #e4e2dd;           /* was navy → now warm off-white for text */
  --ink-mute: #7a7876;      /* muted text on dark surfaces */
  --amber: #4f98a3;         /* teal accent replaces amber */
  --amber-deep: #3d7a83;
  --paper-text: #cdccca;    /* body text on dark cream surfaces */
  --paper-mute: #7a7876;
  --ink-text: #cdccca;
  --rule: rgba(205, 204, 202, 0.12);
  --rule-ink: rgba(205, 204, 202, 0.15);
}

/* ── Formerly-cream sections: explicit dark backgrounds ── */
[data-theme="dark"] body    { background: #171614; }
[data-theme="dark"] .beginning { background: #171614; }
[data-theme="dark"] .deals     { background: #171614; }
[data-theme="dark"] .fasep  { background: linear-gradient(180deg, #171614 0%, #1e1c1a 100%); }
[data-theme="dark"] .contact   { background: #171614; }
[data-theme="dark"] .tst       { background: #171614; }

/* ── Formerly-navy sections: re-lock backgrounds (--ink is now light) ── */
[data-theme="dark"] .hero   { background: #0A1628; }
[data-theme="dark"] .built  { background: #0A1628; }
[data-theme="dark"] .stat   { background: #0A1628; }
[data-theme="dark"] .stat:hover { background: #1a2942; transform: translateY(-6px) scale(1.01); }
[data-theme="dark"] .bring  { background: #0A1628; }
[data-theme="dark"] .foot   { background: #0A1628; }
[data-theme="dark"] .number {
  background: linear-gradient(180deg, #0A1628 0%, #1a2942 50%, #3d7a83 100%);
}

/* ── Interactive element fills ── */
[data-theme="dark"] .contact__link::before  { background: #1a2942; }
[data-theme="dark"] .contact__cv:hover      { background-color: #1a2942; }
[data-theme="dark"] .contact__link:hover .contact__value { color: var(--cream); }

/* ── Highlight underlines (hardcoded amber rgba → teal) ── */
[data-theme="dark"] .beginning__body strong {
  background: linear-gradient(180deg, transparent 60%, rgba(79, 152, 163, 0.28) 60%);
}
[data-theme="dark"] .fasep__text strong {
  background: linear-gradient(180deg, transparent 60%, rgba(79, 152, 163, 0.32) 60%);
}

/* ── SVG fills in FASEP map ── */
[data-theme="dark"] .fasep__node text       { fill: #e4e2dd; }
[data-theme="dark"] .fasep__node--origin text { fill: #7a7876; }
[data-theme="dark"] .fasep__arc { stroke: var(--amber-deep); }

/* ── Smooth theme toggle — section backgrounds transition in sync with body ── */
.hero, .built, .stat, .bring, .foot, .number,
.beginning, .deals, .fasep, .contact, .tst {
  transition: background-color 0.3s ease, background 0.3s ease;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--paper-text);
  line-height: 1.55;
  font-weight: 400;
  font-size: 16px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

::selection { background: var(--amber); color: var(--ink); }

/* ── Skip to content — visually hidden, visible on focus ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 1000000;
  padding: 0.75rem 1.5rem;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 1rem; outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── Global focus-visible ring — keyboard navigation ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============== NAV ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--pad-x);
  z-index: 200;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Frosted glass — readable on any section colour, light or dark */
  background: rgba(245, 237, 224, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.07);
  color: var(--paper-text);
  pointer-events: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
[data-theme="dark"] .nav {
  background: rgba(20, 19, 18, 0.92);
  border-bottom-color: rgba(245, 237, 224, 0.07);
  color: var(--ink-text);
}
.nav a, .nav__meta, .nav__hamburger, .nav__backdrop { pointer-events: auto; }
.nav__mark {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.02em;
  font-style: italic;
}
.nav__meta { display: flex; gap: 2rem; align-items: center; }
.nav__location { display: flex; align-items: center; gap: 0.5rem; }
.nav__dot {
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ============== HERO ============== */
.hero {
  min-height: 100vh;
  background: var(--ink);
  color: var(--ink-text);
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 4rem var(--pad-x) 6rem;
  overflow: hidden;
}

/* The sun — a soft amber radial glow, top-right, parallax-driven */
.hero__sun {
  position: absolute;
  top: -10vw; right: -10vw;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(244, 165, 71, 0.45) 0%, rgba(244, 165, 71, 0.08) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  filter: blur(2px);
}

/* Subtle grain overlay for editorial texture */
.hero__grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero__label {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4rem;
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 0.3s forwards;
}
.hero__label .line {
  width: 3rem; height: 1px; background: var(--ink-mute);
}

.hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(4rem, 13vw, 12rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.hero__title .word {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: rise 1.1s var(--ease-out) forwards;
}
.hero__title .word--1 { animation-delay: 0.5s; }
.hero__title .word--2 { animation-delay: 0.7s; }
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.hero__caption {
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-text);
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 1s forwards;
}
.hero__caption p { margin-bottom: 0.8rem; }
.hero__caption strong {
  color: var(--amber);
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem; left: var(--pad-x);
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 1.5s forwards;
}
.hero__scroll-arrow {
  display: inline-block;
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { to { opacity: 1; } }

/* ============== 02. THE NUMBER ============== */
.number {
  min-height: 100vh;
  background: linear-gradient(180deg, #0A1628 0%, #1a2942 50%, var(--amber-deep) 100%);
  color: var(--cream);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: var(--section) var(--pad-x);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.number__meta {
  display: flex; justify-content: space-between; width: 100%; max-width: 60rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3rem;
}
.number__stage {
  display: flex; align-items: flex-start;
  font-family: var(--display);
  font-weight: 300;
  line-height: 0.9;
  margin-bottom: 3rem;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.number__currency {
  font-size: clamp(3rem, 8vw, 7rem);
  font-style: italic;
  color: var(--amber);
  margin-right: 0.4rem;
  margin-top: 0.4rem;
  font-weight: 400;
}
.number__value {
  font-size: clamp(5rem, 16vw, 15rem);
  letter-spacing: -0.05em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.number__caption {
  max-width: 32rem;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.6;
  color: var(--ink-text);
  font-style: italic;
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "opsz" 14;
}
.number__caption em { color: var(--amber); font-style: normal; }

/* ============== 03. THE BEGINNING ============== */
.beginning {
  background: var(--cream);
  padding: var(--section) var(--pad-x);
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 4rem;
  max-width: 92rem;
  margin: 0 auto;
}
.beginning__sidebar {
  display: flex; flex-direction: column;
  position: sticky; top: 5rem;
  height: fit-content;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-mute);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}
.beginning.is-revealed .beginning__sidebar { opacity: 1; transform: translateX(0); }
.beginning__chapter-name { margin-top: 0.3rem; color: var(--ink); }

.beginning__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 3rem;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.beginning__title em {
  color: var(--amber-deep);
  font-weight: 400;
  font-style: italic;
}

.beginning__body {
  max-width: 36rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--paper-text);
}
.beginning__body .lead {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1.4;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-variation-settings: "opsz" 24;
}
.beginning__body p {
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.beginning.is-revealed .beginning__body p:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.beginning.is-revealed .beginning__body p:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.21s; }
.beginning.is-revealed .beginning__body p:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.27s; }
.beginning.is-revealed .beginning__body p:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.33s; }
.beginning__body em {
  color: var(--amber-deep);
  font-style: italic;
}
.beginning__body strong {
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 60%, rgba(244, 165, 71, 0.35) 60%);
  padding: 0 0.1em;
}

/* ============== 04. WHAT I BUILT ============== */
.built {
  background: var(--ink);
  color: var(--ink-text);
  padding: var(--section) var(--pad-x);
}
.built__header {
  max-width: 60rem;
  margin: 0 auto 5rem;
  text-align: center;
}
.built__chapter {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
}
.built__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  color: var(--cream);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.built__title em { color: var(--amber); font-style: italic; }
.built__intro {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-mute);
}

.built__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 88rem;
  margin: 0 auto;
  background: var(--rule-ink);
  border: 1px solid var(--rule-ink);
}
.stat {
  background: var(--ink);
  padding: 3rem 2rem;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  opacity: 0; transform: translateY(30px) scale(0.97);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), background 0.5s var(--ease-out);
}
/* Amber bar at top — scaleX reveal on .is-revealed */
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.stat.is-revealed { opacity: 1; transform: translateY(0) scale(1); }
.stat.is-revealed::before { transform: scaleX(1); }
.stat:hover { background: var(--ink-soft); transform: translateY(-6px) scale(1.01); }
.stat__num {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.5rem, 6vw, 5rem);
  line-height: 1;
  color: var(--amber);
  margin-bottom: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144;
}
.stat__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.8rem;
}
.stat__note {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-mute);
}
.stat__note strong { color: var(--cream); font-weight: 500; }

/* ============== 05. THE DEALS ============== */
.deals {
  background: var(--cream);
  padding: var(--section) var(--pad-x);
  max-width: 92rem;
  margin: 0 auto;
}
.deals__header {
  margin-bottom: 6rem;
  max-width: 36rem;
}
.deals__chapter {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 1.5rem;
}
.deals__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.deals__title em { color: var(--amber-deep); font-style: italic; }

.deal {
  display: grid;
  grid-template-columns: 12rem 1fr 1fr;
  gap: 3rem;
  align-items: end;
  padding: 4rem 0;
  position: relative;
}
/* Animated top rule — draws left to right on .deals.is-revealed */
.deal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out);
}
.deals.is-revealed .deal--1::before { transform: scaleX(1); transition-delay: 0.1s; }
.deals.is-revealed .deal--2::before { transform: scaleX(1); transition-delay: 0.35s; }
.deal:last-child { border-bottom: 1px solid var(--rule); }
.deal--2 { padding-left: 8rem; }

.deal {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.deal:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.08);
}
.deal:active { transform: translateY(-2px); }

.deal__meta {
  display: flex; flex-direction: column;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.deal__index { color: var(--ink); font-weight: 500; margin-bottom: 0.4rem; }
.deal__route {
  opacity: 0.5;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.deal:hover .deal__route { opacity: 1; transform: translateX(0); }

.deal__amount {
  display: flex; align-items: flex-start;
  font-family: var(--display);
  line-height: 0.9;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.deal__currency {
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--amber-deep);
  font-style: italic;
  font-weight: 400;
  margin-right: 0.25rem;
  margin-top: 0.6rem;
}
.deal__figure {
  font-size: clamp(4rem, 8vw, 8rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s var(--ease-out);
}
.deal:hover .deal__figure { color: var(--amber-deep); }

.deal__story h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.deal__story p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--paper-text);
  max-width: 26rem;
}

/* ============== 06. FASEP ============== */
.fasep {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  padding: var(--section) var(--pad-x);
  max-width: 92rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 4rem;
}
.fasep__rail {
  display: flex; flex-direction: column;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-mute);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  position: sticky; top: 5rem;
  height: fit-content;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}
.fasep.is-revealed .fasep__rail { opacity: 1; transform: translateX(0); }
.fasep__when { margin-top: 0.3rem; color: var(--ink); }

.fasep__body { display: grid; gap: 2.5rem; max-width: 52rem; }

.fasep__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.fasep__title em {
  font-style: italic;
  color: var(--amber-deep);
  font-weight: 400;
}

.fasep__map {
  max-width: 32rem;
  margin: 1rem 0;
  background: rgba(10, 22, 40, 0.025);
  border: 1px solid var(--rule);
  padding: 1rem;
}
.fasep__svg { width: 100%; height: auto; }
.fasep__grid line {
  stroke: var(--rule);
  stroke-width: 0.5;
  stroke-dasharray: 2 4;
}
.fasep__lat text {
  font-family: var(--mono);
  font-size: 7px;
  fill: var(--paper-mute);
  letter-spacing: 0.05em;
}
.fasep__arc {
  stroke: var(--amber-deep);
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 2s var(--ease-out) 0.3s;
}
.fasep.is-revealed .fasep__arc { stroke-dashoffset: 0; }
.fasep__node circle {
  fill: var(--ink);
  stroke: var(--amber);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.fasep__node--origin circle { stroke: var(--paper-mute); }
.fasep.is-revealed .fasep__node circle { opacity: 1; }
.fasep__node:nth-of-type(2) circle { transition-delay: 0.4s; }
.fasep__node:nth-of-type(3) circle { transition-delay: 1.4s; }
.fasep__node:nth-of-type(4) circle { transition-delay: 2.0s; }
.fasep__node text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.fasep__node--origin text { fill: var(--paper-mute); font-size: 8px; text-transform: uppercase; }
.fasep__node text.fasep__sub {
  text-transform: none;
  fill: var(--paper-mute);
  font-size: 7px;
  letter-spacing: 0.02em;
}
.fasep.is-revealed .fasep__node text { opacity: 1; }
.fasep__node:nth-of-type(2) text { transition-delay: 0.6s; }
.fasep__node:nth-of-type(3) text { transition-delay: 1.6s; }
.fasep__node:nth-of-type(4) text { transition-delay: 2.2s; }

.fasep__text {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--paper-text);
}
.fasep__text .lead {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.fasep__text strong {
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 60%, rgba(244, 165, 71, 0.4) 60%);
  padding: 0 0.1em;
}
.fasep__text p {
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fasep.is-revealed .fasep__text p:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.fasep.is-revealed .fasep__text p:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.31s; }
.fasep.is-revealed .fasep__text p:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.37s; }
.fasep.is-revealed .fasep__text p:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.43s; }
.fasep__text .aside {
  font-style: italic;
  color: var(--paper-mute);
  font-family: var(--display);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--amber);
}

/* ============== 07. WHAT I BRING ============== */
.bring {
  background: var(--ink);
  color: var(--ink-text);
  padding: var(--section) var(--pad-x);
}
.bring__header {
  max-width: 88rem;
  margin: 0 auto 5rem;
}
.bring__chapter {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
}
.bring__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  max-width: 26rem;
}
.bring__title em { color: var(--amber); font-style: italic; }

.bring__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  max-width: 88rem;
  margin: 0 auto;
}
.bring__col h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-ink);
}
.bring__col ul { list-style: none; }
.bring__col li {
  padding: 0.7rem 0 0.7rem 0;
  border-bottom: 1px solid var(--rule-ink);
  border-left: 2px solid transparent;
  font-size: 1.05rem;
  color: var(--cream);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  transition: color 0.3s ease, padding-left 0.3s ease, border-left-color 0.3s ease;
}
.bring__col li:hover { color: var(--amber); padding-left: 0.75rem; border-left-color: var(--amber); }
.bring__col li:active { opacity: 0.6; }
.bring__col li em {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 0.9rem;
  font-weight: 400;
  text-align: right;
}

/* ============== 08. CONTACT ============== */
.contact {
  background: var(--cream);
  padding: var(--section) var(--pad-x);
  min-height: 90vh;
  display: flex; align-items: center;
}
.contact__inner {
  max-width: 60rem;
  margin: 0 auto;
  width: 100%;
}
.contact__pre {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 1.5rem;
}
.contact__cta {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 4rem;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}
.contact__cta em {
  font-style: italic;
  color: var(--amber-deep);
  font-weight: 400;
}

.contact__links {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
  margin-bottom: 4rem;
}
.contact__link {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1rem;
  margin: 0 -1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.15rem;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: padding 0.4s var(--ease-out);
}
.contact__link::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.6s var(--ease-out);
}
.contact__link > * { transition: color 0.4s var(--ease-out); }
.contact__link:hover { padding-left: 2.5rem; padding-right: 2.5rem; }
.contact__link:hover::before { transform: translateX(0); }
.contact__link:hover .contact__label { color: var(--ink-mute); }
.contact__link:hover .contact__value { color: var(--cream); }
.contact__link:hover .contact__arrow { color: var(--amber); transform: translateX(0.4rem); }
.contact__link:active { opacity: 0.75; transform: scaleX(0.99); }

.contact__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.contact__value {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 400;
}
.contact__arrow {
  font-size: 1.3rem;
  color: var(--amber-deep);
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.contact__cv {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 1.2rem 2rem;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  transition: all 0.4s var(--ease-out);
}
.contact__cv:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-2px);
}
.contact__cv:active { transform: scale(0.96); opacity: 0.8; }
.contact__cv-arrow { transition: transform 0.4s var(--ease-out); }
.contact__cv:hover .contact__cv-arrow { transform: translateY(2px); }

/* ============== CONTACT FORM ============== */
.cf-wrap {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  max-width: 36rem;
}
.cf-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 2rem;
}
.cf {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cf__row { display: flex; flex-direction: column; gap: 0.35rem; }
.cf__label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.cf__char-count {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--paper-mute);
  opacity: 0.55;
  text-transform: none;
  transition: color 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.cf__char-count--warn  { color: var(--amber); opacity: 1; }
.cf__char-count--limit { color: #e07070; opacity: 1; }
.cf__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem 0;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s var(--ease-out);
  -webkit-appearance: none;
}
.cf__input::placeholder { color: var(--paper-mute); opacity: 0.6; }
.cf__input:focus { border-color: var(--amber); }
[data-theme="dark"] .cf__input { color: var(--cream); }
[data-theme="dark"] .cf__input::placeholder { color: rgba(245,237,224,0.3); }
[data-theme="dark"] .cf__input:focus { border-color: var(--amber); }
.cf__textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.cf__actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.cf__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  padding: 1rem 1.75rem;
  cursor: pointer;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out), transform 0.3s var(--ease-out);
}
.cf__submit:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.cf__submit:active { transform: scale(0.96); opacity: 0.8; }
.cf__submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
[data-theme="dark"] .cf__submit { color: var(--cream); border-color: rgba(245,237,224,0.4); }
[data-theme="dark"] .cf__submit:hover { background: rgba(245,237,224,0.1); color: var(--cream); }
.cf__arrow { transition: transform 0.3s var(--ease-out); }
.cf__submit:not(:disabled):hover .cf__arrow { transform: translateX(4px); }
.cf__error {
  font-family: var(--body);
  font-size: 0.88rem;
  color: #c0392b;
  line-height: 1.5;
}
[data-theme="dark"] .cf__error { color: #e07070; }
.cf__success { margin-top: 2.5rem; }
.cf__success-msg {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
[data-theme="dark"] .cf__success-msg { color: var(--cream); }
.cf__success-msg em { font-style: italic; color: var(--amber-deep); }

/* ============== FOOT ============== */
.foot {
  background: var(--ink);
  color: var(--ink-mute);
  padding: 3rem var(--pad-x);
}
.foot__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule-ink);
}
.foot__col--center { text-align: center; }
.foot__col--right { text-align: right; }

.foot__personal {
  max-width: 36rem;
  margin: 2rem auto 0;
  text-align: center;
}
.foot__personal p {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-mute);
  line-height: 1.6;
  font-variation-settings: "opsz" 14;
}

/* ============== PROGRESS BAR ============== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 999;
  pointer-events: none;
  will-change: transform;
}

/* ============== CUSTOM CURSOR ============== */
.cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  opacity: 0;
  will-change: transform;
  transition: width 0.25s var(--ease-out),
              height 0.25s var(--ease-out),
              opacity 0.3s ease;
}
.cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1.5px solid var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  top: 0; left: 0;
  opacity: 0;
  will-change: transform;
  transition: width 0.4s var(--ease-out),
              height 0.4s var(--ease-out),
              opacity 0.4s ease;
}
.cursor-dot--visible { opacity: 1; }
.cursor-ring--visible { opacity: 0.65; }
.cursor-dot--hidden,
.cursor-ring--hidden { opacity: 0 !important; transition: opacity 0.15s ease !important; }
.cursor-dot--hover { width: 14px; height: 14px; }
.cursor-ring--hover { width: 22px; height: 22px; opacity: 1 !important; }

/* Click ripple — spawned by JS, auto-removed on animationend */
@keyframes cursor-ripple {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  to   { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}
.cursor-ripple {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  animation: cursor-ripple 0.55s var(--ease-out) forwards;
}

/* Hide cursor on touch devices */
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ============== NAV LANG TOGGLE ============== */
.nav__lang {
  background: none;
  border: none;
  cursor: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  padding: 0.2rem 0.4rem;
  border: 1px solid currentColor;
  line-height: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease;
  opacity: 0.6;
}
.nav__lang:hover { opacity: 1; }
.nav__lang:active { opacity: 0.3; }

/* ── Touch target boost for small toggle buttons ── */
@media (pointer: coarse) {
  .nav__theme, .nav__lang {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .ftr__btn { min-height: 44px; }
}

/* ============================================================
   MOBILE HAMBURGER NAVIGATION
   ============================================================ */
.nav__hamburger {
  display: none;              /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  flex-shrink: 0;
  z-index: 310;
  position: relative;
}
.nav__hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper-text); /* dark ink in light mode */
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
  transform-origin: center;
}
[data-theme="dark"] .nav__hamburger-bar {
  background: var(--cream); /* cream #F5EDE0 — always light, always visible on dark nav */
}
/* Animate to × when open */
.nav--open .nav__hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav--open .nav__hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile backdrop */
.nav__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  z-index: 299;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav--open .nav__backdrop {
  display: block;   /* only rendered when menu is open */
  opacity: 1;
}

@media (max-width: 767px) {
  /* Show hamburger on mobile; backdrop only appears when drawer is open (see nav--open rule) */
  .nav__hamburger { display: flex; }

  /* Nav layout on mobile: brand left, hamburger right */
  .nav {
    padding: 0.9rem var(--pad-x);
    gap: 0;
  }

  /* Slide-in drawer for nav__meta */
  .nav__meta {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;        /* dynamic viewport height avoids iOS toolbar issues */
    height: 100vh;         /* fallback */
    width: min(300px, 84vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 5rem 2rem 2.5rem;
    background: var(--cream);
    border-left: 1px solid rgba(10, 22, 40, 0.08);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
    z-index: 300;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 40px rgba(10, 22, 40, 0.15);
  }
  [data-theme="dark"] .nav__meta {
    background: #0f1a2b;
    border-left-color: rgba(245, 237, 224, 0.07);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
  }

  /* Opened state */
  .nav--open .nav__meta {
    transform: translateX(0);
  }

  /* Each item in drawer: thumb-friendly height */
  .nav__meta .nav__blog-link,
  .nav__meta .nav__contact-cta {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(10, 22, 40, 0.07);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  [data-theme="dark"] .nav__meta .nav__blog-link,
  [data-theme="dark"] .nav__meta .nav__contact-cta {
    border-bottom-color: rgba(245, 237, 224, 0.08);
  }
  .nav__meta .nav__blog-link:hover  { opacity: 1; }
  .nav__meta .nav__contact-cta {
    /* Solid amber CTA button in the drawer */
    background: var(--amber);
    color: #0A1628;
    border: none;
    border-radius: 3px;
    padding: 0 1.25rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 600;
    opacity: 1;
    animation: none;
    box-shadow: 0 2px 12px rgba(244, 165, 71, 0.25);
  }
  .nav__meta .nav__contact-cta::after {
    content: '→';
    font-size: 1rem;
    line-height: 1;
  }
  [data-theme="dark"] .nav__meta .nav__contact-cta {
    background: var(--amber);
    color: #0A1628;
  }

  /* Theme and lang in drawer: stack at the bottom */
  .nav__meta .nav__theme,
  .nav__meta .nav__lang {
    margin-top: auto;
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav__meta .nav__theme { margin-top: 1.5rem; }

  /* Prevent body scroll when nav open */
  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  /* Inner pages: hide blog-nav links that won't fit — they're in the drawer */
  .blog-nav .nav__meta .nav__blog-link { display: flex; }
}

/* Chapter nav links */
.nav__chapters {
  display: flex;
  gap: 1.25rem;
  pointer-events: auto;
}
.nav__chapter {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: inherit;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  position: relative;
  padding-bottom: 2px;
}
.nav__chapter::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav__chapter:hover { opacity: 0.8; }
.nav__chapter.is-active { opacity: 1; }
.nav__chapter.is-active::after { transform: scaleX(1); }
@media (max-width: 900px) { .nav__chapters { display: none; } }

/* Theme toggle */
.nav__theme {
  background: none;
  border: none;
  cursor: none;
  font-size: 0.85rem;
  color: inherit;
  pointer-events: auto;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out);
  line-height: 1;
  padding: 0;
}
.nav__theme:hover { opacity: 1; transform: rotate(20deg); }
.nav__theme:active { opacity: 0.3; }

/* ============== HERO LAYOUT (with portrait) ============== */
.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  flex: 1;
  padding-top: 2rem;
}
.hero__left {
  display: flex;
  flex-direction: column;
}

/* Portrait slot */
.hero__portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 72vh;
  overflow: hidden;
  border: 1px solid var(--rule-ink);
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 0.8s forwards;
}
.hero__portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero__portrait-placeholder {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255,255,255,0.03);
}
.hero__portrait-img[style*="display: none"] + .hero__portrait-placeholder,
.hero__portrait-img.errored + .hero__portrait-placeholder {
  display: flex;
}
.hero__portrait-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 1rem;
}
.hero__portrait-icon {
  font-size: 2.5rem;
  color: var(--ink-mute);
  opacity: 0.4;
}
.hero__portrait-hint {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0.5;
}

/* Portrait: show placeholder by default, hide if image loads */
.hero__portrait-img { display: block; }
.hero__portrait-placeholder { display: none; }

@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__portrait {
    aspect-ratio: 4 / 3;
    max-height: 50vw;
    order: -1;
  }
}

/* ============== MARQUEE ============== */
.marquee {
  position: absolute;
  bottom: 5.5rem;
  left: 0; right: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__content {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  padding: 0.6rem 0;
}
.marquee__item {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 2rem;
}
.marquee__sep {
  color: var(--amber);
  font-size: 0.6rem;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ============== TEXT REVEAL (scroll-triggered word mask) ============== */
.reveal-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /*
   * Fraunces display italic has extreme optical extents at large sizes.
   * The negative margin trick keeps line-spacing intact while the padding
   * expands the clip box so no ink is ever cut. Values are intentionally
   * generous — 0.3em top (swash ascenders), 0.45em bottom (descenders),
   * 0.2em right (italic slant of last character overhangs the right edge).
   */
  padding-top: 0.3em;
  margin-top: -0.3em;
  padding-bottom: 0.45em;
  margin-bottom: -0.45em;
  padding-right: 0.2em;
  margin-right: -0.2em;
}
.reveal-word__inner {
  display: inline-block;
  transform: translateY(160%);
  transition: transform 0.85s var(--ease-out);
}
/* Stagger via CSS custom property set by JS */
.reveal-word__inner {
  transition-delay: var(--reveal-delay, 0ms);
}
/* Trigger: parent section gets is-revealed */
.is-revealed .reveal-word__inner {
  transform: translateY(0);
}

/* ============== REVEAL ANIMATION ============== */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }

/* Stagger inside .built__grid */
.built__grid .stat:nth-child(1) { transition-delay: 0s; }
.built__grid .stat:nth-child(2) { transition-delay: 0.1s; }
.built__grid .stat:nth-child(3) { transition-delay: 0.2s; }
.built__grid .stat:nth-child(4) { transition-delay: 0.05s; }
.built__grid .stat:nth-child(5) { transition-delay: 0.15s; }
.built__grid .stat:nth-child(6) { transition-delay: 0.25s; }

/* ============================================================
   TESTIMONIALS SECTION
   ============================================================ */
.tst {
  background: var(--cream);
  padding: var(--section) var(--pad-x);
}
.tst__inner { max-width: 88rem; margin: 0 auto; }

/* ── Header ── */
.tst__header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.tst__eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
[data-theme="dark"] .tst__eyebrow { color: var(--amber); }
.tst__eyebrow::before, .tst__eyebrow::after {
  content: '';
  width: 3rem;
  height: 1px;
  background: var(--rule);
}
.tst__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 20;
  color: var(--paper-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
[data-theme="dark"] .tst__title { color: var(--ink-text); }
.tst__title em {
  font-style: italic;
  font-variation-settings: "opsz" 48, "SOFT" 80;
  color: var(--amber-deep);
}
[data-theme="dark"] .tst__title em { color: var(--amber); }

/* ── Card grid ── */
.tst__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* ── Individual card ── */
.tst__card {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 2rem 2rem 1.75rem;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
[data-theme="dark"] .tst__card { background: #222019; border-color: rgba(205,204,202,0.1); }
.tst__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(10,22,40,0.09);
}
[data-theme="dark"] .tst__card:hover { box-shadow: 0 14px 40px rgba(0,0,0,0.4); }

/* ── Quote mark ── */
.tst__quote-mark {
  font-family: var(--display);
  font-size: 3.5rem;
  line-height: 0.75;
  color: var(--amber);
  font-style: italic;
  font-weight: 400;
  user-select: none;
}

/* ── Quote body ── */
.tst__quote {
  font-family: var(--display);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 18, "SOFT" 40;
  color: var(--paper-text);
  line-height: 1.65;
  flex: 1;
}
[data-theme="dark"] .tst__quote { color: var(--ink-text); }

/* ── Author row ── */
.tst__author {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
[data-theme="dark"] .tst__author { border-top-color: rgba(205,204,202,0.12); }

.tst__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}
.tst__name {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-text);
  font-weight: 500;
}
[data-theme="dark"] .tst__name { color: var(--ink-text); }
.tst__role {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
  color: var(--paper-mute);
  margin-top: 0.2rem;
}
[data-theme="dark"] .tst__role { color: var(--ink-mute); }

/* ── Responsive ── */
@media (max-width: 900px) { .tst__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tst__grid { grid-template-columns: 1fr; } }

/* ============== RESPONSIVE ============== */
@media (max-width: 900px) {
  .built__grid { grid-template-columns: repeat(2, 1fr); }
  .bring__grid { grid-template-columns: 1fr; gap: 3rem; }
  .beginning, .fasep { grid-template-columns: 1fr; gap: 2rem; }
  .beginning__sidebar, .fasep__rail { position: static; flex-direction: row; gap: 1rem; }
  .deal { grid-template-columns: 1fr; gap: 1.5rem; }
  .deal--2 { padding-left: 0; }
  .foot__row { grid-template-columns: 1fr; gap: 0.5rem; text-align: left !important; }
  .foot__col--center, .foot__col--right { text-align: left; }
  .contact__link { grid-template-columns: 1fr; gap: 0.3rem; }
  .nav__meta { gap: 1rem; font-size: 0.65rem; }
}
@media (max-width: 600px) {
  .built__grid { grid-template-columns: 1fr; }
  .number__meta { flex-direction: column; gap: 0.5rem; text-align: left; align-items: flex-start; }
}

/* ============================================================
   BLOG — NAV + SHARED
   ============================================================ */

/* Blog pages — light mode uses cream; dark mode uses navy */
.blog-page, .post-page {
  background: var(--cream);
  color: var(--ink);
}
[data-theme="dark"] .blog-page,
[data-theme="dark"] .post-page {
  background: #0A1628;
  color: var(--cream);
}

/* .blog-nav — colour overrides removed; frosted-glass base .nav handles all pages */

.nav__blog-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.nav__blog-link:hover { opacity: 1; }
.nav__blog-link--active { opacity: 1; }

/* ── Nav "Contact me" CTA ── */
.nav__contact-cta {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 2rem;
  padding: 0.38rem 0.9rem;
  text-decoration: none;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  animation: nav-cta-pulse 3s ease-in-out infinite;
  white-space: nowrap;
}
.nav__contact-cta:hover {
  background: var(--amber);
  color: var(--ink);
  box-shadow: none;
  animation: none;
}
@keyframes nav-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,165,71,0); }
  50%       { box-shadow: 0 0 0 5px rgba(244,165,71,0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .nav__contact-cta { animation: none; }
}
/* Dark mode: amber stays amber — it reads well on navy */
[data-theme="dark"] .nav__contact-cta { color: var(--amber); border-color: var(--amber); }
[data-theme="dark"] .nav__contact-cta:hover { background: var(--amber); color: #0A1628; }

/* ── Contact page ── */
.contact-page { background: var(--cream); color: var(--ink); }
[data-theme="dark"] .contact-page { background: #0A1628; color: var(--cream); }

.cp-hero {
  min-height: 42vh;
  padding: calc(var(--section) * 0.6) var(--pad-x) 3rem;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--rule);
}
.cp-hero__inner { max-width: 60rem; margin: 0 auto; width: 100%; }
.cp-hero__pre {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 1.5rem;
}
.cp-hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}
[data-theme="dark"] .cp-hero__title { color: var(--cream); }
.cp-hero__title em { font-style: italic; color: var(--amber-deep); font-weight: 400; }

.cp-body {
  padding: 5rem var(--pad-x) 6rem;
}
.cp-body__inner {
  max-width: 60rem;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
@media (max-width: 768px) {
  .cp-body__inner { grid-template-columns: 1fr; gap: 4rem; }
}

/* Links column */
.cp-links { display: flex; flex-direction: column; }
.cp-links__label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 1.5rem;
}
.cp-link {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0.75rem;
  margin: 0 -0.75rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: padding 0.4s var(--ease-out);
}
[data-theme="dark"] .cp-link { color: var(--cream); }
.cp-link:first-of-type { border-top: 1px solid var(--rule); }
.cp-link::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink); z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out);
}
[data-theme="dark"] .cp-link::before { background: rgba(245,237,224,0.08); }
.cp-link > * { transition: color 0.3s var(--ease-out); }
.cp-link:hover { padding-left: 2rem; padding-right: 2rem; }
.cp-link:hover::before { transform: translateX(0); }
.cp-link:hover .cp-link__label { color: rgba(245,237,224,0.5); }
.cp-link:hover .cp-link__value { color: var(--cream); }
.cp-link:hover .cp-link__arrow { color: var(--amber); transform: translateX(4px); }
[data-theme="dark"] .cp-link:hover .cp-link__value { color: var(--cream); }
.cp-link__label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.cp-link__value {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
}
.cp-link__arrow {
  font-size: 1.1rem;
  color: var(--amber-deep);
  transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

/* Footer on blog pages — always dark (editorial anchor) */
.blog-foot { background: #0A1628; border-top: 1px solid rgba(245,237,224,0.08); }
[data-theme="dark"] .blog-foot { background: #06080c; }
.blog-foot, .blog-foot * { color: rgba(245,237,224,0.5); }
.foot__blog-link { color: inherit; text-decoration: none; opacity: 0.7; transition: opacity 0.2s; }
.foot__blog-link:hover { opacity: 1; }

/* Eyebrow (like Alec template) */
.bl-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.bl-eyebrow__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 3rem;
}
[data-theme="dark"] .bl-eyebrow__line { background: rgba(246,248,251,0.15); }
.pt-more .bl-eyebrow__line, .latest-posts .bl-eyebrow__line { background: rgba(245,237,224,0.15); }
.bl-eyebrow__text {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
  white-space: nowrap;
}
[data-theme="dark"] .bl-eyebrow__text { color: rgba(246,248,251,0.45); }
.pt-more .bl-eyebrow__text, .latest-posts .bl-eyebrow__text { color: rgba(245,237,224,0.45); }

/* Preview mode badge */
.bl-demo-badge {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246,248,251,0.5);
  border: 1px solid rgba(246,248,251,0.18);
  padding: 0.2em 0.5em;
  border-radius: 2px;
  margin-left: 0.4rem;
  align-self: center;
}

/* Category tag */
.bl-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--ink);
  padding: 0.3em 0.7em;
  border-radius: 2px;
}
[data-theme="dark"] .bl-tag { background: var(--amber); color: #0A1628; }

/* ============================================================
   BLOG — SCROLL REVEAL ANIMATIONS
   ============================================================ */
html { scroll-behavior: smooth; }

.bl-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--bl-delay, 0s);
}
.bl-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero header slides in from left on load */
.bl-hero__header {
  opacity: 0;
  transform: translateX(-20px);
  animation: bl-slide-in 0.9s var(--ease-out) 0.1s forwards;
}
@keyframes bl-slide-in {
  to { opacity: 1; transform: none; }
}

/* Post hero left content fades up */
.pt-hero__left {
  opacity: 0;
  animation: bl-fade-up 0.8s var(--ease-out) 0.15s forwards;
}
@keyframes bl-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Post cover zooms in subtly on load */
.pt-hero__right {
  overflow: hidden;
  opacity: 0;
  animation: bl-fade-in 1s var(--ease-out) 0.05s forwards;
}
@keyframes bl-fade-in {
  to { opacity: 1; }
}

/* Cover image inner element for parallax */
.pt-cover__img {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0.08s linear;
}

@media (prefers-reduced-motion: reduce) {
  .bl-reveal, .bl-hero__header, .pt-hero__left, .pt-hero__right {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .pt-cover__img { transition: none !important; }
}

/* ============================================================
   BLOG LISTING — CARD SYSTEM (Alec-style: full-bleed + overlay)
   ============================================================ */
.bl-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  text-decoration: none;
  background: #1a2942;
}

/* Photo background fills the entire card */
.bl-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a2942;
  transition: transform 0.6s var(--ease-out);
}
.bl-card:hover .bl-card__bg { transform: scale(1.04); }

/* Dark gradient overlay */
.bl-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,0.05) 0%,
    rgba(10,22,40,0.3) 40%,
    rgba(10,22,40,0.85) 100%
  );
  transition: background 0.3s ease;
}
.bl-card:hover .bl-card__overlay {
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,0.1) 0%,
    rgba(10,22,40,0.4) 40%,
    rgba(10,22,40,0.92) 100%
  );
}

/* Content sits on top */
.bl-card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1.25rem;
}
.bl-card__top { display: flex; align-items: flex-start; }
.bl-card__bottom { margin-top: auto; }

.bl-card__title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 36, "SOFT" 40;
  line-height: 1.12;
  color: #f6f8fb;
  margin-bottom: 0.6rem;
}
.bl-card--featured .bl-card__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-variation-settings: "opsz" 60, "SOFT" 50;
}
.bl-card--small .bl-card__title { font-size: clamp(1.05rem, 2vw, 1.4rem); }

.bl-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246,248,251,0.55);
}
.bl-card__dot { opacity: 0.4; }

.bl-card__arrow {
  margin-top: 0.75rem;
  color: var(--amber);
  transform: translateX(0);
  transition: transform 0.2s var(--ease-out);
}
.bl-card:hover .bl-card__arrow { transform: translateX(6px); }

.bl-card__cta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 1rem;
}

/* Skeleton */
.bl-card.bl-skeleton { background: var(--cream-deep); }
[data-theme="dark"] .bl-card.bl-skeleton { background: #151618; }
.bl-skeleton__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.04) 50%,transparent 100%);
  background-size: 200% 100%;
  animation: bl-shimmer 1.6s ease infinite;
}
@keyframes bl-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.bl-card--empty { background: var(--cream-deep); min-height: 480px; }
[data-theme="dark"] .bl-card--empty { background: #151618; }

/* ============================================================
   BLOG LISTING — HERO (two-column split)
   ============================================================ */
.bl-hero {
  min-height: 100vh;
  padding-top: 5rem;
  display: flex;
  align-items: center;
}
.bl-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad-x);
  width: 100%;
}

/* Header side */
.bl-hero__header { display: flex; flex-direction: column; }
.bl-hero__title {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 600;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 60;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
[data-theme="dark"] .bl-hero__title { color: var(--cream); }
.bl-hero__title em { font-variation-settings: "opsz" 96, "SOFT" 100; }

.bl-hero__desc {
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.65;
  color: var(--paper-mute);
  max-width: 38ch;
  margin-bottom: 2rem;
}
[data-theme="dark"] .bl-hero__desc { color: rgba(246,248,251,0.5); }

.bl-hero__scroll {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  transition: opacity 0.2s;
}
.bl-hero__scroll:hover { opacity: 0.7; }

/* Featured card side */
.bl-hero__featured { height: clamp(420px, 60vh, 640px); }
.bl-card--featured { height: 100%; }

/* ============================================================
   BLOG LISTING — POSTS GRID
   ============================================================ */
.bl-posts {
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
}
.bl-posts__inner { max-width: 1400px; margin: 0 auto; }

.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}
.bl-grid .bl-card--small { aspect-ratio: 4/3; }

/* 3-up grid for "more posts" */
.bl-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.bl-grid--3 .bl-card--small { aspect-ratio: 4/3; }

.bl-empty { padding: 5rem 0; text-align: center; }
.bl-empty__text {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--paper-mute);
}
[data-theme="dark"] .bl-empty__text { color: rgba(245,237,224,0.4); }

/* ============================================================
   POST PAGE — PROGRESS BAR
   ============================================================ */
.pt-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 201;          /* one above the nav so the line is always visible */
  pointer-events: none;
}
.pt-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width 0.1s linear;
  will-change: width;
}

/* ============================================================
   POST PAGE — LOADING / 404 / ERROR
   ============================================================ */
.pt-loading {
  min-height: 100vh;
  padding: 5rem var(--pad-x) 3rem;
  background: var(--cream);
}
[data-theme="dark"] .pt-loading { background: #0A1628; }
.pt-loading__hero {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
  min-height: 70vh;
}
.pt-loading__left { display: flex; flex-direction: column; gap: 1rem; }
.pt-loading__right {
  height: clamp(320px,55vh,560px);
  background: var(--cream-deep);
  border-radius: 2px;
  animation: bl-shimmer 1.6s ease infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--cream-deep) 0%, #e0d5c0 50%, var(--cream-deep) 100%);
}
[data-theme="dark"] .pt-loading__right {
  background: #151618;
  background-image: linear-gradient(90deg,#151618 0%,#1e1c1a 50%,#151618 100%);
}
.pt-loading__bar {
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cream-deep) 0%, #ddd0b8 50%, var(--cream-deep) 100%);
  background-size: 200% 100%;
  animation: bl-shimmer 1.6s ease infinite;
}
[data-theme="dark"] .pt-loading__bar {
  background: linear-gradient(90deg,#1e1c1a 0%,#252320 50%,#1e1c1a 100%);
}
.pt-loading__bar--tag { height: 24px; width: 90px; }
.pt-loading__bar--title { height: 52px; width: 90%; }
.pt-loading__bar--short { width: 60%; }
.pt-loading__bar--meta { height: 20px; width: 200px; margin-top: 1rem; }

.pt-notfound {
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad-x);
}
[data-theme="dark"] .pt-notfound { background: #0A1628; }
.pt-notfound__inner { text-align: center; }
.pt-notfound__num {
  font-family: var(--mono);
  font-size: 6rem;
  color: var(--rule);
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}
[data-theme="dark"] .pt-notfound__num { color: rgba(245,237,224,0.08); }
.pt-notfound__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
[data-theme="dark"] .pt-notfound__title { color: var(--cream); }
.pt-notfound__sub { font-family: var(--body); color: var(--paper-mute); margin-bottom: 1.5rem; }
[data-theme="dark"] .pt-notfound__sub { color: rgba(245,237,224,0.5); }
.pt-notfound__back {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
}

/* ============================================================
   POST PAGE — HERO (Alec-style split: text left, photo right)
   ============================================================ */
.pt-article { background: var(--cream); }
[data-theme="dark"] .pt-article { background: #0A1628; }

.pt-hero {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  min-height: 100vh;
  align-items: stretch;
}

/* Left text side */
.pt-hero__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6rem var(--pad-x) clamp(3rem, 6vw, 5rem);
  padding-right: clamp(2rem, 4vw, 4rem);
}

/* Breadcrumb */
.pt-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
[data-theme="dark"] .pt-breadcrumb { color: rgba(245,237,224,0.35); }
.pt-breadcrumb__link { color: inherit; text-decoration: none; transition: color 0.2s; }
.pt-breadcrumb__link:hover { color: var(--ink); }
[data-theme="dark"] .pt-breadcrumb__link:hover { color: rgba(245,237,224,0.8); }
.pt-breadcrumb__sep { opacity: 0.3; }
.pt-breadcrumb__current { color: var(--paper-text); }
[data-theme="dark"] .pt-breadcrumb__current { color: rgba(245,237,224,0.7); }

/* Hero tag */
.pt-hero__tag { margin-bottom: 1.25rem; }

/* Hero title */
.pt-hero__title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 600;
  font-style: italic;
  font-variation-settings: "opsz" 72, "SOFT" 60;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 2rem;
}
[data-theme="dark"] .pt-hero__title { color: var(--cream); }

/* Author + date row */
.pt-hero__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
[data-theme="dark"] .pt-hero__meta { border-bottom-color: rgba(245,237,224,0.1); }
.pt-author { display: flex; align-items: center; gap: 0.75rem; }
.pt-author__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pt-author__name {
  display: block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink);
}
[data-theme="dark"] .pt-author__name { color: var(--cream); }
.pt-author__role {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
[data-theme="dark"] .pt-author__role { color: rgba(245,237,224,0.4); }
.pt-hero__details {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
[data-theme="dark"] .pt-hero__details { color: rgba(245,237,224,0.4); }

/* Tags */
.pt-hero__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.pt-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-mute);
  border: 1px solid var(--rule);
  padding: 0.2em 0.6em;
  border-radius: 2px;
}
[data-theme="dark"] .pt-tag { color: rgba(245,237,224,0.5); border-color: rgba(245,237,224,0.12); }

/* Share buttons (inline, above fold) */
.pt-share-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pt-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-mute);
  background: rgba(10,22,40,0.05);
  border: 1px solid var(--rule);
  padding: 0.45em 0.8em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.pt-share-btn:hover { color: var(--ink); background: rgba(10,22,40,0.08); border-color: var(--rule); }
[data-theme="dark"] .pt-share-btn { color: rgba(245,237,224,0.5); background: rgba(245,237,224,0.06); border-color: rgba(245,237,224,0.1); }
[data-theme="dark"] .pt-share-btn:hover { color: var(--cream); background: rgba(245,237,224,0.12); border-color: rgba(245,237,224,0.25); }
.pt-share-btn.is-copied { color: #1a6b3c; background: rgba(26,107,60,0.15); border-color: rgba(26,107,60,0.3); }

/* Right: cover photo */
.pt-hero__right {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #1a2942;
  min-height: 60vh;
}
.pt-cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(245,237,224,0.65) 0%, rgba(245,237,224,0) 45%);
  transition: background 0.3s ease;
}
[data-theme="dark"] .pt-cover__overlay {
  background: linear-gradient(to right, rgba(10,22,40,0.6) 0%, rgba(10,22,40,0) 45%);
}

/* ============================================================
   POST PAGE — BODY
   ============================================================ */
.pt-body-section {
  background: var(--cream);
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
}
[data-theme="dark"] .pt-body-section { background: #0f1012; }

.pt-body-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 5rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

/* TOC */
.pt-toc {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}
.pt-toc__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 0.75rem;
}
.pt-toc__nav { display: flex; flex-direction: column; }
.pt-toc__link {
  font-family: var(--body);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--paper-mute);
  text-decoration: none;
  padding: 0.3em 0 0.3em 0.75em;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.pt-toc__link--h3 { padding-left: 1.5em; font-size: 0.72rem; }
.pt-toc__link:hover { color: var(--ink); }
.pt-toc__link.is-active { color: var(--ink); border-left-color: var(--amber); }

/* Body content */
.pt-body {
  font-family: var(--body);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.8;
  color: var(--paper-text);
}
[data-theme="dark"] .pt-body { color: rgba(246,248,251,0.85); }
.pt-body p { margin-bottom: 1.5em; }
.pt-body h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  font-variation-settings: "opsz" 36, "SOFT" 40;
  color: var(--ink);
  margin: 2.5em 0 0.7em;
  line-height: 1.1;
}
[data-theme="dark"] .pt-body h2 { color: #f6f8fb; }
.pt-body h3 {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 500;
  font-variation-settings: "opsz" 24, "SOFT" 30;
  color: var(--ink);
  margin: 2em 0 0.5em;
  line-height: 1.2;
}
[data-theme="dark"] .pt-body h3 { color: #f6f8fb; }
.pt-body h4 {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5em 0 0.4em;
}
[data-theme="dark"] .pt-body h4 { color: #f6f8fb; }
.pt-body blockquote {
  border-left: 3px solid var(--amber);
  margin: 2.5em 0;
  padding: 0.5em 0 0.5em 1.5em;
}
.pt-body blockquote p {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-variation-settings: "opsz" 24, "SOFT" 60;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
[data-theme="dark"] .pt-body blockquote p { color: #f6f8fb; }
.pt-body ul, .pt-body ol { margin: 1.25em 0; padding-left: 1.5em; }
.pt-body li { margin-bottom: 0.4em; }
.pt-body strong { font-weight: 600; color: var(--ink); }
[data-theme="dark"] .pt-body strong { color: #f6f8fb; }
.pt-body em { font-style: italic; }
.pt-body code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--cream-deep);
  color: var(--ink);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}
[data-theme="dark"] .pt-body code { background: #1a1c1f; color: #f6f8fb; }
.pt-body a { color: var(--amber-deep); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .pt-body a { color: var(--amber); }
.pt-img { margin: 2.5em 0; }
.pt-img img { width: 100%; height: auto; display: block; border-radius: 2px; }
.pt-img__cap {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--paper-mute);
  margin-top: 0.6rem;
  text-align: center;
}

/* ============================================================
   POST PAGE — MORE POSTS
   ============================================================ */
.pt-more {
  background: #0A1628;
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
}
[data-theme="dark"] .pt-more { background: #060a10; }
.pt-more__inner { max-width: 1400px; margin: 0 auto; }
.pt-more__header { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.pt-more__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  font-style: italic;
  font-variation-settings: "opsz" 48, "SOFT" 50;
  line-height: 1;
  color: var(--cream);
  margin: 0;
}
[data-theme="dark"] .pt-more__title { color: #f6f8fb; }
.pt-more__title em { font-variation-settings: "opsz" 48, "SOFT" 100; }
.pt-more__back { margin-top: 2.5rem; text-align: center; }
.pt-more__back-link {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  transition: opacity 0.2s;
}
.pt-more__back-link:hover { opacity: 0.7; }

/* ============================================================
   POST PAGE — PREV / NEXT
   ============================================================ */
.pt-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #0A1628;
  border-top: 1px solid rgba(245,237,224,0.08);
}
[data-theme="dark"] .pt-nav { background: #060a10; border-top-color: rgba(255,255,255,0.06); }
.pt-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem var(--pad-x);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  border-top: 1px solid rgba(245,237,224,0.08);
}
.pt-nav__item:hover { background: rgba(245,237,224,0.04); }
.pt-nav__item--next { align-items: flex-end; text-align: right; }
.pt-nav__dir {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.3);
}
.pt-nav__ptitle {
  font-family: var(--display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 500;
  font-variation-settings: "opsz" 18, "SOFT" 20;
  color: var(--cream);
  line-height: 1.2;
}
[data-theme="dark"] .pt-nav__ptitle { color: #f6f8fb; }

/* ============================================================
   HOMEPAGE LATEST POSTS (also uses bl-card system now)
   ============================================================ */
.latest-posts {
  background: var(--ink);
  padding: clamp(4rem, 8vw, 8rem) var(--pad-x);
}
[data-theme="dark"] .latest-posts { background: #0A1628; }
.latest-posts__inner { max-width: 1400px; margin: 0 auto; }
.latest-posts__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.latest-posts__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.35);
  margin-bottom: 0.5rem;
}
.latest-posts__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  font-style: italic;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  line-height: 1;
  color: var(--cream);
  margin: 0;
}
.latest-posts__title em { font-variation-settings: "opsz" 48, "SOFT" 100; }
.latest-posts__all {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.latest-posts__all:hover { opacity: 0.7; }
.latest-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.latest-posts__grid .bl-card--small { aspect-ratio: 4/3; }

/* ============================================================
   EDUCATION PAGE
   ============================================================ */

/* ── Hero ── */
.edu-hero {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(7rem, 14vw, 14rem) var(--pad-x) clamp(4rem, 8vw, 8rem);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .edu-hero { background: #0A1628; }

.edu-hero__glow {
  position: absolute;
  top: -15vw; right: -5vw;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(244,165,71,0.22) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.edu-hero__inner { max-width: 70rem; margin: 0 auto; }

.edu-hero__pre {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.edu-hero__pre::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--amber);
}

.edu-hero__title {
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 500;
  font-variation-settings: "opsz" 72, "SOFT" 20;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 1.5rem;
}
.edu-hero__title em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 72, "SOFT" 80;
}

.edu-hero__sub {
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--ink-mute);
  max-width: 36rem;
  line-height: 1.65;
}

.edu-hero__strip {
  margin-top: 3rem;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-ink);
}
.edu-hero__count {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.4);
}
.edu-hero__count strong {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

/* ── Body ── */
.edu-body {
  background: var(--cream);
  padding: var(--section) var(--pad-x);
}
[data-theme="dark"] .edu-body { background: #171614; }
.edu-body__inner { max-width: 70rem; margin: 0 auto; }

/* ── Institution card ── */
.edu-card {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--rule);
}
.edu-card:last-child { border-bottom: 1px solid var(--rule); }
[data-theme="dark"] .edu-card { border-color: rgba(205,204,202,0.12); }

.edu-card__top {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

/* ── Badge ── */
.edu-badge {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}
.edu-badge--isg { background: var(--amber); color: var(--ink); }
.edu-badge--iut { background: var(--ink); color: var(--cream); }
[data-theme="dark"] .edu-badge--iut { background: rgba(245,237,224,0.15); color: var(--cream); border: 1px solid rgba(245,237,224,0.2); }
.edu-badge--gss { background: transparent; color: var(--paper-mute); border: 1px solid var(--rule); }
[data-theme="dark"] .edu-badge--gss { color: var(--ink-mute); border-color: rgba(205,204,202,0.2); }
/* Logo image badge — replaces coloured circle for schools that have real logos */
.edu-badge--logo {
  border-radius: 10px;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
  border: 1px solid rgba(0,0,0,0.08);
}
[data-theme="dark"] .edu-badge--logo { background: rgba(255,255,255,0.92); }


/* ── Card header ── */
.edu-card__school-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.edu-card__school {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 500;
  font-variation-settings: "opsz" 36, "SOFT" 20;
  color: var(--paper-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
[data-theme="dark"] .edu-card__school { color: var(--ink-text); }
.edu-card__location {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
[data-theme="dark"] .edu-card__location { color: var(--ink-mute); }
.edu-card__program {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 1rem;
}
[data-theme="dark"] .edu-card__program { color: var(--amber); }

/* ── Chips ── */
.edu-card__chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.edu-chip {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--rule);
  color: var(--paper-mute);
  background: transparent;
}
[data-theme="dark"] .edu-chip { color: var(--ink-mute); border-color: rgba(205,204,202,0.2); }
.edu-chip--accent {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}
[data-theme="dark"] .edu-chip--accent { background: var(--amber); color: #0A1628; border-color: var(--amber); }

/* ── Two-column grid ── */
.edu-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* ── Description ── */
.edu-card__desc {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--paper-text);
}
[data-theme="dark"] .edu-card__desc { color: var(--ink-text); }
.edu-card__desc p + p { margin-top: 1em; }

/* ── Modules ── */
.edu-modules { margin-top: 2rem; }
.edu-modules__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .edu-modules__label { color: var(--ink-mute); }
.edu-modules__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.edu-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  background: var(--cream-deep);
  color: var(--paper-text);
  border-radius: 4px;
}
[data-theme="dark"] .edu-tag { background: rgba(245,237,224,0.08); color: var(--ink-text); }

/* ── Opinion pull quote ── */
.edu-opinion {
  border-left: 2px solid var(--amber);
  padding: 0.75rem 0 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
}
.edu-opinion__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .edu-opinion__label { color: var(--ink-mute); }
.edu-opinion__text {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 24, "SOFT" 60;
  color: var(--paper-text);
  line-height: 1.5;
}
[data-theme="dark"] .edu-opinion__text { color: var(--ink-text); }

/* ── Diploma card ── */
.edu-diploma {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  aspect-ratio: 1.41 / 1;
}
[data-theme="dark"] .edu-diploma { background: rgba(245,237,224,0.05); border-color: rgba(205,204,202,0.12); }

.edu-diploma__doc {
  position: absolute; inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.edu-diploma__seal {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--paper-mute);
  opacity: 0.45;
}
.edu-diploma__line {
  height: 6px;
  border-radius: 3px;
  background: var(--paper-mute);
  opacity: 0.25;
}
.edu-diploma__line--wide  { width: 60%; }
.edu-diploma__line--med   { width: 45%; }
.edu-diploma__line--short { width: 30%; }
.edu-diploma__line--thin  { height: 3px; opacity: 0.15; }
/* Real diploma photo — blurred */
.edu-diploma__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(6px);
  transform: scale(1.04); /* prevent blur edge fringing */
  user-select: none;
  pointer-events: none;
}

.edu-diploma__overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(245, 237, 224, 0.72);
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 1.5rem;
}
[data-theme="dark"] .edu-diploma__overlay { background: rgba(23,22,20,0.75); }

.edu-diploma__lock { font-size: 1.4rem; line-height: 1; }
.edu-diploma__note {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  max-width: 11rem;
  line-height: 1.5;
}
[data-theme="dark"] .edu-diploma__note { color: var(--ink-mute); }
.edu-diploma__cta {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--amber-deep);
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
[data-theme="dark"] .edu-diploma__cta { color: var(--amber); border-color: var(--amber); }
.edu-diploma__cta:hover { background: var(--amber-deep); color: var(--cream); }
[data-theme="dark"] .edu-diploma__cta:hover { background: var(--amber); color: #0A1628; }

/* ── GCSEs smaller card ── */
.edu-card--small .edu-card__grid { grid-template-columns: 1fr; gap: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .edu-card__top { grid-template-columns: 72px 1fr; gap: 1.25rem; }
  .edu-card__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .edu-card__top { grid-template-columns: 1fr; gap: 1rem; }
  .edu-badge { width: 58px; height: 58px; font-size: 0.56rem; }
  .edu-hero__strip { gap: 1.5rem; }
}

/* ============================================================
   QUALIFICATIONS PAGE
   ============================================================ */

/* ── Hero: cream bg + amber top-rule (inverted from edu's navy hero) ── */
.qua-hero {
  background: var(--cream);
  padding: clamp(7rem, 14vw, 14rem) var(--pad-x) clamp(3.5rem, 6vw, 6rem);
  border-top: 3px solid var(--amber);
  position: relative;
}
[data-theme="dark"] .qua-hero { background: #171614; border-top-color: var(--amber); }

.qua-hero__inner { max-width: 70rem; margin: 0 auto; }

.qua-hero__pre {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
[data-theme="dark"] .qua-hero__pre { color: var(--amber); }
.qua-hero__pre::after {
  content: '';
  display: block;
  flex: 1;
  max-width: 4rem;
  height: 1px;
  background: var(--amber-deep);
  opacity: 0.5;
}
[data-theme="dark"] .qua-hero__pre::after { background: var(--amber); }

.qua-hero__title {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 500;
  font-variation-settings: "opsz" 60, "SOFT" 20;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--paper-text);
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .qua-hero__title { color: var(--ink-text); }
.qua-hero__title em {
  font-style: italic;
  color: var(--amber-deep);
  font-variation-settings: "opsz" 60, "SOFT" 80;
}
[data-theme="dark"] .qua-hero__title em { color: var(--amber); }

.qua-hero__sub {
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--paper-mute);
  max-width: 34rem;
  line-height: 1.65;
}
[data-theme="dark"] .qua-hero__sub { color: var(--ink-mute); }

.qua-hero__strip {
  margin-top: 2.5rem;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
[data-theme="dark"] .qua-hero__strip { border-top-color: var(--rule); }

.qua-hero__stat {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
[data-theme="dark"] .qua-hero__stat { color: var(--ink-mute); }
.qua-hero__stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--paper-text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}
[data-theme="dark"] .qua-hero__stat strong { color: var(--ink-text); }

/* ── Body: cream-deep bg (different from edu's plain cream) ── */
.qua-body {
  background: var(--cream-deep);
  padding: var(--section) var(--pad-x);
}
[data-theme="dark"] .qua-body { background: #1a1816; }
.qua-body__inner { max-width: 70rem; margin: 0 auto; }

/* ── Section eyebrow ── */
.qua-section-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
[data-theme="dark"] .qua-section-label { color: var(--ink-mute); }
.qua-section-label::before, .qua-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── Card grid (3-col → differs from edu's stacked articles) ── */
.qua-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* ── Cert card ── */
.qua-card {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
[data-theme="dark"] .qua-card { background: #222019; border-color: rgba(205,204,202,0.1); }
.qua-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(10,22,40,0.1);
}
[data-theme="dark"] .qua-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.45); }

/* Coming-soon card: muted, no hover lift */
.qua-card--soon { opacity: 0.78; }
.qua-card--soon:hover { transform: none; box-shadow: none; }

/* ── Blurred certificate at top of card ── */
.qua-cert {
  position: relative;
  background: var(--cream-deep);
  aspect-ratio: 1.55 / 1;
  overflow: hidden;
  flex-shrink: 0;
}
[data-theme="dark"] .qua-cert { background: rgba(245,237,224,0.04); }

.qua-cert__doc {
  position: absolute; inset: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.qua-cert__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(6px);
  transform: scale(1.04); /* prevent blur edge fringing */
  user-select: none;
  pointer-events: none;
}
.qua-cert__seal {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--paper-mute);
  opacity: 0.4;
}
.qua-cert__line {
  height: 5px;
  border-radius: 3px;
  background: var(--paper-mute);
  opacity: 0.22;
}
.qua-cert__line--wide  { width: 55%; }
.qua-cert__line--med   { width: 42%; }
.qua-cert__line--short { width: 28%; }
.qua-cert__line--thin  { height: 3px; opacity: 0.13; }

.qua-cert__overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(245, 237, 224, 0.68);
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 1rem;
}
[data-theme="dark"] .qua-cert__overlay { background: rgba(23,22,20,0.72); }

/* Coming-soon overlay: crosshatch stripe pattern */
.qua-cert__overlay--soon {
  background: repeating-linear-gradient(
    -45deg,
    rgba(245,237,224,0.5) 0px,
    rgba(245,237,224,0.5) 8px,
    rgba(234,224,206,0.3) 8px,
    rgba(234,224,206,0.3) 16px
  );
}
[data-theme="dark"] .qua-cert__overlay--soon {
  background: repeating-linear-gradient(
    -45deg,
    rgba(23,22,20,0.6) 0px,
    rgba(23,22,20,0.6) 8px,
    rgba(30,28,26,0.4) 8px,
    rgba(30,28,26,0.4) 16px
  );
}

.qua-cert__lock { font-size: 1.2rem; line-height: 1; }
.qua-cert__note {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  max-width: 9rem;
  line-height: 1.5;
}
[data-theme="dark"] .qua-cert__note { color: var(--ink-mute); }
.qua-cert__cta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
  padding: 0.4rem 1rem;
  border: 1px solid var(--amber-deep);
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
[data-theme="dark"] .qua-cert__cta { color: var(--amber); border-color: var(--amber); }
.qua-cert__cta:hover { background: var(--amber-deep); color: var(--cream); }
[data-theme="dark"] .qua-cert__cta:hover { background: var(--amber); color: #0A1628; }

/* ── Card body (below cert image) ── */
.qua-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Issuer row */
.qua-issuer-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.qua-issuer-badge {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.qua-issuer-badge--hs  { background: #FF7A59; color: #fff; }
.qua-issuer-badge--ga  { background: #E8710A; color: #fff; }
.qua-issuer-badge--pmi { background: var(--ink); color: var(--cream); }
[data-theme="dark"] .qua-issuer-badge--pmi { background: rgba(245,237,224,0.15); color: var(--cream); }

.qua-issuer-name {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
[data-theme="dark"] .qua-issuer-name { color: var(--ink-mute); }

/* Cert title */
.qua-card__name {
  font-family: var(--display);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  font-variation-settings: "opsz" 18, "SOFT" 20;
  color: var(--paper-text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
[data-theme="dark"] .qua-card__name { color: var(--ink-text); }

/* Skills */
.qua-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.qua-skill {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  background: var(--cream-deep);
  color: var(--paper-mute);
  border-radius: 4px;
}
[data-theme="dark"] .qua-skill { background: rgba(245,237,224,0.07); color: var(--ink-mute); }

/* Status chip + CTA row */
.qua-card__foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
[data-theme="dark"] .qua-card__foot { border-top-color: rgba(205,204,202,0.12); }

.qua-status {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}
.qua-status--certified {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
[data-theme="dark"] .qua-status--certified {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border-color: rgba(34,197,94,0.2);
}
.qua-status--soon {
  background: rgba(244,165,71,0.12);
  color: var(--amber-deep);
  border: 1px solid rgba(244,165,71,0.3);
}
[data-theme="dark"] .qua-status--soon { color: var(--amber); border-color: rgba(244,165,71,0.25); }

.qua-card__link {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
  transition: opacity 0.2s;
}
[data-theme="dark"] .qua-card__link { color: var(--amber); }
.qua-card__link:hover { opacity: 0.65; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .qua-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .qua-grid { grid-template-columns: 1fr; }
  .qua-hero__strip { gap: 1.5rem; }
}

/* ============================================================
   RESPONSIVE — BLOG + POST
   ============================================================ */
@media (max-width: 900px) {
  .bl-hero__inner { grid-template-columns: 1fr; }
  .bl-hero { min-height: auto; }
  .bl-hero__featured { height: clamp(300px, 50vw, 420px); }
  .pt-hero { grid-template-columns: 1fr; min-height: auto; }
  .pt-hero__left { padding: 5rem var(--pad-x) 2rem; }
  .pt-hero__right { min-height: 320px; }
  .pt-body-layout { grid-template-columns: 1fr; gap: 2rem; }
  .pt-toc { position: static; max-height: none; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
  .pt-nav { grid-template-columns: 1fr; }
  .pt-nav__item--next { align-items: flex-start; text-align: left; }
  .bl-grid--3 { grid-template-columns: 1fr 1fr; }
  .latest-posts__grid { grid-template-columns: 1fr 1fr; }
  .latest-posts__header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .bl-grid--3 { grid-template-columns: 1fr; }
  .latest-posts__grid { grid-template-columns: 1fr; }
  .pt-hero__meta { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .pt-loading__hero { grid-template-columns: 1fr; }
  .pt-loading__right { display: none; }
}

/* ============================================================
   FOOTER — Rich (ftr-*)
   ============================================================ */
.ftr {
  background: #0A1628;
  border-top: 1px solid rgba(245, 237, 224, 0.08);
  font-family: var(--body);
}

.ftr__top {
  display: grid;
  grid-template-columns: 1.15fr 0.75fr 1.1fr;
  gap: 3rem;
  padding: 4rem var(--pad-x) 3rem;
  border-bottom: 1px solid rgba(245, 237, 224, 0.08);
}

/* ── Brand column ── */
.ftr__logo {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: rgba(245, 237, 224, 0.95);
  text-decoration: none;
  line-height: 1;
  margin-bottom: 0.7rem;
  font-variation-settings: "opsz" 72;
  transition: color 0.2s;
}
.ftr__logo:hover { color: #F4A547; }

.ftr__tagline {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #F4A547;
  margin: 0 0 0.3rem;
}

.ftr__location {
  font-size: 0.78rem;
  color: rgba(245, 237, 224, 0.38);
  margin: 0 0 1.1rem;
  line-height: 1.5;
}

.ftr__avail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  color: rgba(245, 237, 224, 0.7);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 2rem;
  padding: 0.3rem 0.8rem 0.3rem 0.55rem;
  margin-bottom: 1.5rem;
}

.ftr__avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: ftrPulse 2.2s ease-in-out infinite;
}

@keyframes ftrPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50%       { opacity: 1;    transform: scale(1.15); }
}

.ftr__socials {
  display: flex;
  gap: 0.6rem;
}

.ftr__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(245, 237, 224, 0.14);
  border-radius: 50%;
  color: rgba(245, 237, 224, 0.5);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ftr__social:hover {
  border-color: rgba(245, 237, 224, 0.5);
  color: rgba(245, 237, 224, 0.95);
  background: rgba(245, 237, 224, 0.05);
}
.ftr__social svg { display: block; }

/* ── Nav column ── */
.ftr__nav-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.3);
  margin: 0 0 1rem;
}

.ftr__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ftr__nav-list a {
  color: rgba(245, 237, 224, 0.55);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.ftr__nav-list a:hover { color: rgba(245, 237, 224, 0.95); }

/* ── Newsletter column ── */
.ftr__newsletter-desc {
  font-size: 0.83rem;
  line-height: 1.7;
  color: rgba(245, 237, 224, 0.45);
  margin: 0 0 1.2rem;
}

.ftr__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ftr__input {
  background: rgba(245, 237, 224, 0.04);
  border: 1px solid rgba(245, 237, 224, 0.14);
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  font-family: var(--body);
  font-size: 0.85rem;
  color: rgba(245, 237, 224, 0.9);
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.ftr__input::placeholder { color: rgba(245, 237, 224, 0.25); }
.ftr__input:focus {
  border-color: rgba(245, 237, 224, 0.4);
  background: rgba(245, 237, 224, 0.07);
}

.ftr__btn {
  background: #F4A547;
  color: #0A1628;
  border: none;
  border-radius: 4px;
  padding: 0.65rem 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.15s;
}
.ftr__btn:hover:not(:disabled) { background: #D88416; }
.ftr__btn:active:not(:disabled) { transform: scale(0.98); }
.ftr__btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ftr__form-msg {
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}
.ftr__form-msg--ok  { color: #4ade80; background: rgba(74, 222, 128, 0.06); border: 1px solid rgba(74, 222, 128, 0.18); }
.ftr__form-msg--err { color: #f87171; background: rgba(248, 113, 113, 0.06); border: 1px solid rgba(248, 113, 113, 0.18); }

/* ── Bottom bar ── */
.ftr__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem var(--pad-x);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.22);
}

.ftr__totop {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.ftr__totop:hover { color: rgba(245, 237, 224, 0.65); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .ftr__top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2rem;
  }
  .ftr__newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .ftr__top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem var(--pad-x) 2.5rem;
  }
  .ftr__bottom {
    flex-direction: column;
    gap: 0.45rem;
    text-align: center;
    padding: 1rem var(--pad-x) 1.25rem;
  }
}

/* ============================================================
   BOOKS PAGE — Reading List
   ============================================================ */

/* Hero (navy panel) */
.bk-hero {
  background: #0A1628;
  padding: clamp(6rem, 12vw, 9rem) var(--pad-x) clamp(4rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}
.bk-hero__glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(244,165,71,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.bk-hero__inner {
  max-width: 70rem;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  animation: bk-fade-up 0.9s var(--ease-out) 0.1s forwards;
}
@keyframes bk-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.bk-hero__pre {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.bk-hero__pre::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--amber);
  opacity: 0.5;
}
.bk-hero__title {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 600;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 60;
  line-height: 1;
  color: var(--cream);
  margin: 0 0 1.5rem;
  max-width: 16ch;
}
.bk-hero__title em {
  font-variation-settings: "opsz" 96, "SOFT" 100;
  color: var(--amber);
  font-style: inherit;
}
.bk-hero__desc {
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.65;
  color: rgba(245,237,224,0.55);
  max-width: 44ch;
  margin-bottom: 3rem;
}
.bk-hero__strip {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(245,237,224,0.1);
}
.bk-hero__stat { display: flex; flex-direction: column; gap: 0.3rem; }
.bk-hero__stat-num {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  font-variation-settings: "opsz" 72, "SOFT" 40;
  color: var(--cream);
  line-height: 1;
}
.bk-hero__stat-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.38);
}

/* Section (cream body) */
.bk-section {
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
}
.bk-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid — 3 columns desktop, 2 tablet, 1 mobile */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) { .bk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .bk-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Card — vertical layout: cover on top, body below */
.bk-card {
  background: #fff;
  border: 1px solid rgba(10,22,40,0.07);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
[data-theme="dark"] .bk-card {
  background: #101b2e;
  border-color: rgba(245,237,224,0.07);
}
.bk-card:hover {
  box-shadow: 0 12px 40px rgba(10,22,40,0.12);
  transform: translateY(-3px);
}
[data-theme="dark"] .bk-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
/* Featured: span all 3 cols, go back to row layout for emphasis */
.bk-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

/* Cover — full card width, portrait aspect ratio */
.bk-card__cover-link {
  display: block;
  width: 100%;
  text-decoration: none;
  flex-shrink: 0;
}
.bk-card--featured .bk-card__cover-link { width: 260px; }
.bk-card__cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #e8e0ce;
  overflow: hidden;
  position: relative;
}
.bk-card--featured .bk-card__cover-wrap {
  aspect-ratio: unset;
  height: 100%;
  min-height: 280px;
}
[data-theme="dark"] .bk-card__cover-wrap { background: #1a2942; }
.bk-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.bk-card:hover .bk-card__cover { transform: scale(1.04); }
.bk-card__cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bk-card__cover-fallback span {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(10,22,40,0.28);
}
[data-theme="dark"] .bk-card__cover-fallback span { color: rgba(245,237,224,0.18); }

/* Body */
.bk-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
  min-width: 0;
}
.bk-card--featured .bk-card__body { padding: 2rem; }

/* Meta row */
.bk-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.bk-card__category {
  font-family: var(--mono);
  font-size: 0.53rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(244,165,71,0.1);
  padding: 0.2em 0.65em;
  border-radius: 2px;
}
[data-theme="dark"] .bk-card__category { background: rgba(244,165,71,0.14); }
.bk-card__rating {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  background: var(--amber);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  line-height: 1;
  flex-shrink: 0;
}
.bk-card__rating-num {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  font-variation-settings: "opsz" 24, "SOFT" 0;
  color: #0A1628;
  line-height: 1;
}
.bk-card__rating-denom {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: rgba(10,22,40,0.55);
  line-height: 1.1;
}

/* Title */
.bk-card__title {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 600;
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 40;
  line-height: 1.2;
  color: var(--paper-text);
  margin: 0 0 0.35rem;
}
[data-theme="dark"] .bk-card__title { color: var(--cream); }
.bk-card--featured .bk-card__title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Author */
.bk-card__author {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--paper-mute);
  margin: 0 0 1rem;
}
[data-theme="dark"] .bk-card__author { color: rgba(245,237,224,0.38); }

/* Thoughts */
.bk-card__thoughts {
  font-family: var(--body);
  font-size: 0.82rem;
  line-height: 1.62;
  color: var(--paper-mute);
  font-style: italic;
  margin: 0 0 0.5rem;
  flex: 1;
}
[data-theme="dark"] .bk-card__thoughts { color: rgba(245,237,224,0.42); }

/* What I Learned */
.bk-card__divider {
  border: none;
  border-top: 1px solid rgba(10,22,40,0.08);
  margin: 0.75rem 0;
}
[data-theme="dark"] .bk-card__divider { border-color: rgba(245,237,224,0.08); }
.bk-card__learned { margin-bottom: 1rem; }
.bk-card__learned-label {
  font-family: var(--mono);
  font-size: 0.53rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .bk-card__learned-label { color: rgba(245,237,224,0.28); }
.bk-card__learned-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}
.bk-card__learned-list li {
  font-family: var(--body);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--paper-text);
  padding-left: 1rem;
  position: relative;
}
[data-theme="dark"] .bk-card__learned-list li { color: rgba(245,237,224,0.62); }
.bk-card__learned-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-size: 0.62rem;
  top: 0.1em;
}

/* Buy button */
.bk-card__buy {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0A1628;
  background: var(--amber);
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 2px;
  margin-top: auto;
  align-self: flex-start;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.bk-card__buy:hover {
  background: var(--amber-deep);
  transform: translateX(3px);
}

/* Skeleton */
.bk-card--skeleton {
  background: var(--cream-deep);
  border-color: transparent;
  min-height: 220px;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .bk-card--skeleton { background: #151618; }
.bk-skeleton__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%
  );
  animation: bk-shimmer 1.6s ease-in-out infinite;
}
[data-theme="dark"] .bk-skeleton__shine {
  background: linear-gradient(
    90deg,
    transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%
  );
}
@keyframes bk-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Empty state */
.bk-empty { grid-column: 1 / -1; padding: 5rem 0; text-align: center; }
.bk-empty__title {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-style: italic;
  font-variation-settings: "opsz" 48, "SOFT" 60;
  color: var(--paper-mute);
}
[data-theme="dark"] .bk-empty__title { color: rgba(245,237,224,0.28); }

/* Responsive */
@media (max-width: 860px) {
  .bk-card--featured .bk-card__cover-link { width: 160px; }
}
@media (max-width: 700px) {
  .bk-grid { grid-template-columns: 1fr; }
  .bk-card--featured { grid-column: auto; }
}
@media (max-width: 540px) {
  /* Stack every card vertically — including featured */
  .bk-card,
  .bk-card--featured { flex-direction: column; }
  /* Cover spans full card width */
  .bk-card__cover-link,
  .bk-card--featured .bk-card__cover-link { width: 100%; }
  /* Portrait aspect ratio — DO NOT set height (it overrides aspect-ratio) */
  .bk-card__cover-wrap,
  .bk-card--featured .bk-card__cover-wrap {
    aspect-ratio: 2 / 3;
    height: auto;
    min-height: unset;
  }
  .bk-hero__strip { gap: 2rem; flex-wrap: wrap; }
}

/* ============================================================
   PREFERS REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Exception: theme color transitions should still work smoothly */
  html, body { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .fasep__path { stroke-dashoffset: 0; }
  .reveal-word__inner { transform: none !important; transition: none !important; }
  .marquee__track { animation: none !important; }
  .cursor-dot, .cursor-ring, .cursor-ripple { display: none !important; }
  .beginning__sidebar,
  .fasep__rail { opacity: 1 !important; transform: none !important; }
  .beginning__body p,
  .fasep__text p { opacity: 1 !important; transform: none !important; }
  .bk-hero__inner { opacity: 1 !important; transform: none !important; animation: none !important; }
  .bk-skeleton__shine { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   IN THE FIELD — Experiences Gallery Page
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.exp-hero {
  position: relative;
  padding: clamp(7rem, 14vw, 11rem) var(--gap) clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}
.exp-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.exp-hero__inner {
  max-width: var(--content-w);
  margin: 0 auto;
}
.exp-hero__pre {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.exp-hero__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.exp-hero__title em {
  font-style: italic;
  color: var(--accent);
}
.exp-hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 52ch;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}
.exp-hero__strip {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.exp-hero__count strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.exp-hero__count span {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--mono);
}

/* ── Gallery grid ── */
.exp-gallery {
  padding: clamp(3rem, 6vw, 5rem) var(--gap) clamp(5rem, 10vw, 8rem);
  background: var(--surface);
}
.exp-gallery__inner {
  max-width: var(--content-w);
  margin: 0 auto;
}
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
}

/* ── Gallery card ── */
.exp-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg, var(--paper));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94),
              box-shadow 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}
.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -10px color-mix(in srgb, var(--ink) 18%, transparent);
}

/* Image wrapper */
.exp-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--border);
}
.exp-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
  display: block;
}
.exp-card:hover .exp-card__img-wrap img {
  transform: scale(1.04);
}

/* Tag badge */
.exp-card__tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  backdrop-filter: blur(8px);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
}

/* Text body */
.exp-card__body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.exp-card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.exp-card__desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.exp-card__meta {
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Wide card (spans 2 cols on large screens) ── */
@media (min-width: 780px) {
  .exp-card--wide {
    grid-column: span 2;
  }
  .exp-card--wide .exp-card__img-wrap {
    aspect-ratio: 16 / 7;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .exp-card { transition: none !important; }
  .exp-card__img-wrap img { transition: none !important; }
}

/* ============================================================
   GLOBAL MOBILE — 375px–767px optimisations
   ============================================================ */

/* ── Prevent any horizontal overflow on all pages ── */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }

  /* ── Section padding tightened on phones ── */
  :root {
    --section: clamp(3.5rem, 8vw, 8rem);
    --pad-x:   clamp(1.25rem, 5vw, 2rem);
  }

  /* ── Hero (homepage) — tighter on phone ── */
  .hero { padding: 3rem var(--pad-x) 7rem; }
  .hero__title { font-size: clamp(3.2rem, 13vw, 7rem); line-height: 0.95; }
  .hero__label { margin-bottom: 2rem; font-size: 0.65rem; }
  .hero__portrait { max-height: 40vw; }

  /* ── Marquee: smaller text on phone ── */
  .marquee__item { font-size: clamp(0.6rem, 2.5vw, 0.75rem); gap: 1rem; }

  /* ── Number section ── */
  .number { padding: clamp(3rem, 8vw, 6rem) var(--pad-x); }
  .number__figure { font-size: clamp(3.5rem, 18vw, 8rem); }

  /* ── Contact section on homepage ── */
  .contact { padding: clamp(3rem, 8vw, 6rem) var(--pad-x); }
  .contact__link { grid-template-columns: 1fr; gap: 0.2rem; }
  .contact__label { font-size: 0.6rem; }
  .contact__value { font-size: clamp(0.95rem, 4vw, 1.2rem); }

  /* ── Blog listing hero ── */
  .bl-hero { padding: 5rem var(--pad-x) 3rem; }
  .bl-hero__title { font-size: clamp(2.2rem, 10vw, 4rem); }

  /* ── Blog listing strip stats — wrap ── */
  .bl-hero__strip, .bk-hero__strip,
  .edu-hero__strip, .qua-hero__strip {
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
  }

  /* ── Post page hero on smaller phones ── */
  .pt-hero__left { padding: 4.5rem var(--pad-x) 2rem; }
  .pt-hero__title { font-size: clamp(1.8rem, 7vw, 3rem); }

  /* ── Contact page — contact links ── */
  .cp-link { grid-template-columns: 6rem 1fr auto; gap: 0.75rem; padding: 1rem 0.5rem; }
  .cp-link__value { font-size: 0.9rem; word-break: break-all; }

  /* ── Education hero ── */
  .edu-hero { padding: clamp(5rem, 10vw, 8rem) var(--pad-x) clamp(3rem, 6vw, 5rem); }
  .edu-hero__title { font-size: clamp(2.4rem, 10vw, 4.5rem); }

  /* ── Qualifications hero ── */
  .qua-hero { padding: clamp(5rem, 10vw, 8rem) var(--pad-x) clamp(3rem, 6vw, 5rem); }

  /* ── Experiences — lightbox close button ── */
  .exp-lb__x { width: 44px; height: 44px; font-size: 1.5rem; }
  .exp-lb__nav { width: 44px; height: 44px; }

  /* ── Books hero ── */
  .bk-hero { padding: clamp(5rem, 10vw, 8rem) var(--pad-x) clamp(2.5rem, 5vw, 4rem); }

  /* ── Footer form on mobile ── */
  .ftr__form { flex-direction: column; gap: 0.75rem; }
  .ftr__input, .ftr__btn { width: 100%; }
  .ftr__btn { min-height: 48px; }

  /* ── Testimonial section ── */
  .tst { padding: clamp(3rem, 8vw, 5rem) var(--pad-x); }
  .tst__quote { font-size: clamp(1rem, 3.5vw, 1.2rem); }
}

/* ── Very small phones (≤ 375px) ── */
@media (max-width: 375px) {
  .nav__mark { font-size: 1.2rem; }
  .pt-hero__title { font-size: 1.7rem; }
  .bk-hero__stat-num { font-size: 1.6rem; }
}

/* ============================================================
   EDITORIAL SECTION — blog, education, qualifications
   Shared rich-text closing section, bilingual via JS
   ============================================================ */
.editorial-section {
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
  background: var(--cream);
  border-top: 1px solid var(--rule);
}
[data-theme="dark"] .editorial-section {
  background: #0f1a2b;
  border-top-color: rgba(245,237,224,0.07);
}
.editorial-section__inner {
  max-width: 720px;
  margin: 0 auto;
}
.editorial-section__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.5rem;
}
.editorial-section__body p {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: -0.005em;
  color: var(--paper-text);
  margin: 0 0 1.4em;
}
[data-theme="dark"] .editorial-section__body p {
  color: rgba(245,237,224,0.78);
}
.editorial-section__body p:last-child { margin-bottom: 0; }
.editorial-section__body strong {
  font-weight: 500;
  color: var(--ink);
}
[data-theme="dark"] .editorial-section__body strong { color: var(--cream); }
.editorial-section__body em {
  font-style: italic;
  color: var(--amber);
}
.editorial-section__body a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s ease;
}
.editorial-section__body a:hover { opacity: 0.75; }

@media (max-width: 600px) {
  .editorial-section { padding: 3rem var(--pad-x); }
  .editorial-section__body p { font-size: 1rem; line-height: 1.65; }
}
