/* Ghost/Casper-inspired theme for Against a Sea of Troubles */

:root {
  --color-darkgrey: #15171a;
  --color-midgrey: #738a94;
  --color-lightgrey: #f1f1f1;
  --color-secondary-text: #979797;
  --color-border: #e1e1e1;
  --ghost-accent-color: #1a1a1a;
  /* Theme-aware (for nav, home sections, body – respect prefers-color-scheme) */
  --site-bg: #fff;
  --site-bg-muted: #f8f8f6;
  --site-text: #15171a;
  --site-text-muted: #2d2d28;
  --site-text-soft: #5c5c4a;
  --site-border: #e1e1e1;
  --site-cta-secondary-bg: #4a4a32;
  --site-cta-secondary-bg-hover: #3d3d2a;
  /* Match againstaseaoftroubles.com (Ghost Casper) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font-serif: Georgia, Times, serif;
  --font-mono: Menlo, Courier, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-bg: #1a1a1a;
    --site-bg-muted: #252525;
    --site-text: #e8e8e8;
    --site-text-muted: #c0c0c0;
    --site-text-soft: #9a9a9a;
    --site-border: #3a3a3a;
    --site-cta-secondary-bg: #7E8B4B;
    --site-cta-secondary-bg-hover: #6b7740;
  }
}

/* User override: explicit light/dark (navbar toggle; defaults to system when unset) */
html[data-theme="light"] {
  color-scheme: light;
  --site-bg: #fff;
  --site-bg-muted: #f8f8f6;
  --site-text: #15171a;
  --site-text-muted: #2d2d28;
  --site-text-soft: #5c5c4a;
  --site-border: #e1e1e1;
  --site-cta-secondary-bg: #4a4a32;
  --site-cta-secondary-bg-hover: #3d3d2a;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --site-bg: #1a1a1a;
  --site-bg-muted: #252525;
  --site-text: #e8e8e8;
  --site-text-muted: #c0c0c0;
  --site-text-soft: #9a9a9a;
  --site-border: #3a3a3a;
  --site-cta-secondary-bg: #7E8B4B;
  --site-cta-secondary-bg-hover: #6b7740;
}

/* Base typography (match live site https://againstaseaoftroubles.com) */
body {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  line-height: 1.6em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}


section {
  margin-bottom: 0;
}

.viewport {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex-grow: 1;
}

.outer {
  position: relative;
  padding: 0 max(4vmin, 20px);
}

.inner {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

/* Header / Nav (Ghost .gh-head) */
.gh-head {
  height: 100px;
  font-size: 1.6rem;
  line-height: 1.3em;
  background-color: var(--site-bg);
  z-index: 150;
  border-bottom: 1px solid var(--site-border);
}

.gh-head a {
  text-decoration: none;
  color: var(--site-text);
}

.gh-head-inner {
  display: grid;
  column-gap: 48px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 100%;
}

.gh-head-brand {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.gh-head-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  color: inherit;
  white-space: nowrap;
}

.gh-head-logo-img {
  display: block;
  height: 72px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  object-position: left center;
}

/* Dark mode: oval gradient glow behind logo image */
html[data-theme="dark"] .gh-head-logo {
  position: relative;
}
html[data-theme="dark"] .gh-head-logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 160%;
  height: 120%;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 160% 120% at center,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.3) 70%,
      transparent 90%
    );
  z-index: 0;
  pointer-events: none;
}
html[data-theme="dark"] .gh-head-logo-img {
  position: relative;
  z-index: 1;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .gh-head-logo {
    position: relative;
  }
  html:not([data-theme="light"]) .gh-head-logo::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 160%;
    height: 120%;
    border-radius: 50%;
    background:
      radial-gradient(
        ellipse 160% 120% at center,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.3) 70%,
        transparent 90%
        );
    z-index: 0;
    pointer-events: none;
  }
  html:not([data-theme="light"]) .gh-head-logo-img {
    position: relative;
    z-index: 1;
  }
}

.gh-head-logo-text {
  display: block;
}

.gh-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.gh-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: 50%;
  background: var(--site-bg-muted);
  color: var(--site-text);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gh-theme-toggle:hover {
  background: var(--site-border);
  color: var(--site-text);
}
.gh-theme-toggle:focus-visible {
  outline: 2px solid var(--site-text-soft);
  outline-offset: 2px;
}
.gh-theme-toggle .gh-theme-toggle-icon {
  display: inline-flex;
  line-height: 0;
}
.gh-theme-toggle .gh-theme-toggle-icon svg {
  width: 20px;
  height: 20px;
}

