/* =========================================================
   Diritto-Penale.it — Legal Editorial Design System
   Palette: inchiostro / avorio / oro spento
   ========================================================= */

:root {
  --ink:        #0B1F3A;   /* navy profondo, inchiostro */
  --ink-soft:   #1C3557;
  --ink-muted:  #4A5A75;
  --paper:      #F6F1E7;   /* avorio carta */
  --paper-2:    #EFE8D8;
  --rule:       #D9CFB9;   /* linee sottili */
  --gold:       #A8874E;   /* oro spento editoriale */
  --gold-soft:  #C9A96B;
  --crimson:    #7A1E22;   /* rosso toga, accento raro */
  --shadow:     0 1px 0 rgba(11,31,58,.06), 0 24px 48px -32px rgba(11,31,58,.18);

  --f-display:  "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-body:     "Lora", "Source Serif Pro", Georgia, serif;
  --f-ui:       "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.78;
  font-feature-settings: "liga", "kern", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* trama carta */
  background-image:
    radial-gradient(rgba(11,31,58,.035) 1px, transparent 1px),
    radial-gradient(rgba(11,31,58,.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

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

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s, background .2s;
}
a:hover {
  color: var(--crimson);
  text-decoration-color: var(--crimson);
}
.entry .body a {
  color: var(--gold);
  font-weight: 500;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
}
.entry .body a:hover {
  color: var(--crimson);
  background: rgba(168,135,78,.08);
  text-decoration-color: var(--crimson);
}

/* ---------- Typography ---------- */
.display,
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 1.9vw, 1.6rem); letter-spacing: -0.005em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }

