/* =========================================================
   Asanka's Personal Blog — Warm Editorial
   Calm · honest · premium · literary
   ========================================================= */

:root {
  /* Paper & ink */
  --paper: #f7f3ec;
  --paper-2: #f1eadf;
  --surface: #fffdf8;
  --ink: #1b2a25;
  --muted: #5a6b62;
  --soft: #34433c;

  /* Brand */
  --forest: #234f45;
  --forest-deep: #16352f;
  --leaf: #4f8a73;
  --gold: #b5894a;       /* decorative gold (rules, dots) */
  --gold-ink: #855e1e;   /* legible gold for small text — AA (>=4.5:1) on paper, paper-2 and surface */
  --white: #ffffff;

  /* Lines */
  --line: rgba(27, 42, 37, 0.12);
  --line-strong: rgba(27, 42, 37, 0.2);

  /* Warm layered shadows */
  --shadow-sm: 0 1px 2px rgba(46, 38, 18, 0.05), 0 3px 8px rgba(46, 38, 18, 0.05);
  --shadow-md: 0 8px 20px rgba(46, 38, 18, 0.08), 0 20px 44px rgba(46, 38, 18, 0.06);
  --shadow-lg: 0 14px 34px rgba(46, 38, 18, 0.1), 0 44px 90px rgba(46, 38, 18, 0.09);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 24px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 620px at 88% -8%, rgba(181, 137, 74, 0.1), transparent 60%),
    radial-gradient(1000px 560px at -6% 12%, rgba(79, 138, 115, 0.08), transparent 55%),
    var(--paper);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: rgba(181, 137, 74, 0.26);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 3px;
}

.button:focus-visible,
.nav-cta:focus-visible,
.filter-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Texture & chrome ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 50;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
  will-change: transform;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform 200ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(247, 243, 236, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: background 280ms ease, border-color 280ms ease, box-shadow 280ms ease, min-height 280ms ease;
}

.site-header.is-scrolled {
  min-height: 64px;
  background: rgba(247, 243, 236, 0.9);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(46, 38, 18, 0.06);
}

.brand {
  display: grid;
  line-height: 1.04;
}

.brand span {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.brand strong {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 32px);
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  padding: 9px 18px !important;
  border-radius: 999px;
  background: var(--forest);
  color: var(--white) !important;
  font-weight: 600;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms ease;
}

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

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  background: var(--forest-deep);
  box-shadow: var(--shadow-md);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 19px;
  height: 1.6px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 200ms var(--ease), opacity 200ms ease;
}

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

/* ---------- Typography ---------- */

.eyebrow,
.section-kicker,
.status,
.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--gold-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  width: 26px;
  height: 1.5px;
  background: var(--gold);
  content: "";
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  text-wrap: balance;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  font-size: clamp(3.1rem, 7vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.2rem, 4.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.accent {
  font-style: italic;
  color: var(--gold-ink);
  font-variation-settings: "SOFT" 40;
}

.lead {
  max-width: 640px;
  color: var(--soft);
  font-size: clamp(1.12rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.primary {
  background: var(--forest);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.primary:hover,
.primary:focus-visible {
  background: var(--forest-deep);
  box-shadow: var(--shadow-md);
}

.ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--forest);
}

.ghost:hover,
.ghost:focus-visible {
  border-color: var(--forest);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.light {
  background: var(--white);
  color: var(--forest);
  box-shadow: var(--shadow-sm);
}

.light:hover,
.light:focus-visible {
  box-shadow: var(--shadow-md);
}

.outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.outline-light:hover,
.outline-light:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--forest);
  font-weight: 600;
}

.text-link::after {
  content: "→";
  transition: transform 220ms var(--ease);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: translateX(5px);
}

/* ---------- Layout helpers ---------- */

.section-pad {
  padding: clamp(72px, 9vw, 128px) clamp(20px, 5vw, 64px);
}

section[id] {
  scroll-margin-top: 96px;
}

.soft-band {
  position: relative;
  max-width: none;
  background: linear-gradient(180deg, var(--paper-2), rgba(247, 251, 248, 0.6));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto 44px;
}

.section-heading h2 {
  max-width: 760px;
  margin-bottom: 0;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  max-width: 1320px;
  min-height: calc(100vh - 76px);
  margin: 0 auto;
}

.hero-copy {
  max-width: 660px;
}

.hero h1 span {
  display: block;
}

.hero h1 span:nth-child(2) {
  font-style: italic;
  color: var(--gold-ink);
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.hero-media {
  position: relative;
  isolation: isolate;
}

.hero-media::before {
  position: absolute;
  inset: 8% -3% -6% 7%;
  z-index: -1;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(181, 137, 74, 0.1), rgba(79, 138, 115, 0.08));
  content: "";
}

.media-frame {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.media-frame img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transform: scale(1.06) translateY(var(--py, 0px));
  transition: transform 900ms var(--ease);
  will-change: transform;
}

.hero-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 2px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(251, 253, 251, 0.78);
  color: var(--forest);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.hero-note span:first-child {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
}

/* ---------- Marquee (frosted-glass band) ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: clamp(20px, 2.8vw, 32px) 0;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(9px) saturate(116%);
  -webkit-backdrop-filter: blur(9px) saturate(116%);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(30px, 4vw, 60px);
  padding-left: clamp(30px, 4vw, 60px);
  white-space: nowrap;
}

.marquee-group span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  letter-spacing: -0.01em;
  color: rgba(27, 42, 37, 0.42);
}

.marquee-sep {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.78em;
  color: rgba(181, 137, 74, 0.78);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Story + timeline ---------- */

.story,
.projects,
.blog-topic {
  max-width: var(--max);
  margin: 0 auto;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(380px, 1fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: center;
}

.story-copy p,
.project-card p,
.proof-card p,
.post-card p,
.topic-card p {
  color: var(--muted);
}

.story-copy h2 {
  margin-bottom: 24px;
}

.story-photo {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.story-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}

.story-photo:hover img {
  transform: scale(1.05);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 84px);
  border-top: 1px solid var(--line-strong);
}

.timeline-card {
  position: relative;
  min-height: 210px;
  padding: 42px 24px 14px;
  border-right: 1px solid var(--line);
  transition: background 300ms ease;
}

.timeline-card:last-child {
  border-right: none;
}

.timeline-card:hover {
  background: linear-gradient(180deg, rgba(181, 137, 74, 0.07), transparent);
}

.timeline-card span,
.proof-card span {
  position: absolute;
  top: -19px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--paper);
  color: var(--gold-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 300ms ease, color 300ms ease, transform 300ms var(--ease);
}

.timeline-card:hover span {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-3px);
}

