/* ============================================================
   Emergent Economics — styles
   Editorial / minimal / understated.
   Typography: Source Serif 4 (display + body), Inter (UI).
   ============================================================ */

:root {
  /* palette — warm paper, ink, restrained oxblood accent */
  --paper:        #F4EFE6;
  --paper-2:      #ECE6D9;
  --surface:      #FBF8F2;
  --ink:          #1C1B17;
  --ink-2:        #34322C;
  --muted:        #6C6A62;
  --faint:        #B5B1A6;
  --rule:         #D9D3C4;
  --rule-strong:  #BDB6A4;
  --accent:       #7A2A2A;   /* deep oxblood */
  --accent-hover: #5D1F1F;

  /* type */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --r-sm: 4px;
  --r-md: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ------------- accessibility ------------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; z-index: 100;
  font-family: var(--sans); font-size: 14px;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------- container ------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
}
.brand-logo {
  width: clamp(150px, 19vw, 210px);
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-family: var(--sans);
  font-size: 14.5px;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-cta {
  color: var(--accent) !important;
  font-weight: 500;
}

/* mobile nav */
.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  cursor: pointer; gap: 4px; flex-direction: column;
}
.nav-toggle span {
  width: 22px; height: 1.5px; background: var(--ink); display: block;
  transition: transform .25s ease, opacity .2s ease;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 var(--gutter) 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.mobile-nav a {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 16px;
}
.mobile-nav a:last-child { border: 0; }

@media (max-width: 800px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav[data-open="true"] { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  color: var(--ink);
  max-width: 14ch;
}
.hero-title .period { color: var(--accent); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 0 0 2rem;
}

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 0; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* hero meta column */
.hero-meta {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
  font-family: var(--sans);
}
.hero-meta dl {
  display: grid;
  gap: 1.1rem;
  margin: 0;
}
.hero-meta div { display: grid; gap: 4px; }
.hero-meta dt {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.hero-meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.hero-meta dd em { font-family: var(--serif); font-size: 16px; }
.hero-meta a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.hero-meta a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-meta { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 2rem; }
}

/* ============================================================
   LOGO ROW
   ============================================================ */
.logos {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.logos-caption {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.75rem;
  font-weight: 500;
}
.logo-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 2.2rem;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--muted);
  letter-spacing: 0.005em;
}
.logo-row li {
  padding: 6px 0;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ============================================================
   SECTION CHROME
   ============================================================ */
section { padding: clamp(4rem, 8vw, 7rem) 0; }
section + section { border-top: 0; }

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 60ch;
}
.section-num {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.75rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.section-lede {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0;
  max-width: 56ch;
}
.section-lede a, .more a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
}
.section-lede a:hover, .more a:hover { border-bottom-color: var(--accent); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about-body .big {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 1.25rem;
  max-width: 60ch;
}
.about-body p {
  max-width: 62ch;
  color: var(--ink-2);
}
.about-body a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}
.about-body a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 2.5rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.about-cols h3 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.85rem;
}
ul.plain {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-2);
}

.book { margin: 2rem 0 0; padding: 0; }
.book-kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.book h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.book figcaption p {
  max-width: 58ch;
  color: var(--ink-2);
}
.book blockquote {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.25rem 1.1rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  font-style: italic;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 64ch;
}
.book blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================
   WRITING / ESSAYS
   ============================================================ */
.essays {
  list-style: none;
  counter-reset: ess;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.essays li {
  counter-increment: ess;
  padding: 1.75rem clamp(1rem, 2vw, 1.75rem) 1.75rem 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.essays li:nth-child(odd)  { padding-right: clamp(1.5rem, 3vw, 2.5rem); border-right: 1px solid var(--rule); }
.essays li:nth-child(even) { padding-left:  clamp(1.5rem, 3vw, 2.5rem); }
.essays li:nth-last-child(-n+2):not(:nth-child(odd):last-child) { /* nothing */ }

.essay-meta {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.essays h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.essays h3 a,
.media-list .m-title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s ease, color .25s ease;
}
.essays h3 a:hover,
.media-list .m-title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}
.essays p:not(.essay-meta) {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
  max-width: 52ch;
}

.more {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--muted);
}

