/* ==========================================================================
   Barry Ninham - barryninham.com
   ========================================================================== */

/* Fonts (self-hosted, SIL Open Font Licence - see /fonts/OFL-*.txt) */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/nunito.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/abhaya-libre-600.woff2") format("woff2");
}

@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/abhaya-libre-700.woff2") format("woff2");
}

:root {
  --clr-primary: #bda392;
  --clr-primary-dark: #a68a76;
  --clr-primary-text: #736155;
  --clr-dark: #242424;
  --clr-ink: #333333;
  --clr-text: #666666;
  --clr-paper: #f4f4f4;
  --clr-line: #e5ddd6;
  --clr-white: #ffffff;
  --font-heading: "Abhaya Libre", Georgia, serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1140px;
  --header-h: 76px;
  --shadow-card: 0 10px 30px rgba(36, 36, 36, 0.08);
  --shadow-card-hover: 0 18px 44px rgba(36, 36, 36, 0.16);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 76px) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--clr-text);
  background: var(--clr-white);
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--clr-ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.25em; }

a {
  color: var(--clr-primary-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover { color: var(--clr-ink); }

ul { padding-left: 1.3em; }

:focus-visible {
  outline: 3px solid var(--clr-dark);
  outline-offset: 2px;
  border-radius: 2px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.95);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  background: var(--clr-dark);
  color: var(--clr-white);
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; color: var(--clr-white); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(56px, 9vw, 104px); }
.section--paper { background: var(--clr-paper); }
.section--dark { background: var(--clr-dark); color: #cfcfcf; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--clr-white); }

/* Eyebrow labels */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-primary-text);
  margin-bottom: 14px;
}

.section--dark .eyebrow, .hero .eyebrow { color: var(--clr-primary); }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clr-dark);
  background: var(--clr-primary);
  border: 2px solid var(--clr-primary);
  border-radius: 3px;
  padding: 14px 30px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  background: var(--clr-dark);
  border-color: var(--clr-dark);
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(36, 36, 36, 0.35);
}

.btn--ghost { background: transparent; color: var(--clr-ink); }
.btn--ghost:hover { background: var(--clr-primary); border-color: var(--clr-primary); color: var(--clr-dark); }

/* Buttons on dark surfaces */
.hero .btn:hover,
.page-hero .btn:hover,
.section--dark .btn:hover {
  background: var(--clr-white);
  border-color: var(--clr-white);
  color: var(--clr-dark);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.hero .btn--ghost, .section--dark .btn--ghost { color: var(--clr-white); }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(20, 20, 20, 0.72);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 769px) {
  .site-header {
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.site-header.is-scrolled {
  background: rgba(20, 20, 20, 0.94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.site-header.site-header--solid,
.site-header.site-header--solid.is-scrolled {
  background: rgba(20, 20, 20, 0.97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 220px; height: 55px; object-fit: contain; }

.nav { display: flex; align-items: center; }

.nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #e9e4e0;
  transition: color 0.2s ease;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--clr-primary); }

/* Dropdown */
.nav .has-sub { position: relative; }

.nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  align-items: stretch;
  text-align: left;
  white-space: nowrap;
  min-width: 240px;
  background: rgba(20, 20, 20, 0.97);
  border-top: 2px solid var(--clr-primary);
  border-radius: 0 0 6px 6px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav .has-sub:hover .sub-menu,
.nav .has-sub:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav .sub-menu a { padding: 10px 20px; letter-spacing: 1px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px 12px;
  min-width: 50px;
  min-height: 50px;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--clr-white);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero / page banners
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92vh;
  padding: calc(var(--header-h) + 40px) 0 72px;
  background-color: var(--clr-dark);
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.72), rgba(10, 10, 10, 0.78)),
    url("/images/hero-bubbles.webp");
  background-size: cover;
  background-position: center;
  color: #d9d4d0;
}

.hero .container { width: 100%; }

.hero h1 { color: var(--clr-white); max-width: 21ch; }

.hero__lead {
  max-width: 640px;
  font-size: 1.15rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 9vw, 96px)) 0 clamp(48px, 8vw, 84px);
  background-color: var(--clr-dark);
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.74), rgba(10, 10, 10, 0.8)),
    url("/images/hero-bubbles.webp");
  background-size: cover;
  background-position: center;
  color: #d9d4d0;
  text-align: center;
}