.timeline-card h3 {
  font-size: 1.18rem;
}

/* ---------- Topics ---------- */

.topic-grid,
.proof-grid,
.project-list,
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: var(--max);
  margin: 0 auto;
}

.topic-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), border-color 320ms ease;
}

.topic-card:hover,
.topic-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(181, 137, 74, 0.42);
  box-shadow: var(--shadow-lg);
}

.topic-card img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.topic-card:hover img {
  transform: scale(1.06);
}

.topic-card span {
  display: block;
  padding: 24px 24px 0;
  font-family: var(--font-display);
  font-size: 1.42rem;
  letter-spacing: -0.01em;
}

.topic-card p {
  padding: 8px 24px 0;
}

.topic-card::after {
  content: "Explore →";
  display: block;
  padding: 16px 24px 24px;
  color: var(--gold-ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 240ms var(--ease);
}

.topic-card:hover::after {
  transform: translateX(5px);
}

/* ---------- Collaborate strip ---------- */

.collab-strip {
  position: relative;
  overflow: hidden;
  background: radial-gradient(900px 500px at 12% -20%, rgba(79, 138, 115, 0.35), transparent 60%), var(--forest-deep);
  color: var(--white);
}

.collab-strip .section-kicker,
.collab-strip h2,
.cta .section-kicker,
.cta h2 {
  color: var(--white);
}

.collab-strip .section-kicker,
.cta .section-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.collab-strip .section-kicker::before,
.cta .section-kicker::before {
  background: var(--gold);
}

.strip-title,
.proof-grid {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.strip-title {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  margin-bottom: 40px;
}

.proof-card {
  position: relative;
  padding: 30px 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  transition: transform 300ms var(--ease), background 300ms ease, border-color 300ms ease;
}

.proof-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(181, 137, 74, 0.5);
}

.proof-card span {
  position: static;
  display: inline-flex;
  margin-bottom: 22px;
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.proof-card:hover span {
  background: var(--gold);
  border-color: var(--gold);
}

.proof-card h3,
.proof-card p {
  color: var(--white);
}

.proof-card p {
  color: rgba(255, 255, 255, 0.74);
}

/* ---------- Projects ---------- */

.project-card,
.post-card {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), border-color 320ms ease;
}

.project-card:hover,
.post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 137, 74, 0.4);
  box-shadow: var(--shadow-lg);
}

.status,
.post-meta {
  color: var(--gold-ink);
}

.status::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
}

.project-card h3 {
  font-size: 1.42rem;
}

/* ---------- CTA ---------- */

.cta {
  background: linear-gradient(135deg, var(--forest-deep), #2f6a58);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--white);
}

.cta-panel h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.cta-panel p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 40px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--ink);
}

.site-footer div {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-footer a {
  position: relative;
  font-weight: 500;
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: var(--forest);
}

/* ---------- Blog page ---------- */

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(30px, 6vw, 78px);
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
}

.blog-hero h1 {
  max-width: 920px;
  font-size: clamp(2.8rem, 5.6vw, 6rem);
}

.filter-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.filter-panel p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--gold-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.filter-panel p::before {
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  content: "";
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, transform 200ms var(--ease), border-color 200ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
}

