/* =========================================
   FAK PORTFOLIO
   GitHub-inspired visual system
========================================= */


/* =========================================
   DESIGN TOKENS
========================================= */

:root {

    /* Dark theme is the default */

    --bg: #0d1117;
    --surface: #161b22;
    --surface-raised: #21262d;

    --text: #f0f6fc;
    --text-muted: #8b949e;

    --border: #30363d;
    --border-strong: #484f58;

    --accent: #3fb950;
    --accent-hover: #56d364;

    --accent-soft: rgba(63, 185, 80, 0.12);

    --shadow:
        0 8px 24px rgba(0, 0, 0, 0.35);

    --max-width: 1180px;

    --radius: 6px;
}

/* =========================================
   DARK THEME
========================================= */

:root[data-theme="dark"] {

    --bg: #0d1117;
    --surface: #161b22;
    --surface-raised: #21262d;

    --text: #f0f6fc;
    --text-muted: #8b949e;

    --border: #30363d;
    --border-strong: #484f58;

    --accent: #3fb950;
    --accent-hover: #56d364;

    --accent-soft: rgba(63, 185, 80, 0.12);

    --shadow:
        0 8px 24px rgba(0, 0, 0, 0.35);
}


/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

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

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


a {
    color: inherit;
}


button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================
   LAYOUT
========================================= */

.container {
    width: min(
        calc(100% - 3rem),
        var(--max-width)
    );

    margin-inline: auto;
}


.section {
    padding-top: 7rem;
    padding-bottom: 7rem;
}


.section-alt {
    background: var(--surface);
}


/* =========================================
   HEADER
========================================= */

.site-header {
    position: sticky;
    top: 0;

    z-index: 100;

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

    background:
        color-mix(
            in srgb,
            var(--bg) 92%,
            transparent
        );

    backdrop-filter: blur(12px);
}


.nav {
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.brand {
    color: var(--text);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 1.05rem;
    font-weight: 700;

    text-decoration: none;

    letter-spacing: -0.03em;
}


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


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

    gap: 1.75rem;
}


.nav-links a {
    color: var(--text-muted);

    font-size: 0.85rem;

    text-decoration: none;

    transition:
        color 0.15s ease;
}


.nav-links a:hover {
    color: var(--text);
}


/* =========================================
   THEME TOGGLE
========================================= */

.theme-toggle {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

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

    border-radius: var(--radius);

    background: var(--surface);

    color: var(--text);

    cursor: pointer;

    font-size: 1rem;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}


.theme-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-raised);
}


/* =========================================
   HERO
========================================= */

.hero {
    min-height: calc(100vh - 64px);

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding-top: 6rem;
    padding-bottom: 7rem;
}