.page-hero h1 { color: var(--clr-white); margin-bottom: 0.3em; }
.page-hero .eyebrow { color: var(--clr-primary); }
.page-hero__intro { max-width: 760px; margin: 0.75em auto 0; }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 14px;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #a5a5a5; }
.breadcrumbs a { color: var(--clr-primary); text-decoration: none; }
.breadcrumbs [aria-current] { color: #bdbdbd; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.split--media-right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--top { align-items: start; }
.split--top .split__media { position: sticky; top: calc(var(--header-h) + 24px); }

.split__media img { border-radius: 8px; }
.split__media--plain img { border-radius: 0; }

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--clr-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 32px 26px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.card__icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
}

.card h3, .card h4 { margin-bottom: 0.4em; }

.card p { font-size: 0.98rem; margin-bottom: 0; }

.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:hover { color: inherit; }
.card--link h3, .card--link h4 { transition: color 0.25s ease; }
.card--link:hover h3, .card--link:hover h4 { color: var(--clr-primary-text); }

/* Post cards */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); color: inherit; }

.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; }

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__media img { transform: scale(1.05); }

.post-card__body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.post-card__meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--clr-primary-text);
}

.post-card h3 { font-size: 1.35rem; margin: 0; transition: color 0.25s ease; }
.post-card:hover h3 { color: var(--clr-primary-text); }
.post-card p { margin: 0; font-size: 0.97rem; }

.post-card__more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-ink);
}

/* --------------------------------------------------------------------------
   Stats / counters
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  text-align: center;
}

@media (min-width: 769px) {
  .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--clr-primary);
  line-height: 1;
  display: block;
}

.stat__label {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: inherit;
}

/* --------------------------------------------------------------------------
   Quote
   -------------------------------------------------------------------------- */
.quote {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(48px, 8vw, 88px);
}

.quote__mark { width: 54px; margin: 0 auto 20px; opacity: 0.85; }

.quote blockquote {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 600;
  color: var(--clr-ink);
  line-height: 1.3;
}

.quote figcaption {
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-primary-text);
}

/* --------------------------------------------------------------------------
   Timeline (career, awards)
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--clr-line);
}

.timeline > li {
  position: relative;
  padding: 0 0 30px 42px;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--clr-white);
  border: 3px solid var(--clr-primary);
}

.timeline h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--clr-primary-text);
  margin-bottom: 4px;
}

.timeline p { margin-bottom: 0; }
.timeline ul { margin-top: 6px; list-style: disc; padding-left: 1.3em; }

/* --------------------------------------------------------------------------
   Expertise tags
   -------------------------------------------------------------------------- */
.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags li {
  background: var(--clr-white);
  border: 1px solid var(--clr-line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--clr-ink);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.tags li:hover { border-color: var(--clr-primary); background: #faf6f3; }

/* Logos row */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 64px);
}

.logo-row img {
  max-height: 84px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-row img:hover { filter: none; opacity: 1; }

/* --------------------------------------------------------------------------
   Books (publications)
   -------------------------------------------------------------------------- */
.book {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  background: var(--clr-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.book img { border-radius: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.book h3 { font-size: 1.25rem; }
.book h3 a { color: inherit; text-decoration: none; }
.book h3 a:hover { color: var(--clr-primary-text); }
.book p { font-size: 0.95rem; margin-bottom: 0; }

.book__more { margin-top: 12px; }
.book__more a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Video embeds (click-to-play YouTube facade)
   -------------------------------------------------------------------------- */
.yt {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.yt img.yt__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.yt:hover img.yt__thumb { opacity: 1; transform: scale(1.03); }

.yt__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 60px;
  border: 0;
  border-radius: 14px;
  background: rgba(20, 20, 20, 0.82);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.yt__play::after {
  content: "";
  border-style: solid;
  border-width: 12px 0 12px 22px;
  border-color: transparent transparent transparent var(--clr-white);
  margin-left: 5px;
}

.yt:hover .yt__play { background: var(--clr-primary); transform: scale(1.08); }

.yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Blog post (single)
   -------------------------------------------------------------------------- */
.post-hero { text-align: center; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-top: 10px;
}

.post-body { max-width: 760px; margin-inline: auto; }
.post-body > figure { margin: 0 0 32px; }
.post-body > figure img { width: 100%; border-radius: 8px; }
.post-body .yt { margin: 32px 0; }
.post-body h2, .post-body h3 { margin-top: 1.6em; }

.attribution {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--clr-paper);
  border-left: 4px solid var(--clr-primary);
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
}

.attribution h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-primary-text);
  margin-bottom: 8px;
}

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

audio { width: 100%; margin: 18px 0; }

.post-nav {
  max-width: 760px;
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--clr-line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.95rem;
}

.post-nav a { text-decoration: none; max-width: 46%; }
.post-nav span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-text);
  margin-bottom: 4px;
}

