/* This site's own styles. The design system lives in keel.css, which is
   vendored from AdamCoulterOz/keel and must not be edited here. Reference
   keel's semantic tokens rather than restating their values. */

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface-base);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--surface-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.25s var(--ease-out);
}

a {
    color: var(--accent);
}

::selection {
    background: rgba(11, 95, 255, 0.16);
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--surface-overlay);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-nav__inner,
main,
.site-footer__inner {
    width: min(100%, 1200px);
    margin-inline: auto;
    padding-inline: 32px;
}

.site-nav__inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.site-brand {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.site-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1.3px solid var(--accent);
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.contact-links {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

.contact-link:hover {
    color: var(--text-primary);
}

.contact-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

main {
    padding-block: 80px 96px;
}

.intro {
    margin-bottom: 56px;
}

h1 {
    max-width: 14ch;
    margin: 0;
    font-size: clamp(40px, 5.6vw, 66px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.intro p {
    max-width: 40ch;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1.5;
}

.project-index {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    background: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.project-row {
    min-height: 142px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--surface-card);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out);
}

.project-row:hover {
    background: var(--surface-subtle);
}

.project-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.project-copy {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.project-copy strong {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.project-copy > span {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.project-arrow {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 50%;
    background: var(--accent-subtle);
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.project-row:hover .project-arrow {
    background: var(--surface-sunken);
    transform: translateX(2px);
}

.site-brand:focus-visible,
.contact-link:focus-visible,
.project-row:focus-visible {
    outline: none;
    border-radius: 10px;
    box-shadow: var(--ring);
}

.site-footer {
    padding-block: 48px;
    background: var(--surface-midnight);
    color: rgba(255, 255, 255, 0.6);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.privacy-disclosure {
    width: min(100%, 1200px);
    margin: 22px auto 0;
    padding-inline: 32px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.5;
}

.footer-brand {
    color: #ffffff;
    font-size: 17px;
}

.site-mark--footer {
    width: 34px;
    height: 34px;
    border-color: #7aa2ff;
    background: rgba(122, 162, 255, 0.12);
    color: #7aa2ff;
}

@media (max-width: 620px) {
    .site-nav__inner,
    main,
    .site-footer__inner,
    .privacy-disclosure {
        padding-inline: 20px;
    }

    .contact-links {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .site-nav__inner {
        gap: 12px;
        padding-inline: 16px;
    }

    .site-brand > span:last-child,
    .contact-link > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .contact-links {
        gap: 4px;
    }

    .contact-link {
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

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

@media (max-width: 680px) {
    .site-nav__inner,
    main,
    .site-footer__inner,
    .privacy-disclosure {
        padding-inline: 10px;
    }

    .site-brand {
        font-size: 17px;
    }

    .site-mark {
        width: 34px;
        height: 34px;
    }

    .github-link span {
        display: none;
    }

    main {
        padding-block: 48px 64px;
    }

    .intro {
        margin-bottom: 40px;
    }

    h1 {
        font-size: clamp(40px, 13vw, 52px);
    }

    .intro p {
        margin-top: 20px;
        font-size: 18px;
    }

    .project-index {
        border-radius: 14px;
    }

    .project-row {
        min-height: 124px;
        grid-template-columns: 42px minmax(0, 1fr) 36px;
        gap: 12px;
        padding: 18px 14px;
    }

    .project-number {
        width: 38px;
        height: 38px;
        font-size: 11px;
    }

    .project-copy strong {
        font-size: clamp(24px, 7.2vw, 29px);
    }

    .project-copy > span {
        font-size: 15px;
    }

    .project-arrow {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    .site-footer {
        padding-block: 40px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }
}
