:root {
    /* Colors */
    --color-page: #1e2127;
    --color-nav: #0f1419;
    --color-panel: #243244;
    --color-section: #34526d;
    --color-accent: #4f7da7;
    --color-text: #f5f7fb;
    --color-text-muted: #c8d2de;
    --color-line: rgba(245, 247, 251, 0.76);
    --color-divider: rgba(245, 247, 251, 0.42);
    --color-button-border: rgba(245, 247, 251, 0.7);
    --color-button-hover: rgba(245, 247, 251, 0.1);
    --color-card-shadow: rgba(6, 12, 22, 0.4);
    --color-image-frame: rgba(245, 247, 251, 0.16);
    --color-footer: #404047;

    /* Sizing */
    --section-padding-x: clamp(1.125rem, 5.75vw, 5.25rem);
    --layout-inline-padding: max(
        var(--section-padding-x),
        calc((100% - var(--page-max-width)) / 2 + var(--section-padding-x))
    );
    --content-block-spacing: 2.5rem;
    --title-size: clamp(2.25rem, 3vw + 1rem, 4rem);
    --site-name-size: clamp(1.85rem, 1.1vw + 1.2rem, 2.5rem);
    --nav-link-size: clamp(1rem, 0.8vw + 0.65rem, 2rem);
    --hero-title-size: clamp(3rem, 4.25vw + 1rem, 6rem);
    --hero-list-size: clamp(1.125rem, 1.2vw + 0.75rem, 2rem);
    --body-lg-size: clamp(1.1rem, 1.5vw + 0.7rem, 2rem);
    --card-title-size: clamp(1.75rem, 1.25vw + 1.1rem, 2.5rem);
    --card-subtitle-size: clamp(0.9rem, 0.45vw + 0.8rem, 1.25rem);
    --body-md-size: clamp(1rem, 0.55vw + 0.85rem, 1.3rem);
    --education-title-size: clamp(2rem, 1.5vw + 1.2rem, 3rem);
    --education-line-size: clamp(1rem, 1vw + 0.75rem, 2.25rem);
    --education-courses-size: clamp(0.95rem, 0.6vw + 0.8rem, 2rem);
    --experience-title-size: clamp(1.8rem, 1.2vw + 1.15rem, 2.6rem);
    --experience-role-size: clamp(1rem, 0.8vw + 0.8rem, 1.5rem);
    --experience-list-size: clamp(1rem, 0.5vw + 0.85rem, 1.25rem);

    /* Misc. */
    --section-radius: 8px;
    --section-shadow: 0 10px 24px rgba(6, 12, 22, 0.16);
    --transition-fast: 0.2s ease;
    --interactive-opacity: 0.75;
    --font-family-base: "Inter", sans-serif;
    --page-max-width: 1440px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--color-page);
    color: var(--color-text);
    font-family: var(--font-family-base), serif;
}

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

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

p,
h1,
h2,
h3,
ul {
    margin: 0;
}

.page {
    background: var(--color-page);
}

.site-header {
    position: static;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    min-height: 6.4375rem;
    padding-block: 1.25rem;
    padding-inline: var(--layout-inline-padding);
    background: var(--color-nav);
}

.site-header__brand {
    flex: 0 0 auto;
}

.site-header__name {
    font-size: var(--site-name-size);
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.site-header__divider {
    width: 1px;
    min-height: 3.75rem;
    background: var(--color-divider);
}

.site-nav {
    flex: 1 1 auto;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.875rem;
    align-items: center;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    font-size: var(--nav-link-size);
    font-weight: 400;
    line-height: 1.25;
    transition: opacity var(--transition-fast);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    opacity: var(--interactive-opacity);
}

.site-header__social {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 1rem;
}

.site-header__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.35rem;
    transition: opacity var(--transition-fast);
}

.site-header__social-link:hover,
.site-header__social-link:focus-visible {
    opacity: var(--interactive-opacity);
}

.page__content {
    width: min(100%, var(--page-max-width));
    margin: 0 auto;
}

.hero {
    --hero-column-gap: clamp(2rem, 3vw, 3rem);
    --hero-media-width: clamp(16rem, 32vw, 32rem);
    display: grid;
    grid-template-columns: minmax(16rem, 32rem) minmax(20rem, 1fr);
    gap: var(--hero-column-gap);
    align-items: start;
    padding: 2.5625rem var(--section-padding-x) 4rem;
}

.hero__media {
    position: relative;
    z-index: 1;
}

.hero__image {
    width: 100%;
    max-width: 32.875rem;
    aspect-ratio: 526 / 539;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(6, 12, 22, 0.28);
}

.hero__content {
    padding-top: 1.75rem;
}

.hero__title {
    font-size: var(--hero-title-size);
    font-weight: 300;
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero__title strong {
    font-weight: 300;
}

.hero__title-line {
    width: min(100%, 41.625rem);
    height: 2px;
    margin-top: 1rem;
    background: var(--color-line);
}

.hero__summary {
    max-width: 45.8125rem;
    margin-top: 2.1875rem;
    padding: 1.125rem 1.875rem 1.5625rem;
    position: relative;
    z-index: 0;
}

.hero__summary::before {
    content: "";
    position: absolute;
    inset: 0;
    left: calc(-1 * (var(--hero-media-width) + var(--hero-column-gap)));
    z-index: -1;
    background: var(--color-accent);
    border-radius: var(--section-radius);
    box-shadow: var(--section-shadow);
}

.hero__list {
    padding: 0;
    list-style: none;
}

.hero__list-item {
    color: var(--color-text-muted);
    font-size: var(--hero-list-size);
    font-weight: 300;
    line-height: 1.3;
}

.content-section {
    background: var(--color-page);
}

.content-section--accent {
    background: var(--color-section);
    border-radius: var(--section-radius);
    box-shadow: var(--section-shadow);
}

.content-section--mid {
    background: var(--color-panel);
    border-radius: var(--section-radius);
    box-shadow: var(--section-shadow);
}

.content-section__inner {
    padding: 3.8125rem var(--section-padding-x) 4.5rem;
}

.content-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.content-section__title {
    font-size: var(--title-size);
    font-weight: 300;
    line-height: 1.2;
}

.content-section__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--color-button-border);
    border-radius: 999px;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        opacity var(--transition-fast);
}

