/* =========================
   Base
   ========================= */

:root {
    color-scheme: light;

    --background: #ffffff;
    --text: #222222;
    --text-secondary: #666666;
    --border: #dddddd;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --background: #111111;
        --text: #f5f5f5;
        --text-secondary: #aaaaaa;
        --border: #333333;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

main,
header,
footer {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================
   Navigation
   ========================= */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
}

nav > a {
    flex-shrink: 0;
    color: inherit;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-decoration: none;
}

nav div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 24px;
}

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

a:hover {
    text-decoration: underline;
}


/* =========================
   Header / Hero
   ========================= */

header {
    padding: 24px 0 0;
}

header > div {
    padding: 100px 0 90px;
}

header > div h2 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

header h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(42px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -2px;
}


/* =========================
   Sections
   ========================= */

section {
    padding: 52px 0;
    border-top: 1px solid var(--border);
}

h2 {
    margin-top: 0;
    font-size: 28px;
}

article {
    padding: 20px 0;
}

article h3 {
    margin-bottom: 8px;
}


/* =========================
   About
   ========================= */

#about {
    max-width: 700px;
}

#about p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}


/* =========================
   Footer
   ========================= */

footer {
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

footer > div {
    display: flex;
    justify-content: center;
    gap: 24px;
}

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


/* =========================
   Mobile
   ========================= */

@media (max-width: 600px) {
    main,
    header,
    footer {
        width: calc(100% - 32px);
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 20px 0;
    }

    nav > a {
        font-size: 20px;
    }

    nav div {
        width: 100%;
        justify-content: center;
        gap: 8px 18px;
    }

    nav div a {
        font-size: 15px;
    }

    header {
        padding-top: 12px;
    }

    header > div {
        padding: 56px 0 56px;
    }

    header > div h2 {
        margin-bottom: 14px;
        font-size: 15px;
    }

    header h1 {
        max-width: 100%;
        font-size: clamp(38px, 11vw, 48px);
        line-height: 1.08;
        letter-spacing: -1.5px;
    }

    section {
        padding: 48px 0;
    }

    h2 {
        font-size: 26px;
    }

    #about p {
        font-size: 17px;
        line-height: 1.7;
    }

    article {
        padding: 16px 0;
    }

    footer {
        padding: 48px 0;
    }

    footer > div {
        flex-wrap: wrap;
        gap: 12px 20px;
    }
}

.page-header {
    padding: 72px 0 40px;
}

.page-header h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.page-header p {
    max-width: 600px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.7;
}

.book {
    padding: 28px 0;
    border-top: 1px solid var(--border);
}

.book h3 {
    margin: 0 0 4px;
    font-size: 21px;
}

.book-author {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.book > p:not(.book-author) {
    max-width: 650px;
    color: var(--text-secondary);
}

.book a {
    display: inline-block;
    margin-top: 8px;
    color: inherit;
    font-weight: 600;
}

@media (max-width: 600px) {
    .page-header {
        padding: 56px 0 44px;
    }

    .page-header h1 {
        font-size: 44px;
        letter-spacing: -1.5px;
    }

    .page-header p {
        font-size: 17px;
    }

    .book {
        padding: 24px 0;
    }

    .book {
        grid-template-columns: 90px 1fr;
        gap: 20px;
    }

    .book img {
        width: 90px;
    }

    .book h3 {
        font-size: 18px;
    }
}

.book {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.book img {
    width: 140px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.book-content {
    max-width: 650px;
}

.book h3 {
    margin: 0 0 4px;
    font-size: 21px;
}

.book-author {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 15px;
}

.book-content > p:not(.book-author) {
    color: var(--text-secondary);
    line-height: 1.7;
}

.book a {
    display: inline-block;
    margin-top: 8px;
    color: inherit;
    font-weight: 600;
}