@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #f7f4ee;
    --surface: #ffffff;
    --surface-soft: #f1ece3;
    --text: #1f1b16;
    --muted: #6d655c;
    --line: #ddd4c7;
    --line-strong: #c8bcab;
    --accent: #9d4b26;
    --accent-deep: #23352e;
    --max-width: 1120px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
    line-height: 1.65;
}

body.home-page,
.reading-page {
    padding: 24px;
}

body:not(.home-page) {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 24px 96px;
}

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

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

p {
    margin: 0;
    color: var(--muted);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text);
    font-family: "Fraunces", serif;
    line-height: 1.08;
    font-weight: 700;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body > h2 {
    margin: 12px auto 20px;
    max-width: 920px;
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.04em;
}

.home-page .site-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto 24px;
    padding: 18px 0 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}

.brand-text {
    font-size: 0.94rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease;
}

nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] {
    background: var(--surface-soft);
    color: var(--text);
}

body:not(.home-page) nav {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(calc(100% - 32px), 760px);
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.home-shell,
.reading-page .reading-shell {
    display: grid;
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.panel,
section,
#content-list {
    /* background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg); */
    /* margin-top: 4em; */
}

.panel {
    padding: 32px;
}

.hero,
.project-hero,
.split-grid,
.support-grid,
.reading-page .reading-hero,
.reading-page .reading-intro-grid,
.reading-page .reading-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.hero-copy,
.hero-aside,
.feature-card,
.recent-card,
.stat-card,
.aside-card,
.identity-list div,
.lane-card,
.project-card,
.reading-page .recent-article,
.reading-page .archive-card {
    min-width: 0;
}

.eyebrow,
.feature-kicker,
.aside-label,
.label,
.recent-meta,
.project-tech,
.reading-page .search-label,
.reading-page .archive-category {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
}

.eyebrow,
.feature-kicker,
.aside-label,
.recent-meta,
.project-tech,
.reading-page .search-label,
.reading-page .archive-category {
    color: var(--accent);
}

.hero h1,
.project-hero h1,
.reading-page .reading-hero h1 {
    margin-top: 10px;
    font-size: clamp(3rem, 6vw, 4.9rem);
    letter-spacing: -0.06em;
    max-width: 11ch;
}

.lede {
    margin-top: 20px;
    max-width: 62ch;
    font-size: clamp(1.02rem, 1.9vw, 1.22rem);
}

.supporting-copy {
    margin-top: 16px;
    max-width: 62ch;
}

.hero-actions,
.support-actions,
.reading-page .featured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
}

.button.primary {
    background: var(--text);
    color: #fff;
}

.button.secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line-strong);
}

.text-link {
    min-height: auto;
    padding: 0;
    color: var(--accent-deep);
}

.stats-grid,
.feature-grid,
.recent-grid,
.lane-grid,
.reading-page .reading-shelf-grid {
    display: grid;
    gap: 16px;
}

