@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,400;600;700&display=swap");

:root {
  --bg: #f6f1e9;
  --bg-alt: #efe6da;
  --ink: #1f1f1f;
  --muted: #5c5752;
  --accent: #e07a5f;
  --accent-dark: #c4644c;
  --olive: #3d405b;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(31, 31, 31, 0.12);
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Figtree", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff4e0 0%, transparent 55%),
    radial-gradient(circle at 85% 12%, #e4f0ea 0%, transparent 45%),
    linear-gradient(120deg, var(--bg) 0%, #f7efe2 40%, #f9f4ee 100%);
  min-height: 100vh;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
      circle,
      rgba(0, 0, 0, 0.04) 1px,
      transparent 1px
    ),
    radial-gradient(circle at 20% 20%, rgba(224, 122, 95, 0.1), transparent 60%),
    radial-gradient(circle at 70% 30%, rgba(61, 64, 91, 0.08), transparent 55%);
  background-size: 26px 26px, 800px 800px, 900px 900px;
  opacity: 0.55;
  z-index: -1;
}

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

img {
  max-width: 100%;
  display: block;
  border-radius: 18px;
}

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 44px 0 32px;
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
  background: rgba(246, 241, 233, 0.75);
  backdrop-filter: blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  flex-wrap: wrap;
}

.logo {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 520px;
}

.nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
  color: var(--muted);
}

.nav a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--olive);
  font-weight: 600;
}

.hero {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.2rem, 3.6vw, 3.2rem);
  line-height: 1.2;
  margin: 12px 0 16px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 36px rgba(224, 122, 95, 0.3);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-dark);
}

.button.ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.button.ghost:hover,
.button.ghost:focus-visible {
  background: var(--ink);
  color: #fff;
}

.hero-highlight {
  background: var(--card);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 31, 31, 0.08);
  box-shadow: var(--shadow);
}

.card-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 600;
}

.hero-highlight h2 {
  font-family: "Fraunces", "Georgia", serif;
  margin: 12px 0;
  font-size: 1.6rem;
  line-height: 1.3;
}

.card-body {
  color: var(--muted);
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 18px 0;
}

.post-meta {
  justify-content: center;
  margin-top: 16px;
}

.tag {
  background: rgba(129, 178, 154, 0.25);
  color: #2d5b49;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--olive);
}

.text-link::after {
  content: ">";
  font-weight: 700;
}

.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section h2 {
  font-family: "Fraunces", "Georgia", serif;
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
}

.essay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.essay-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(31, 31, 31, 0.08);
  box-shadow: 0 12px 30px rgba(31, 31, 31, 0.08);
  display: flex;
  flex-direction: column;
}

.essay-card img {
  border-radius: 0;
  height: 200px;
  object-fit: cover;
}

.essay-body {
  padding: 22px;
  display: grid;
  gap: 10px;
}

.essay-body h3 {
  margin: 0;
  font-size: 1.2rem;
}

.essay-body p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.about-card {
  background: var(--card);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 31, 31, 0.08);
  box-shadow: var(--shadow);
}

.about-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.post {
  background: var(--card);
  padding: clamp(24px, 5vw, 60px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 31, 31, 0.08);
  margin: 60px 0 80px;
}

.post-hero {
  text-align: center;
  margin-bottom: 32px;
}

.post-hero h1 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.2;
  margin: 12px 0 0;
}

.post-content h2 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-top: 42px;
}

.post-content h3 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.35rem;
  margin-top: 30px;
}

.post-content p,
.post-content li {
  color: var(--muted);
}

.post-content ul {
  padding-left: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
  text-align: left;
}

.data-table th {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--olive);
  background: rgba(61, 64, 91, 0.08);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.post-image {
  margin: 32px 0;
}

blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  background: #fff7ef;
  border-radius: 16px;
  color: var(--ink);
  font-style: italic;
}

blockquote p {
  margin: 6px 0;
}

.math-block {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f7f1e9;
  border: 1px dashed rgba(31, 31, 31, 0.2);
  color: var(--ink);
  overflow-x: auto;
  text-align: center;
}

.math-block mjx-container {
  font-size: 1.05rem;
}

.post-continued {
  margin-top: 36px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--olive);
  text-align: center;
}

.site-footer {
  padding: 28px 0 50px;
  text-align: center;
  color: var(--muted);
}

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

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 32px 0 24px;
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }

  blockquote {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