.content-section__action:hover,
.content-section__action:focus-visible {
    background: var(--color-button-hover);
}

.content-section__rule {
    width: min(22.625rem, 100%);
    height: 2px;
    margin-top: 1rem;
    background: var(--color-line);
}

.content-section__body--about {
    max-width: 79.875rem;
    padding-top: 3.5rem;
}

.content-section__paragraph {
    font-size: var(--body-lg-size);
    font-weight: 300;
    line-height: 1.38;
}

.content-section__paragraph + .content-section__paragraph {
    margin-top: 2rem;
}

.projects-list {
    display: grid;
    gap: var(--content-block-spacing);
    padding-top: var(--content-block-spacing);
}

.project-card {
    display: grid;
    grid-template-columns: minmax(16rem, 1.5fr) minmax(15rem, 1fr);
    gap: 2rem;
    align-items: start;
}

.project-card__image-wrap {
    overflow: hidden;
    border-radius: 0.25rem;
    box-shadow: 0 0.625rem 1.5rem var(--color-card-shadow);
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__content {
    padding-top: 0.5rem;
}

.project-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.project-card__heading-group {
    max-width: 32rem;
}

.project-card__title {
    font-size: var(--card-title-size);
    font-weight: 700;
    line-height: 1.2;
}

.project-card__subtitle {
    margin-top: 0.35rem;
    color: var(--color-text-muted);
    font-size: var(--card-subtitle-size);
    font-weight: 300;
    line-height: 1.4;
}

.project-card__description {
    margin-top: 1.25rem;
}

.project-card__paragraph {
    font-size: var(--body-md-size);
    font-weight: 300;
    line-height: 1.6;
}

.project-card__paragraph + .project-card__paragraph {
    margin-top: 1rem;
}

.education-card {
    display: grid;
    grid-template-columns: minmax(8rem, 18.875rem) minmax(18rem, 1fr);
    gap: 1.6875rem;
    align-items: start;
    padding-top: var(--content-block-spacing);
}

.education-card__logo-wrap {
    align-self: center;
}

.education-card__logo {
    width: min(100%, 18.875rem);
}

.education-card__title {
    font-size: var(--education-title-size);
    font-weight: 300;
    line-height: 1.2;
}

.education-card__line {
    color: var(--color-text-muted);
    font-size: var(--education-line-size);
    font-weight: 300;
    line-height: 1.4;
}

.education-card__line:nth-of-type(1) {
    margin-top: 0.3125rem;
}

.education-card__courses {
    max-width: 59.1875rem;
    margin-top: 1rem;
    font-size: var(--education-courses-size);
    font-weight: 300;
    line-height: 1.35;
}

.experience-card {
    max-width: 62rem;
    padding-top: var(--content-block-spacing);
}

.experience-card__title {
    font-size: var(--experience-title-size);
    font-weight: 700;
    line-height: 1.25;
}

.experience-card__role {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
    font-size: var(--experience-role-size);
    font-weight: 300;
    line-height: 1.4;
}

.experience-card__date {
    margin-top: 0.375rem;
    color: var(--color-text-muted);
    font-size: var(--body-md-size);
    font-weight: 400;
    line-height: 1.4;
}

.experience-card__list {
    display: grid;
    gap: 0.875rem;
    margin-top: 1.5rem;
    padding-left: 1.25rem;
    font-size: var(--experience-list-size);
    line-height: 1.55;
}

.site-footer {
    width: 100%;
    padding-block: 2.5rem 3.5rem;
    padding-inline: var(--layout-inline-padding);
    background: var(--color-footer);
}

.site-footer__address {
    color: var(--color-text);
    font-size: 1rem;
    font-style: normal;
    line-height: 1.8;
}

.site-footer__link {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

@media (max-width: 1440px) {
    .content-section--accent,
    .content-section--mid {
        border-radius: 0;
    }
}

@media (max-width: 980px) {
    .site-header {
        flex-wrap: wrap;
        align-items: center;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .site-header__brand {
        flex: 1 1 auto;
        width: auto;
        order: 1;
    }

    .site-header__social {
        margin-left: 0;
        order: 2;
    }

    .site-header__divider {
        width: 100%;
        min-height: 1px;
        order: 3;
    }

    .site-nav {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        order: 4;
    }

    .site-nav__list {
        justify-content: flex-start;
    }

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

    .hero__media::before {
        top: auto;
        bottom: 0;
        right: 0;
        left: -100vw;
        width: 220vw;
        height: 35%;
    }

    .hero__content {
        padding-top: 0;
    }

    .hero__summary::before {
        left: 0;
    }

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

    .education-card__logo-wrap {
        max-width: 12rem;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 0;
    }

    .site-header {
        position: static;
    }

    .content-section {
        scroll-margin-top: 0;
    }

    .site-nav__list {
        gap: 0.75rem 1.25rem;
    }

    .hero {
        padding-bottom: 3rem;
    }

    .content-section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__summary {
        padding: 1rem 1.125rem 1.25rem;
    }

    .content-section__inner {
        padding-top: 2.75rem;
        padding-bottom: 3rem;
    }

    .content-section__body--about {
        padding-top: 2rem;
    }

    .project-card {
        gap: 1.25rem;
    }
}
