/* ==========================================================================
   Pradeep Hingorani — Essays archive page design (scoped under body.ph-essays)
   Ported 1:1 from essays.html. Loaded on top of ph-home.css, which supplies
   the shared chrome (.ph, .ph-wrap, .ph-header, .ph-nav, .ph-lang, .ph-logo,
   .ph-footer, .ph-marginalia, .ph-reveal) and the design tokens.
   ========================================================================== */

/* ============ BASE ============ */
.ph-essays{
  --ph-text-max:820px;
}

body.ph-essays{
  background:var(--ph-ivory);
  color:var(--ph-charcoal);
  font-family:var(--ph-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

/* Headings keep the design's charcoal (Astra otherwise colours them). */
.ph-essays h1,
.ph-essays h2,
.ph-essays h3{
  color:var(--ph-charcoal);
}

/* ============ PAGE HERO ============ */
.ph-page-hero{
  padding:80px 0 60px;
  border-bottom:1px solid var(--ph-hairline);
}
.ph-page-hero .ph-wrap{
  max-width:720px;
}
.ph-essays .ph-page-hero .ph-marginalia{
  margin-bottom:22px;
}
.ph-essays .ph-essays-title{
  font-family:var(--ph-display);
  font-weight:500;
  font-size:clamp(38px, 5.5vw, 62px);
  line-height:1.05;
  margin:0 0 22px;
}
.ph-essays .ph-page-hero-sub{
  font-size:17px;
  color:var(--ph-charcoal-soft);
  max-width:52ch;
}

/* ============ ESSAY INDEX ============ */
.ph-essay-index{
  padding:20px 0 40px;
}
.ph-essay-index .ph-wrap{
  max-width:var(--ph-text-max);
}

.ph-essay-entry{
  padding:56px 0;
  border-bottom:1px solid var(--ph-hairline);
  display:grid;
  grid-template-columns:70px 1fr;
  gap:8px 28px;
}
.ph-essay-entry:first-child{
  padding-top:56px;
}
.ph-entry-number{
  font-family:var(--ph-display);
  font-style:italic;
  font-size:15px;
  color:var(--ph-terracotta);
  padding-top:4px;
}
.ph-essays .ph-entry-title{
  font-family:var(--ph-display);
  font-weight:500;
  font-size:clamp(24px, 2.6vw, 32px);
  line-height:1.2;
  margin:0 0 14px;
}
.ph-entry-title a{
  color:inherit;
  transition:color .2s ease;
}
.ph-entry-title a:hover,
.ph-entry-title a:focus-visible{
  color:var(--ph-terracotta);
}
.ph-essays .ph-entry-excerpt{
  font-size:16px;
  color:var(--ph-charcoal-soft);
  max-width:60ch;
  margin-bottom:18px;
}
.ph-essays .ph-entry-meta{
  display:flex;
  align-items:center;
  gap:14px;
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--ph-warm-gray);
}
.ph-entry-meta .dot{
  width:3px;
  height:3px;
  border-radius:50%;
  background:var(--ph-warm-gray);
}

/* ============ INDEX FOOTNOTE ============ */
.ph-index-footnote{
  padding:20px 0 70px;
}
.ph-index-footnote .ph-wrap{
  max-width:var(--ph-text-max);
}
.ph-essays .ph-index-footnote .ph-marginalia{
  margin-bottom:14px;
}
.ph-essays .ph-index-footnote p{
  font-size:15px;
  color:var(--ph-warm-gray);
}

/* ============ NAV CURRENT ============ */
.ph-essays .ph-nav a.current{
  opacity:1;
  color:var(--ph-terracotta);
}

/* ============ RESPONSIVE ============ */
@media (max-width:640px){
  .ph-essay-entry{
    grid-template-columns:1fr;
  }
  .ph-entry-number{
    padding-top:0;
  }
  .ph-page-hero{ padding:60px 0 48px; }
}

/* ============ ASTRA WRAPPER NEUTRALISATION ============ */
body.ph-essays #content,
body.ph-essays #content .ast-container,
body.ph-essays #primary,
body.ph-essays #main,
body.ph-essays article,
body.ph-essays .ast-article-single,
body.ph-essays .entry-content{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  border:none;
  box-shadow:none;
  background:transparent;
}
body.ph-essays .entry-header{ display:none !important; }

/* ============ GERMAN TYPOGRAPHY ============
   German runs longer — display sizes a step down, per essays-de.html (§7.8). */
html[lang^="de"] .ph-essays .ph-essays-title{
  font-size:clamp(34px, 4.8vw, 54px);
  line-height:1.1;
}
html[lang^="de"] .ph-essays .ph-entry-title{
  font-size:clamp(22px, 2.4vw, 30px);
  line-height:1.24;
}
