:root {
    --bg: #ffffff;
    --text: #1e1e1a;
    --muted: #67645f;
    --line: #d8d2c7;
    --link: #2f6f68;
    --link-hover: #8a4c26;
    --tag-bg: #ede8dd;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 54px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: var(--link);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover,
a:focus {
    color: var(--link-hover);
}

.site-header,
main {
    width: min(880px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    padding: 28px 0 0;
}

.nav-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    width: min(880px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0;
    font-size: 0.94rem;
}

#projects {
    padding-bottom: 0;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
    color: var(--text);
    text-decoration: underline;
}

.intro-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.intro-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.portrait {
    display: block;
    width: 180px;
    height: 180px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
}

.intro-links {
    display: flex;
    flex-direction: column;
}

.intro-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.intro-links a:last-child {
    border-bottom: none;
}

.intro-links .fa {
    font-size: 0.92rem;
    width: 14px;
    text-align: center;
}

.intro-links a:hover,
.intro-links a:focus {
    background: var(--tag-bg);
    color: var(--link);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
li,
dd {
    margin-top: 0;
    overflow-wrap: break-word;
}

h1 {
    max-width: 12ch;
    margin-bottom: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.6rem;
    font-weight: 500;
    line-height: 1;
}

.subtitle {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 1.04rem;
    font-weight: 700;
}

h2 {
    margin-bottom: 0;
    font-size: 1.28rem;
    line-height: 1.2;
}

h3 {
    margin-bottom: 4px;
    font-size: 1rem;
    line-height: 1.35;
}

section {
    padding: 44px 0;
    border-top: 1px solid var(--line);
}

.section-heading {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.entry-list {
    display: grid;
    gap: 0;
    padding: 0;
    list-style: none;
}

.entry,
.project {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.project {
    grid-template-columns: 1fr;
    gap: 10px;
    align-content: start;
}

.project.is-hidden {
    display: none;
}


.entry:first-child,
.project:first-child {
    border-top: 0;
}

.project-list .project:nth-child(2) {
    border-top: 0;
}

.entry p,
.project p {
    margin-bottom: 0;
}

.project-links {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.entry ul,
.project ul {
    margin: 0;
    padding-left: 1.1rem;
}

.entry ul li,
.project ul li {
    margin-bottom: 4px;
}

.meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
    border-bottom: 1px solid var(--line);
}

.project-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.project-filter,
.tags .tag-filter {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--tag-bg);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
    font-family: inherit;
}

.project-filter {
    appearance: none;
    cursor: pointer;
    font-weight: 700;
}

.project-filter:hover,
.project-filter:focus,
.tags .tag-filter:hover,
.tags .tag-filter:focus {
    border-color: var(--link);
    color: var(--link);
}

.project-filter.is-active {
    background: var(--link);
    border-color: var(--link);
    color: #ffffff;
}

.tags .tag-filter.is-active {
    background: var(--link);
    border-color: var(--link);
    color: #ffffff;
}

.project-title {
    min-width: 0;
}

.project-media {
    display: block;
    align-self: start;
}

.project-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f4f4f4;
    object-fit: cover;
}

.project-media:hover img,
.project-media:focus img {
    border-color: var(--link);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--tag-bg);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.tags .tag-filter {
    cursor: pointer;
    font-weight: 700;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px;
}

.link-list {
    padding-left: 1.1rem;
}

.link-list li {
    margin-bottom: 6px;
}

.reads {
    display: grid;
    gap: 8px;
}

.reads dt {
    color: var(--muted);
    font-weight: 700;
}

.reads dd {
    margin: -8px 0 8px;
}

.strava-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.strava-card {
    display: block;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.strava-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f4f4f4;
    object-fit: cover;
}

.strava-card:hover,
.strava-card:focus {
    color: var(--link);
}

.strava-card:hover img,
.strava-card:focus img {
    border-color: var(--link);
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .site-header,
    main {
        width: min(880px, calc(100% - 28px));
    }

    .site-header {
        padding-top: 22px;
    }

    .site-nav {
        width: min(880px, calc(100% - 28px));
    }

    .project-list {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .project-list .project:nth-child(2) {
        border-top: 1px solid var(--line);
    }

    .intro-layout,
    .section-heading,
    .entry,
    .project,
    .two-column,
    .three-column {
        grid-template-columns: 1fr;
        gap: 14px;
        min-width: 0;
    }


    .portrait {
        width: 120px;
        height: 120px;
    }

    h1 {
        max-width: 11ch;
        font-size: 2.75rem;
    }

    section {
        padding: 34px 0;
    }

    .entry,
    .project {
        gap: 8px;
    }

    .strava-grid {
        grid-template-columns: 1fr;
    }

    .strava-card {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
    }

    .strava-card img {
        margin-bottom: 0;
    }
}

@media (max-width: 500px) {
    .site-header,
    main {
        width: min(362px, calc(100% - 28px));
        margin-left: 14px;
        margin-right: auto;
    }
}
