:root {
    --paper: #fcfbf7;
    --ink: #0f172a;
    --muted: #475569;
    --line: #cbd5e1;
    --dot: #cbd5e1;
    --blue: #2563eb;
    --highlight: #fef08a;
    --nav: rgba(252, 251, 247, 0.95);
}

.dark-mode {
    --paper: #111111;
    --ink: #f8fafc;
    --muted: #94a3b8;
    --line: #404040;
    --dot: #333333;
    --blue: #60a5fa;
    --highlight: #facc15;
    --nav: rgba(17, 17, 17, 0.95);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--paper);
    background-image: radial-gradient(var(--dot) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    color: var(--ink);
    font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: background-color .3s ease, color .3s ease;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 100;
    background: var(--ink);
    color: var(--paper);
    padding: .75rem 1rem;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: var(--nav);
    backdrop-filter: blur(8px);
}

.nav-wrap,
.main,
.footer-wrap {
    width: min(100% - 2rem, 1024px);
    margin-inline: auto;
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.04em;
    text-decoration: none;
}

.nav-actions,
.nav-links {
    display: flex;
    align-items: center;
}

.nav-actions {
    gap: 1rem;
}

.nav-links {
    gap: 1.6rem;
}

.nav-links a {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--blue);
}

.theme-toggle,
.menu-toggle {
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
}

.theme-toggle {
    font-size: 1rem;
    padding: .5rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
}

.main {
    padding-block: 5.5rem 7rem;
}

.eyebrow,
.mono {
    font-family: "Courier Prime", monospace;
}

.eyebrow {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-weight: 900;
    letter-spacing: -.035em;
}

h1 {
    max-width: 850px;
    margin-bottom: 1.5rem;
    font-size: clamp(3.5rem, 9vw, 7rem);
    line-height: .92;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.25rem);
}

h3 {
    font-size: 1.55rem;
}

.lede {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    line-height: 1.55;
}

.highlight {
    position: relative;
    display: inline;
    z-index: 0;
}

.highlight::before {
    position: absolute;
    right: -.15em;
    bottom: .08em;
    left: -.15em;
    z-index: -1;
    height: .25em;
    border-radius: 2px;
    background: var(--highlight);
    content: "";
    transform: rotate(-1deg);
}

.section {
    margin-top: 6rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--ink);
}

.section-heading h2 {
    margin-bottom: .8rem;
}

.section-heading span {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .8rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

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

.card {
    display: flex;
    min-height: 280px;
    flex-direction: column;
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 1.75rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
    box-shadow: -4px 4px 0 var(--ink);
    transform: translateY(-2px);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-family: "Courier Prime", monospace;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.card p,
.prose p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.card-link,
.text-link {
    color: var(--blue);
    font-weight: 800;
    text-underline-offset: .22em;
}

.card-link {
    margin-top: auto;
    padding-top: 1.2rem;
}

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

.list-item {
    display: grid;
    grid-template-columns: 8rem 1fr 1.6fr auto;
    gap: 1rem;
    align-items: baseline;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.list-item strong {
    font-size: 1.1rem;
}

.list-item span {
    color: var(--muted);
}

.prose {
    max-width: 760px;
}

.prose h2 {
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.contact-panel {
    margin-top: 4rem;
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: clamp(1.5rem, 5vw, 3.5rem);
}

.email {
    display: inline-block;
    margin-top: 1rem;
    border-bottom: .3rem solid var(--highlight);
    font-size: clamp(1.35rem, 4vw, 2.25rem);
    font-weight: 900;
    text-decoration: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-block: 2rem;
    color: var(--muted);
    font-family: "Courier Prime", monospace;
    font-size: .78rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    text-underline-offset: .2em;
}

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 76px;
        right: 0;
        left: 0;
        display: none;
        align-items: flex-start;
        flex-direction: column;
        gap: 1.4rem;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
        padding: 1.5rem;
    }

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

    .grid,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .list-item {
        grid-template-columns: 5rem 1fr auto;
    }

    .list-item .description {
        display: none;
    }

    .footer-wrap {
        align-items: flex-start;
        flex-direction: column;
    }
}
