/*
Theme Name: Negar Seddigh
Theme URI: https://example.com/
Author: Built for Negar Seddigh
Description: A warm, accessible portfolio and publishing theme for an inclusive educator. Includes a reader-controlled reading-options panel (text size, high contrast, reduced motion, reading ruler), filterable resources and talks, and a plugin-free contact form.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: negar
Tags: education, portfolio, blog, accessibility-ready, custom-colors, translation-ready
*/

/* ==========================================================================
   Negar Seddigh — Inclusive Educator
   Static sample. Structured to port cleanly to a WordPress theme:
   this token block becomes theme.json, the component blocks become
   template parts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surface */
  --paper:        #F7F4EE;
  --paper-2:      #EFEAE1;
  --card:         #FFFDF9;

  /* Ink */
  --ink:          #22201C;
  --ink-2:        #5C554B;
  --ink-3:        #7A7166;

  /* Accent — indigo carries structure and every interactive state */
  --indigo:       #414C8F;
  --indigo-deep:  #2E3767;
  --indigo-tint:  #E7E8F3;

  /* Accent — apricot is decorative only, never text on paper */
  --apricot:      #E29B6D;
  --apricot-tint: #FAEDE2;

  --line:         #DED6C9;
  --line-strong:  #C4B9A7;

  /* Type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Reader-adjustable scale. Multiplied into the root font size. */
  --ts: 1;

  --step--1: clamp(0.8125rem, 0.79rem + 0.11vw, 0.875rem);
  --step-0:  clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --step-1:  clamp(1.1875rem, 1.12rem + 0.34vw, 1.375rem);
  --step-2:  clamp(1.4375rem, 1.29rem + 0.73vw, 1.875rem);
  --step-3:  clamp(1.75rem, 1.47rem + 1.4vw, 2.625rem);
  --step-4:  clamp(2.125rem, 1.62rem + 2.5vw, 3.75rem);
  --step-5:  clamp(2.5rem, 1.75rem + 3.75vw, 4.75rem);

  /* Space */
  --sp-1: 0.375rem;
  --sp-2: 0.75rem;
  --sp-3: 1.125rem;
  --sp-4: 1.75rem;
  --sp-5: 2.5rem;
  --sp-6: 4rem;
  --sp-7: 6rem;

  --measure: 66ch;
  --shell: 74rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;

  --speed: 220ms;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Reader preference: high contrast.
   Flattens tints, pushes every foreground/background pair well past AA. */
:root[data-contrast="high"] {
  --paper:        #FFFFFF;
  --paper-2:      #F2F2F2;
  --card:         #FFFFFF;
  --ink:          #000000;
  --ink-2:        #2B2B2B;
  --ink-3:        #444444;
  --indigo:       #1E2A6E;
  --indigo-deep:  #131B4A;
  --indigo-tint:  #E4E6F5;
  --apricot:      #8A4A17;
  --apricot-tint: #F6E7DA;
  --line:         #767676;
  --line-strong:  #333333;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

html {
  font-size: calc(100% * var(--ts));
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, li { text-wrap: pretty; }
p { margin: 0 0 var(--sp-3); max-width: var(--measure); }
img, svg { max-width: 100%; display: block; }

a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--indigo-deep); }

ul, ol { padding-left: 1.25em; }

button, input, textarea, select { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -100%;
  z-index: 200;
  background: var(--indigo);
  color: #fff;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  text-decoration: none;
  transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

/* All vertical rhythm lives here so section classes never fight over padding. */
.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }
.section--tinted { background: var(--paper-2); }

.section-head { margin-bottom: var(--sp-5); }
.stack-gap { margin-top: var(--sp-6); }
.section-head p { color: var(--ink-2); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 var(--sp-2);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--apricot);
  flex: none;
}
:root[data-contrast="high"] .eyebrow::before { background: var(--ink); }

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: var(--step-0);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.btn--primary:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--indigo); color: var(--indigo); }

.btn__arrow { transition: transform var(--speed) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
:root[data-contrast="high"] .site-header { background: var(--paper); backdrop-filter: none; }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 4.5rem;
}

.brand {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}
.brand span {
  display: block;
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 0.15em;
}