.post-nav .next { text-align: right; margin-left: auto; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-panel {
  background: var(--clr-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.contact-panel .email {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  font-weight: 700;
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--clr-dark);
  color: #a8a8a8;
  padding: 56px 0 32px;
  font-size: 0.92rem;
}

.site-footer a { color: #d6ccc4; text-decoration: none; }
.site-footer a:hover { color: var(--clr-primary); }

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #3a3a3a;
}

.site-footer__brand img { width: 200px; height: 50px; object-fit: contain; }

.site-footer__nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
}

.site-footer__nav a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 26px;
}

.site-footer__bottom .social-link { justify-self: center; }
.site-footer__bottom .built-by { justify-self: end; }

.site-footer__legal { margin: 0; justify-self: start; }
.site-footer__legal a {
  margin-left: 14px;
  color: inherit;
  text-decoration: none;
}
.site-footer__legal a:hover { color: var(--clr-primary); text-decoration: underline; text-underline-offset: 3px; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.social-link svg { width: 22px; height: 22px; fill: currentColor; }

.built-by { display: inline-flex; align-items: center; gap: 10px; opacity: 0.75; transition: opacity 0.3s ease; }
.built-by:hover { opacity: 1; }
.built-by img { width: 110px; height: auto; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.error-page .code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 700;
  color: var(--clr-primary);
  line-height: 1;
  display: block;
}

/* Profile logos */
.scholar-logo { display: inline-block; margin-inline: auto; max-width: 72px; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.u-center { text-align: center; }
.u-narrow { max-width: 860px; margin-inline: auto; }
.u-books { max-width: 900px; margin-inline: auto; }
.u-prose { max-width: 760px; margin-inline: auto; }
.u-mt { margin-top: 24px; }
.section-cta { text-align: center; margin-top: 40px; }
.grid--1 { grid-template-columns: 1fr; }

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

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view { opacity: 1; transform: none; }

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *,
  *::before,
  *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* No-JS fallback */
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .brand img { width: 180px; height: 45px; }

  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: rgba(18, 18, 18, 0.98);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    padding: 24px 0 40px;
  }

  .nav.is-open { transform: translateX(0); visibility: visible; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4); }

  /* No-JS fallback */
  .no-js .nav-toggle { display: none; }
  .no-js .nav {
    position: static;
    transform: none;
    visibility: visible;
    width: auto;
    background: none;
    padding: 0;
  }

  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }

  .nav a { padding: 14px 28px; font-size: 0.9rem; }

  .nav .has-sub { display: flex; flex-direction: column; }

  .nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255, 255, 255, 0.04);
    border-top: 0;
    border-radius: 0;
    padding: 0 0 6px;
  }

  .nav .sub-menu a { padding-left: 46px; }

  body.nav-open { overflow: hidden; }

  .hero { min-height: 82vh; }

  .split, .split--media-right { grid-template-columns: 1fr; }
  .split--media-right .split__media { order: -1; }
  .split__media { max-width: 460px; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

  .book { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; padding: 20px; }

  .site-footer__top { flex-direction: column; text-align: center; }
  .site-footer__bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-footer__bottom .social-link, .site-footer__bottom .built-by { justify-self: center; }
  .site-footer__legal { justify-self: center; }
  .site-footer__nav ul { justify-content: center; }

  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .post-nav .next { text-align: left; margin-left: 0; }
}