.topic-thumb {
  width: min(220px, 30vw);
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.post-card {
  display: grid;
  align-content: start;
}

.post-card h3 {
  font-size: 1.3rem;
}

.post-card a {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.92rem;
}

.post-card a::after {
  content: "→";
  transition: transform 220ms var(--ease);
}

.post-card:hover a::after {
  transform: translateX(5px);
}

.blog-topic.is-hidden {
  display: none;
}

.resource-note {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.resource-note strong {
  color: var(--ink);
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .media-frame img {
    transform: scale(1.02);
  }

  .marquee-track {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav-toggle {
    position: absolute;
    top: 15px;
    right: 18px;
    z-index: 12;
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 76px 16px auto;
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 220ms var(--ease);
  }

  .nav-cta {
    justify-self: start;
  }

  .site-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .site-nav a:not(.nav-cta) {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  body.nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(5.6px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-5.6px) rotate(-45deg);
  }

  .hero,
  .story-grid,
  .blog-hero,
  .strip-title,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: clamp(40px, 8vw, 70px);
  }

  .cta-panel {
    align-items: start;
  }

  .topic-grid,
  .proof-grid,
  .project-list,
  .post-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
    border-top: none;
  }

  .timeline-card {
    border-top: 1px solid var(--line-strong);
    border-right: 1px solid var(--line);
  }

  .timeline-card:nth-child(2n) {
    border-right: none;
  }

  .timeline-card:last-child {
    border-right: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: 100vw;
    max-width: 100vw;
  }

  h1 {
    font-size: clamp(2.7rem, 12vw, 3.4rem);
  }

  h2 {
    font-size: 2.15rem;
  }

  .section-pad {
    padding: 64px 18px;
  }

  .hero,
  .hero-copy,
  .lead {
    max-width: calc(100vw - 36px);
  }

  .site-header {
    min-height: 66px;
    padding: 12px 18px;
  }

  .site-header.is-scrolled {
    min-height: 60px;
  }

  .site-nav {
    inset: 66px 16px auto;
  }

  .hero-media::before {
    inset: 6% -2% -5% 5%;
  }

  .hero-note {
    right: 12px;
    bottom: 12px;
    padding: 11px 13px;
  }

  .media-frame img {
    aspect-ratio: 4 / 5;
    object-position: 58% center;
  }

  .section-heading,
  .site-footer,
  .cta-panel {
    display: grid;
    gap: 18px;
  }

  .topic-grid,
  .proof-grid,
  .project-list,
  .post-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline-card {
    min-height: 0;
    padding: 40px 20px 20px;
    border-right: none;
  }

  .topic-thumb {
    width: 100%;
  }
}

/* ---------- Story article page ---------- */

.story-article {
  padding-bottom: clamp(48px, 7vw, 96px);
}

.article-head {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: clamp(26px, 4vw, 44px);
}

.article-head .eyebrow {
  justify-content: center;
}

.article-head h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6rem);
}

.article-standfirst {
  margin: 0 auto;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.article-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.article-hero {
  max-width: 1080px;
  margin: 0 auto clamp(44px, 6vw, 76px);
  padding: 0 clamp(20px, 5vw, 64px);
}

.article-hero .media-frame img {
  aspect-ratio: 16 / 9;
  transform: scale(1.05) translateY(var(--py, 0px));
}

.article-hero figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
  text-align: center;
}

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 28px);
}

.article-body p {
  margin: 0 0 1.5em;
  color: var(--soft);
  font-size: clamp(1.12rem, 1.4vw, 1.24rem);
  line-height: 1.85;
}

.article-body p.has-dropcap::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  font-family: var(--font-display);
  font-size: 4.4em;
  line-height: 0.74;
  font-weight: 500;
  color: var(--forest);
}

.article-body p.article-lead-line {
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  margin: clamp(30px, 4vw, 48px) auto;
}

.article-body p.story-statement,
.article-body p.story-closing {
  font-family: var(--font-display);
  text-align: center;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.012em;
  max-width: 760px;
  text-wrap: balance;
}

.article-body p.story-statement {
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  margin: clamp(36px, 5vw, 60px) auto;
}

.article-body p.story-closing {
  position: relative;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  margin: clamp(44px, 6vw, 72px) auto 0;
  padding-top: clamp(36px, 5vw, 52px);
}

.story-closing::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--gold);
  content: "";
}

.story-statement .accent,
.story-closing .accent {
  display: inline;
}

.article-cta {
  max-width: 700px;
  margin: clamp(52px, 7vw, 92px) auto 0;
  padding: clamp(34px, 4.5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.article-cta .section-kicker {
  justify-content: center;
  color: var(--gold-ink);
}

.article-cta h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: 14px;
}

.article-cta p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
}

.article-cta .cta-actions {
  justify-content: center;
  margin-top: 30px;
}

@media (max-width: 640px) {
  .article-body p.has-dropcap::first-letter {
    font-size: 3.6em;
  }

  .article-meta {
    gap: 8px 14px;
  }

  .article-head h1 {
    font-size: clamp(2.5rem, 11vw, 3rem);
  }

  .blog-hero h1 {
    font-size: clamp(2.5rem, 10vw, 3rem);
  }

  .article-hero {
    padding: 0 18px;
  }

  .article-hero .media-frame img {
    aspect-ratio: 4 / 3;
  }
}
