/* Article modal + category + paper page styles */
.article-back {
  position: fixed; inset: 0;
  background: rgba(5,5,7,0.75);
  backdrop-filter: blur(8px);
  z-index: 3000;
  overflow-y: auto;
  padding: 40px 20px;
  animation: articleBackIn 0.25s ease;
}
@keyframes articleBackIn { from { opacity: 0; } to { opacity: 1; } }

.article-page, .category-page, .paper-page {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.5);
  position: relative;
  animation: articleIn 0.3s cubic-bezier(0.2,0.7,0.3,1);
}
.category-page { max-width: 1200px; }
@keyframes articleIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

.article-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px 0 0;
  z-index: 10;
  padding: 8px 14px;
  background: #0d0d0f; color: #fff;
  border-radius: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  cursor: pointer;
}
.article-close:hover { background: var(--ember); }

.article-hero {
  position: relative;
  aspect-ratio: 16/7;
  background: var(--cream);
  overflow: hidden;
}
.article-body {
  padding: 28px 60px 60px;
  max-width: 760px;
  margin: 0 auto;
}
.article-title {
  font-family: var(--serif); font-weight: 900;
  font-size: 44px; line-height: 1.1;
  margin: 16px 0 12px;
  letter-spacing: -0.01em;
}
.article-dek {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.5;
  color: var(--muted); margin: 0 0 20px;
}
.article-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 16px;
}
.article-share {
  display: flex; gap: 8px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 28px;
}
.article-share button {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  background: #fff; cursor: pointer;
}
.article-share button:hover { background: var(--ink); color: var(--flame-2); border-color: var(--ink); }
.article-content {
  font-family: var(--serif); font-size: 18px; line-height: 1.75;
  color: var(--text);
}
.article-content p { margin: 0 0 18px; }
.article-content p:first-of-type::first-letter {
  font-size: 64px; float: left; font-weight: 900;
  line-height: 0.85; padding: 6px 10px 0 0; color: var(--ember);
}

.article-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}
.article-related h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; margin: 0 0 20px;
}
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.related-card { cursor: pointer; }
.related-card .rt { font-family: var(--serif); font-weight: 700; font-size: 14px; margin: 8px 0 4px; line-height: 1.3; }
.related-card:hover .rt { color: var(--ember); }
.related-card .rm { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* Category page */
.category-head {
  padding: 36px 40px 20px;
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, #fff, var(--cream));
}
.category-head h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: 48px; margin: 12px 0 8px;
  letter-spacing: -0.01em;
}
.category-head p { font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin: 0; }

.category-body { padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 32px; }
.cat-hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px;
  cursor: pointer;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.cat-hero .hero-media { aspect-ratio: 16/10; }
.cat-hero h2 { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1.15; margin: 8px 0 10px; }
.cat-hero:hover h2 { color: var(--ember); }
.cat-hero .dek { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.cat-hero .meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }

.cat-secondary {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.cat-card { cursor: pointer; }
.cat-card .hero-media { aspect-ratio: 4/3; margin-bottom: 12px; }
.cat-card h3 { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 0 0 8px; line-height: 1.25; }
.cat-card:hover h3 { color: var(--ember); }
.cat-card .meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

.cat-list { display: flex; flex-direction: column; }
.cat-row { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px dashed var(--rule); cursor: pointer; align-items: center; }
.cat-row:last-child { border-bottom: none; }
.cat-row .thumb { aspect-ratio: 4/3; }
.cat-row h3 { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 0 0 4px; line-height: 1.3; }
.cat-row:hover h3 { color: var(--ember); }
.cat-row .meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* Paper page */
.paper-page { max-width: 720px; background: #fdfaf0; }
.paper-big { padding: 40px 48px; }
.pb-masthead { font-family: var(--serif); font-weight: 900; font-size: 56px; padding-bottom: 12px; border-bottom: 4px double var(--ink); margin-bottom: 10px; letter-spacing: -0.01em; text-align: center; }
.pb-date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.pb-headline { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.1; text-align: center; margin-bottom: 16px; }
.pb-photo { aspect-ratio: 16/9; background: var(--rule); margin-bottom: 20px; position: relative; }
.pb-photo .ph { position: absolute; inset: 0; }
.pb-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; column-gap: 20px; }
.pb-col h4 { font-family: var(--serif); font-weight: 800; font-size: 14px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.pb-col p { font-family: var(--serif); font-size: 12px; line-height: 1.5; margin: 0 0 10px; text-align: justify; }
.pb-line { height: 3px; background: var(--rule); margin: 4px 0; }
.pb-line.short { width: 70%; }

body.theme-dark .article-page,
body.theme-dark .category-page { background: #141417; color: #eee; }
body.theme-dark .article-title,
body.theme-dark .category-head h1,
body.theme-dark .cat-hero h2,
body.theme-dark .cat-card h3,
body.theme-dark .cat-row h3 { color: #fff; }
body.theme-dark .category-head { background: linear-gradient(180deg, #1a1a1d, #141417); }
body.theme-dark .article-content { color: #ddd; }
body.theme-dark .article-share button { background: #1a1a1d; border-color: #2a2a2f; color: #eee; }
