:root {
    color-scheme: dark;
    --bg: #0e1218;
    --panel: #151b23;
    --text: #e4e9ec;
    --muted: #8b97a3;
    --line: #232c36;
    --accent: #6cc4b6;
    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
main,
.site-footer {
    width: min(var(--max), calc(100% - 48px));
    margin: auto;
}

.site-header {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .12em;
}

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

nav {
    display: flex;
    gap: 32px;
    color: var(--muted);
    font-size: .88rem;
}

nav a:hover,
.text-link:hover,
.link-list a:hover {
    color: var(--accent);
}

.hero {
    min-height: 550px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 48px;
    padding: 75px 0 90px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .18em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.04;
    letter-spacing: -.055em;
}

.intro {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 13px 18px;
    border-radius: 4px;
    background: var(--accent);
    color: #071411;
    font-size: .88rem;
    font-weight: 700;
}

.text-link {
    font-size: .88rem;
}

/* Projects */

.section {
    padding: 55px 0 105px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.045em;
    line-height: 1.1;
}

.section-note {
    max-width: 390px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .92rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-card {
    display: block;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 7px;
    transition: transform .2s, border-color .2s;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: #4b7778;
}

.project-image {
    height: 190px;
    position: relative;
    overflow: hidden;
    background: #132630;
}

.project-image > span {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 16px;
    padding: 5px 8px;
    border: 1px solid #557b7b;
    color: #b5e7df;
    background: #0b1a20b0;
    font-size: .58rem;
    letter-spacing: .12em;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Array graphic */

.elements {
    position: absolute;
    left: 15%;
    right: 15%;
    top: 48%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.elements i {
    width: 9px;
    height: 55px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 12px #58d6c366;
}

.elements i:nth-child(2n) {
    height: 37px;
}

/* Project card text */

.card-body {
    padding: 23px 22px 24px;
}

.meta {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.card-body h3 {
    margin-bottom: 10px;
    font-size: 1.22rem;
    line-height: 1.25;
}

.card-body p:not(.meta) {
    min-height: 72px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: .88rem;
}

.card-body b {
    font-size: .82rem;
}

/* About section */

.about-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 65px 0 15px;
}

.about-top {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: start;
}

.about-heading h2 {
    margin: 0;
    max-width: 500px;
}

.education {
    padding-top: 4px;
}

.education p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
}

.education .eyebrow {
    margin-bottom: 18px;
    color: var(--accent);
    font-size: .75rem;
    letter-spacing: .12em;
    font-weight: 700;
}

.education strong {
    display: inline-block;
    width: 38px;
    color: var(--text);
    font-weight: 700;
}

.about-description {
    width: 100%;
}

.about-description p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.about-description p:last-child {
    margin-bottom: 0;
}

/* Links section */

.links-section {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 30px;
    padding: 65px 0 75px;
}

.link-list {
    display: flex;
    gap: clamp(20px, 4vw, 55px);
    flex-wrap: wrap;
}

.link-list a {
    font-size: .92rem;
    font-weight: 650;
}

/* Footer */

.site-footer {
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: #778892;
    font-size: .75rem;
}

/* Article pages */

.page-hero {
    padding: 90px 0 55px;
    max-width: 800px;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.3rem);
}

.article {
    max-width: 780px;
    padding: 0 0 100px;
}

.article h2 {
    margin: 42px 0 16px;
    font-size: 1.7rem;
}

.article p,
.article li {
    color: var(--muted);
}

.article code {
    color: var(--accent);
    background: var(--panel);
    padding: 2px 5px;
    border-radius: 3px;
}

.callout {
    padding: 18px 20px;
    border-left: 2px solid var(--accent);
    background: var(--panel);
    color: var(--muted);
}

.back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: var(--accent);
    font-size: .85rem;
}

/* Tablet and mobile */

@media (max-width: 760px) {
    .site-header,
    main,
    .site-footer {
        width: calc(100% - 36px);
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 65px 0;
        gap: 50px;
    }

    .section-heading {
        display: block;
    }

    .section-note {
        margin-top: 16px;
    }

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

    .project-image {
        height: 210px;
    }

    .card-body p:not(.meta) {
        min-height: 0;
    }

    .about-section {
        gap: 24px;
        padding: 45px 0 65px;
    }

    .about-top {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .links-section {
        display: block;
    }

    .link-list {
        margin-top: 24px;
    }
}

@media (max-width: 430px) {
    nav {
        gap: 15px;
        font-size: .8rem;
    }

    .wordmark {
        font-size: .78rem;
    }

    .site-header {
        height: 70px;
    }

    .site-footer {
        align-items: start;
        justify-content: center;
        flex-direction: column;
        gap: 3px;
        padding: 18px 0;
    }
}