.eyebrow {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.lede {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 52ch;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-double {
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  height: 4px;
  margin: 2.5rem 0;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(6px);
  background-color: rgba(246,241,231,.92);
}
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 0;
  gap: 16px;
}
.masthead .date {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.masthead .date .edition { color: var(--gold); }
.logo {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.logo .dot { color: var(--gold); }
.logo-sub {
  display: block;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}
.masthead .tools {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.masthead .tools a { text-decoration: none; color: var(--ink-muted); }
.masthead .tools a:hover { color: var(--gold); }

.site-nav {
  border-top: 1px solid var(--rule);
  border-bottom: 3px double var(--rule);
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 3vw, 38px);
  margin: 0;
  padding: 12px 0;
}
.site-nav a {
  font-family: var(--f-ui);
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--gold); color: var(--gold); }
.site-nav a.is-active { border-bottom-color: var(--ink); }

/* ---------- Hamburger / mobile nav ---------- */
.nav-toggle {
  display: none;
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  cursor: pointer;
  z-index: 60;
  border-radius: 0;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: background .2s, border-color .2s;
}
.nav-toggle:hover { background: var(--paper-2); border-color: var(--ink); }
.nav-toggle .bars {
  display: inline-block;
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: background .2s;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, top .25s, bottom .25s, opacity .2s;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after  { bottom: -6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { bottom: 0; transform: rotate(-45deg); }

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,31,58,.45);
  z-index: 45;
  opacity: 0;
  transition: opacity .25s;
}
body.nav-open .nav-scrim { display: block; opacity: 1; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  /* simplify masthead on mobile */
  .masthead {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 16px 0 14px;
  }
  .masthead .date { display: none; }
  .masthead .tools { display: none; }
  .logo { font-size: 1.7rem; }
  .logo-sub { font-size: 9px; letter-spacing: .25em; }

  /* hide main nav by default; show as drawer when open */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 86vw);
    height: 100vh;
    background: var(--paper);
    border-left: 1px solid var(--rule);
    border-bottom: 0;
    border-top: 0;
    z-index: 50;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2,.7,.2,1);
    overflow-y: auto;
    padding: 70px 0 40px;
  }
  body.nav-open .site-nav { transform: translateX(0); }
  .site-nav > .container { padding: 0; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .site-nav li { width: 100%; }
  .site-nav a {
    display: block;
    padding: 18px 28px;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    font-size: 12px;
    letter-spacing: .22em;
  }
  .site-nav a:hover,
  .site-nav a.is-active {
    background: var(--paper-2);
    border-bottom-color: var(--rule);
  }

  /* prevent scroll when menu open */
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero editoriale ---------- */
.hero {
  padding: clamp(48px, 8vw, 110px) 0 clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero::before {
  content: "§";
  position: absolute;
  top: 40px;
  right: 4vw;
  font-family: var(--f-display);
  font-size: clamp(180px, 26vw, 360px);
  color: var(--paper-2);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { max-width: 16ch; }

/* ---------- Search ---------- */
.search-wrap {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  max-width: 680px;
  border: 1.5px solid var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}
.search-wrap input {
  border: 0;
  background: transparent;
  padding: 18px 22px;
  font-family: var(--f-body);
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
  font-style: italic;
}
.search-wrap input::placeholder { color: var(--ink-muted); }
.search-wrap button {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0 26px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.search-wrap button:hover { background: var(--gold); }

.search-hint {
  margin-top: 10px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 18px 0;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "//"; margin-right: 8px; color: var(--gold); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* ---------- Grid categorie ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}
.cat-card {
  background: var(--paper);
  padding: 30px 28px 34px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .25s, transform .25s;
  position: relative;
}
.cat-card:hover { background: #fff; }
.cat-card .num {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--gold);
}
.cat-card h3 { margin: 4px 0 6px; }
.cat-card p {
  margin: 0;
  font-size: .98rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.cat-card .arrow {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
}
.cat-card:hover .arrow { color: var(--gold); }

/* ---------- Editorial article ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  padding: 36px 0 80px;
}
@media (min-width: 980px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}

article.entry header { border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 28px; }
article.entry .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 18px;
}
article.entry .meta span + span::before { content: "·"; margin-right: 18px; color: var(--gold); }

.entry .body { max-width: 68ch; }
.entry .body p {
  margin: 0 0 1.35em;
  hyphens: auto;
}
.entry .body > p:first-of-type::first-letter {
  font-family: var(--f-display);
  float: left;
  font-size: 5.2rem;
  line-height: .82;
  padding: 6px 12px 0 0;
  color: var(--ink);
  font-weight: 500;
}
.entry .body h2 {
  margin: 2.2em 0 .6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
}
.entry .body h3 { margin: 1.8em 0 .4em; }
.entry .body blockquote {
  margin: 2em 0;
  padding: 1.2em 1.6em;
  border-left: 2px solid var(--gold);
  background: var(--paper-2);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.entry .body blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.entry .body ul, .entry .body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.entry .body li { margin-bottom: .5em; }

.callout-law {
  margin: 2.2em 0;
  padding: 22px 26px;
  border: 1px solid var(--rule);
  background: #fff;
  position: relative;
}
.callout-law::before {
  content: "ART.";
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--paper);
  padding: 0 10px;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--gold);
}
.callout-law .code { font-family: var(--f-ui); font-size: .88rem; color: var(--ink-muted); letter-spacing: .02em; }
.callout-law p { margin: 6px 0 0; font-size: 1rem; }

/* ---------- Sidebar ---------- */
aside.sidebar { font-size: .95rem; }
aside.sidebar .block {
  border-top: 3px double var(--rule);
  padding: 18px 0 24px;
}
aside.sidebar .block:first-child { border-top: 0; }
aside.sidebar h4 {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
aside.sidebar ul { list-style: none; padding: 0; margin: 0; }
aside.sidebar li { padding: 10px 0; border-bottom: 1px dashed var(--rule); }
aside.sidebar li:last-child { border-bottom: 0; }
aside.sidebar a { text-decoration: none; }
aside.sidebar a:hover { color: var(--gold); }
aside.sidebar .ref {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
}

/* ---------- Latest / feed ---------- */
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.feed article {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.feed article:last-child { border-right: 0; }
.feed .kicker {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.feed h3 { margin: 0 0 10px; font-size: 1.35rem; }
.feed h3 a { text-decoration: none; }
.feed p { color: var(--ink-muted); font-size: .98rem; margin: 0 0 14px; }
.feed .byline {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Section headings ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 80px 0 24px;
}
.section-head .line { height: 1px; background: var(--rule); }
.section-head h2 {
  font-size: 1.2rem;
  font-family: var(--f-ui);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.section-head .pilcrow { color: var(--gold); font-family: var(--f-display); font-size: 1.6rem; }

/* ---------- Codice penale strip ---------- */
.codice-strip {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(48px, 6vw, 80px) 0;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.codice-strip::before {
  content: "CODICE  PENALE  ·  CODICE  PENALE  ·  CODICE  PENALE  ·  CODICE  PENALE  ·";
  position: absolute;
  top: 16px;
  left: 0;
  white-space: nowrap;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(80px, 14vw, 200px);
  color: rgba(201,169,107,.08);
  line-height: 1;
  pointer-events: none;
}
.codice-strip .inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .codice-strip .inner { grid-template-columns: 1fr 1.2fr; align-items: end; } }
.codice-strip h2 { color: var(--paper); font-size: clamp(2.2rem, 4vw, 3.2rem); }
.codice-strip h2 em { color: var(--gold-soft); }
.codice-strip p { color: rgba(246,241,231,.78); max-width: 52ch; }
.book-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  border-top: 1px solid rgba(201,169,107,.3);
}
.book-index a {
  display: block;
  padding: 18px 18px;
  border-right: 1px solid rgba(201,169,107,.15);
  border-bottom: 1px solid rgba(201,169,107,.15);
  text-decoration: none;
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.book-index a:hover { background: rgba(201,169,107,.12); color: var(--gold-soft); }
.book-index .roman { color: var(--gold-soft); font-family: var(--f-display); font-style: italic; font-size: .95rem; display: block; margin-bottom: 4px; letter-spacing: 0; text-transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 3px double var(--rule);
  padding: 60px 0 30px;
  margin-top: 80px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--gold);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--gold); }
.site-footer .mark {
  font-family: var(--f-display);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
}
.site-footer .mark .dot { color: var(--gold); }
.site-footer .colophon {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Author / byline card ---------- */
.author-byline {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  margin: 22px 0 4px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.author-byline .avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  flex-shrink: 0;
}
.author-byline .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-byline .who {
  font-family: var(--f-display);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}
.author-byline .who strong { font-weight: 600; }
.author-byline .role {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Full bio at the end of the article */
.author-bio {
  margin: 60px 0 0;
  padding: 32px;
  border: 1px solid var(--rule);
  background: #fff;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
  box-shadow: var(--shadow);
  position: relative;
}
.author-bio::before {
  content: "L'AUTORE";
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--paper);
  padding: 0 12px;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--gold);
}
.author-bio .portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 0 6px 0 -2px var(--gold), 0 0 0 6px var(--paper);
}
.author-bio .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-bio h3 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  font-family: var(--f-display);
  font-weight: 600;
}
.author-bio .role {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.author-bio p { margin: 0 0 10px; font-size: 1rem; color: var(--ink-soft); }
.author-bio .credentials {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.author-bio .contact-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.author-bio .contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.author-bio .contact-links a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.author-bio .contact-links a.outline { background: transparent; color: var(--ink); }
.author-bio .contact-links a.outline:hover { background: var(--ink); color: var(--paper); }
.author-bio .contact-links svg { width: 14px; height: 14px; }
.author-bio .credentials span {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
}
@media (max-width: 640px) {
  .author-bio { grid-template-columns: 1fr; text-align: left; }
  .author-bio .portrait { width: 110px; height: 110px; }
}

/* Author profile hero */
.author-hero {
  position: relative;
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--ink);
}
.author-hero img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  object-position: center 30%;
}
.author-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0) 55%, rgba(11,31,58,.55) 100%);
  pointer-events: none;
}
.author-hero .caption {
  position: absolute; bottom: 22px; left: 26px; right: 26px;
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.author-hero .caption strong { color: var(--gold-soft); font-weight: 500; }

/* Career timeline */
.timeline {
  list-style: none; padding: 0; margin: 32px 0 40px;
  border-left: 1px solid var(--rule);
}
.timeline li {
  position: relative;
  padding: 16px 0 24px 28px;
  margin: 0;
}
.timeline li::before {
  content: "";
  position: absolute; left: -5px; top: 22px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
}
.timeline .year {
  font-family: var(--f-ui);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  display: block; margin-bottom: 4px;
}
.timeline h4 {
  margin: 0 0 6px;
  font-family: var(--f-display); font-size: 1.3rem; font-weight: 500;
  line-height: 1.2;
}
.timeline p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* Two-column stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  margin: 32px 0;
  background: #fff;
}
.stats-bar .stat {
  padding: 24px 22px;
  border-right: 1px solid var(--rule);
  text-align: center;
}
.stats-bar .stat:last-child { border-right: 0; }
.stats-bar .num {
  font-family: var(--f-display);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.stats-bar .num em { color: var(--gold); font-style: italic; }
.stats-bar .lbl {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
  display: block;
}

/* Expertise pill list */
.expertise {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 16px 0 30px;
}
.expertise span {
  font-family: var(--f-ui);
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}

/* Publication list */
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: start;
}
.pubs li:last-child { border-bottom: 0; }
.pubs .y {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold);
  line-height: 1.1;
  padding-top: 3px;
}
.pubs .t { font-family: var(--f-body); font-size: 1.02rem; line-height: 1.55; color: var(--ink); margin: 0 0 3px; }
.pubs .t em { color: var(--ink); }
.pubs .venue {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

/* Sidebar author mini-card */
aside.sidebar .author-mini {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0 18px;
}
aside.sidebar .author-mini .avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--rule);
}
aside.sidebar .author-mini img { width: 100%; height: 100%; object-fit: cover; }
aside.sidebar .author-mini .name { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.2; }
aside.sidebar .author-mini .aff { font-family: var(--f-ui); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-muted); margin-top: 3px; }

