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

:root {
    --bg: #faf8f3;
    --ink: #201f1c;
    --muted: #6b6760;
    --accent: #1d3557;
    --accent-line: rgba(29, 53, 87, 0.4);
    --hairline: rgba(32, 31, 28, 0.12);
    --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
    --font-hand: "Caveat", cursive;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
}

body {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition:
        color 0.15s,
        text-decoration-color 0.15s;
}
a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

h1,
h2,
p,
ul,
figure {
    margin: 0;
}

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

/* ---------- page shell + fade-in ---------- */

.page-shell {
    opacity: 0;
    min-height: 100svh;
    padding: clamp(96px, 15vh, 140px) clamp(22px, 6vw, 80px)
        clamp(48px, 8vh, 96px);
    animation: page-in 0.7s ease-out 80ms forwards;
}

.home-shell {
    padding-top: clamp(136px, 19vh, 180px);
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- header / nav ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    padding: 22px clamp(22px, 6vw, 80px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    background: linear-gradient(var(--bg) 60%, transparent);
}

.site-header nav {
    grid-column: 2;
    justify-self: center;
}

.wordmark {
    font-family: var(--font-serif);
    font-size: 19px;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}
.wordmark:hover {
    color: var(--accent);
}

.link-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    padding: 0;
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.03em;
}
.link-list a {
    text-decoration: underline transparent;
}
.link-list a:hover {
    text-decoration-color: var(--accent);
}
.link-list a.is-active {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ---------- home: notebook spread ---------- */

.notebook-spread {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1fr);
    align-items: center;
    gap: clamp(56px, 9vw, 130px);
    width: min(1180px, 100%);
    margin: 0 auto;
}

.photo-side {
    display: grid;
    place-items: center;
    min-width: 0;
}

.portrait-figure {
    position: relative;
    width: min(100%, 340px);
}

.portrait {
    width: 100%;
    height: auto;
    max-height: min(64vh, 560px);
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 18px 40px -20px rgba(32, 31, 28, 0.35);
}

.snapshot {
    position: absolute;
    bottom: -9%;
    right: -20%;
    width: 62%;
    border: 6px solid var(--bg);
    border-radius: 2px;
    box-shadow: 0 12px 26px -10px rgba(32, 31, 28, 0.4);
    transform: rotate(4deg);
}

.text-side {
    width: min(100%, 540px);
    min-width: 0;
}

.intro-copy {
    --para-gap: 16px;
}

.intro-copy h1 {
    font-size: 40px;
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 10px;
}

.lead {
    max-width: 460px;
    font-size: 19px;
    color: var(--ink);
    margin-bottom: 8px;
}

.section-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    font-style: normal;
    margin-top: calc(var(--para-gap) * 1.2);
    margin-bottom: 4px;
}

.intro-copy p.body-copy {
    max-width: 500px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.outside-line {
    margin-top: 2px;
    margin-bottom: 2px;
}

.hello-line a {
    color: var(--accent);
}

.signoff-line {
    margin-top: 8px;
}

.signature {
    font-family: var(--font-hand);
    font-size: 30px;
    color: #49629c;
    margin-top: 2px;
}

@media (max-width: 860px) {
    .notebook-spread {
        grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr);
        gap: 48px;
    }
    .intro-copy h1 {
        font-size: 32px;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 14px 20px;
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: 8px;
    }
    .site-header nav {
        grid-column: 1;
    }
    .link-list {
        gap: 4px 14px;
        font-size: 12px;
    }
    .page-shell {
        padding-top: 108px;
    }
    .home-shell {
        padding-top: 136px;
    }
    .notebook-spread {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: left;
        gap: 36px;
    }
    .portrait-figure {
        width: min(72%, 260px);
    }
    .text-side {
        width: 100%;
    }
    .lead,
    .intro-copy p.body-copy {
        max-width: 100%;
    }
}

/* ---------- experience page ---------- */

.experience-page {
    width: min(760px, 100%);
    margin: 0 auto;
}

.experience-intro {
    text-align: center;
    width: min(560px, 100%);
    margin: 0 auto 64px;
}

.experience-intro h1 {
    font-size: 34px;
    font-weight: 500;
    margin-bottom: 14px;
}

.experience-intro p {
    font-size: 17px;
    color: var(--ink);
}

.entry-list {
    display: flex;
    flex-direction: column;
    gap: 56px;
    min-width: 0;
}

.entry-list > * {
    min-width: 0;
}

.entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: clamp(32px, 6vw, 64px);
    padding-bottom: 56px;
    border-bottom: 1px solid var(--hairline);
    min-width: 0;
}

.entry-copy,
.entry-artifact {
    min-width: 0;
}
.entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.entry.no-artifact {
    grid-template-columns: 1fr;
}

.entry.visual-left {
    grid-template-columns: 280px minmax(0, 1fr);
}
.entry.visual-left .entry-copy {
    grid-column: 2;
}
.entry.visual-left .entry-artifact {
    grid-row: 1;
    grid-column: 1;
}

.entry-copy h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 6px;
}

.entry-meta {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 11px;
    margin-bottom: 14px;
}

.entry-description {
    font-size: 16px;
    line-height: 1.55;
}

.entry-artifact {
    width: 100%;
    display: block;
    text-decoration: none;
    transition:
        opacity 0.18s,
        transform 0.18s;
}
a.entry-artifact:hover {
    opacity: 0.88;
    transform: scale(1.012);
}

.entry-artifact img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 14px 30px -18px rgba(32, 31, 28, 0.45);
}

@media (max-width: 700px) {
    .experience-page {
        width: 100%;
    }
    .experience-intro {
        margin-bottom: 48px;
    }
    .experience-intro h1 {
        font-size: 28px;
    }
    .entry,
    .entry.visual-left {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .entry.visual-left .entry-copy,
    .entry.visual-left .entry-artifact {
        grid-column: 1;
        grid-row: auto;
    }
    .entry-list {
        gap: 40px;
    }
}
