/* Design C "Convocation": bright and modern, colours from his doctoral gown (royal blue, scarlet, gold); bold grotesque headlines, a full-bleed blue hero band and rounded study-card blocks. */
:root {
  --paper: #ffffff;
  --sheet: #f2f5fc;
  --ink: #0f1a33;
  --muted: #4c5873;
  --rule: #dce3f2;
  --royal: #1e4fd8;
  --royal-deep: #12307f;
  --scarlet: #e0402f;
  --gold: #f2c14e;
  --on-royal: #ffffff;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Literata", "Georgia", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1124; --sheet: #141c36; --ink: #eef2fb; --muted: #a7b2cc; --rule: #26314f;
    --royal: #6f93ff; --royal-deep: #16245a; --scarlet: #ff7a6b; --gold: #f2c14e; --on-royal: #ffffff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b1124; --sheet: #141c36; --ink: #eef2fb; --muted: #a7b2cc; --rule: #26314f;
  --royal: #6f93ff; --royal-deep: #16245a; --scarlet: #ff7a6b; --gold: #f2c14e; --on-royal: #ffffff; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.05rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 1140px; margin: 0 auto; padding-inline: 20px; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--royal-deep); color: var(--on-royal); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--gold); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 0.92rem; padding: 6px 12px; border-radius: 999px; opacity: .85; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.nav a[aria-current="page"] { opacity: 1; background: var(--gold); color: #0f1a33; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.8vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0; max-width: 65ch; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--scarlet); }
.lede { font-size: 1.18rem; }
.post { font-family: var(--display); font-size: 0.9rem; font-weight: 600; color: var(--muted); }

section { padding-block: clamp(56px, 8vw, 100px); }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1rem; text-decoration: none; padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; transition: transform .15s, background .15s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--scarlet); color: #ffffff; }
.btn-ghost { border-color: currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero: full-bleed royal band */
.hero { background: var(--royal); color: var(--on-royal); padding-block: 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero-text { display: grid; gap: 22px; padding-block: clamp(48px, 7vw, 96px); min-width: 0; }
.hero .eyebrow { color: var(--gold); }
.hero .btn-primary { background: var(--gold); color: #0f1a33; }
.hero-photo { align-self: end; position: relative; max-width: 400px; justify-self: end; width: 100%; margin-top: 40px; }
.hero-photo::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; top: 18%; background: var(--gold); border-radius: 999px 999px 0 0; }
.hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 999px 999px 0 0; }
.postnominals { display: flex; flex-wrap: wrap; gap: 8px; }
.postnominals span { font-family: var(--display); font-weight: 700; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.16); }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.figures div { padding: 22px; display: grid; gap: 6px; background: var(--sheet); border-radius: 18px; }
.figures strong { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--royal); font-variant-numeric: tabular-nums; }
.figures span { font-size: 0.92rem; color: var(--muted); }

/* About */
.about .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: 24px; }
.about-text { display: grid; gap: 18px; min-width: 0; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 0; list-style: none; }
.skills li { font-family: var(--display); font-weight: 600; font-size: 0.88rem; padding: 6px 14px; border-radius: 999px; background: var(--sheet); color: var(--royal); }