.stats-grid {
    margin-top: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lane-grid,
.reading-page .reading-shelf-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.aside-card,
.feature-card,
.recent-card,
.identity-list div,
.lane-card,
.reading-page .reading-note-card,
.project-card,
.reading-page .recent-article,
.reading-page .archive-card,
.projects-grid > section {
    padding: 22px;
    background: #fcfbf8;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.stat-card strong {
    display: block;
    color: var(--accent-deep);
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.stat-card span {
    display: block;
    margin-top: 8px;
}

.hero-aside,
.project-hero-notes,
.reading-page .reading-stats,
.identity-list {
    display: grid;
    gap: 16px;
}

.hero-aside img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.mini-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.mini-list li {
    position: relative;
    padding-left: 16px;
    color: var(--muted);
}

.mini-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.section-block,
.project-archive-panel,
.reading-page .reading-intro,
.reading-page .archive-panel {
    display: grid;
    gap: 24px;
}

.section-heading {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.05em;
}

.feature-card h3,
.recent-card h3,
.lane-card h3,
.reading-page .recent-article h3,
.reading-page .archive-card h4,
.projects-grid h3 {
    margin-top: 10px;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.feature-card p:not(.feature-kicker),
.recent-card p:last-child,
.lane-card p:last-child,
.project-blurb p,
.reading-page .recent-article p:last-child,
.reading-page .archive-card p:last-child {
    margin-top: 10px;
}

.feature-card a,
.recent-card a,
.projects-grid h3 a,
.project-blurb + a,
.reading-page .archive-card h4 a,
.reading-page .recent-article h3 a {
    color: var(--accent-deep);
}

.accent-warm,
.accent-deep,
.accent-soft {
    background: #fcfbf8;
}

.story-block {
    display: grid;
    gap: 18px;
}

.label {
    color: var(--accent-deep);
}

.support-panel {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
}

.support-panel .section-heading h2,
.support-panel p,
.support-panel .text-link {
    color: #f5efe7;
}

.support-panel .eyebrow {
    color: #d8b08a;
}

.support-panel .button.primary {
    background: #f5efe7;
    color: var(--accent-deep);
}

.support-panel .button.secondary {
    background: transparent;
    border-color: rgba(245, 239, 231, 0.35);
    color: #f5efe7;
}

.project-category + .project-category {
    margin-top: 28px;
}

.project-category-heading {
    /* max-width: 720px; */
    /* padding-bottom: 16px; */
    /* border-bottom: 1px solid var(--line); */
    margin-top: 4em;
    margin-bottom: 1em;
}

.project-category-heading h2 {
    margin-top: 8px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

.project-category-heading p:last-child {
    margin-top: 10px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    /* margin-top: 18px; */
}

.project-card {
    display: grid;
    gap: 14px;
    padding: 18px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--accent-deep);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.projects-grid h4 {
    margin-top: 8px;
    font-family: "Manrope", sans-serif;
    font-size: 0.95rem;
    color: var(--muted);
}

.projects-page .panel {
    /* padding: 28px; */
}

.projects-page .section-block,
.projects-page .project-archive-panel {
    gap: 20px;
}

.projects-page .lane-grid {
    gap: 12px;
}

.projects-page .lane-card {
    padding: 18px;
    background: transparent;
    border: 1px solid var(--line);
}

.projects-page #content-list {
    padding: 0;
    background: transparent;
    border: 0;
}

.projects-page .project-archive-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

#content-list {
    padding: 28px;
}

.file-title {
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
}

.archive-item {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.archive-item:first-of-type {
    margin-top: 24px;
}

.archive-item h3 {
    font-size: 1.18rem;
}

.meta {
    margin-top: 4px;
    font-size: 0.95rem;
}

.reading-page {
    max-width: none;
    margin: 0;
    padding-bottom: 24px;
}

.reading-page .reading-controls,
.reading-page .featured-panel,
.reading-page .recent-panel,
.reading-page .archive-panel {
    background: var(--surface);
}

.reading-page .compact-heading {
    max-width: none;
}

.reading-page .compact-heading h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.reading-page .reading-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.reading-page .search-field {
    display: grid;
    gap: 10px;
}

.reading-page .search-field input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.reading-page .search-field input:focus {
    outline: 2px solid rgba(157, 75, 38, 0.18);
    outline-offset: 2px;
}

.reading-page .results-summary {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.reading-page .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.reading-page .filter-chip {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.reading-page .filter-chip:hover,
.reading-page .filter-chip:focus-visible,
.reading-page .filter-chip.active {
    background: var(--surface-soft);
    color: var(--text);
}

.reading-page .featured-panel,
.reading-page .recent-panel {
    display: grid;
    gap: 18px;
}

.reading-page .featured-meta,
.reading-page .archive-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.reading-page .featured-meta span + span::before {
    content: "•";
    margin-right: 10px;
    color: var(--line-strong);
}

.reading-page .featured-excerpt {
    max-width: 62ch;
    font-size: 1.02rem;
}

.reading-page .recent-stack,
.reading-page .archive-groups {
    display: grid;
    gap: 16px;
}

.reading-page .archive-groups {
    padding: 0;
    background: transparent;
    border: 0;
    max-width: none;
    margin: 0;
}

.reading-page .year-group {
    padding-top: 6px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.reading-page .year-group + .year-group {
    border-top: 1px solid var(--line);
}

.reading-page .year-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.reading-page .year-heading h3 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.reading-page .year-heading p {
    font-size: 0.95rem;
}

.reading-page .archive-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.reading-page .empty-state {
    color: var(--muted);
}

@media (max-width: 980px) {
    .home-page .site-top,
    .hero,
    .project-hero,
    .feature-grid,
    .split-grid,
    .support-grid,
    .recent-grid,
    .stats-grid,
    .lane-grid,
    .reading-page .reading-hero,
    .reading-page .reading-intro-grid,
    .reading-page .reading-grid,
    .reading-page .reading-shelf-grid,
    .reading-page .archive-card-grid,
    .reading-page .reading-toolbar {
        grid-template-columns: 1fr;
    }

    .home-page .site-top {
        position: static;
        padding-top: 0;
    }

    .hero h1,
    .project-hero h1,
    .reading-page .reading-hero h1 {
        max-width: none;
    }

    .reading-page .results-summary {
        white-space: normal;
    }
}

@media (max-width: 720px) {
    body,
    body.home-page,
    .reading-page,
    body:not(.home-page) {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.home-page,
    .reading-page {
        padding-top: 16px;
        padding-bottom: 96px;
    }

    .panel,
    #content-list {
        padding: 20px;
    }

    .home-page .site-top {
        gap: 16px;
    }

    .brand {
        width: 100%;
        justify-content: center;
    }

    .home-page .site-top {
        flex-direction: column;
        align-items: stretch;
    }

    .home-page .site-top nav ul,
    body:not(.home-page) nav ul {
        justify-content: space-between;
        gap: 6px;
    }

    .home-page .site-top nav a,
    body:not(.home-page) nav a {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
        font-size: 0.76rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .section-heading h2 {
        font-size: 1.9rem;
    }

    .reading-page .year-heading {
        flex-direction: column;
        align-items: start;
    }

    .reading-page .archive-card-grid {
        grid-template-columns: 1fr;
    }
}