.nav { display: flex; align-items: center; gap: var(--sp-4); }
.nav__list { display: flex; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
/* WordPress puts state classes on the <li>, not the <a>, so the link styling
   is keyed to the list rather than to a class on the anchor itself. */
.nav__link,
.nav__list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.4em;
  border-bottom: 2px solid transparent;
}
.nav__link:hover,
.nav__list a:hover { border-bottom-color: var(--apricot); color: var(--ink); }

.nav__link[aria-current="page"],
.nav__list .current-menu-item > a,
.nav__list .current_page_item > a,
.nav__list .current-menu-parent > a,
.nav__list .current_page_ancestor > a {
  border-bottom-color: var(--indigo);
  color: var(--indigo);
}

.nav__list { list-style: none; }
.nav__list li { list-style: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.45em 0.6em;
  cursor: pointer;
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: block; order: 3; }
  .nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) 1.25rem var(--sp-4);
    transform: translateY(-120%);
    transition: transform var(--speed) var(--ease);
    box-shadow: 0 16px 40px rgba(34, 32, 28, 0.09);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 0.7em 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: var(--sp-3); justify-content: center; }
}

/* --------------------------------------------------------------------------
   6. Reading options — the signature element
   -------------------------------------------------------------------------- */

.prefs { position: relative; }

.prefs__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--indigo-tint);
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.5em 1em;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--indigo-deep);
  cursor: pointer;
  transition: border-color var(--speed) var(--ease);
}
.prefs__trigger:hover { border-color: var(--indigo); }
.prefs__trigger svg { width: 1.05rem; height: 1.05rem; flex: none; }

.prefs__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  width: min(21rem, calc(100vw - 2.5rem));
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: 0 20px 50px rgba(34, 32, 28, 0.14);
  z-index: 120;
}
.prefs__panel[hidden] { display: none; }

.prefs__title { font-family: var(--display); font-size: var(--step-1); margin: 0 0 0.25rem; }
.prefs__note { font-size: var(--step--1); color: var(--ink-2); margin: 0 0 var(--sp-3); max-width: none; }

.prefs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  border-top: 1px solid var(--line);
}
.prefs__row:first-of-type { border-top: 0; }
.prefs__label { font-size: var(--step--1); font-weight: 700; }

.sizes { display: flex; gap: 0.25rem; }
.sizes button {
  width: 2.25rem; height: 2.25rem;
  border: 2px solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius);
  font-family: var(--display);
  cursor: pointer;
  line-height: 1;
}
.sizes button:nth-child(1) { font-size: 0.85rem; }
.sizes button:nth-child(2) { font-size: 1.05rem; }
.sizes button:nth-child(3) { font-size: 1.3rem; }
.sizes button[aria-pressed="true"] {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

/* Switch */
.switch {
  position: relative;
  width: 3.1rem; height: 1.75rem;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--paper-2);
  cursor: pointer;
  flex: none;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 0.14rem; left: 0.14rem;
  width: 1.2rem; height: 1.2rem;
  border-radius: 50%;
  background: var(--ink-2);
  transition: transform var(--speed) var(--ease), background var(--speed) var(--ease);
}
.switch[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); }
.switch[aria-pressed="true"]::after { transform: translateX(1.3rem); background: #fff; }

.prefs__reset {
  margin-top: var(--sp-3);
  background: none;
  border: 0;
  padding: 0;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* Reading ruler — a tracking aid, off by default */
.ruler {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.25rem;
  pointer-events: none;
  z-index: 80;
  background: color-mix(in srgb, var(--indigo) 9%, transparent);
  border-top: 2px solid color-mix(in srgb, var(--indigo) 55%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--indigo) 55%, transparent);
  display: none;
}
:root[data-ruler="on"] .ruler { display: block; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: var(--sp-7) var(--sp-6); position: relative; overflow: hidden; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-6);
  align-items: center;
}

.hero h1 {
  font-size: var(--step-5);
  margin-bottom: var(--sp-3);
}

