@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #fafaf7;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #d4d4d0;
  --accent: #b91c1c;
  --accent-soft: #fef2f2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
main { padding: 3rem 0 6rem; }

/* ==================== Masthead — newspaper-style ==================== */
header.masthead {
  border-bottom: 3px double var(--ink);
  padding: 2rem 0 1.25rem;
  background: var(--paper);
  text-align: center;
}
header.masthead a { display: inline-block; }
header.masthead .nameplate {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
}
header.masthead .nameplate em {
  font-style: italic;
  color: var(--accent);
}
header.masthead .tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: .5rem;
}
header.masthead .meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .15em;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: .55rem 0; margin-top: 1.25rem; color: var(--muted);
  gap: 1rem; flex-wrap: wrap;
}

/* ==================== Featured / lead article ==================== */
.lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3.5rem;
  align-items: stretch;
}
.lead .image {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #ddd;
  border-radius: 2px;
}
.lead .image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.1) contrast(1.05);
  transition: transform .8s ease, filter .4s;
}
.lead .image:hover img {
  transform: scale(1.04);
  filter: grayscale(0) contrast(1.05);
}
.lead .image::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  pointer-events: none;
}
.lead-content { display: flex; flex-direction: column; justify-content: center; }
.lead .label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent); font-weight: 600;
  display: inline-block; margin-bottom: .75rem;
}
.lead h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 900; letter-spacing: -.02em; line-height: 1.1;
  margin: .25rem 0 1rem;
}
.lead h1 a { color: inherit; }
.lead h1 a:hover { color: var(--accent); }
.lead .deck {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 1.2rem;
  color: #404040; line-height: 1.5;
}
.lead .byline {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted); font-weight: 500;
}

/* ==================== Article grid — magazine 3-col ==================== */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em;
  border-bottom: 2px solid var(--ink); padding-bottom: .6rem;
  margin-bottom: 2.5rem;
  display: flex; align-items: baseline; gap: 1rem;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--rule);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
}
.grid article {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  display: flex; flex-direction: column;
  transition: transform .3s;
}
.grid article:hover { transform: translateY(-3px); }
.grid article .image {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #ddd;
}
.grid article .image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s, filter .4s;
  filter: grayscale(.15);
}
.grid article:hover .image img {
  transform: scale(1.06);
  filter: grayscale(0);
}
.grid article .label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent); font-weight: 600;
  display: inline-block; margin-bottom: .35rem;
}
.grid article h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2;
  margin: .25rem 0 .5rem;
}
.grid article h2 a { color: inherit; }
.grid article h2 a:hover { color: var(--accent); }
.grid article p {
  color: var(--muted); font-size: .92rem; line-height: 1.55;
  flex: 1;
}
.grid article .byline {
  margin-top: 1rem; padding-top: .75rem;
  border-top: 1px dotted var(--rule);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
}

/* ==================== Single post ==================== */
article.post {
  background: var(--paper);
  padding: 0 0 4rem;
  border-top: 1px solid var(--rule);
}
article.post .hero-image {
  display: block;
  position: relative;
  aspect-ratio: 21/9;
  max-height: 520px;
  overflow: hidden;
  margin-bottom: 3rem;
  background: #ddd;
}
article.post .hero-image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.post-body { max-width: 680px; margin: 0 auto; padding: 0 2rem; }
.post-body .label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .25em;
  color: var(--accent); font-weight: 600;
  display: inline-block; margin-bottom: .5rem;
}
.post-body h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900; letter-spacing: -.025em; line-height: 1.1;
  margin: .5rem 0 1rem;
}
.post-body .deck {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 1.3rem; color: #404040; line-height: 1.45;
}
.post-body .byline {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1rem 0; margin: 2rem 0 2.5rem;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap;
  align-items: center;
}
.post-body .byline strong { color: var(--ink); font-weight: 600; }

.post-content { font-size: 1.1rem; line-height: 1.78; color: #222; }
.post-content > p:first-of-type::first-letter {
  font-family: 'Playfair Display', serif;
  float: left; font-size: 5rem; line-height: .85; font-weight: 900;
  padding-right: .75rem; padding-top: .35rem;
  color: var(--accent);
}
.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 700; margin: 2.75rem 0 1rem;
  letter-spacing: -.01em; line-height: 1.2;
}
.post-content h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem; margin: 2rem 0 .75rem; font-weight: 700;
  color: var(--ink);
}
.post-content p { margin: 1rem 0; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.75rem; }
.post-content li { margin: .35rem 0; }
.post-content a { color: var(--accent); border-bottom: 1px solid currentColor; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: .25rem 1.5rem; margin: 2rem 0;
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 1.4rem; color: var(--ink); line-height: 1.4;
  background: var(--accent-soft);
}
.post-content pre {
  background: #1a1a1a; color: #f4f4f5;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .85rem; line-height: 1.5;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}
.post-content code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .92em;
}
.post-content :not(pre) > code {
  background: #f4f4f4; padding: .12rem .35rem; border-radius: 3px;
  color: var(--accent);
}
.post-content pre code { background: transparent; padding: 0; color: inherit; }

footer.site {
  border-top: 3px double var(--ink); padding: 2.5rem 0;
  background: var(--paper); text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted);
}

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  header.masthead .meta { font-size: .65rem; gap: .5rem; }
  .lead { grid-template-columns: 1fr; gap: 1.5rem; padding-bottom: 2.5rem; margin-bottom: 2.5rem; }
  .grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-title { font-size: 1.1rem; }
  .post-content > p:first-of-type::first-letter { font-size: 3.5rem; }
}
