/* ==========================================================================
   Essays — extends the Dynamic Geometric Dark system in styles.css
   Loaded only on /essays/ pages. styles.css is never modified.
   ========================================================================== */

.essay-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9rem var(--page-padding) 6rem;
}

/* ---------- shared kicker ---------- */
.essay-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 1.1rem;
}

/* ---------- index ---------- */
.essay-index-head {
  max-width: 720px;
  margin-bottom: 4.5rem;
}

.essay-index-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  color: var(--text-white);
  margin-bottom: 1.4rem;
}

.essay-index-sub {
  font-size: 1.14rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 40rem;
}

.essay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.5rem;
}

.essay-card {
  display: block;
  color: var(--text-cream);
  padding: 2.1rem 1.9rem 1.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.essay-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.essay-card-kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 0.9rem;
}

.essay-card-title {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--text-white);
  margin-bottom: 0.85rem;
}

.essay-card-blurb {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-secondary);
  margin-bottom: 1.3rem;
}

.essay-card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ---------- article ---------- */
.essay-article {
  max-width: 43rem;
  margin: 0 auto;
}

.essay-head {
  margin-bottom: 3.2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--border-glass);
}

.essay-title {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-white);
  margin-bottom: 1.5rem;
}

.essay-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.essay-dot { margin: 0 0.6rem; }

.essay-body p {
  font-size: 1.16rem;
  line-height: 1.82;
  color: var(--text-cream);
  margin-bottom: 1.6rem;
}

.essay-body > p:first-of-type:not(.essay-standfirst) {
  font-size: 1.3rem;
  line-height: 1.7;
  color: var(--text-white);
}

.essay-body > p:first-of-type:not(.essay-standfirst)::first-letter,
.essay-body > p.essay-standfirst + p::first-letter {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 700;
  float: left;
  line-height: 0.84;
  padding: 0.09em 0.09em 0 0;
  color: var(--accent-amber);
}

/* ---------- footer ---------- */
.essay-footer {
  border-top: 1px solid var(--border-glass);
  padding: 2.6rem var(--page-padding);
}

.essay-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.essay-back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-amber);
  text-decoration: none;
}

.essay-back:hover { color: var(--accent-orange); }

.essay-foot-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .essay-main { padding-top: 7rem; }
  .essay-body p { font-size: 1.08rem; }
  .essay-body > p:first-of-type:not(.essay-standfirst),
  .essay-body p.essay-standfirst + p { font-size: 1.18rem; }
}

/* homepage essays section */
.home-essay-grid { margin-top: 2.5rem; }
.essays-all-cta { margin-top: 2.6rem; }

/* ==========================================================================
   Standard pages (/about/, /publications/, /presentations/, 404)
   ========================================================================== */

.pg-main { max-width: 1240px; margin: 0 auto; padding: 9rem var(--page-padding) 5rem; }

.pg-head { max-width: 46rem; margin-bottom: 5rem; }

.pg-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.02;
  color: var(--text-white); margin-bottom: 1.5rem;
}

.pg-lede { font-size: 1.2rem; line-height: 1.72; color: var(--text-secondary); }

.pg-section { margin-bottom: 5rem; }
.pg-section .section-tag-box { margin-bottom: 2.2rem; }

.pg-prose {
  font-size: 1.09rem; line-height: 1.8;
  color: var(--text-cream); max-width: 46rem; margin-bottom: 1.4rem;
}

/* cards */
.pg-card-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.pg-card {
  padding: 1.9rem 1.7rem; background: var(--bg-card);
  border: 1px solid var(--border-glass); border-radius: 14px;
}
.pg-card-title {
  font-family: var(--font-serif); font-size: 1.24rem; font-weight: 600;
  color: var(--text-white); margin-bottom: 0.7rem; line-height: 1.3;
}
.pg-card-body { font-size: 0.97rem; line-height: 1.65; color: var(--text-secondary); }

/* bullet list */
.pg-list { list-style: none; max-width: 52rem; }
.pg-list li {
  position: relative; padding: 0.95rem 0 0.95rem 1.6rem;
  border-bottom: 1px solid var(--border-glass);
  font-size: 1.02rem; line-height: 1.6; color: var(--text-cream);
}
.pg-list li::before {
  content: ""; position: absolute; left: 0; top: 1.5rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-amber);
}