@media (max-width: 780px) {
  .essays { grid-template-columns: 1fr; }
  .essays li, .essays li:nth-child(odd), .essays li:nth-child(even) {
    padding: 1.5rem 0;
    border-right: 0;
  }
}

/* ============================================================
   PAPERS
   ============================================================ */
.paper-themes {
  display: grid;
  gap: 2.75rem;
}
.paper-theme {
  padding: 0;
}
.paper-theme + .paper-theme {
  border-top: 1px solid var(--rule);
  padding-top: 2.75rem;
}
.paper-theme h3 {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.85rem;
}
.papers-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.papers-list li {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 2.5rem;
  row-gap: 0.55rem;
  align-items: start;
}
.papers-list li > .paper-meta { grid-column: 1; grid-row: 1 / span 2; padding-top: 4px; }
.papers-list li > h4       { grid-column: 2; grid-row: 1; }
.papers-list li > p:not(.paper-meta) { grid-column: 2; grid-row: 2; }
.papers-list li:last-child { border-bottom: 1px solid var(--rule); }

.paper-meta {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}
.papers-list h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.papers-list h4 a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s ease, color .25s ease;
}
.papers-list h4 a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}
.papers-list p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 64ch;
}
.ext {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-left: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .papers-list li {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 0.4rem;
  }
  .papers-list li > .paper-meta { grid-column: 1; grid-row: 1; padding-top: 0; }
  .papers-list li > h4 { grid-column: 1; grid-row: 2; }
  .papers-list li > p:not(.paper-meta) { grid-column: 1; grid-row: 3; }
}

/* ============================================================
   MEDIA
   ============================================================ */
.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.media-list li {
  padding: 1.25rem 1.5rem 1.25rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: baseline;
}
.media-list li > .m-date { grid-row: 1 / span 2; padding-top: 2px; }
.media-list li > .m-title { grid-column: 2; }
.media-list li > .m-outlet { grid-column: 2; }
.media-list li:nth-child(odd)  { border-right: 1px solid var(--rule); padding-right: clamp(1rem, 2vw, 2rem); }
.media-list li:nth-child(even) { padding-left: clamp(1rem, 2vw, 2rem); }
.media-list li:nth-last-child(-n+2) { /* keeps base border-top behaviour */ }

.m-date {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.m-title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.m-outlet {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 780px) {
  .media-list { grid-template-columns: 1fr; }
  .media-list li, .media-list li:nth-child(odd), .media-list li:nth-child(even) {
    padding: 1.25rem 0;
    border-right: 0;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--paper-2); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact-body .big {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.4;
  margin: 0 0 1.75rem;
  max-width: 32ch;
  color: var(--ink);
}
.email-box {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 1.35rem;
  margin: 0 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.email-box:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.email-box span {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.email-box strong {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--accent);
}
.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.contact-links li { border-bottom: 1px solid var(--rule); }
.contact-links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--ink);
  transition: padding-left .25s ease, color .25s ease;
}
.contact-links a:hover { padding-left: 12px; color: var(--accent); }
.contact-links a > span:first-child {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 500;
}
.contact-links .ext {
  margin-left: 0;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.contact-links a:hover .ext { color: var(--accent); }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem 0;
  font-family: var(--sans);
  font-size: 13.5px;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper);
}
.foot-meta { margin: 0; color: var(--faint); }
.foot-links { display: flex; gap: 1.25rem; margin: 0; }
.foot-links a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}
.foot-links a:hover { border-bottom-color: var(--paper); }

@media (max-width: 640px) {
  .foot-row { flex-direction: column; align-items: flex-start; }
}
.book-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.book-cover {
  margin: 0;
}

.book-cover img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}

.book-copy {
  max-width: 60ch;
}

@media (max-width: 760px) {
  .book-layout {
    grid-template-columns: 1fr;
  }

  .book-cover img {
    max-width: 180px;
  }
}