/* site.css — Andreas Breidenthal */

:root {
  --ink:    #1a1410;
  --paper:  #f4efe6;
  --aged:   #e8dfc8;
  --rust:   #8b3a2a;
  --gold:   #a07830;
  --faded:  #7a6e5f;
  --rule:   #c8bda8;
  --shadow: rgba(26,20,16,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 4vw 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.site-name span { color: var(--rust); }
nav {
  display: flex;
  gap: 2rem;
  font-family: 'Inconsolata', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
nav a { color: var(--faded); text-decoration: none; transition: color 0.2s; }
nav a:hover, nav a.active { color: var(--rust); }
@media (max-width: 480px) {
  header { flex-direction: column; gap: 1rem; }
  nav { gap: 1.2rem; }
}

/* ── HERO ── */
.hero {
  padding: 5rem 4vw 4rem;
  max-width: 860px;
  border-bottom: 1px solid var(--rule);
}
.hero-label {
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.8rem;
}
.hero h1 em { font-style: italic; color: var(--rust); }
.hero p {
  font-size: 1.05rem;
  color: var(--faded);
  max-width: 620px;
  margin-bottom: 1rem;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 4rem 4vw 3rem;
  border-bottom: 1px solid var(--rule);
  max-width: 800px;
}
.page-header .label {
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.page-header p {
  font-size: 0.95rem;
  color: var(--faded);
  max-width: 540px;
}

/* ── ARCHIVE LIST ── */
.archive-list {
  padding: 3rem 4vw;
  max-width: 860px;
  display: flex;
  flex-direction: column;
}

.archive-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
@media (max-width: 560px) {
  .archive-entry { grid-template-columns: 1fr; gap: 0.8rem; }
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.entry-date {
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  color: var(--rule);
}
.entry-category {
  font-family: 'Inconsolata', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--gold);
}
.entry-sort {
  font-family: 'Inconsolata', monospace;
  font-size: 0.65rem;
  color: var(--rust);
}

.entry-body { display: flex; flex-direction: column; gap: 0.6rem; }

.entry-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 400;
  line-height: 1.3;
}

.entry-excerpt {
  font-size: 0.9rem;
  color: var(--faded);
}

/* ── POST PAGE ── */
.post-wrap {
  max-width: 680px;
  padding: 4rem 4vw 6rem;
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.post-header .label {
  font-family: 'Inconsolata', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.post-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-body { line-height: 1.85; }

.post-body p { margin-bottom: 1.4em; }

.post-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  margin: 2.5rem 0 0.8rem;
}

.post-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
}

/* ── RESPONSIVE IMAGES (THIS IS THE FIX) ── */
.post-body img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

@media (max-width: 768px) {
  .post-body img {
    max-width: 100%;
  }
}

/* ── FOOTER ── */
footer {
  padding: 2.5rem 4vw;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  color: var(--rule);
  border-top: 1px solid var(--rule);
}

.footer-links { display: flex; gap: 1.5rem; }

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(14px); animation: fadeUp 0.6s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
