/* Posthuman Papers – site styles
   Brand: charcoal #101318, warm ivory #F2EFE7, soft silver #B7BEC7, steel blue #526B80
   Type: Cormorant Garamond (editorial headlines) + Montserrat (text, labels) */

:root {
  --charcoal: #101318;
  --ivory: #F2EFE7;
  --silver: #B7BEC7;
  --steel: #526B80;

  --bg: var(--ivory);
  --surface: #EAE6DC;
  --ink: #16191F;
  --muted: #555B64;
  --line: #D3CEC2;
  --link: #3F5568;
  --icon-filter: none;

  --dark-bg: var(--charcoal);
  --dark-ink: #F2EFE7;
  --dark-muted: #B9BFC7;
  --dark-line: #2B313A;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --narrow: 720px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101318;
    --surface: #181C23;
    --ink: #EDEAE2;
    --muted: #AEB4BC;
    --line: #2B313A;
    --link: #A9BCCC;
    --icon-filter: invert(1);
  }
}
:root[data-theme="dark"] {
  --bg: #101318; --surface: #181C23; --ink: #EDEAE2; --muted: #AEB4BC;
  --line: #2B313A; --link: #A9BCCC; --icon-filter: invert(1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 48px, var(--narrow)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--charcoal); color: var(--ivory); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.display { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: .005em; margin: 0; }
.kicker {
  font: 500 13px/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand span { font: 500 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 28px; margin-left: auto; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: currentColor; }

.social { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: background .2s; }
.social a:hover { background: var(--surface); }
.social img { width: 20px; height: 20px; filter: var(--icon-filter); opacity: .9; }
.social svg, .social i { font-size: 20px; width: 20px; height: 20px; color: var(--ink); }
.social-footer svg, .social-footer i { color: var(--dark-ink); }
.social span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--dark-bg); color: var(--dark-ink);
  padding: clamp(80px, 13vw, 168px) 0 clamp(72px, 10vw, 128px);
}
.hero-mark {
  position: absolute; right: -6vw; top: 50%;
  width: min(62vw, 760px); aspect-ratio: 1;
  translate: 0 -50%;
  color: var(--ivory); opacity: .07;
  animation: portal 2.6s cubic-bezier(.2,.7,.1,1) both;
}
.hero-mark svg { width: 100%; height: 100%; }
@keyframes portal { from { rotate: -180deg; opacity: 0; } to { rotate: 0deg; opacity: .07; } }
.hero-inner { position: relative; }
.hero .kicker { color: var(--silver); }
.hero-title {
  font-size: clamp(44px, 6.6vw, 92px);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.02;
  max-width: 17ch;
}
.hero-sub { max-width: 54ch; font-size: clamp(17px, 1.6vw, 20px); font-weight: 300; color: var(--dark-muted); margin: 34px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 42px 0 0; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px;
  background: var(--ivory); color: var(--charcoal);
  font: 500 15px/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  border: 1px solid var(--ivory); transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: #4A515C; }
.btn-ghost:hover { border-color: var(--ivory); }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 16px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(34px, 4vw, 48px); }
.section-head a { font-size: 15px; font-weight: 500; }
.latest { padding: 96px 0 104px; }
.latest-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; }