/* Hand-drawn emphasis on a single word */
.mark { position: relative; display: inline-block; line-height: 1; color: inherit; }
.mark__line {
  position: absolute;
  left: -4%;
  bottom: 0.04em;
  width: 108%;
  height: 0.26em;
  color: var(--apricot);
  overflow: visible;
}
:root[data-contrast="high"] .mark__line { color: var(--apricot); }
.mark__line path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw 900ms var(--ease) 350ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.hero__prefs-hint {
  margin-top: var(--sp-4);
  font-size: var(--step--1);
  color: var(--ink-2);
  max-width: 34ch;
}
.hero__prefs-hint button {
  background: none; border: 0; padding: 0;
  font: inherit; font-weight: 700;
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* Portrait — arch frame with an offset block behind */
.portrait { position: relative; justify-self: center; width: min(100%, 22rem); margin: 0; }
.portrait--sm { width: min(100%, 18rem); justify-self: start; }

/* On the About page the bio runs long, leaving the portrait column empty.
   Let the portrait travel with the reader instead. */
.portrait-col { align-self: stretch; }
.portrait-col .portrait { position: sticky; top: 6rem; }
@media (max-width: 800px) { .portrait-col .portrait { position: static; } }
.portrait::before {
  content: "";
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  background: var(--apricot-tint);
  border-radius: 12rem 12rem var(--radius-lg) var(--radius-lg);
  z-index: 0;
}
.portrait__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border-radius: 12rem 12rem var(--radius-lg) var(--radius-lg);
  background: var(--indigo-tint);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

@media (max-width: 800px) {
  /* Headline leads on small screens; the portrait follows the call to action. */
  .hero { padding-block: var(--sp-5) var(--sp-5); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .portrait { width: min(100%, 15rem); justify-self: start; }
  .portrait::before { inset: 1rem -1rem -1rem 1rem; }
}

/* Credentials rail */
.rail-band { padding-block: 0; }
.rail {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-3);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--sp-3) var(--sp-4);
}
.rail div { display: flex; gap: 0.6rem; align-items: flex-start; }
.rail svg { width: 1.15rem; height: 1.15rem; color: var(--indigo); flex: none; margin-top: 0.28em; }
.rail dt { font-size: var(--step--1); color: var(--ink-2); }
.rail dd { margin: 0; font-weight: 700; font-size: var(--step--1); line-height: 1.45; }

/* --------------------------------------------------------------------------
   7b. Photography
   Images carry the warmth on this site, so the frames stay quiet: one
   radius, one hairline, a slow scale on hover. Every media box declares an
   aspect-ratio so nothing reflows as photos load.
   -------------------------------------------------------------------------- */

.media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

/* Session strip — what the work actually looks like */
.sessions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--sp-4);
}
.session__media { aspect-ratio: 3 / 2; }
.session:hover .session__media img { transform: scale(1.04); }
.session h3 { font-size: var(--step-1); margin-top: var(--sp-3); }
.session p { color: var(--ink-2); margin: var(--sp-1) 0 0; max-width: none; }

/* Wide band — one photo used at full measure */
.band { aspect-ratio: 21 / 9; }
@media (max-width: 720px) { .band { aspect-ratio: 3 / 2; } }

.media--aside { aspect-ratio: 4 / 3; margin-bottom: var(--sp-4); }