/* Ledgers as timeline */
.ledger { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; padding: 16px 20px; background: var(--sheet); border-radius: 14px; }
.ledger .what { min-width: 0; display: grid; gap: 2px; }
.ledger .what b { font-family: var(--display); font-weight: 700; font-size: 1.08rem; }
.ledger .what small { color: var(--muted); font-size: 0.95rem; }
.ledger .when { font-family: var(--display); font-weight: 700; font-size: 0.85rem; color: var(--royal); background: var(--paper); padding: 4px 12px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger.total li:first-child { background: var(--royal); color: var(--on-royal); }
.ledger.total li:first-child small { color: var(--on-royal); opacity: .8; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.two-col > div { min-width: 0; display: grid; gap: 18px; align-content: start; }

/* PhD */
.phd { background: var(--royal-deep); color: var(--on-royal); }
.phd .eyebrow { color: var(--gold); }
.phd .post { color: var(--on-royal); opacity: .75; }
.phd .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.phd-text { display: grid; gap: 20px; min-width: 0; }
.phd img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; max-width: 360px; justify-self: end; border-radius: 24px; border: 6px solid var(--gold); }
.thesis { font-family: var(--body); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.35; padding: 22px 24px; background: rgba(255,255,255,.08); border-radius: 18px; }

/* Covers */
.cover { aspect-ratio: 2 / 3; width: 100%; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 22px; color: #ffffff; border-radius: 6px 16px 16px 6px; box-shadow: 0 18px 32px -16px rgba(15,26,51,.5); }
.cover::after { content: ""; position: absolute; right: -30%; bottom: -20%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.12); }
.cover .c-series { font-family: var(--display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; position: relative; }
.cover .c-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.02; letter-spacing: -0.02em; position: relative; }
.cover .c-author { font-family: var(--display); font-weight: 600; font-size: 0.82rem; position: relative; }
.cover-a { background: #e0402f; }
.cover-b { background: #1e4fd8; }
.cover-c { background: #0f1a33; }
.cover-c .c-series { color: #f2c14e; }

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 44px); }
.book { display: grid; gap: 16px; align-content: start; min-width: 0; }
.book-meta { display: grid; gap: 8px; }
.book-meta .year { font-family: var(--display); font-weight: 700; font-size: 0.82rem; color: var(--scarlet); }
.book-meta p { font-size: 0.98rem; color: var(--muted); }
.book .btn { justify-self: start; }

.coming { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.coming li { background: var(--sheet); border-radius: 18px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.coming b { font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.coming span { justify-self: start; font-family: var(--display); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #0f1a33; }

.books-hero { background: var(--royal); color: var(--on-royal); padding-bottom: 0; }
.books-hero .eyebrow { color: var(--gold); }
.books-hero .post { color: var(--on-royal); opacity: .8; }
.books-hero .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(32px, 6vw, 72px); align-items: end; }
.books-hero .text { display: grid; gap: 20px; min-width: 0; padding-bottom: clamp(48px, 7vw, 90px); }
.books-hero img { aspect-ratio: 4 / 5; object-fit: cover; object-position: top; width: 100%; max-width: 340px; justify-self: end; border-radius: 999px 999px 0 0; }

/* Subscribe */
.subscribe .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 56px); align-items: center; background: var(--gold); color: #0f1a33; border-radius: 28px; padding: clamp(28px, 5vw, 56px); }
.subscribe .eyebrow { color: #0f1a33; }
.sub-text { display: grid; gap: 14px; min-width: 0; }
.sub-form { display: grid; gap: 6px; min-width: 0; }
.sub-form label { font-family: var(--display); font-weight: 700; font-size: 0.85rem; }
.sub-form input { font: inherit; color: #0f1a33; background: #ffffff; border: 2px solid #0f1a33; border-radius: 999px; padding: 12px 18px; margin-bottom: 10px; width: 100%; }
.sub-form .btn-primary { background: #0f1a33; color: #ffffff; }
.sub-note { font-size: 0.88rem; }
.subscribe { padding-inline: 16px; }

/* Contact */
.contact { background: var(--sheet); }
.contact .wrap { display: grid; gap: 28px; }
.contact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-list div { padding: 20px 22px; display: grid; gap: 6px; min-width: 0; background: var(--paper); border-radius: 18px; }
.contact-list small { font-family: var(--display); font-weight: 700; font-size: 0.8rem; color: var(--scarlet); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-list a { font-family: var(--display); font-weight: 600; font-size: 1.1rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--royal); }
.site-foot { padding-block: 24px; font-size: 0.88rem; background: var(--royal-deep); color: var(--on-royal); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-text { padding-bottom: 8px; }
  .hero-photo { max-width: 380px; }
  .about .wrap, .phd .wrap, .books-hero .wrap, .two-col, .subscribe .wrap { grid-template-columns: 1fr; }
  .phd img { justify-self: start; }
  .books-hero img { justify-self: start; max-width: 280px; }
  .books-hero .text { padding-bottom: 0; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .coming { grid-template-columns: repeat(2, 1fr); }
  .contact-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .shelf, .coming { grid-template-columns: 1fr; }
  .shelf .cover { max-width: 300px; }
  .ledger li { grid-template-columns: 1fr; }
  .ledger .when { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:hover { transform: none; } }
