:root {
    --ink: #1a1a1a;
    --paper: #f8f6f3;
    --muted: #8a8580;
    --accent: #2d5a6b;
    --rule: #d4d0cb;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    background-color: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Nav --- */

nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.2rem 2rem 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

/* --- Layout --- */

.site {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    flex: 1;
}

/* --- Header --- */

header {
    padding: 2.5rem 0 1.5rem;
}

.wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2.4rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    text-decoration: none;
    display: inline-block;
}

a.wordmark:hover {
    color: var(--ink);
}

.wordmark .ampersand {
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

.suffix {
    display: block;
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.6rem;
    margin-left: 0.12em;
}

/* --- Rule --- */

hr {
    border: none;
    height: 1px;
    background: var(--rule);
    margin: 1.5rem 0;
}

/* --- Sections --- */

.section {
    margin-bottom: 2rem;
}

.section-label {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

/* --- Typography --- */

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--ink);
    margin-bottom: 0.3rem;
}

.intro {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 520px;
}

.body-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 520px;
}

.body-text p + p {
    margin-top: 0.8rem;
}

/* --- Project --- */

.project-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: 0.01em;
}

.project-desc {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.6;
    max-width: 480px;
}

.project-desc p + p {
    margin-top: 0.6rem;
}

/* --- Links --- */

.text-link {
    font-size: 0.85rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.text-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Section titles (for about/azurite pages) --- */

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

/* --- Last updated --- */

.last-updated {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

/* --- Footer --- */

footer {
    padding: 1.5rem 2rem 1.2rem;
    text-align: center;
}

footer p {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    line-height: 1.8;
}

footer a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

footer a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Entrance --- */

@keyframes settle {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav { animation: settle 0.8s ease-out both; }
header { animation: settle 0.8s ease-out 0.05s both; }
main { animation: settle 0.8s ease-out 0.15s both; }
footer { animation: settle 0.8s ease-out 0.3s both; }

/* --- Responsive --- */

@media (max-width: 480px) {
    html { font-size: 16px; }

    nav { padding: 1rem 1.4rem 0; gap: 1rem; }

    .wordmark { font-size: 2rem; }

    .site { padding: 0 1.4rem; }

    header { padding: 2rem 0 1rem; }

    .section { margin-bottom: 1.5rem; }

    footer { padding: 1rem 1.4rem 0.8rem; }
}
