/* ============================================================
       Wesley K. Alexander — author site
       "Editorial" — one structure, two moods (Ink / Paper).
       Theme tokens flip on [data-theme]; serif swaps with the mood
       so each keeps its voice. Accent baked to #FF4D00.
       ============================================================ */

    :root {
      --gutter: clamp(24px, 5vw, 72px);
      --accent: #FF4D00;
      --sans: 'Geist', 'Space Grotesk', system-ui, sans-serif;
    }

    html[data-theme="ink"] {
      --bg: #101012;
      --panel: #17171A;
      --ink: #ECEAE6;
      --sub: rgba(236, 234, 230, 0.72);
      --faint: rgba(236, 234, 230, 0.62);
      --line: rgba(236, 234, 230, 0.14);
      --serif: 'Instrument Serif', serif;
      --btn-bg: #ECEAE6;
      --btn-ink: #111111;
      --headshot-filter: grayscale(100%);
      --cover-shadow: 0 60px 120px -30px rgba(255, 77, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.6);
    }

    html[data-theme="paper"] {
      --bg: #F7F5F0;
      --panel: #EFEBE2;
      --ink: #17150F;
      --sub: rgba(23, 21, 15, 0.72);
      --faint: rgba(23, 21, 15, 0.62);
      --line: rgba(23, 21, 15, 0.14);
      --serif: 'Newsreader', serif;
      --btn-bg: #17150F;
      --btn-ink: #F7F5F0;
      --headshot-filter: none;
      --cover-shadow: 0 60px 120px -30px rgba(255, 77, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.25);
    }

    html { scroll-behavior: smooth; }
    * { box-sizing: border-box; }
    body { margin: 0; }

    .page {
      background: var(--bg);
      color: var(--ink);
      font-family: var(--sans);
      min-height: 100vh;
      transition: background 300ms ease, color 300ms ease;
    }

    .wrap {
      max-width: 1400px;
      margin: 0 auto;
    }

    section[id] { scroll-margin-top: 24px; }
    .eyebrow {
      font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
    }

    /* ---------- Nav ---------- */
    .nav {
      display: flex; justify-content: space-between; align-items: center;
      padding: clamp(20px, 3vw, 32px) var(--gutter);
      border-bottom: 1px solid var(--line);
      flex-wrap: wrap; gap: 16px;
    }
    .brand {
      font-family: var(--serif); font-size: 23px; color: var(--ink);
      text-decoration: none; line-height: 1;
    }
    .nav-links { display: flex; gap: 38px; align-items: center; }
    .nav-a {
      font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
      text-decoration: none; transition: opacity 200ms ease;
    }
    .nav-a:hover { opacity: 0.7; }
    .nav-a.muted { color: var(--sub); }
    .nav-a.strong { color: var(--ink); }
    .nav-a:focus-visible, .brand:focus-visible, .theme-toggle:focus-visible,
    .btn-solid:focus-visible, .btn-ghost:focus-visible, .text-link:focus-visible,
    .footer-links a:focus-visible {
      outline: 2px solid var(--accent); outline-offset: 4px;
    }

    .theme-toggle {
      font-family: var(--sans);
      font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
      color: var(--sub); background: transparent;
      border: 1px solid var(--line); border-radius: 999px;
      padding: 8px 16px; cursor: pointer;
      display: inline-flex; align-items: center; gap: 8px;
      transition: color 200ms ease, border-color 200ms ease;
    }
    .theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
    .theme-toggle .dot {
      width: 9px; height: 9px; border-radius: 50%;
      background: var(--ink); display: inline-block;
    }

    /* ---------- Buttons / links ---------- */
    .btn-solid, .btn-ghost {
      display: inline-block; padding: 16px 36px; font-size: 14px;
      letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
      text-decoration: none; transition: opacity 200ms ease, transform 200ms ease;
    }
    .btn-solid { background: var(--btn-bg); color: var(--btn-ink); }
    .btn-ghost { border: 1px solid var(--line); color: var(--ink); }
    .btn-solid:hover, .btn-ghost:hover { opacity: 0.85; transform: translateY(-1px); }
    .text-link {
      font-size: 15px; font-weight: 600; text-decoration: none; color: var(--accent);
    }
    .text-link:hover { text-decoration: underline; }

    /* ---------- Hero ---------- */
    .hero {
      display: grid; grid-template-columns: 1fr 420px;
      gap: clamp(40px, 6vw, 90px);
      padding: clamp(60px, 8vw, 110px) var(--gutter) clamp(70px, 8vw, 120px);
      align-items: center;
    }
    .hero-eyebrow { color: var(--accent); margin-bottom: 26px; font-weight: 600; }
    .hero-h1 {
      font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.6vw, 92px);
      line-height: 1.04; letter-spacing: -0.01em; color: var(--ink); margin: 0;
    }
    .hero-h1 em { color: var(--sub); }
    .hero-lede {
      font-size: 18px; line-height: 1.7; color: var(--sub);
      max-width: 540px; margin: 32px 0 42px;
    }
    .hero-lede em { font-family: var(--serif); font-size: 1.05em; font-style: italic; }
    .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
    .hero-cover {
      width: 100%; max-width: 420px; justify-self: center;
      box-shadow: var(--cover-shadow);
      transform: rotate(1.5deg);
      transition: transform 400ms ease;
    }
    .hero-cover:hover { transform: rotate(0deg); }
    .hero-cover img { width: 100%; display: block; }

    /* ---------- Quote band ---------- */
    .band {
      border-top: 1px solid var(--line);
      padding: clamp(60px, 7vw, 96px) var(--gutter);
      display: grid; grid-template-columns: minmax(140px, 280px) 1fr;
      gap: clamp(32px, 5vw, 80px);
    }
    .band-label { color: var(--faint); }
    .band-quote {
      font-family: var(--serif); font-size: clamp(26px, 3vw, 40px);
      line-height: 1.3; font-style: italic; color: var(--ink); margin: 0;
      text-wrap: pretty;
    }

    /* ---------- Guide row ---------- */
    .guide {
      border-top: 1px solid var(--line);
      padding: clamp(48px, 6vw, 76px) var(--gutter);
      display: flex; justify-content: space-between; align-items: center;
      gap: 48px; flex-wrap: wrap;
    }
    .guide-body { max-width: 640px; }
    .guide-label { color: var(--faint); margin-bottom: 20px; }
    .guide-label-secondary { margin-top: 38px; }
    .guide-title {
      font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px);
      line-height: 1.2; color: var(--ink);
    }
    .guide-p { color: var(--sub); font-size: 16px; line-height: 1.7; margin: 14px 0 0; }
    .affiliate-note { font-size: 13px; color: var(--faint); }
    .guide-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
    .guide-cta .text-link { display: inline-flex; align-items: center; min-height: 52px; }
    .inline-guide-cta { margin: 24px 0 0; }

    /* ---------- Portfolio router ---------- */
    .portfolio {
      border-top: 1px solid var(--line);
      padding: clamp(60px, 7vw, 96px) var(--gutter);
    }
    .portfolio-heading { max-width: 780px; margin-bottom: 38px; }
    .portfolio-label { color: var(--faint); margin-bottom: 18px; }
    .portfolio-title {
      font-family: var(--serif); font-size: clamp(34px, 4vw, 54px);
      line-height: 1.1; color: var(--ink); margin: 0;
    }
    .portfolio-intro { color: var(--sub); font-size: 17px; line-height: 1.7; margin: 18px 0 0; }
    .portfolio-group + .portfolio-group { margin-top: 48px; }
    .portfolio-group-title { color: var(--faint); margin-bottom: 18px; }
    .book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .book-card {
      border: 1px solid var(--line); background: var(--panel);
      padding: clamp(26px, 3vw, 38px); min-height: 280px;
      display: flex; flex-direction: column;
      transition: transform 200ms ease, border-color 200ms ease, background 300ms ease;
    }
    .book-card:hover { transform: translateY(-2px); border-color: var(--accent); }
    .book-card-with-cover {
      display: grid;
      grid-template-columns: minmax(0, 1fr) clamp(82px, 7vw, 98px);
      gap: clamp(20px, 2.4vw, 30px);
      align-items: start;
    }
    .book-card-copy {
      grid-column: 1;
      grid-row: 1;
      min-width: 0;
      min-height: 100%;
      display: flex;
      flex-direction: column;
    }
    .book-cover-thumb {
      grid-column: 2;
      grid-row: 1;
      width: 100%;
      aspect-ratio: 2 / 3;
      height: auto;
      object-fit: contain;
      display: block;
      align-self: start;
      background: #0E0E10;
      border: 1px solid var(--line);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    }
    .book-status { color: var(--accent); margin-bottom: 20px; font-weight: 600; }
    .book-title { font-family: var(--serif); font-size: clamp(27px, 2.5vw, 36px); line-height: 1.12; }
    .book-series { color: var(--sub); font-size: 13px; letter-spacing: 0.08em; margin-top: 7px; }
    .book-description { color: var(--sub); font-size: 15px; line-height: 1.65; margin: 18px 0 28px; }
    .book-card .text-link { margin-top: auto; align-self: flex-start; }
    .book-card .text-link + .text-link { margin-top: 14px; }
    .book-card-wide { grid-column: 1 / -1; min-height: 230px; }

    /* ---------- About ---------- */
    .about {
      border-top: 1px solid var(--line);
      padding: clamp(60px, 7vw, 96px) var(--gutter);
      display: grid; grid-template-columns: 200px 1fr;
      gap: clamp(36px, 5vw, 80px); align-items: start;
    }
    .about img {
      width: 200px; display: block; border-radius: 2px;
      filter: var(--headshot-filter); transition: filter 300ms ease;
    }
    .about-label { color: var(--faint); margin-bottom: 20px; }
    .about-bio {
      font-size: 19px; line-height: 1.75; color: var(--sub);
      max-width: 680px; margin: 0; text-wrap: pretty;
    }
    .about-links { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }

    /* ---------- Newsletter ---------- */
    .newsletter {
      border-top: 1px solid var(--line); background: var(--panel);
      padding: clamp(56px, 7vw, 88px) var(--gutter); text-align: center;
      transition: background 300ms ease;
    }
    .newsletter-inner { max-width: 560px; margin: 0 auto; }
    .newsletter-label { color: var(--faint); margin-bottom: 18px; }
    .newsletter-h {
      font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px);
      color: var(--ink); line-height: 1.2;
    }
    .newsletter-p { color: var(--sub); font-size: 16px; line-height: 1.7; margin: 16px 0 30px; }

    /* ---------- Footer ---------- */
    .footer {
      border-top: 1px solid var(--line); padding: 36px var(--gutter);
      display: flex; justify-content: space-between; align-items: center;
      gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--faint);
      letter-spacing: 0.05em;
    }
    .footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
    .footer-links a { color: var(--faint); text-decoration: none; }
    .footer-links a:hover { color: var(--ink); }

    /* ---------- Responsive ---------- */
    @media (max-width: 900px) {
      .hero { grid-template-columns: 1fr; }
      .hero-cover { max-width: 300px; }
      .band { grid-template-columns: 1fr; gap: 20px; }
      .about { grid-template-columns: 1fr; }
      .book-grid { grid-template-columns: 1fr; }
      .book-card-wide { grid-column: auto; }
      .nav { align-items: flex-start; }
      .nav-links { gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
    }
    .nav-a[aria-current="page"] { color: var(--accent); }
    .about-heading {
      font-family: var(--serif); font-size: clamp(38px, 5vw, 64px);
      line-height: 1.05; font-weight: 400; color: var(--ink); margin: 0 0 24px;
    }
    .inner-main { min-height: 60vh; }
    @media (max-width: 600px) {
      .nav { padding: 20px var(--gutter); }
      .brand { width: 100%; }
      .nav-links { width: 100%; justify-content: flex-start; gap: 14px 18px; }
      .nav-a {
        min-height: 44px; display: inline-flex; align-items: center;
        font-size: 11px; letter-spacing: 0.1em;
      }
      .theme-toggle { min-height: 44px; padding: 7px 12px; }
      .hero-cta, .guide-cta { display: grid; grid-template-columns: 1fr; width: 100%; }
      .hero-cta a, .guide-cta a { width: 100%; text-align: center; }
      .book-card-with-cover { grid-template-columns: 1fr; }
      .book-cover-thumb {
        grid-column: 1;
        grid-row: 1;
        width: 96px;
        margin-bottom: 22px;
      }
      .book-card-copy {
        grid-column: 1;
        grid-row: 2;
      }
      .about img { width: 240px; max-width: 100%; justify-self: center; }
      .footer { align-items: flex-start; }
      .footer-links {
        display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%;
      }
      .footer-links a {
        min-height: 44px; display: inline-flex; align-items: center;
        color: var(--sub); text-decoration: underline; text-underline-offset: 4px;
      }
    }