.gh-head-cta.main-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  background-color: #7E8B4B;
  color: #fff;
  border: none;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gh-head-cta.main-cta:hover {
  background-color: #6b7740;
  color: #fff;
  text-decoration: none;
}

.gh-head-menu .nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-head-menu .nav a {
  display: inline-block;
  line-height: 1.5;
  color: var(--site-text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.gh-head-menu .nav a:hover {
  color: var(--site-text);
}

.gh-head-menu .nav a.active {
  color: var(--site-text);
  font-weight: 600;
  text-decoration: underline;
}

/* Hamburger - hidden on desktop */
.gh-burger {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 30px;
  padding: 0;
  position: relative;
  width: 30px;
}

.gh-burger::before,
.gh-burger::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 24px;
  height: 1px;
  background-color: var(--site-text);
  transition: all 0.2s ease;
}

.gh-burger::before {
  top: 11px;
}

.gh-burger::after {
  bottom: 11px;
}

.gh-head-open .gh-burger::before {
  top: 15px;
  transform: rotate(45deg);
}

.gh-head-open .gh-burger::after {
  bottom: 14px;
  transform: rotate(-45deg);
}

@media (max-width: 767px) {
  #gh-head .gh-head-inner {
    grid-template-columns: 1fr auto auto;
    gap: 16px;
  }

  #gh-head .gh-head-brand {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  #gh-head .gh-head-logo {
    font-size: 2.2rem;
  }

  .gh-head-logo-img {
    height: 40px;
    max-width: 180px;
  }

  .gh-head-actions {
    display: none;
  }

  .gh-head-open .gh-head-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }

  .gh-burger {
    display: block;
  }

  .gh-head-menu {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--site-bg);
    z-index: 9999;
    padding: 2rem;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
  }

  .gh-head-open .gh-head-menu {
    visibility: visible;
    opacity: 1;
  }

  .gh-head-menu .nav {
    flex-direction: column;
    gap: 24px;
  }

  .gh-head-menu .nav a {
    font-size: 1.125rem;
  }
}

/* Home hero (cover + title) — legacy, kept for other pages if needed */
.site-header-content {
  position: relative;
  display: flex;
  align-items: center;
  padding-top: calc(19vmin + 44px);
  padding-bottom: 19vmin;
  text-align: center;
  color: var(--color-darkgrey);
  min-height: 400px;
}

.site-header-content.has-cover {
  min-height: 560px;
  background-color: var(--ghost-accent-color);
  color: #fff;
}

.site-header-cover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header-inner {
  position: relative;
  z-index: 10;
}

.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-description {
  margin-top: 1rem;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.95;
}

/* ==========================================================================
   HOME PAGE
   Combined hero (headline + quote + lead + CTA + cover); Hamlet excerpt;
   body copy; CTA block. Modern hierarchy and flow.
   ========================================================================== */

/* ── Section rhythm ── */
#site-main {
  --section-padding-y: clamp(3rem, 6vw, 4.5rem);
  --section-padding-x: max(4vmin, 20px);
  --content-max: 720px;
  --wide-max: 1100px;
}

/* ── Hero (combined: headline, quote, lead, CTA, cover) ── */
.home-hero {
  background: #aba84d;
  background: radial-gradient(circle, rgba(171, 168, 77, 1) 0%, rgba(119, 117, 52, 1) 50%, rgba(128, 124, 36, 1) 100%);
  background: radial-gradient(circle, rgba(171, 168, 77, 1) 0%, rgba(119, 117, 52, 1) 50%, rgba(128, 124, 36, 1) 100%);

  color: #f5f5f0;
  padding: var(--section-padding-y) var(--section-padding-x);
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--wide-max);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .home-hero-inner {
    grid-template-columns: 1fr minmax(280px, 0.9fr);
    gap: 3.5rem;
    align-items: center;
  }
}

.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hierarchy: headline = primary, quote = secondary, lead = tertiary */
.home-hero-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  order: 1;
}

.home-hero-quote {
  margin: 0;
  padding: 0;
  border: none;
  order: 2;
}

.home-hero-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  font-style: italic;
}

.home-hero-lead {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  order: 3;
}

.home-hero-actions {
  margin-top: 0.25rem;
  order: 4;
}

.home-hero-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: #7E8B4B;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  margin-bottom: 0.5rem;
}

.home-hero-btn:hover {
  background: #6b7740;
  color: #fff;
  text-decoration: none;
}

.home-hero-formats {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.home-hero-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  order: -1;
}

@media (min-width: 900px) {
  .home-hero-cover {
    order: 0;
  }
}

