:root {
    --bg: #f5efe7;
    --surface: #fff7ee;
    --surface-2: #fffaf4;
    --ink: #10161a;
    --muted: #4b5563;
    --accent: #c04b2b;
    --accent-2: #2a5d63;
    --line: #e3ddd3;
    --shadow: 0 14px 32px rgba(16, 22, 26, 0.12);
    --radius: 18px;
    --hero-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%201600%20700%27%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%27a%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%0A%20%20%20%20%20%20%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23c04b2b%27/%3E%0A%20%20%20%20%20%20%3Cstop%20offset%3D%271%27%20stop-color%3D%27%232a5d63%27/%3E%0A%20%20%20%20%3C/linearGradient%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%27b%27%20x1%3D%270%27%20y1%3D%271%27%20x2%3D%271%27%20y2%3D%270%27%3E%0A%20%20%20%20%20%20%3Cstop%20offset%3D%270%27%20stop-color%3D%27%231f2937%27%20stop-opacity%3D%270.7%27/%3E%0A%20%20%20%20%20%20%3Cstop%20offset%3D%271%27%20stop-color%3D%27%230f172a%27%20stop-opacity%3D%270%27/%3E%0A%20%20%20%20%3C/linearGradient%3E%0A%20%20%3C/defs%3E%0A%20%20%3Crect%20width%3D%271600%27%20height%3D%27700%27%20fill%3D%27%23efe7dd%27/%3E%0A%20%20%3Cpath%20d%3D%27M0%2C460%20C240%2C380%20420%2C520%20700%2C470%20C980%2C420%201180%2C560%201600%2C500%20L1600%2C700%20L0%2C700%20Z%27%20fill%3D%27url%28%23a%29%27/%3E%0A%20%20%3Cpath%20d%3D%27M0%2C380%20C260%2C320%20460%2C420%20760%2C390%20C1080%2C350%201260%2C440%201600%2C420%20L1600%2C700%20L0%2C700%20Z%27%20fill%3D%27url%28%23b%29%27%20opacity%3D%270.5%27/%3E%0A%20%20%3Ccircle%20cx%3D%271250%27%20cy%3D%27180%27%20r%3D%27140%27%20fill%3D%27%23f6f1e8%27%20opacity%3D%270.35%27/%3E%0A%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% 10%, #fff3e2 0%, rgba(255, 243, 226, 0) 60%),
        radial-gradient(800px 500px at 85% 20%, #e9f0ef 0%, rgba(233, 240, 239, 0) 55%),
        linear-gradient(135deg, #f6f1e8 0%, #efe7dd 100%);
}

h1, h2, h3 {
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    letter-spacing: 0.2px;
    color: #10161a;
}

h1 {
    font-size: clamp(2.1rem, 3vw, 2.9rem);
    margin: 1.5rem 0 1.25rem;
    padding: 1.1rem 1.4rem;
    border-radius: 16px;
    color: #f9fafb;
    background-image:
        linear-gradient(135deg, rgba(12, 20, 28, 0.82) 0%, rgba(12, 20, 28, 0.35) 70%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

h2 {
    font-size: clamp(1.6rem, 2.3vw, 2.1rem);
    margin: 2.25rem 0 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    color: #f9fafb;
    background-image:
        linear-gradient(135deg, rgba(12, 20, 28, 0.78) 0%, rgba(12, 20, 28, 0.3) 70%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 22px rgba(16, 22, 26, 0.16);
}

h3 {
    font-size: 1.35rem;
    margin: 0 0 0.75rem;
}

.site-main p {
    max-width: 90ch;
    margin-left: auto;
    margin-right: auto;
}

.site-main ul,
.site-main ol {
    padding-left: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 90ch;
    list-style-position: outside;
}

.site-main li {
    max-width: 90ch;
}

.site-main ul ul,
.site-main ul ol,
.site-main ol ul,
.site-main ol ol {
    padding-left: 1.5rem;
}

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 3rem 0;
}

article {
    margin-bottom: 4rem;
}

.post-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

nav {
    background: #10161a;
    color: #f9fafb;
    padding: 0.9rem 1.75rem;
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid #1f2937;
}

nav a {
    color: #f9fafb;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

a {
    color: var(--accent-2);
}

a:hover {
    text-decoration: underline;
}

.site-main {
    padding: 2rem 1.5rem 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    text-align: center !important;
    margin-top: 2rem;
    padding: 1rem 0 2rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

footer p {
    max-width: 65ch;
    margin: 0 auto;
}

pre {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
}

code {
    font-size: 0.9rem;
}

pre + p {
    margin-top: 1.5rem;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
}

.page-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 260px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: start;
}

.hero-text {
    padding-top: 0.5rem;
}

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

.measure {
    max-width: 65ch;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 18px rgba(192, 75, 43, 0.25);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(192, 75, 43, 0.35);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn.ghost:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(16, 22, 26, 0.12);
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.card-kicker {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
}

.link-inline {
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--accent-2);
    font-weight: 600;
}

.link-inline:hover {
    text-decoration: underline;
}

.scholar-embed {
    position: relative;
    width: 100%;
    padding-top: 62%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #ffffff;
}

.scholar-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.small {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.section {
    margin-top: 3rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(16, 22, 26, 0.08);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.link-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
    display: grid;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 24px rgba(16, 22, 26, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(16, 22, 26, 0.16);
}

.link-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.link-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

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

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Only show the floating panel on wide screens */
@media (min-width: 1100px) {
  .post {
    position: relative;
  }

  .series-float {
    float: left;
    width: 240px;

    /* push it outside the content column */
    margin-left: -360px;
    margin-right: 2rem;

    position: sticky;
    top: 50%;
    transform: translateY(-50%);
  }

  .series-box {
    border-left: 2px solid var(--line);
    padding-left: 1rem;
    font-size: 0.9rem;
  }

  .series-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ink);
  }

  .series-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .series-box li {
    margin-bottom: 0.5rem;
    color: var(--muted);
  }

  .series-box li a {
    color: var(--accent-2);
    text-decoration: none;
  }

  .series-box li a:hover {
    text-decoration: underline;
  }

  .series-box li.active {
    font-weight: 600;
    color: var(--ink);
  }
}

/* On smaller screens, don't float: keep reading clean */
@media (max-width: 1099px) {
  .series-float {
    display: none;
  }
}


.hero-banner {
    position: relative;
    min-height: 360px;
    border-radius: 26px;
    padding: 2.75rem 3rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 20, 28, 0.82) 0%, rgba(12, 20, 28, 0.28) 65%, rgba(12, 20, 28, 0.15) 100%);
}

.banner-content {
    position: relative;
    max-width: 640px;
    color: #f9fafb;
}

.banner-content h1 {
    color: #f9fafb;
    margin: 0.5rem 0 0.75rem;
}

.banner-subtitle {
    color: rgba(249, 250, 251, 0.86);
    font-size: 1.05rem;
    max-width: 55ch;
}

.intro {
    margin-top: 2.5rem;
    font-size: 1.05rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.scholar-figure {
    margin: 1.5rem 0 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: 0 12px 24px rgba(16, 22, 26, 0.08);
}

.scholar-figure img {
    width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.scholar-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero-banner {
        min-height: 320px;
        padding: 2.25rem;
    }
}