.eyebrow {
    margin: 0 0 1.25rem;

    color: var(--accent);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.72rem;

    font-weight: 600;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.hero h1 {
    max-width: 900px;

    margin: 0;

    font-size:
        clamp(
            4rem,
            11vw,
            8rem
        );

    font-weight: 700;

    line-height: 0.95;

    letter-spacing: -0.07em;
}


.hero h1 span {
    color: var(--accent);
}


.hero-description {
    max-width: 680px;

    margin: 2rem 0 0;

    color: var(--text-muted);

    font-size:
        clamp(
            1.05rem,
            2vw,
            1.3rem
        );

    line-height: 1.7;
}


.hero-actions {
    display: flex;

    gap: 0.75rem;

    margin-top: 2rem;
}


/* =========================================
   BUTTONS
========================================= */

.button {
    display: inline-flex;

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

    min-height: 40px;

    padding:
        0.55rem
        1rem;

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

    border-radius: var(--radius);

    font-size: 0.85rem;

    font-weight: 600;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}


.button:hover {
    transform: translateY(-1px);
}


.button.primary {
    border-color: var(--accent);

    background: var(--accent);

    color: #ffffff;
}


.button.primary:hover {
    background: var(--accent-hover);
}


.button.secondary {
    background: var(--surface);

    color: var(--text);
}


.button.secondary:hover {
    border-color: var(--border-strong);

    background: var(--surface-raised);
}


/* =========================================
   SECTION HEADINGS
========================================= */

.section-heading {
    margin-bottom: 3rem;
}


.section-heading h2 {
    max-width: 800px;

    margin: 0;

    font-size:
        clamp(
            2rem,
            5vw,
            3.5rem
        );

    font-weight: 650;

    line-height: 1.1;

    letter-spacing: -0.045em;
}


.section-description {
    max-width: 720px;

    margin-top: 1.25rem;

    color: var(--text-muted);

    font-size: 1rem;

    line-height: 1.8;
}


/* =========================================
   FEATURED PROJECTS
========================================= */

.projects-grid {
    display: grid;

    gap: 1rem;
}


.featured-project {
    display: grid;

    grid-template-columns:
        80px
        1fr;

    overflow: hidden;

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

    border-radius: var(--radius);

    background: var(--surface);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.featured-project:hover {
    border-color: var(--border-strong);

    transform: translateY(-2px);

    box-shadow: var(--shadow);
}


.project-number {
    display: flex;

    align-items: flex-start;
    justify-content: center;

    padding-top: 2rem;

    border-right: 1px solid var(--border);

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.8rem;
}


.project-content {
    padding: 2rem;
}


.project-type {
    margin: 0 0 0.75rem;

    color: var(--accent);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.7rem;

    font-weight: 600;

    letter-spacing: 0.08em;
}


.project-content h3 {
    margin: 0 0 0.75rem;

    font-size: 1.6rem;

    font-weight: 650;

    letter-spacing: -0.025em;
}


.project-content > p:not(.project-type) {
    max-width: 750px;

    margin: 0;

    color: var(--text-muted);

    line-height: 1.75;
}


/* =========================================
   TAGS
========================================= */

.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    margin-top: 1.5rem;
}


.tags span {
    padding:
        0.25rem
        0.55rem;

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

    border-radius: 999px;

    background: var(--accent-soft);

    color: var(--text);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.7rem;
}


/* =========================================
   PROJECT STATS
========================================= */

.project-stats {
    display: flex;

    flex-wrap: wrap;

    gap: 0.75rem 1.25rem;

    margin-top: 1.5rem;

    padding-top: 1rem;

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

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.72rem;
}


/* =========================================
   PROJECT LINK
========================================= */

.project-link {
    display: inline-flex;

    margin-top: 1.5rem;

    color: var(--accent);

    font-size: 0.85rem;

    font-weight: 600;

    text-decoration: none;
}


.project-link:hover {
    color: var(--accent-hover);

    text-decoration: underline;
}


/* =========================================
   GITHUB IMPACT
========================================= */

.github-section {
    border-top: 1px solid var(--border);
}


.github-stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    overflow: hidden;

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

    border-radius: var(--radius);

    background: var(--surface);
}


.github-stat {
    padding:
        2.5rem
        1.5rem;

    text-align: center;

    border-right:
        1px solid
        var(--border);
}


.github-stat:last-child {
    border-right: none;
}


.github-stat strong {
    display: block;

    margin-bottom: 0.6rem;

    color: var(--text);

    font-size:
        clamp(
            2.5rem,
            5vw,
            4rem
        );

    font-weight: 700;

    line-height: 1;

    letter-spacing: -0.06em;
}


.github-stat span {
    display: block;

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.7rem;

    font-weight: 600;

    letter-spacing: 0.1em;

    text-transform: uppercase;
}


.github-profile-link {
    margin-top: 1.5rem;
}


/* =========================================
   TECHNICAL WORK
========================================= */

.technology-grid {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

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

    border-left: 1px solid var(--border);
}


.technology {
    min-height: 110px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 1.5rem;

    border-right: 1px solid var(--border);

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

    color: var(--text);

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


.technology span:first-child {
    font-weight: 600;
}


.technology span:last-child {
    color: var(--text-muted);
}


.technology:hover {
    background: var(--accent-soft);

    color: var(--accent);
}


/* =========================================
   RESEARCH
========================================= */

.research-grid {
    display: grid;

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

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

    border-left: 1px solid var(--border);
}


.research-card {
    min-height: 290px;

    display: flex;

    flex-direction: column;

    padding: 2rem;

    border-right: 1px solid var(--border);

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

    transition:
        background-color 0.2s ease;
}


.research-card:hover {
    background: var(--surface);
}


.research-number {
    margin-bottom: 3rem;

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.75rem;
}


.research-card h3 {
    margin: 0 0 0.75rem;

    font-size: 1.35rem;

    font-weight: 650;

    letter-spacing: -0.02em;
}


.research-card p {
    max-width: 600px;

    margin: 0;

    color: var(--text-muted);

    line-height: 1.75;
}


.research-card .tags {
    margin-top: auto;
}


/* =========================================
   WRITING
========================================= */

#writing {
    border-top: 1px solid var(--border);
}


