:root {
    --bg: #f6f4ef;
    --text: #1d1d1d;
    --muted: #6d6d6d;
    --line: #d8d4cc;
    --accent: #31475e;
    --max-width: 820px;
    --wide-width: 1200px;
}

/* Fonts */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
}

@font-face {
    font-family: 'Source Serif';
    src: url('../fonts/source-serif-4-v14-latin-ext-regular.woff2') format('woff2');
    font-weight: 200 900;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 320;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Source Serif', serif;
    font-weight: 500;
    letter-spacing: -0.03em;
}

h1 {
    font-size: 5rem;
    line-height: 0.95;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.6rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    opacity: 0.7;
}

/* Layout */
.container {
    width: 92%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.wide-container {
    width: 92%;
    max-width: var(--wide-width);
    margin: 0 auto;
}

section {
    padding: 7rem 0;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    background: rgba(246, 244, 239, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-family: 'Source Serif', serif;
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
}

/* Hero */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
}

.hero-subtitle {
    color: var(--muted);
    font-size: 1.25rem;
    max-width: 720px;
}

/* Equation block */
.equation {
    margin-top: 4rem;
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Themes grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.theme-card {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
}

.theme-card p {
    color: var(--muted);
}

/* Publication */
.publication {
    margin-bottom: 2.5rem;
}

.publication-title {
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.publication-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Notes */
.note {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
}

.about-grid img {
    width: 100%;
}

/* Footer */
footer {
    border-top: 1px solid var(--line);
    padding: 4rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 800px) {
    h1 {
        font-size: 3.4rem;
    }

    h2 {
        font-size: 2rem;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        flex-direction: column;
        gap: 1rem;
    }
}

.questions {
    margin: 6rem 0;
}

.question-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.question-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.question-list li::before {
    content: "?";
    position: absolute;
    left: 0;
    top: 0;
    font-family: "Source Serif", serif;
    color: var(--accent);
    font-weight: 600;
}

.nav-links a.active {
    color: var(--text);
    border-bottom: 1px solid var(--text);
}

@media (max-width: 768px) {

    .nav-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}

.nav-links a {
    color: var(--muted);
}

.where-to-begin {

    padding: 6rem 0;

    border-top: 1px solid var(--line);
}

.where-to-begin p {

    max-width: 700px;
    margin-bottom: 2.5rem;
}

.cta-buttons {

    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button-primary,
.button-secondary {

    display: inline-block;

    padding: 0.85rem 1.5rem;

    border-radius: 4px;

    transition: all 0.2s ease;
}

.button-primary {

    background: var(--accent);
    color: white;
}

.button-primary:hover {

    opacity: 0.9;
}

.button-secondary {

    border: 1px solid var(--line);
    color: var(--text);
}

.button-secondary:hover {

    border-color: var(--accent);
}

.where-links {

    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.where-links a {

    font-size: 1.05rem;
    font-weight: 500;
}

.site-footer {

    margin-top: 6rem;
    padding: 4rem 0 2rem 0;

    border-top: 1px solid var(--line);

    color: var(--muted);
    font-size: 0.95rem;
}

.footer-inner {

    display: flex;
    justify-content: space-between;
    gap: 3rem;

    flex-wrap: wrap;
}

.footer-title {

    font-family: "Source Serif", serif;
    font-size: 1.2rem;
    color: var(--text);
}

.footer-subtitle {

    margin-top: 0.5rem;
    max-width: 300px;
}

.footer-contact {

    margin-bottom: 1.5rem;
}

.footer-label {

    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-email {

    color: var(--text);
}

.footer-links {

    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {

    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {

    color: var(--text);
}

.footer-bottom {

    margin-top: 3rem;
    padding-top: 1.5rem;

    border-top: 1px solid var(--line);

    text-align: center;
    font-size: 0.85rem;
}

.footer-links-minimal {

    margin-top: 0.5rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.footer-links-minimal a {

    color: var(--muted);
    text-decoration: none;
}

.footer-links-minimal a:hover {

    color: var(--text);
}

@media (max-width: 700px) {

    .footer-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        text-align: left;
    }
}

/* .foundation-next {

    margin-top: 3rem;
    padding-top: 1.5rem;

    border-top: 1px solid var(--line);

    font-size: 0.95rem;
    color: var(--muted);

} */

.see-also {

    margin-top: 3rem;
    padding-top: 1.5rem;

    border-top: 1px solid var(--line);
}

.see-also h4 {

    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.see-also ul {

    margin: 0;
    padding-left: 1.2rem;
}

.foundation-figure {

    margin: 2rem 0 3rem 0;
    text-align: center;
}

.binary-geometry {

    width: 220px;
    max-width: 100%;
    color: var(--text);
}

.figure-caption {

    margin-top: 1rem;

    font-size: 0.9rem;
    font-style: italic;

    color: var(--muted);

    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.button-group {

    margin: 2.5rem 0;
}

.button {

    display: inline-block;

    margin-right: 1rem;
    margin-bottom: 0.75rem;

    padding: 0.6rem 1rem;

    border-left: 3px solid var(--text);

    text-decoration: none;

    color: var(--text);

    background: var(--surface);
}

.button:hover {

    transform: translateX(2px);
}

.book-header {

    text-align: center;

    max-width: 52rem;
    margin: 0 auto 4rem auto;
}

.book-subtitle {

    margin-top: -0.5rem;
    margin-bottom: 1.5rem;

    font-style: italic;
    color: var(--muted);

    font-size: 1.05rem;
}

.book-tagline {

    max-width: 38rem;

    margin: 0 auto;

    padding: 1.25rem 0;

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);

    font-size: 1.1rem;
    line-height: 1.7;

    font-weight: 300;
}