:root {
  --bg: #f4efe6;
  --bg-soft: rgba(255, 250, 240, 0.72);
  --surface: rgba(255, 253, 247, 0.9);
  --surface-strong: #fffdf8;
  --text: #201815;
  --muted: #675e56;
  --line: rgba(32, 24, 21, 0.16);
  --accent: #ab3c2f;
  --accent-dark: #81281f;
  --shadow: 0 20px 50px rgba(43, 26, 18, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(171, 60, 47, 0.14), transparent 30%),
    linear-gradient(180deg, #f7f3eb 0%, #efe4d6 100%);
  color: var(--text);
  font-family: "Noto Serif SC", serif;
}

img {
  max-width: 100%;
  display: block;
}

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

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, black 65%, transparent);
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  backdrop-filter: blur(12px);
}

.brand,
.hero h1,
.section-heading h2,
.about-panel h2,
.post-card h3,
.hero-card h2 {
  font-family: "Cormorant Garamond", serif;
}

.brand {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
}

main {
  padding: 1rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  margin: 2rem 0 4rem;
}

.hero-copy,
.hero-card,
.about-panel,
.note,
.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 3rem;
  border-radius: var(--radius-lg);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.9;
  max-width: 10ch;
}

.hero-text,
.about-text,
.post-card p,
.note p,
.hero-card p {
  color: var(--muted);
  line-height: 1.85;
}

.hero-text {
  margin: 1.5rem 0 0;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: transform 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.filter:hover,
.filter:focus-visible,
.post-card:hover,
.about-links a:hover,
.hero-card a:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fffaf4;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.58);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 1.1rem;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px dashed rgba(171, 60, 47, 0.35);
  pointer-events: none;
}

.card-label,
.post-meta {
  color: var(--accent);
  font-size: 0.84rem;
}

.hero-card h2 {
  margin: 1rem 0 0.4rem;
  font-size: 2.4rem;
  line-height: 0.95;
}

.hero-card a,
.post-card a,
.about-links a {
  color: var(--accent-dark);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.section-heading h2,
.about-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter {
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--muted);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.filter.is-active {
  background: var(--text);
  color: #fffaf4;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-card {
  padding: 1.6rem;
  border-radius: var(--radius-md);
  transition: transform 200ms ease, border-color 200ms ease;
}

.post-card h3 {
  margin: 0.6rem 0;
  font-size: 2rem;
  line-height: 1.02;
}

.post-card.is-hidden {
  display: none;
}

.notes-wrap {
  margin: 4rem 0;
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.note {
  padding: 1.3rem;
  border-radius: var(--radius-md);
}

.note span {
  color: var(--accent);
  font-size: 0.85rem;
}

.about-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 120px;
}

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .about-panel,
  .post-grid,
  .notes-list {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-copy,
  .hero-card,
  .about-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(171, 60, 47, 0.18), transparent 36%),
      linear-gradient(180deg, #f7f3eb 0%, #efe4d6 100%);
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 1.25rem, 1120px);
  }

  .hero {
    margin-top: 1rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .hero-text,
  .about-text,
  .post-card p,
  .note p,
  .hero-card p {
    line-height: 1.7;
  }
}
