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

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

/* ── LOCK LIGHT MODE ── */
:root {
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    html {
        background: #f8f6f2 !important;
    }

    body {
        background: #f8f6f2 !important;
        color: #18160f !important;
    }
}

/* ── TOKENS ── */
:root {
    --bg: #f8f6f2;
    --ink: #18160f;
    --mid: #6b6355;
    --faint: #aea79c;
    --rule: #e5dfd6;
    --green: #2a6b3c;
    --red: #b83410;
    --sans: 'Inter', system-ui, sans-serif;
    --serif: 'Fraunces', Georgia, serif;
    --col: 600px;
    --pad: clamp(18px, 5vw, 56px);
}

/* ── BASE ── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .15s;
}

/* ── PAGE SHELL ── */
.page {
    max-width: calc(var(--col) + var(--pad) * 2);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ── NAV ── */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--rule);
    gap: 12px;
}

.nav-name {
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    font-size: .78rem;
    color: var(--mid);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}

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

.nav-links a.active {
    color: var(--ink);
    font-weight: 500;
}

.nav-right {
    font-size: .7rem;
    color: var(--faint);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--ink);
    flex-shrink: 0;
}

.nav-toggle svg {
    display: block;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    padding: 4px 0 16px;
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    font-size: .875rem;
    color: var(--mid);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    transition: color .15s;
}

.nav-mobile a:last-child {
    border-bottom: none;
}

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

.nav-mobile a.active {
    color: var(--ink);
    font-weight: 500;
}

@media (max-width: 520px) {
    .nav-links {
        display: none;
    }

    .nav-right {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

/* ── SECTION LABEL (shared across all pages) ── */
.section-label {
    font-size: .67rem;
    font-weight: 500;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 22px;
}

/* ── PAGE HEADER (inner pages: work, how-i-work, writing) ── */
.page-header {
    padding: 44px 0 40px;
}

.page-header h1 {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 6vw, 2.75rem);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -.03em;
    color: var(--ink);
    margin-bottom: 14px;
}

.page-header h1 em {
    font-style: italic;
    font-weight: 300;
}

.page-header p {
    font-size: .9rem;
    color: var(--mid);
    max-width: 480px;
    line-height: 1.72;
}

/* ── SOCIAL ICONS ── */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--faint);
    text-decoration: none;
    border-radius: 50%;
    transition: color .15s, background .15s;
}

.social-icon:hover {
    color: var(--ink);
    background: var(--rule);
}

/* ── FOOTER ── */
.footer {
    padding: 60px 0 56px;
    border-top: 1px solid var(--rule);
}

.footer-cta {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -.03em;
    color: var(--ink);
    margin-bottom: 8px;
}

.footer-cta em {
    font-style: italic;
}

.footer-cta a {
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-underline-offset: 4px;
    transition: color .2s, text-decoration-color .2s;
}

.footer-cta a:hover {
    color: var(--red);
    text-decoration-color: var(--red);
}

.footer-honest {
    font-size: .8rem;
    color: var(--faint);
    margin-bottom: 40px;
    font-style: italic;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid var(--rule);
    padding-top: 18px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: .78rem;
    color: var(--mid);
    text-decoration: none;
    transition: color .15s;
}

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

.footer-credit {
    font-size: .68rem;
    color: var(--faint);
    letter-spacing: .01em;
}

/* ── REVEAL ANIMATIONS ── */
.fade {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .55s ease, transform .55s ease;
}

.fade.on {
    opacity: 1;
    transform: none;
}

.stagger > * {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .45s ease, transform .45s ease;
}

.stagger.on > * {
    opacity: 1;
    transform: none;
}

.stagger.on > *:nth-child(1) { transition-delay: 0s; }
.stagger.on > *:nth-child(2) { transition-delay: .07s; }
.stagger.on > *:nth-child(3) { transition-delay: .14s; }
.stagger.on > *:nth-child(4) { transition-delay: .21s; }
.stagger.on > *:nth-child(5) { transition-delay: .28s; }

/* ── RESPONSIVE SHARED ── */
@media (max-width: 600px) {
    .page-header h1 {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .footer-cta {
        font-size: clamp(1.3rem, 6vw, 2rem);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
