:root {
    --bg: #0b0d10;
    --surface: #11151a;
    --surface-2: #161b21;
    --border: #232a31;
    --text: #e6e9ec;
    --muted: #8b949e;
    --accent: #3fb950;
    --accent-dim: rgba(63, 185, 80, 0.12);
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --wrap: 1120px;
    --radius: 2px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wrap {
    width: min(var(--wrap), 100% - 3rem);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 0.8rem;
}

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

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 16, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand {
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-accent {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.35rem 0;
    border-bottom: 1px solid transparent;
}

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

.site-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before {
    display: block;
    width: 16px;
    height: 1px;
    margin-inline: auto;
    background: var(--text);
}

.nav-toggle-bar::before {
    content: "";
    transform: translateY(5px);
}

.nav-toggle-bar {
    transform: translateY(-5px);
}

/* Shared type */

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Hero */

.hero {
    padding: 5rem 0 4rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    line-height: 1.02;
}

.lede {
    max-width: 58ch;
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.btn:hover {
    text-decoration: none;
    background: transparent;
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-avatar {
    width: 176px;
    height: 176px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    filter: grayscale(100%) contrast(1.05);
}

/* Metrics */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.metric {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--border);
}

.metric:last-child {
    border-right: 0;
}

.metric-value {
    margin: 0;
    color: var(--text);
    font-family: var(--mono);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.metric-label {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Sections */

.section {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.section-lede {
    max-width: 60ch;
    margin: -0.75rem 0 2rem;
    color: var(--muted);
}

.section-more {
    margin: 1.5rem 0 0;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

/* Cards */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--accent);
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.card .card-link {
    color: var(--accent);
    margin-top: auto;
    padding-top: 0.5rem;
    min-height: calc(2 * 1.65em + 0.5rem);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.card li {
    margin: 0.3rem 0;
}

/* Facts */

.facts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.facts li {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.facts li:first-child {
    border-top: 0;
    padding-top: 0;
}

.fact-label {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.facts p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Timeline */

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.timeline li:first-child {
    border-top: 0;
    padding-top: 0;
}

.timeline .when {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.timeline p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Project list */

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--border);
}

.divider span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-list li {
    flex: 0 0 calc((100% - 2rem) / 3);
}

.project-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.project-list a:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.project-list .tag {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Screenshots */

.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shots figure {
    margin: 0;
}

.shots img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.shots figcaption {
    margin-top: 0.5rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Contact */

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-links a {
    display: inline-block;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.78rem;
}

.contact-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* Prose */

.prose {
    max-width: 72ch;
    padding: 4rem 0;
}

.prose-wide {
    max-width: none;
}

.page-head {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page-summary {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

:where(.prose) > p {
    margin: 1rem 0;
}

:where(.prose) > h2 {
    margin: 2.5rem 0 1rem;
}

:where(.prose) > h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1.15rem;
}

:where(.prose) > ul,
:where(.prose) > ol {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

:where(.prose) > ul > li,
:where(.prose) > ol > li {
    margin: 0.4rem 0;
}

.prose strong {
    color: var(--text);
}

:where(.prose) > blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 1.25rem;
    border-left: 2px solid var(--accent);
    color: var(--muted);
}

.prose code {
    padding: 0.1em 0.35em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.88em;
}

.prose pre {
    padding: 1rem 1.25rem;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.prose pre code {
    padding: 0;
    background: none;
    border: 0;
}

.prose hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.page-back {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.78rem;
}

/* Footer */

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0;
}

.footer-meta {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--mono);
    font-size: 0.75rem;
}

/* Responsive */

@media (min-width: 901px) {
    .hero-avatar {
        transform: scaleX(-1);
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 3.5rem 0 3rem;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-avatar {
        width: 128px;
        height: 128px;
        order: -1;
    }

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

    .metric:nth-child(2) {
        border-right: 0;
    }

    .metric:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .project-list li {
        flex-basis: calc((100% - 1rem) / 2);
    }

}

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

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 0 1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .site-nav a:last-child {
        border-bottom: 0;
    }

    .site-nav a[aria-current="page"] {
        border-bottom-color: var(--border);
    }
}

@media (max-width: 640px) {
    .wrap {
        width: calc(100% - 2rem);
    }

    .timeline li {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .facts li {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }


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

    .project-list li {
        flex-basis: 100%;
    }
}

@media print {
    :root {
        --bg: #ffffff;
        --surface: #ffffff;
        --surface-2: #ffffff;
        --border: #cccccc;
        --text: #000000;
        --muted: #444444;
        --accent: #000000;
    }

    .site-header,
    .site-footer,
    .skip-link,
    .nav-toggle,
    .hero-actions,
    .page-back {
        display: none;
    }

    a {
        text-decoration: underline;
    }

    .shots img {
        filter: grayscale(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
