:root {
    color-scheme: dark;

    --bg: #0d1117;
    --bg-soft: #141a21;
    --panel: #181f27;
    --panel-hover: #202832;

    --text: #f2f4f7;
    --muted: #a6b0bb;
    --faint: #77818c;

    --border: rgba(255, 255, 255, .10);

    --accent: #ff7a2f;
    --accent-hover: #ff914f;
    --accent-soft: rgba(255, 122, 47, .13);

    --max: 1120px;
    --radius: 16px;
}

:root[data-theme="light"] {
    color-scheme: light;

    --bg: #f5f6f7;
    --bg-soft: #e9edf1;
    --panel: #ffffff;
    --panel-hover: #f0f3f6;

    --text: #17202a;
    --muted: #52606d;
    --faint: #7a8794;

    --border: rgba(23, 32, 42, .12);

    --accent: #e85f16;
    --accent-hover: #d84f08;
    --accent-soft: rgba(232, 95, 22, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

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

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

button {
    font: inherit;
}

.container {
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
}

.narrow {
    max-width: 780px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-title {
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.03em;
    white-space: nowrap;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    color: var(--muted);
    font-size: 14px;
}

.main-nav a:hover {
    color: var(--text);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--panel-hover);
}

.hero {
    min-height: 700px;
    display: flex;
    align-items: center;
    padding: 90px 0;
    background:
        radial-gradient(circle at 80% 20%, var(--accent-soft), transparent 28rem),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 390px;
    align-items: center;
    gap: 90px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 25px;
    font-size: clamp(48px, 7vw, 78px);
    line-height: .98;
    letter-spacing: -.055em;
}

h1 span {
    color: var(--accent);
}

.hero-lead {
    max-width: 650px;
    color: var(--muted);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 750;
}

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

.button.primary:hover {
    background: var(--accent-hover);
}

.button.secondary {
    background: var(--panel);
}

.button.secondary:hover {
    background: var(--panel-hover);
}

.button.full {
    width: 100%;
}

.hero-note {
    margin-top: 35px;
    color: var(--faint);
    font-size: 13px;
}

.book-cover {
    position: relative;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .30);
    transform: rotate(1.5deg);
}

.book-cover img {
    width: 100%;
    border-radius: 3px;
}

.section {
    padding: 100px 0;
}

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

h2 {
    max-width: 780px;
    margin-bottom: 24px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.03;
    letter-spacing: -.045em;
}

h3 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.2;
}

.section-intro {
    max-width: 740px;
    color: var(--muted);
    font-size: 18px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 55px;
}

.card {
    min-height: 250px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.card-number {
    display: block;
    margin-bottom: 65px;
    color: var(--accent);
    font: 700 12px monospace;
}

.card p,
.author-placeholder p,
.feedback p {
    color: var(--muted);
}

.split {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 80px;
    align-items: start;
}

.info-panel {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.info-panel dl {
    margin: 0 0 25px;
}

.info-panel dl > div {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.info-panel dl > div:last-child {
    border-bottom: 0;
}

dt {
    color: var(--faint);
    font-size: 12px;
}

dd {
    margin: 3px 0 0;
    font-weight: 650;
}

.material-list {
    margin-top: 45px;
    border-top: 1px solid var(--border);
}

.material-item {
    display: grid;
    grid-template-columns: 55px 1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.material-item > span {
    color: var(--accent);
    font: 700 12px monospace;
}

.material-item small {
    color: var(--muted);
}

.material-item:hover strong {
    color: var(--accent);
}

.author-placeholder {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 30px;
    max-width: 760px;
    margin-top: 45px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.author-photo {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--faint);
    font-size: 12px;
}

.feedback {
    border-top: 1px solid var(--border);
}

.site-footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 0;
    color: var(--faint);
    font-size: 12px;
}

@media (max-width: 900px) {
    .main-nav {
        gap: 14px;
    }

    .main-nav a:nth-child(n+4) {
        display: none;
    }

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

    .hero-grid {
        gap: 55px;
    }

    .book-cover {
        max-width: 390px;
        margin-inline: auto;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(calc(100% - 28px), var(--max));
    }

    .main-nav {
        display: none;
    }

    .hero {
        padding: 65px 0 75px;
    }

    h1 {
        font-size: 48px;
    }

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

    .card {
        min-height: auto;
    }

    .card-number {
        margin-bottom: 40px;
    }

    .material-item {
        grid-template-columns: 40px 1fr;
    }

    .material-item small {
        grid-column: 2;
    }

    .author-placeholder {
        grid-template-columns: 1fr;
    }

    .author-photo {
        width: 140px;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
