/* editorial — warm paper, serif editorial */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,700&display=swap');

:root {
  --paper: #fff7df;
  --ink: #1e1a14;
  --muted: #756a5c;
  --rule: #282016;
  --accent: #e35b2f;
  --accent-soft: #ffd7a8;
  --leaf: #315f45;
  --font-body: 'Newsreader', Georgia, serif;
  --font-display: 'Fraunces', Georgia, serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(227,91,47,0.18), transparent 28rem),
    radial-gradient(circle at 82% 10%, rgba(49,95,69,0.16), transparent 24rem),
    linear-gradient(180deg, #fff8e7 0%, var(--paper) 42%, #f4e4c5 100%);
  font-family: var(--font-body);
}

a { color: inherit; }

/* ── Layout ── */
.site-header,
.site-footer,
.site-main {
  width: 92%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0 20px;
  border-bottom: 2px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--rule);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.brand-mark--icon {
  background: none;
  border: none;
  overflow: hidden;
  padding: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 1;
  min-width: 0;
}

.site-nav .nav-link { text-decoration: none; }
.site-nav .nav-link:hover { color: var(--accent); }

.more-categories { position: relative; }
.more-toggle { cursor: pointer; list-style: none; white-space: nowrap; }
.more-toggle::-webkit-details-marker { display: none; }

.more-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 10px;
  min-width: 160px;
  padding: 14px;
  border: 2px solid var(--rule);
  background: var(--paper);
  box-shadow: 6px 6px 0 rgba(30,26,20,0.18);
}

.more-categories:not([open]) .more-panel { display: none; }
.more-panel .nav-link { white-space: nowrap; }

.language-switcher select,
.site-switcher select {
  flex-shrink: 0;
  min-width: 0;
  max-width: 180px;
  padding: 8px 34px 8px 12px;
  border: 2px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,247,223,0.78);
  font: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Main ── */
.site-main { flex: 1; }

/* ── Footer ── */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 96px;
  padding: 28px 0 40px;
  border-top: 2px solid var(--rule);
  color: var(--muted);
}

.footer-desc { margin: 0; font-size: 0.92rem; }

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ── Index page ── */
.lead-story {
  display: block;
  padding: 58px 0 38px;
  border-bottom: 2px solid var(--rule);
}

.lead-story--only { border-bottom: 0; }

.lead-card {
  display: grid;
  grid-template-columns: minmax(150px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  text-decoration: none;
}

.lead-card--text { grid-template-columns: 1fr; padding: 26px 0 30px; }

.cover-wrap {
  aspect-ratio: 4 / 3;
  border: 2px solid var(--rule);
  background: var(--accent-soft);
  overflow: hidden;
}

.cover-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04);
}

.post-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead-title {
  max-width: 760px;
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.lead-title a, .lead-excerpt a {
  color: inherit;
  text-decoration: none;
}

.lead-excerpt {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.45;
}

.post-list-section { display: block; padding-top: 38px; }

.post-list { list-style: none; margin: 0; padding: 0; }

.post-item { border-bottom: 2px solid var(--rule); }

.post-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px 0;
  text-decoration: none;
}

.post-row time.post-date {
  display: block;
  padding-top: 4px;
}

.post-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.post-title a, .post-excerpt a {
  color: inherit;
  text-decoration: none;
}

.post-excerpt {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 0 0;
  font-weight: 700;
}

.pagination .page-prev,
.pagination .page-next {
  padding: 10px 18px;
  border: 2px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
}

.page-disabled { color: var(--muted); opacity: 0.58; }

.empty-state {
  margin: 64px 0;
  padding: 28px;
  border: 2px dashed var(--rule);
  color: var(--muted);
  font-size: 1.2rem;
}

/* ── Category page ── */
.category-hero {
  padding: 48px 0 36px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 36px;
}

.category-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.category-desc {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.5;
}

.subcategory-list-section { padding-bottom: 64px; }

.subcategory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.subcategory-item { border-bottom: 2px solid var(--rule); }
.subcategory-item:first-child { border-top: 2px solid var(--rule); }

.subcategory-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 24px 0;
  text-decoration: none;
  transition: background 0.12s;
}

.subcategory-card:hover { background: rgba(227,91,47,0.04); }
.subcategory-card:hover .subcategory-arrow { transform: translateX(4px); color: var(--accent); }
.subcategory-card:hover .subcategory-name { color: var(--accent); }