.figure-note {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin: var(--sp-2) 0 0;
  max-width: none;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

/* Post listing: two wide columns rather than three narrow ones — the
   headlines are long, and a spanning feature card needs a fixed track count
   (auto-fit and `grid-column: 1 / -1` don't resolve predictably together). */
.grid--posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .grid--posts { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card h3 { font-size: var(--step-2); }
.post-title-link { color: var(--ink); text-decoration: none; }
.post-title-link:hover { color: var(--indigo); text-decoration: underline; text-underline-offset: 0.15em; }
.card p { color: var(--ink-2); margin: 0; max-width: none; }

/* "Who it's for" — real information, not decoration */
.card__for {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.card__for::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tag {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: var(--indigo-tint);
  color: var(--indigo-deep);
}
/* One pill colour per resource type, so downloads, talks, and recommended
   links are told apart before the text is read. All three measure above 7:1. */
.tag--talk { background: var(--apricot-tint); color: #7A3F12; }
.tag--recommended { background: #E6EBE1; color: #3B4E30; }
:root[data-contrast="high"] .tag--talk { color: var(--apricot); }
:root[data-contrast="high"] .tag--recommended { background: #E4EFE0; color: #1C2A14; }

.meta {
  font-size: var(--step--1);
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  margin: 0;
  max-width: none;
}
.meta span[aria-hidden] { color: var(--line-strong); }

.card__link {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-start;
}
.card__link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.card__link .btn__arrow { transition: transform var(--speed) var(--ease); }
.card__link:hover .btn__arrow { transform: translateX(3px); }

/* Card with a featured image. The media sits flush; padding moves to the body. */
.card--media { padding: 0; gap: 0; overflow: hidden; }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.card--media:hover .card__media img { transform: scale(1.04); }
.card__body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

/* Featured post — spans the listing grid, image beside the text */
.feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}
.feature .card__body { justify-content: center; padding: var(--sp-5); }
.feature .card__media { aspect-ratio: auto; height: 100%; min-height: 16rem; }
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; }
  .feature .card__media { aspect-ratio: 16 / 10; min-height: 0; }
}

/* --------------------------------------------------------------------------
   9. About block
   -------------------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--sp-6);
  align-items: start;
}
@media (max-width: 800px) { .about__grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

.pull {
  border-left: 3px solid var(--apricot);
  padding-left: var(--sp-3);
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--ink);
  margin: var(--sp-4) 0;
  max-width: none;
}

/* Timeline — order carries meaning here, so the structure is chronological */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline__when { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); letter-spacing: 0.04em; }
.timeline__what strong { display: block; font-size: var(--step-1); font-family: var(--display); font-weight: 600; }
.timeline__what span { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; gap: var(--sp-1); }
}

/* --------------------------------------------------------------------------
   10. Filters
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: 0;
  border: 0;
}
.filters legend { font-size: var(--step--1); font-weight: 700; margin-bottom: var(--sp-2); color: var(--ink-2); }

.chip {
  background: transparent;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4em 1em;
  font-size: var(--step--1);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }

/* Buttons carry aria-pressed (resources, filtered in the browser); links carry
   aria-current (topics, which are real archive URLs). Both look the same. */
.chip[aria-pressed="true"],
.chip[aria-current="page"] {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
a.chip { text-decoration: none; }
a.chip[aria-current="page"]:hover { color: #fff; }

.result-count { font-size: var(--step--1); color: var(--ink-2); margin: 0 0 var(--sp-4); }

.empty-state {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-align: center;
  color: var(--ink-2);
}
.empty-state[hidden] { display: none; }

/* --------------------------------------------------------------------------
   11. Article
   -------------------------------------------------------------------------- */

.article-media { aspect-ratio: 21 / 9; margin-bottom: var(--sp-5); }
@media (max-width: 720px) { .article-media { aspect-ratio: 3 / 2; } }

.article-head { max-width: var(--measure); }
.article-head h1 { font-size: var(--step-4); margin-bottom: var(--sp-3); }

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin: var(--sp-5) 0 var(--sp-2); }
.prose h3 { font-size: var(--step-1); margin: var(--sp-4) 0 var(--sp-2); }
.prose ul, .prose ol { margin: 0 0 var(--sp-3); }
.prose li { margin-bottom: var(--sp-1); }
.prose blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--indigo-tint);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.45;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

.article-foot {
  max-width: var(--measure);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   12. Form
   -------------------------------------------------------------------------- */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: var(--sp-6);
  align-items: start;
}
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 700; margin-bottom: var(--sp-1); }
.field .hint { display: block; font-size: var(--step--1); color: var(--ink-2); font-weight: 400; margin-bottom: var(--sp-2); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--speed) var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }

