:root {
    --background: #ffffff;

    --text: #1d1d1f;
    --secondary: #6e6e73;
    --tertiary: #86868b;

    --line: #e5e5e7;
    --surface: #f7f7f8;

    --link: #0066cc;

    --content-width: 720px;
}


/* --------------------------------------------------
   Base
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Text",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;

    font-size: 15px;
    line-height: 1.55;
}

.container {
    width: min(
        calc(100% - 48px),
        var(--content-width)
    );

    margin: 0 auto;
    padding: 88px 0 48px;
}


/* --------------------------------------------------
   Links
-------------------------------------------------- */

a {
    color: var(--link);
    text-decoration: none;

    transition: opacity 120ms ease;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* --------------------------------------------------
   Intro
-------------------------------------------------- */

.intro {
    margin-bottom: 78px;
}

h1 {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 650;

    letter-spacing: -0.03em;
}

h1::after {
    content: "";

    display: block;

    width: 32px;
    height: 2px;

    margin: 15px 0 19px;

    background: var(--text);

    border-radius: 999px;
}

.intro-text {
    margin: 0 0 18px;

    font-size: 17px;
    line-height: 1.5;

    letter-spacing: -0.01em;
}

.location {
    margin: 0 0 7px;

    color: var(--secondary);
}

.links {
    display: flex;
    flex-wrap: wrap;

    gap: 6px 16px;
}


/* --------------------------------------------------
   Sections
-------------------------------------------------- */

section {
    margin-bottom: 70px;
}

.section-heading {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 10px;

    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin: 0;

    font-size: 14px;
    line-height: 1.3;

    font-weight: 650;

    letter-spacing: -0.01em;
}

.section-heading > span {
    color: var(--tertiary);

    font-size: 12px;
}


/* --------------------------------------------------
   Apps
-------------------------------------------------- */

.item {
    position: relative;

    padding: 22px 14px;
    margin: 0 -14px;

    border-bottom: 1px solid var(--line);
    border-radius: 10px;

    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

.item:hover {
    background: var(--surface);

    transform: translateY(-1px);
}

.item-heading {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    gap: 20px;
}

h3 {
    margin: 0;

    font-size: 15px;
    line-height: 1.4;

    font-weight: 600;

    letter-spacing: -0.01em;
}

.item p {
    max-width: 520px;

    margin: 6px 0 12px;

    color: var(--secondary);
}

.year {
    flex-shrink: 0;

    color: var(--tertiary);

    font-size: 12px;

    font-variant-numeric: tabular-nums;
}


/* --------------------------------------------------
   Status
-------------------------------------------------- */

.status {
    flex-shrink: 0;

    padding: 2px 8px;

    border: 1px solid var(--line);
    border-radius: 999px;

    color: var(--secondary);

    background: var(--background);

    font-size: 11px;
    line-height: 1.6;

    white-space: nowrap;
}

.status.subtle {
    color: var(--tertiary);
}


/* --------------------------------------------------
   App metadata
-------------------------------------------------- */

.meta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color: var(--tertiary);

    font-size: 13px;
}


/* --------------------------------------------------
   Selected Work
-------------------------------------------------- */

.work-row {
    display: grid;

    grid-template-columns: 110px 1fr;

    gap: 20px;

    padding: 20px 0;

    border-bottom: 1px solid var(--line);
}

.work-year {
    color: var(--tertiary);

    font-size: 13px;

    font-variant-numeric: tabular-nums;
}

.work-row p {
    margin: 4px 0 0;

    color: var(--secondary);
}


/* --------------------------------------------------
   Elsewhere
-------------------------------------------------- */

.elsewhere {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px 24px;

    padding-top: 18px;
}


/* --------------------------------------------------
   Footer
-------------------------------------------------- */

footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding-top: 24px;

    border-top: 1px solid var(--line);

    color: var(--tertiary);

    font-size: 12px;
}

footer nav {
    display: flex;

    gap: 14px;
}


/* --------------------------------------------------
   Mobile
-------------------------------------------------- */

@media (max-width: 600px) {

    .container {
        width: min(
            calc(100% - 36px),
            var(--content-width)
        );

        padding-top: 52px;
    }

    .intro {
        margin-bottom: 58px;
    }

    section {
        margin-bottom: 54px;
    }

    .item {
        padding-left: 8px;
        padding-right: 8px;

        margin-left: -8px;
        margin-right: -8px;
    }

    .work-row {
        grid-template-columns: 1fr;

        gap: 4px;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;

        gap: 8px;
    }
}


/* --------------------------------------------------
   Dark Mode
-------------------------------------------------- */

@media (prefers-color-scheme: dark) {

    :root {
        --background: #111111;

        --text: #f5f5f7;
        --secondary: #a1a1a6;
        --tertiary: #86868b;

        --line: #2c2c2e;
        --surface: #1a1a1c;

        --link: #2997ff;
    }

}