:root {
  --bg: #f5f0e6;
  --paper: rgba(255, 251, 244, 0.84);
  --ink: #1f1b18;
  --muted: #66584e;
  --line: rgba(82, 59, 36, 0.16);
  --accent: #8a5a2b;
  --shadow: 0 22px 60px rgba(64, 43, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(192, 151, 107, 0.24), transparent 35%),
    linear-gradient(180deg, #efe6d6 0%, var(--bg) 48%, #ede3d3 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(82, 59, 36, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 59, 36, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 90%);
}

.layout {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 4rem;
}

.hero {
  max-width: 760px;
  padding: 3rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: rise 650ms ease-out both;
}

.eyebrow,
.label {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
}

.hero h1,
.note-page h1 {
  font-size: clamp(3.3rem, 8vw, 6.4rem);
  font-weight: 600;
}

.hero h1 {
  max-width: 11ch;
}

.note-page h1 {
  max-width: 14ch;
  font-size: clamp(2.9rem, 7vw, 5.2rem);
}

.section-heading h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
}

.intro,
.note-card p,
.note-body p,
.meta-card p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.intro {
  margin: 1.4rem 0 0;
  max-width: 60ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.note-card {
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.78);
  box-shadow: var(--shadow);
  animation: rise 650ms ease-out both;
}

.notes-section {
  margin-top: 1.5rem;
}

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

.note-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 980px;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 2.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.note-link,
.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 27, 24, 0.35);
  padding-bottom: 0.2rem;
  font-weight: 600;
}

.note-link {
  margin-top: 0.25rem;
}

.note-page {
  max-width: 760px;
  padding: 3rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: rise 650ms ease-out both;
}

.back-link {
  margin-bottom: 1.5rem;
}

.note-body {
  margin-top: 2rem;
}

.note-body h2 {
  font-size: 2.1rem;
  margin-top: 2.2rem;
  margin-bottom: 0.85rem;
}

.note-body h2:first-child {
  margin-top: 0;
}

.note-body p + p {
  margin-top: 1rem;
}

.note-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.meta-card {
  padding: 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.78);
}

.meta-card p:last-child {
  margin-bottom: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .layout {
    padding-top: 2rem;
  }

  .hero {
    padding: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .note-list {
    grid-template-columns: 1fr;
  }

  .note-page {
    padding: 2rem;
  }

  .note-meta {
    grid-template-columns: 1fr;
  }
}