/* ---------- 404 ---------- */
.err {
  padding: 80px 0 60px;
  text-align: center;
}
.err .big {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: .8;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.err .big span { color: var(--gold); }
.err p { max-width: 52ch; margin: 18px auto 30px; color: var(--ink-soft); font-style: italic; font-size: 1.2rem; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- FAQ accordion ---------- */
.faq {
  margin: 48px 0 20px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 30px 0 10px;
}
.faq-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 28px;
}
.faq-heading .pilcrow { color: var(--gold); font-family: var(--f-display); font-size: 1.8rem; }
.faq-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--f-ui);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink);
}
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 0;
}
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  transition: transform .25s;
}
.faq details[open] summary { color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq .answer {
  padding: 0 44px 26px 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}
.faq .answer p { margin: 0 0 .9em; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer a {
  text-decoration-color: var(--gold);
}

/* External references (authoritative outbound links) */
.external-refs {
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  display: grid;
  gap: 6px;
}
.external-refs .lbl {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.external-refs a {
  font-family: var(--f-body);
  font-size: .98rem;
  color: var(--ink);
  text-decoration-color: var(--gold-soft);
}
.external-refs a:hover { color: var(--gold); text-decoration-color: var(--gold); }
.external-refs a::after {
  content: " ↗";
  color: var(--gold);
  font-size: .85em;
}

/* Inline "see also" block */
.see-also {
  margin: 36px 0;
  padding: 22px 26px;
  background: var(--paper-2);
  border-left: 2px solid var(--gold);
  display: grid;
  gap: 8px;
}
.see-also .lbl {
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.see-also a {
  font-family: var(--f-body);
  color: var(--ink);
  font-size: 1rem;
}

/* reveal on load */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .9s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