/* year rows: keynotes, media, awards, citations */
.pg-rows { max-width: 56rem; }
.pg-row {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.4rem;
  padding: 1.35rem 0; border-bottom: 1px solid var(--border-glass);
}
.pg-row-year {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; color: var(--accent-amber); padding-top: 0.22rem;
}
.pg-row-title {
  font-size: 1.05rem; font-weight: 600; line-height: 1.42;
  color: var(--text-white); margin-bottom: 0.3rem;
}
.pg-row-note { font-size: 0.92rem; line-height: 1.55; color: var(--text-secondary); }
.pg-cite { font-size: 0.97rem; line-height: 1.62; color: var(--text-cream); }

/* profile links */
.pg-profiles { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.pg-profile {
  display: inline-block; padding: 0.75rem 1.3rem;
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: 999px; text-decoration: none;
  font-size: 0.92rem; color: var(--text-cream);
  transition: border-color 0.22s ease, background 0.22s ease;
}
.pg-profile:hover { border-color: var(--border-bright); background: var(--bg-card-hover); }

/* featured book block */
.pg-book {
  padding: 2.4rem 2.1rem; background: var(--bg-card);
  border: 1px solid var(--border-glass); border-radius: 16px; max-width: 46rem;
}
.pg-book-sub {
  font-family: var(--font-serif); font-size: 1.35rem;
  color: var(--text-white); margin-bottom: 0.5rem;
}
.pg-book-meta {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em;
  color: var(--accent-amber); margin-bottom: 1.3rem; text-transform: uppercase;
}

/* "read the full page" buttons under homepage summary sections */
.section-more { margin-top: 2.6rem; }

/* ==========================================================================
   Site footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border-glass); margin-top: 4rem; }
.site-footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 3.4rem var(--page-padding) 2.2rem;
  display: grid; gap: 2.4rem;
  grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(150px, 1fr));
}
.foot-col { display: flex; flex-direction: column; gap: 0.55rem; }
.foot-name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--text-white); }
.foot-note {
  font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); max-width: 26rem;
}
.foot-head {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-amber); margin-bottom: 0.3rem;
}
.foot-col a {
  font-size: 0.92rem; color: var(--text-secondary); text-decoration: none;
}
.foot-col a:hover { color: var(--accent-orange); }
.site-footer-base {
  max-width: 1240px; margin: 0 auto;
  padding: 1.2rem var(--page-padding) 2.4rem;
  font-size: 0.8rem; color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
}

/* ==========================================================================
   Mobile menu — the nav links were previously unreachable below 768px
   ========================================================================== */
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--text-white); transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-container { flex-wrap: wrap; }
  .nav-links {
    display: none !important;
    order: 3; width: 100%;
    flex-direction: column; align-items: flex-start; gap: 0.2rem;
    padding: 1rem 0 0.4rem;
  }
  .nav-links.is-open { display: flex !important; }
  .nav-links .n-link {
    display: block; width: 100%; padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-cta { display: none; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .pg-main { padding-top: 7rem; }
  .pg-row { grid-template-columns: 4.6rem 1fr; gap: 1rem; }
}

/* ==========================================================================
   Subheadings, standfirst, and bold inside an essay
   ========================================================================== */

.essay-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.75rem);
  font-weight: 600; line-height: 1.24;
  color: var(--text-white);
  margin: 3.1rem 0 1.15rem;
}

/* Specificity has to beat .essay-body p:first-of-type, hence p.essay-standfirst */
.essay-body p.essay-standfirst {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.42rem);
  line-height: 1.6;
  color: var(--accent-amber);
  margin-bottom: 2.4rem;
  padding-bottom: 1.9rem;
  border-bottom: 1px solid var(--border-glass);
}

/* the paragraph right after a standfirst is the real opening paragraph */
.essay-body p.essay-standfirst + p {
  font-size: 1.3rem;
  line-height: 1.7;
  color: var(--text-white);
}

.essay-body strong { color: var(--text-white); font-weight: 700; }

/* cache bump 2026-08-06: forces a new ?v= so anyone holding the briefly-broken
   standfirst CSS refetches instead of waiting out the one-month cache. */
