/* Words For Our Time — shared styles */

:root {
  --paper: #f6f1e8;
  --paper-2: #ede5d6;
  --card: #fffcf6;
  --ink: #2b241e;
  --ink-soft: #5e5248;
  --rule: #d9cdb9;
  --accent: #8a6a2f;        /* antique gold, darkened for contrast on paper */
  --accent-ink: #fffcf6;
  --shadow: 0 1px 2px rgb(43 36 30 / 0.06), 0 8px 24px rgb(43 36 30 / 0.08);

  --serif-display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --serif-body: "Source Serif 4", "Georgia", serif;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f1a16;
    --paper-2: #28221c;
    --card: #2c251f;
    --ink: #efe6d6;
    --ink-soft: #bfb19d;
    --rule: #463b31;
    --accent: #d4b36a;
    --accent-ink: #1f1a16;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  object-fit: cover;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 1rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 30rem) {
  .brand span { display: none; }   /* logo only on very small screens */
  .site-nav { gap: 0.9rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  letter-spacing: 0.005em;
}
.hero .tagline {
  font-size: 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 auto 2rem;
  max-width: var(--measure);
}
.byline {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: -1.25rem 0 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Sections ---------- */
section { padding: 3rem 0; }
.section-alt { background: var(--paper-2); }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
}

/* ---------- Latest post card ---------- */
.post-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.post-card:hover h3 { color: var(--accent); }
.post-card .post-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: var(--paper-2);
}
.post-card .post-body { padding: 1.5rem; }
.post-card h3 {
  font-family: var(--serif-display);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0.25rem 0 0.75rem;
  transition: color 0.15s ease;
}
.post-card p { margin: 0 0 1rem; color: var(--ink-soft); }
.post-date { font-size: 0.9rem; color: var(--ink-soft); }
.read-more { font-weight: 600; color: var(--accent); }

@media (min-width: 48rem) {
  .post-card { grid-template-columns: 2fr 3fr; }
  .post-card { min-height: 20rem; }
  /* height:0 + min-height:100% lets the text set the card height, image fills it */
  .post-card .post-img { aspect-ratio: auto; height: 0; min-height: 100%; }
  .post-card .post-body { padding: 2rem 2.25rem; align-self: center; }
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--rule);
}
.recent-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.recent-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.recent-list a:hover { color: var(--accent); text-decoration: underline; }
.recent-list time { font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap; }

.section-foot { margin-top: 1.75rem; }

/* ---------- About ---------- */
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  max-width: 16rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
@media (min-width: 48rem) {
  .about-grid { grid-template-columns: 16rem 1fr; gap: 3rem; }
}

/* ---------- Podcast ---------- */
.video-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.video { margin: 0; }
.video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.video figcaption { margin-top: 0.6rem; font-weight: 500; line-height: 1.4; }
.video figcaption time { display: block; font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); }

.coming-soon {
  max-width: var(--measure);
  padding: 2rem;
  background: var(--card);
  border: 1px dashed var(--rule);
  border-radius: 12px;
}
.coming-soon h3 {
  font-family: var(--serif-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.coming-soon p { margin: 0 0 1.25rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--ink-soft); }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--card);
  padding: 0.5rem 1rem;
  z-index: 10;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
