@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,500&display=swap');

:root {
  --ink: #14171c;
  --paper: #ffffff;
  --paper-dim: #f4f5f4;
  --steel: #4a5568;
  --steel-soft: #7b8494;
  --wire-red: #c81e3a;
  --gold-wire: #8a6a20;
  --line: #e2e4e8;
  --line-strong: #14171c;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Nanum Gothic Coding', monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 3px solid var(--line-strong);
  padding: 22px 0 16px;
}

.masthead .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 0.5px;
}

.brand span {
  color: var(--wire-red);
}

.masthead-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--steel);
  text-align: right;
  line-height: 1.6;
}

/* ---------- Lead story ---------- */

.lead {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
}

.lead-media img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--gold-wire);
  border: 1px solid var(--gold-wire);
  padding: 3px 8px;
  margin-bottom: 12px;
}

.lead h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 12px;
}

.lead p.summary {
  color: var(--steel);
  font-size: 16px;
  margin: 0 0 16px;
}

.byline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel-soft);
  letter-spacing: 0.5px;
}

/* ---------- Article grid ---------- */

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--steel);
  padding: 26px 0 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 12px 0 48px;
}

.card {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  margin-bottom: 12px;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}

.card p.summary {
  font-size: 14px;
  color: var(--steel);
  margin: 0 0 10px;
}

.card .byline {
  font-size: 11px;
}

/* ---------- Article detail page ---------- */

.article-head {
  padding: 36px 0 24px;
}

.article-head .tag { margin-bottom: 16px; }

.article-head h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 18px;
  max-width: 780px;
}

.article-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--steel);
  max-width: 720px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.article-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.article-media {
  padding: 24px 0;
}

.article-media img {
  width: 100%;
  display: block;
}

.article-media figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel-soft);
  padding-top: 8px;
  letter-spacing: 0.5px;
}

.article-media--inline {
  max-width: 700px;
  margin: 8px auto 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.article-media--inline img {
  background: #fff;
}

.article-media--inline figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 60px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.75;
}

.article-body p {
  margin: 0 0 22px;
}

.article-body p:first-of-type::first-letter {
  font-size: 52px;
  float: left;
  line-height: 0.85;
  padding: 6px 8px 0 0;
  font-weight: 600;
  color: var(--wire-red);
}

.back-link {
  display: inline-block;
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--steel);
  border-bottom: 1px solid var(--steel);
}

.back-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 3px solid var(--line-strong);
  padding: 24px 0 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel-soft);
  letter-spacing: 0.5px;
}

/* ---------- States ---------- */

.empty, .loading {
  padding: 60px 0;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .lead { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .lead h1 { font-size: 27px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .article-head h1 { font-size: 30px; }
  .article-body { font-size: 17px; }
}

@media (max-width: 560px) {
  .brand { font-size: 26px; }
  .masthead-meta { display: none; }
  .grid { grid-template-columns: 1fr; }
  .article-meta { gap: 10px 16px; }
}