.home-cover-img {
  width: 200%;
  height: auto;
  display: block;
  max-width: 850px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

@media (max-width: 767px) {
  .home-hero {
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
  }
  .home-cover-img {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ── Hamlet excerpt + expand/collapse ── */
.home-hamlet {
  padding: var(--section-padding-y) var(--section-padding-x);
  background: var(--site-bg-muted);
}

.home-hamlet .home-body-inner {
  max-width: var(--content-max);
}

.hamlet-heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--site-text-soft);
}

.hamlet-excerpt,
.hamlet-full {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--site-text-muted);
}

/* Table-like verse: text left-aligned, line numbers right-aligned in a column */
.hamlet-verse {
  max-width: 42rem;
}

.hamlet-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 0.25rem;
}

.hamlet-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.hamlet-num {
  flex-shrink: 0;
  min-width: 2.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--site-text-soft);
}

.hamlet-full[hidden] {
  display: none;
}

.hamlet-toggle {
  margin-top: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--site-cta-secondary-bg);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.hamlet-toggle:hover {
  color: var(--site-cta-secondary-bg-hover);
}

/* ── Body ── */
.home-body {
  padding: var(--section-padding-y) var(--section-padding-x);
  background: var(--site-bg);
}

.home-body-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.home-body .home-body-inner p {
  margin: 0 0 1.35rem;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--site-text-muted);
}

.home-body .home-body-inner p:last-child {
  margin-bottom: 0;
}

/* ── CTA block ── */
.home-cta-block {
  padding: var(--section-padding-y) var(--section-padding-x);
  background: var(--site-bg-muted);
  text-align: center;
}

.home-cta-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.home-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--site-cta-secondary-bg);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 0.5rem;
}

.home-cta-btn:hover {
  background: var(--site-cta-secondary-bg-hover);
  color: #fff;
  text-decoration: none;
}

.home-cta-formats {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--site-text-soft);
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 0;
  padding-top: 48px;
  padding-bottom: 140px;
  color: #fff;
  background-color: var(--site-bg);
  background-image: url('/assets/images/army_&_ocean.png');
  background-position: top right;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 320px;
}

.site-footer .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
}

.site-footer .copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer .copyright a {
  color: #fff;
  font-weight: 500;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.site-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer-nav li {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  line-height: 2em;
}

@media (max-width: 767px) {
  .site-footer .inner {
    gap: 20px;
  }
}

/* ── Book page: hero + synopsis + CTA flow ── */
.book-main {
  padding: 0;
}

.book-article {
  margin: 0;
}

.book-hero {
  background: #aba84d;
  background: radial-gradient(circle, rgba(171, 168, 77, 1) 0%, rgba(119, 117, 52, 1) 50%, rgba(128, 124, 36, 1) 100%);
  color: #f5f5f0;
  padding: var(--section-padding-y, 4rem) var(--section-padding-x, max(4vmin, 20px));
}

.book-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--wide-max, 1100px);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .book-hero-inner {
    grid-template-columns: 1fr minmax(260px, 0.85fr);
    gap: 3.5rem;
    align-items: center;
  }
}

.book-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.book-hero-subtitle {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.book-hero-tagline {
  margin: 0;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.book-hero-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  order: -1;
}

@media (min-width: 900px) {
  .book-hero-cover {
    order: 0;
  }
}

.book-cover-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 420px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

@media (max-width: 767px) {
  .book-hero {
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
  }
  .book-cover-img {
    max-width: 240px;
    margin: 0 auto;
  }
}

.book-synopsis {
  padding: var(--section-padding-y, 4rem) var(--section-padding-x, max(4vmin, 20px));
  background: var(--site-bg);
}

.book-synopsis-inner {
  max-width: var(--content-max, 720px);
  margin: 0 auto;
}

.book-prose {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--site-text);
}

.book-prose p {
  margin: 0 0 1.25rem;
}

.book-prose p:last-child {
  margin-bottom: 0;
}

.book-cta-block {
  padding: var(--section-padding-y, 4rem) var(--section-padding-x, max(4vmin, 20px));
  background: var(--site-bg-muted);
  border-top: 1px solid var(--site-border);
}

.book-cta-inner {
  max-width: var(--content-max, 720px);
  margin: 0 auto;
  text-align: center;
}

.book-formats {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  color: var(--site-text);
}

.book-formats-note {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--site-text-soft);
}