.subcategory-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
  text-align: right;
}

.subcategory-body { min-width: 0; }

.subcategory-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  transition: color 0.12s;
}

.subcategory-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subcategory-arrow {
  font-size: 1.4rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.12s, color 0.12s;
}

/* ── Article page ── */
.article-shell {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumb-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-current { color: var(--ink); font-weight: 700; }
.breadcrumb-sep { color: var(--muted); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-title {
  margin: 10px 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.article-summary {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  line-height: 1.45;
}

.article-cover {
  width: 100%;
  max-height: 520px;
  margin: 34px 0 18px;
  object-fit: cover;
  border: 2px solid var(--rule);
  display: block;
}

.prose {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 2px solid var(--rule);
  font-size: 1.16rem;
  line-height: 1.82;
}

.prose h2, .prose h3 {
  margin: 2.2em 0 0.6em;
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: -0.04em;
}

.prose h2 { font-size: 2.6rem; }
.prose h3 { font-size: 2rem; }
.prose p, .prose ul, .prose ol { margin: 1.1em 0; }

.prose blockquote {
  margin: 2em 0;
  padding: 12px 0 12px 28px;
  border-left: 6px solid var(--accent);
  color: var(--leaf);
  font-size: 1.55rem;
  line-height: 1.32;
}

.prose pre {
  overflow-x: auto;
  padding: 20px;
  border: 2px solid var(--rule);
  background: #211a13;
  color: #fff7df;
  font-size: 0.95rem;
}

.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose a { color: var(--accent); font-weight: 700; text-decoration-thickness: 2px; }
.prose img { max-width: 100%; border: 2px solid var(--rule); display: block; }

/* ── Responsive ── */
/* ── Tablet ── */
@media (max-width: 860px) {
  .article-shell { max-width: none; padding-top: 38px; }
  .lead-card { grid-template-columns: 1fr; }
  .lead-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .post-row time.post-date { display: inline; }
  .post-title { font-size: clamp(1.3rem, 3.5vw, 1.9rem); }
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: 2px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: opacity 0.2s;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .site-header,
  .site-footer,
  .site-main { width: 100%; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand { font-size: 1.1rem; flex: 1; }
  .brand-mark { width: 36px; height: 36px; }

  .nav-toggle { display: flex; }

  /* nav hidden by default on mobile, shown when .nav-open */
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: 0.92rem;
    border-top: 1px solid var(--rule);
    padding-top: 12px;
  }

  .site-nav.nav-open { display: flex; }

  .site-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
  }

  .more-categories { width: 100%; }
  .more-toggle { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .more-panel {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 14px;
    margin-bottom: 4px;
  }
  .more-panel .nav-link { border-bottom: none; padding: 7px 0; }

  .language-switcher,
  .site-switcher { width: 100%; padding: 8px 0; }
  .language-switcher select,
  .site-switcher select {
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    padding: 8px 12px;
  }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .footer-nav { flex-wrap: wrap; gap: 12px; }

  .lead-story { padding: 28px 0 20px; }
  .lead-card--text { padding: 16px 0 20px; }
  .cover-wrap { aspect-ratio: 16 / 9; }

  .post-list-section { padding-top: 20px; }
  .post-row { padding: 16px 0; }

  .pagination { gap: 10px; padding-top: 24px; }
  .pagination .page-prev,
  .pagination .page-next { padding: 8px 14px; font-size: 0.88rem; }

  .category-hero { padding: 28px 0 20px; margin-bottom: 20px; }
  .category-title { font-size: clamp(2rem, 7vw, 3rem); }
  .subcategory-card { grid-template-columns: 36px 1fr auto; gap: 14px; padding: 18px 0; }
  .subcategory-num { font-size: 1.1rem; }
  .subcategory-name { font-size: 1.15rem; }

  .article-shell { padding-top: 24px; }
  .article-title { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  .article-summary { font-size: 1rem; }
  .article-cover { max-height: 240px; margin: 20px 0 12px; }

  .prose { font-size: 1rem; line-height: 1.72; }
  .prose h2 { font-size: 1.6rem; }
  .prose h3 { font-size: 1.25rem; }
  .prose blockquote { font-size: 1.15rem; padding-left: 16px; }
  .prose pre { padding: 14px; font-size: 0.85rem; }
}