.card { padding: 28px 0; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card-big { border-bottom: 0; padding-top: 36px; }
.card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 24px; }
.pillar { font: 500 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.pillar:hover { color: var(--ink); }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.12; margin: 10px 0 10px; }
.card-big .card-title { font-size: clamp(38px, 4.4vw, 58px); line-height: 1.04; margin-top: 14px; }
.card-title a { color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.card-title a:hover { background-size: 100% 1px; }
.card-desc { margin: 0 0 14px; color: var(--muted); max-width: 60ch; }
.card-big .card-desc { font-size: 19px; font-weight: 300; color: var(--ink); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 13.5px; color: var(--muted); }

.pillars { background: var(--surface); padding: 96px 0; }
.pillars h2 { font-size: clamp(34px, 4vw, 48px); margin-bottom: 40px; }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pillar-card {
  display: flex; flex-direction: column; gap: 14px; padding: 30px 0 0;
  border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none;
}
.pillar-card h3 { font-size: 34px; }
.pillar-card p { margin: 0; color: var(--muted); }
.pillar-card .count { margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 500; }
.pillar-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- newsletter ---------- */
.newsletter { background: var(--dark-bg); color: var(--dark-ink); padding: 96px 0; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.newsletter .kicker { color: var(--silver); }
.newsletter h2 { font-size: clamp(36px, 4.2vw, 54px); text-transform: uppercase; }
.nl-desc { color: var(--dark-muted); font-weight: 300; font-size: 18px; max-width: 42ch; margin: 22px 0 0; }
.nl-placeholder label { display: block; font-size: 14px; color: var(--dark-muted); margin-bottom: 10px; }
.nl-row { display: flex; gap: 0; }
.nl-row input {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px;
  background: transparent; border: 1px solid #4A515C; border-right: 0;
  color: var(--dark-ink); font: 400 16px var(--sans);
}
.nl-row button {
  height: 54px; padding: 0 26px; background: var(--ivory); color: var(--charcoal);
  border: 1px solid var(--ivory); font: 500 15px var(--sans); letter-spacing: .04em; cursor: pointer;
}
.nl-row :disabled { cursor: not-allowed; }
.nl-note { font-size: 13px; color: var(--dark-muted); margin: 12px 0 0; }

/* Brevo embed: restyle its default form to the brand */
.nl-form .sib-form, .nl-form #sib-form-container, .nl-form #sib-container {
  background: transparent !important; border: 0 !important; padding: 0 !important; max-width: none !important;
  font-family: var(--sans) !important; text-align: left !important;
}
.nl-form #sib-container > div { padding: 0 !important; }
.nl-form .sib-form-block, .nl-form .entry__label, .nl-form .entry__specification,
.nl-form .sib-text-form-block p, .nl-form .sib-optin label, .nl-form .entry__choice {
  color: var(--dark-muted) !important; font-family: var(--sans) !important;
}
.nl-form .sib-form-block__button, .nl-form button[type="submit"] {
  background: var(--ivory) !important; color: var(--charcoal) !important; border-radius: 0 !important;
  font: 500 15px var(--sans) !important; letter-spacing: .04em !important; min-height: 50px; padding: 0 26px !important;
  border: 1px solid var(--ivory) !important;
}
.nl-form .input, .nl-form input[type="email"], .nl-form input[type="text"] {
  background: transparent !important; color: var(--dark-ink) !important; border: 1px solid #4A515C !important;
  border-radius: 0 !important; min-height: 50px; font: 400 16px var(--sans) !important;
}
.nl-form .sib-form-message-panel { border-radius: 0 !important; font-family: var(--sans) !important; }

/* ---------- list pages ---------- */
.page-head { padding: 88px 0 24px; }
.page-head h1 { font-size: clamp(48px, 7vw, 88px); }
.lede { font-size: clamp(18px, 1.7vw, 21px); font-weight: 300; color: var(--muted); max-width: 60ch; margin: 22px 0 0; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.topic-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
}
.topic-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.list { padding: 16px 0 96px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 64px; }
.list .card:last-child { border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); }

/* ---------- article ---------- */
.article { padding: 72px 0 88px; }
.crumbs { display: flex; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--line); }
.article-title { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; }
.article-head .meta { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-hero { margin: 48px auto 0; }
.article-hero img { width: 100%; max-height: 640px; object-fit: cover; }
.article-body { margin-top: 48px; }

.in-short { background: var(--surface); padding: 26px 30px 28px; margin-bottom: 40px; }
.in-short h2, .toc h2 { font: 500 12.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 10px; color: var(--muted); }
.in-short p { margin: 0; font-size: 17.5px; }
.toc { margin-bottom: 44px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { padding: 3px 0; }
.toc a { color: var(--ink); }

.prose { font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.4vw, 38px); line-height: 1.15; margin: 2em 0 0; scroll-margin-top: 90px; }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.2; margin: 1.6em 0 0; }
.prose li + li { margin-top: .45em; }
.prose blockquote {
  margin: 2.2em 0; padding: 26px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(25px, 2.8vw, 31px); line-height: 1.3;
}
.prose blockquote p { margin: 0; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.prose code { font-size: .9em; background: var(--surface); padding: 2px 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.sources { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--ink); }
.sources h2 { font: 500 12.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
.sources ol { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.sources li + li { margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.tags span { font-size: 13px; padding: 5px 12px; background: var(--surface); color: var(--muted); }

.related { padding: 88px 0 96px; }
.related h2 { font-size: clamp(32px, 3.6vw, 44px); margin-bottom: 8px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 48px; }
.related-grid .card:last-child { border-bottom: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { background: var(--dark-bg); color: var(--dark-muted); padding: 64px 0 calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--dark-line); }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 48px; }
.site-footer .brand { color: var(--dark-ink); }
.footer-brand p { margin: 18px 0 0; max-width: 32ch; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; align-content: start; }
.site-footer a { color: var(--dark-muted); text-decoration: none; font-size: 15px; }
.site-footer a:hover { color: var(--dark-ink); }
.footer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.social-footer img { filter: invert(1); }
.social-footer a:hover { background: #1E232B; }
.legal { display: flex; gap: 20px; margin: 0; }
.copy { margin: 0; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .latest-grid, .newsletter-inner { grid-template-columns: 1fr; gap: 32px; }
  .pillar-grid, .related-grid { grid-template-columns: 1fr; }
  .list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-side { align-items: flex-start; }
  .pillar-card { padding-bottom: 12px; }
}
@media (max-width: 680px) {
  body { font-size: 16.5px; }
  .header-inner { flex-wrap: wrap; gap: 0 12px; padding: 10px 0 0; }
  .brand span { font-size: 12px; }
  .social-header { margin-left: auto; }
  .site-header nav { order: 3; width: 100%; margin: 0; gap: 22px; }
  .hero-mark { width: 120vw; right: -50vw; }
  .latest, .pillars, .newsletter { padding: 64px 0; }
  .prose { font-size: 17px; }
  .in-short { padding: 22px 20px; }
  .nl-row { flex-direction: column; gap: 10px; }
  .nl-row input { border-right: 1px solid #4A515C; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark { animation: none; }
  html { scroll-behavior: auto; }
}
