:root {
    --cream: #FAFBFC;
    --paper: #F0F4F8;
    --ink: #1a2a3a;
    --navy: #1e3a5f;
    --royal: #2c5282;
    --gold: #c9a227;
    --gold-text: #7a6213;
    --warm-gray: #64748b;
    --line: #cbd5e1;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    line-height: 1.65;
}

a {
    color: var(--royal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--gold-text);
}

.site {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    align-self: start;
    background: var(--paper);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding: 28px 14px;
    position: sticky;
    top: 0;
}

.sidebar .site-title {
    font-family: "EB Garamond", serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.sidebar .site-title a {
    color: inherit;
    text-decoration: none;
}

.sidebar .site-title a:hover {
    color: var(--royal);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-item {
    background: none;
    border: 0;
    border-radius: 3px;
    color: var(--warm-gray);
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    padding: 5px 7px;
    text-align: left;
    text-decoration: none;
    text-transform: lowercase;
    transition: background 0.1s, color 0.1s;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--ink);
}

.nav-item.active {
    background: rgba(201, 162, 39, 0.1);
    color: var(--gold-text);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

.sidebar-footer a {
    color: var(--warm-gray);
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.55rem;
    margin-bottom: 2px;
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: var(--royal);
}

.main {
    min-width: 0;
    padding: 44px 56px 64px;
}

.page {
    margin: 0 auto;
    max-width: 1080px;
}

.word-nav {
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 48px;
    padding-bottom: 12px;
}

.word-nav a {
    border-radius: 3px;
    color: var(--warm-gray);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.62rem;
    padding: 5px 8px;
    text-decoration: none;
    text-transform: lowercase;
}

.word-nav a:hover {
    background: rgba(44, 82, 130, 0.08);
    color: var(--ink);
}

.word-nav a.active {
    background: rgba(201, 162, 39, 0.12);
    color: var(--gold-text);
}

.hero {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    margin-bottom: 54px;
    padding-bottom: 48px;
}

.eyebrow,
.role-label {
    color: var(--warm-gray);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    color: var(--navy);
    font-family: "EB Garamond", serif;
    font-size: clamp(2.9rem, 7vw, 5.2rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 0.96;
    margin: 12px 0 22px;
    max-width: 720px;
}

.lede {
    font-size: 1.16rem;
    line-height: 1.6;
    max-width: 680px;
}

.hero-note {
    align-self: end;
    background: var(--paper);
    border-left: 3px solid var(--gold);
    padding: 22px;
}

.hero-note p {
    color: var(--warm-gray);
    font-size: 0.88rem;
}

.hero-note strong {
    color: var(--ink);
    font-weight: 600;
}

.section-heading {
    align-items: end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-heading h2 {
    color: var(--navy);
    font-family: "EB Garamond", serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.15;
}

.section-heading p {
    color: var(--warm-gray);
    font-size: 0.84rem;
    max-width: 430px;
}

.book-grid {
    display: grid;
    gap: 26px 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-card {
    min-width: 0;
}

.cover-link {
    background: var(--paper);
    border: 1px solid transparent;
    display: flex;
    justify-content: center;
    min-height: 310px;
    padding: 24px;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.cover-link:hover,
.cover-link:focus-visible {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.cover-link img,
.book-placeholder {
    box-shadow: 0 10px 24px rgba(30, 58, 95, 0.14);
    height: 262px;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.book-placeholder {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(240, 244, 248, 0.15)),
        var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 18px 18px;
    text-align: left;
    width: 175px;
}

.book-placeholder .status,
.book-placeholder .author {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.52rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.book-placeholder .title {
    font-family: "EB Garamond", serif;
    font-size: 1.55rem;
    line-height: 1.05;
}

.book-copy {
    padding: 14px 2px 0;
}

.book-copy h3 {
    font-family: "EB Garamond", serif;
    font-size: 1.18rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 5px 0 3px;
}

.book-copy h3 a {
    color: var(--ink);
    text-decoration: none;
}

.book-copy h3 a:hover {
    color: var(--royal);
}

.book-author {
    color: var(--warm-gray);
    font-size: 0.82rem;
}

.services {
    background: var(--navy);
    color: var(--white);
    margin: 68px 0 54px;
    padding: 42px;
}

.services .eyebrow {
    color: #b9c8d8;
}

.services h2 {
    font-family: "EB Garamond", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    margin: 8px 0 14px;
}

.services-intro {
    color: #d9e1e9;
    max-width: 720px;
}

.service-grid {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 30px;
}

.service {
    background: rgba(255, 255, 255, 0.06);
    min-height: 170px;
    padding: 24px;
}

.service h3 {
    color: var(--white);
    font-family: "EB Garamond", serif;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.service p {
    color: #c8d4df;
    font-size: 0.86rem;
}

.cta {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 28px;
}

.cta p {
    color: #d9e1e9;
    max-width: 620px;
}

.cta-link {
    background: var(--gold);
    border-radius: 3px;
    color: var(--navy);
    flex: 0 0 auto;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.66rem;
    padding: 11px 15px;
    text-decoration: none;
}

.cta-link:hover {
    background: var(--white);
    color: var(--navy);
}

.method {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 26px;
    grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.5fr);
    padding-top: 42px;
}

.method h2 {
    color: var(--navy);
    font-family: "EB Garamond", serif;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.15;
}

.method-copy {
    columns: 2;
    column-gap: 32px;
}

.method-copy p {
    break-inside: avoid;
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.mobile-footer {
    display: none;
    padding: 36px 0 10px;
    text-align: center;
}

.mobile-footer a {
    color: var(--warm-gray);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.62rem;
    margin: 0 6px;
    text-decoration: none;
}

@media (max-width: 980px) {
    .main {
        padding: 38px 34px 56px;
    }

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

    .hero-note {
        max-width: 560px;
    }

    .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .sidebar {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        height: auto;
        padding: 10px 14px;
        position: static;
    }

    .sidebar .site-title {
        margin: 0 auto 0 0;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3px;
    }

    .sidebar-footer {
        display: none;
    }

    .main {
        padding: 30px 20px 48px;
    }

    .word-nav {
        margin-bottom: 38px;
    }

    .hero {
        margin-bottom: 44px;
        padding-bottom: 38px;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 14vw, 4.2rem);
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .services {
        margin-left: -20px;
        margin-right: -20px;
        padding: 34px 20px;
    }

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

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

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

    .method-copy {
        columns: 1;
    }

    .mobile-footer {
        display: block;
    }
}

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

    .cover-link {
        min-height: 292px;
    }

    .cover-link img,
    .book-placeholder {
        height: 242px;
    }
}