.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #A32B1E; }
:root[data-contrast="high"] .field[data-invalid="true"] input,
:root[data-contrast="high"] .field[data-invalid="true"] select,
:root[data-contrast="high"] .field[data-invalid="true"] textarea { border-color: #8A1F14; }

.error {
  display: none;
  margin-top: var(--sp-1);
  font-size: var(--step--1);
  font-weight: 700;
  color: #A32B1E;
}
.field[data-invalid="true"] .error { display: flex; gap: 0.4em; align-items: center; }

.form-status {
  border-radius: var(--radius);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-weight: 700;
  border: 2px solid;
}
.form-status[hidden] { display: none; }
.form-status[data-tone="ok"] { background: var(--indigo-tint); border-color: var(--indigo); color: var(--indigo-deep); }
.form-status[data-tone="error"] { background: #FBEAE7; border-color: #A32B1E; color: #7E2117; }

.aside-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}
.aside-card h2 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card li {
  padding-block: var(--sp-2);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.aside-card li:first-child { border-top: 0; padding-top: 0; }
.aside-card strong { display: block; color: var(--ink); }
.aside-card li a { display: block; }
.stack-note { margin-top: var(--sp-3); }

/* --------------------------------------------------------------------------
   13. CTA band + footer
   -------------------------------------------------------------------------- */

.cta-band { background: var(--indigo); color: #fff; }
.cta-band h2 { font-size: var(--step-3); color: #fff; margin-bottom: var(--sp-2); }
.cta-band p { color: color-mix(in srgb, #fff 82%, var(--indigo)); }
:root[data-contrast="high"] .cta-band p { color: #fff; }
.cta-band .btn--ghost { border-color: rgba(255,255,255,0.65); color: #fff; }
.cta-band .btn--ghost:hover { border-color: #fff; background: #fff; color: var(--indigo-deep); }
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}
.cta-band__inner > div { max-width: 42ch; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-6) var(--sp-4);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-1); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--indigo); text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer__brand { font-family: var(--display); font-size: var(--step-2); color: var(--ink); display: block; margin-bottom: var(--sp-2); }
.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
}
.site-footer__bottom p { margin: 0; max-width: 60ch; }

/* --------------------------------------------------------------------------
   14. Page header (interior pages)
   -------------------------------------------------------------------------- */

.page-head { padding-block: var(--sp-6) var(--sp-5); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-4); margin-bottom: var(--sp-3); }
.page-head .lede { max-width: 52ch; }

/* --------------------------------------------------------------------------
   15. Motion
   -------------------------------------------------------------------------- */

/* Hero entrance. One short orchestrated sequence on load, then the page
   stays still — the rest of the motion on this site is reveal-on-scroll. */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lift { animation: rise 620ms var(--ease) both; }
  .lift-1 { animation-delay:  60ms; }
  .lift-2 { animation-delay: 140ms; }
  .lift-3 { animation-delay: 220ms; }
  .lift-4 { animation-delay: 300ms; }
  .lift-5 { animation-delay: 380ms; }
  :root[data-motion="reduced"] .lift { animation: none; }
}

/* Scroll reveal, done entirely in CSS and strictly additive.
   Content is visible by default. Where scroll-driven animation is supported
   and motion is welcome, it fades up as it enters the viewport; everywhere
   else it simply appears. Nothing is ever hidden waiting on a script. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 20%;
    }
    /* The reader's own preference wins over the OS default. */
    :root[data-motion="reduced"] .reveal { animation: none; }
  }
}

/* Reader preference and OS preference both fully disable motion. */
:root[data-motion="reduced"] * ,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
:root[data-motion="reduced"] .mark__line path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mark__line path { stroke-dashoffset: 0; }
}

@media print {
  .site-header, .cta-band, .prefs, .ruler, .nav-toggle { display: none !important; }
  body { background: #fff; }
}

/* --------------------------------------------------------------------------
   16. WordPress specifics
   Classes the editor and core templates emit, which the static sample had no
   reason to carry.
   -------------------------------------------------------------------------- */

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto;
  margin: 0; padding: var(--sp-2) var(--sp-3);
  background: var(--indigo);
  color: #fff;
  border-radius: var(--radius);
}

/* Editor alignments */
.alignleft { float: left; margin: 0.35em var(--sp-4) var(--sp-3) 0; }
.alignright { float: right; margin: 0.35em 0 var(--sp-3) var(--sp-4); }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100%, 62rem); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.prose .alignwide,
.prose .alignfull { border-radius: 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text,
.wp-element-caption,
figcaption {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: var(--sp-2);
}

.prose img,
.prose figure { border-radius: var(--radius); }
.prose figure { margin: var(--sp-4) 0; }

.wp-block-image img { height: auto; }

.sticky .card { border-color: var(--indigo); }

/* Pagination */
.pagination { margin-top: var(--sp-6); }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.45em 0.85em;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.pagination a.page-numbers:hover { border-color: var(--indigo); color: var(--indigo); }
.pagination .page-numbers.current {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; }

/* Comments */
.comments { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.comments h2 { font-size: var(--step-2); margin-bottom: var(--sp-4); }
.comment-list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.comment-list ol { list-style: none; padding-left: var(--sp-4); }
.comment-body {
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--line);
}
.comment-meta { font-size: var(--step--1); color: var(--ink-2); }
.comment-author img { border-radius: 50%; }
.comment-form label { display: block; font-weight: 700; margin-bottom: var(--sp-1); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
}
.comment-form p { margin-bottom: var(--sp-3); }

/* Admin bar keeps the sticky header clear of it */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