/* =========================================
   ABOUT
========================================= */

.about-grid {
    display: grid;

    grid-template-columns:
        1.5fr
        1fr;

    gap: 5rem;
}


.about-lead {
    max-width: 700px;

    margin: 0;

    font-size:
        clamp(
            1.5rem,
            3vw,
            2.2rem
        );

    line-height: 1.45;

    letter-spacing: -0.025em;
}


.about-details {
    color: var(--text-muted);

    font-size: 0.9rem;

    line-height: 1.7;
}


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


.social-links {
    display: flex;

    flex-wrap: wrap;

    gap: 1rem;

    margin-top: 2rem;
}


.social-links a {
    color: var(--accent);

    font-size: 0.85rem;

    font-weight: 600;

    text-decoration: none;
}


.social-links a:hover {
    text-decoration: underline;
}


/* =========================================
   FOOTER
========================================= */

.footer {
    border-top: 1px solid var(--border);

    background: var(--surface);
}


.footer-content {
    min-height: 80px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.72rem;
}


.footer a {
    color: var(--accent);

    text-decoration: none;
}


.footer a:hover {
    text-decoration: underline;
}


/* =========================================
   SELECTION
========================================= */

::selection {
    background: var(--accent);
    color: #ffffff;
}


/* =========================================
   RESPONSIVE — TABLET
========================================= */

@media (max-width: 900px) {

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

    .about-grid {
        grid-template-columns: 1fr;

        gap: 3rem;
    }

}


/* =========================================
   RESPONSIVE — MOBILE
========================================= */

@media (max-width: 700px) {

    .container {
        width: min(
            calc(100% - 2rem),
            var(--max-width)
        );
    }


    .section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }


    .nav-links {
        display: none;
    }


    .hero {
        min-height: auto;

        padding-top: 6rem;
        padding-bottom: 6rem;
    }


    .hero h1 {
        font-size:
            clamp(
                3.5rem,
                17vw,
                6rem
            );
    }


    .hero-actions {
        flex-wrap: wrap;
    }


    .featured-project {
        grid-template-columns: 1fr;
    }


    .project-number {
        justify-content: flex-start;

        padding:
            1.25rem
            1.5rem;

        border-right: none;

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


    .project-content {
        padding: 1.5rem;
    }


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


    .github-stat:nth-child(2) {
        border-right: none;
    }


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


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


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

}


/* =========================================
   RESPONSIVE — SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .github-stats {
        grid-template-columns: 1fr;
    }


    .github-stat {
        border-right: none;

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


    .github-stat:last-child {
        border-bottom: none;
    }


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


    .footer-content {
        flex-direction: column;

        justify-content: center;

        gap: 0.5rem;

        padding:
            1.5rem 0;
    }

}

/* =========================================
   TECHNICAL WORK
========================================= */

.technical-section {
    border-top: 1px solid var(--border);
}

.section-intro {
    max-width: 680px;
    margin-top: 14px;
    color: var(--text-muted);
    line-height: 1.75;
}


.technical-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 48px;
}


.technical-card {
    position: relative;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.technical-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}


.technical-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}


.technical-index {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}


.technical-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    height: 28px;
    padding: 0 8px;

    border: 1px solid var(--border);
    border-radius: 4px;

    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent);

    background: var(--accent-soft);
}


.technical-card h3 {
    margin-bottom: 12px;

    font-size: 1.15rem;
    line-height: 1.35;
}


.technical-card p {
    min-height: 108px;

    margin: 0;

    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}


.technical-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 24px;
}


.technical-tags span {
    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 4px;

    background: var(--surface-raised);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.68rem;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 960px) {

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

}


@media (max-width: 640px) {

    .technical-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 36px;
    }

    .technical-card {
        padding: 24px;
    }

    .technical-card p {
        min-height: auto;
    }

}

/* =========================================
   RESEARCH
========================================= */

.research-section {
    border-top: 1px solid var(--border);
}

.research-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.research-card {
    position: relative;
    padding: 28px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.research-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.research-number {
    display: block;

    margin-bottom: 32px;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
}

.research-card h3 {
    margin-bottom: 12px;

    font-size: 1.1rem;
    line-height: 1.4;
}

.research-card p {
    min-height: 105px;

    margin: 0;

    color: var(--text-muted);

    font-size: 0.9rem;
    line-height: 1.7;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 24px;
}

.research-tags span {
    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 4px;

    background: var(--surface-raised);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.66rem;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 960px) {

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

}

@media (max-width: 640px) {

    .research-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 36px;
    }

    .research-card {
        padding: 24px;
    }

    .research-card p {
        min-height: auto;
    }

}