.book-cta-inner .btn {
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn-primary,
.main-cta {
  background-color: var(--ghost-accent-color);
  color: #fff;
  border: 2px solid var(--ghost-accent-color);
  text-decoration: none;
}

.btn-primary:hover,
.main-cta:hover {
  background-color: #333;
  border-color: #333;
  color: #fff;
  text-decoration: none;
}

/* Article / page content */
.gh-canvas {
  --gap: max(4vmin, 20px);
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.gh-content {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.6;
}

.gh-content p {
  margin-bottom: 1.5em;
}

/* About page — modern flow */
.about-page .site-content {
  padding-bottom: 0;
}

.about-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--site-bg-muted);
  border-bottom: 1px solid var(--site-border);
}

.about-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 max(4vmin, 20px);
  text-align: center;
}

.about-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--site-text);
  letter-spacing: -0.02em;
}

.about-tagline {
  font-size: 1.15rem;
  color: var(--site-text-muted);
  margin: 0;
  font-style: normal;
}

.about-tagline em {
  font-style: italic;
  color: var(--site-text-soft);
}

.about-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 max(4vmin, 20px);
}

@media (max-width: 700px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .about-photo {
    margin: 0 auto;
  }
  .about-bio {
    text-align: center;
  }
  .about-ctas {
    justify-content: center;
  }
}

.about-photo {
  margin: 0;
  position: relative;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .about-photo img {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .about-photo img {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

.about-bio {
  padding-top: 0.25rem;
}

.about-lead {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.65;
  color: var(--site-text);
  margin: 0 0 1.25em;
  font-weight: 500;
}

.about-bio p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--site-text-muted);
  margin: 0 0 1em;
}

.about-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.about-ctas .btn {
  display: inline-block;
  padding: 0.6rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.about-ctas .btn-secondary {
  background: transparent;
  color: var(--site-text-muted);
  border: 2px solid var(--site-border);
}

.about-ctas .btn-secondary:hover {
  border-color: var(--site-text-soft);
  color: var(--site-text);
  text-decoration: none;
}

/* Legacy about-content (if used elsewhere) */
.about-content {
  position: relative;
}

/* Contact page — modern flow (match about) */
.contact-page .site-content {
  padding-bottom: 0;
}

.contact-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--site-bg-muted);
  border-bottom: 1px solid var(--site-border);
}

.contact-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 max(4vmin, 20px);
  text-align: center;
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--site-text);
  letter-spacing: -0.02em;
}

.contact-tagline {
  font-size: 1.15rem;
  color: var(--site-text-muted);
  margin: 0;
  font-style: normal;
}

.contact-tagline em {
  font-style: italic;
  color: var(--site-text-soft);
}

.contact-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 max(4vmin, 20px);
}

@media (max-width: 700px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }
  .contact-sidebar {
    order: -1;
  }
}

.contact-form-wrap {
  min-width: 0;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form .form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--site-text);
}

.contact-form .form-group .required {
  color: var(--color-midgrey);
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  background: var(--site-bg);
  color: var(--site-text);
  transition: border-color 0.2s ease;
}

.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
  outline: none;
  border-color: var(--site-text-soft);
}

.contact-form .form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .main-cta {
  margin-top: 0.5rem;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  opacity: 0;
  pointer-events: none;
}

.contact-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
}

.contact-status--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.contact-status--error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.contact-status--loading {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

html[data-theme="dark"] .contact-status--success {
  background: rgba(40, 80, 50, 0.4);
  color: #a8e6b0;
  border-color: #2d5a35;
}
html[data-theme="dark"] .contact-status--error {
  background: rgba(80, 40, 40, 0.4);
  color: #f5b0b0;
  border-color: #5a2d2d;
}
html[data-theme="dark"] .contact-status--loading {
  background: rgba(40, 60, 80, 0.4);
  color: #a8d0e6;
  border-color: #2d4a5a;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .contact-status--success {
    background: rgba(40, 80, 50, 0.4);
    color: #a8e6b0;
    border-color: #2d5a35;
  }
  html:not([data-theme="light"]) .contact-status--error {
    background: rgba(80, 40, 40, 0.4);
    color: #f5b0b0;
    border-color: #5a2d2d;
  }
  html:not([data-theme="light"]) .contact-status--loading {
    background: rgba(40, 60, 80, 0.4);
    color: #a8d0e6;
    border-color: #2d4a5a;
  }
}

.contact-sidebar {
  padding-top: 0.25rem;
}

.contact-preferred {
  font-size: 0.95rem;
  color: var(--site-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Error 404 */
.error-content {
  padding: 14vw 4vw 2vw;
}

.error-message {
  text-align: center;
  padding-bottom: 10vw;
}

.error-code {
  font-size: 12vw;
  letter-spacing: -5px;
  line-height: 1em;
  margin: 0;
}

.error-description {
  color: var(--color-secondary-text);
  font-size: 2rem;
  margin: 1rem 0;
}

.error-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}