/* =========================================
   ABOUT
========================================= */

.about-section {
    border-top: 1px solid var(--border);
}

.about-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(280px, 0.7fr);

    gap: 100px;
    align-items: start;
}


.about-main h2 {
    max-width: 720px;

    margin-top: 18px;
    margin-bottom: 28px;

    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}


.about-lead {
    max-width: 720px;

    margin-bottom: 24px;

    color: var(--text);

    font-size: 1.08rem;
    line-height: 1.8;
}


.about-main > p:not(.eyebrow) {
    max-width: 680px;

    color: var(--text-muted);

    line-height: 1.8;
}


.about-main > p + p {
    margin-top: 18px;
}


/* =========================================
   ABOUT SIDEBAR
========================================= */

.about-aside {
    border-top: 1px solid var(--border);
}


.about-block {
    padding: 24px 0;

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


.about-label {
    display: block;

    margin-bottom: 16px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}


.about-block ul {
    display: flex;
    flex-direction: column;
    gap: 11px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.about-block li {
    position: relative;

    padding-left: 16px;

    color: var(--text);
    font-size: 0.88rem;
}


.about-block li::before {
    content: "→";

    position: absolute;
    left: 0;

    color: var(--accent);

    font-family: var(--mono);
}


.about-links {
    display: flex;
    flex-direction: column;
    gap: 11px;
}


.about-links a {
    width: fit-content;

    color: var(--text);

    font-family: var(--mono);
    font-size: 0.82rem;

    transition:
        color 0.2s ease;
}


.about-links a:hover {
    color: var(--accent);
}


.about-status p {
    margin: 0;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 0.78rem;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 800px) {

    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

}


@media (max-width: 640px) {

    .about-main h2 {
        font-size: 2rem;
    }

    .about-lead {
        font-size: 1rem;
    }

}

/* =========================================
   WRITING
========================================= */

.writing-section {
    border-top: 1px solid var(--border);
}

.writing-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(260px, 0.6fr);

    gap: 100px;
    align-items: center;
}

.writing-main h2 {
    max-width: 650px;

    margin-top: 18px;
    margin-bottom: 24px;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.writing-main > p:not(.eyebrow) {
    max-width: 620px;

    margin-bottom: 30px;

    color: var(--text-muted);

    line-height: 1.8;
}

.writing-aside {
    border-top: 1px solid var(--border);
}

.writing-item {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 18px 0;

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

.writing-item span {
    color: var(--accent);

    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
}

.writing-item p {
    margin: 0;

    color: var(--text);

    font-size: 0.88rem;
}

@media (max-width: 800px) {

    .writing-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

}

/* =========================================
   FOOTER
========================================= */

.site-footer {
    margin-top: 40px;

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

    background: var(--surface);
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 34px 0;

    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.footer-brand strong {
    color: var(--text);

    font-family: var(--mono);
    font-size: 1rem;
}

.footer-brand span {
    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.68rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.72rem;

    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;

    padding: 18px 0;

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

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 0.64rem;
}

@media (max-width: 640px) {

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

    .footer-brand {
        flex-direction: column;
        gap: 6px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

}

/* =========================================
   GLOBAL UX
========================================= */

html {
    scroll-behavior: smooth;
}

:target {
    scroll-margin-top: 90px;
}

::selection {
    background: var(--accent);
    color: #0d1117;
}

/* =========================================
   ACCESSIBILITY
========================================= */

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

a:focus-visible,
button:focus-visible {
    border-radius: 4px;
}

@media (max-width: 640px) {

    .site-nav {
        gap: 12px;
    }

    .site-nav a {
        font-size: 0.68rem;
    }

}

/* =========================================
   PAGE LOAD
========================================= */

@media (prefers-reduced-motion: no-preference) {

    .hero,
    .section-heading,
    .featured-project,
    .technical-card,
    .research-card {
        animation: fade-up 0.55s ease both;
    }

    .featured-project:nth-child(2),
    .technical-card:nth-child(2),
    .research-card:nth-child(2) {
        animation-delay: 0.05s;
    }

    .technical-card:nth-child(3),
    .research-card:nth-child(3) {
        animation-delay: 0.1s;
    }

    @keyframes fade-up {

        from {
            opacity: 0;
            transform: translateY(8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }

    }

}