:root {
    --bg: #08090d;
    --bg-soft: #0e1016;
    --panel: #15171f;
    --panel-2: #1d2029;
    --text: #f6f6f3;
    --muted: #b4bac6;
    --quiet: #777f8d;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --lime: #b7e957;
    --coral: #ec5a3c;
    --cyan: #69c9ff;
    --gold: #f5c542;
    --max: 1160px;
    --radius: 8px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 78px;
}

body {
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 20% 8%, rgba(236, 90, 60, 0.13), transparent 34%),
        radial-gradient(circle at 92% 28%, rgba(105, 201, 255, 0.1), transparent 32%),
        var(--bg);
    background-size: 96px 96px, 96px 96px, auto, auto, auto;
    font-family: var(--font);
    line-height: 1.5;
}

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

a {
    color: inherit;
}

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

.skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 100;
    transform: translateY(-140%);
    border-radius: var(--radius);
    background: var(--lime);
    color: var(--bg);
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: min(100% - 40px, var(--max));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: #14161b;
    color: var(--text);
}

.nav {
    width: min(100% - 40px, var(--max));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 850;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--lime);
    color: var(--bg);
    font-size: 14px;
}

.brand-name {
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 9px 11px;
    color: rgba(246, 246, 243, 0.82);
    font-size: 14px;
    text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
    border-color: var(--line-strong);
    color: var(--text);
    outline: none;
}

.nav-link--contact {
    background: var(--coral);
    color: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 78px;
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--coral), var(--gold), var(--lime), var(--cyan));
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    align-items: center;
    gap: 58px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero h1 {
    max-width: 10ch;
    font-size: 76px;
    line-height: 0.98;
    letter-spacing: 0;
}

.hero-lead {
    color: var(--muted);
    font-size: 30px;
    font-weight: 650;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-facts div {
    min-height: 120px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--lime);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    padding: 16px;
}

.hero-facts div:nth-child(2) {
    border-left-color: var(--cyan);
}

.hero-facts div:nth-child(3) {
    border-left-color: var(--gold);
}

.hero-facts strong,
.hero-facts span {
    display: block;
}

.hero-facts strong {
    margin-bottom: 6px;
    font-size: 16px;
}

.hero-facts span {
    color: var(--muted);
    font-size: 14px;
}

.hero-actions,
.profile-actions,
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button,
.project-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: var(--radius);
    padding: 10px 16px;
    background: transparent;
    color: currentColor;
    font-weight: 850;
    text-decoration: none;
}

.button:hover,
.button:focus-visible,
.project-links a:hover,
.project-links a:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.button--primary {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--bg);
}

.hero-portrait {
    position: relative;
    max-width: 420px;
    justify-self: end;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--panel);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.hero-portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.12);
}

.section {
    padding: 84px 0;
    border-bottom: 1px solid var(--line);
}

.section-intro {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-intro h2,
.profile-copy h2,
.contact-copy h2 {
    color: var(--text);
    font-size: 44px;
    line-height: 1.06;
    letter-spacing: 0;
}

.section-intro p,
.profile-copy p,
.contact-copy p {
    margin-top: 14px;
    color: var(--muted);
    font-size: 18px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
}

.project-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--panel);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.project-card:hover .project-media img {
    transform: scale(1.025);
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.project-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.project-heading h3 {
    color: var(--text);
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: 0;
}

.project-number {
    color: var(--coral);
    font-size: 13px;
    font-weight: 900;
}

.project-body p {
    color: var(--muted);
}

.tags,
.skill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span,
.skill-cloud span {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 9px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.project-links {
    margin-top: auto;
}

.project-links a {
    min-height: 36px;
    padding: 8px 11px;
    font-size: 14px;
}

.project-links a:first-child {
    border-color: var(--coral);
    background: var(--coral);
    color: #fff;
}

.profile-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    align-items: center;
    gap: 36px;
}

.profile-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--panel);
}

.profile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-label {
    margin: 0;
    color: var(--coral);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    align-items: start;
    gap: 34px;
}

.contact-list {
    display: grid;
    gap: 10px;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    padding: 16px;
    text-decoration: none;
}

.contact-row:hover,
.contact-row:focus-visible {
    border-color: rgba(236, 90, 60, 0.52);
    outline: none;
}

.contact-row span {
    color: var(--quiet);
    font-size: 14px;
    font-weight: 850;
}

.contact-row strong {
    color: var(--text);
    text-align: right;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #14161b;
    color: var(--text);
    padding: 24px 0;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-grid div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-grid span,
.footer-grid p {
    color: var(--muted);
}

@media (max-width: 980px) {
    .hero {
        padding-top: 78px;
    }

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

    .hero h1 {
        max-width: 11ch;
        font-size: 58px;
    }

    .hero-lead {
        font-size: 24px;
    }

    .hero-portrait {
        justify-self: start;
        width: min(100%, 420px);
    }
}

@media (max-width: 720px) {
    body {
        background-size: 72px 72px, 72px 72px, auto, auto, auto;
    }

    .container,
    .nav {
        width: min(100% - 28px, var(--max));
    }

    .nav {
        min-height: 62px;
    }

    .brand-name {
        display: none;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-link {
        padding: 8px;
        font-size: 13px;
    }

    .hero {
        padding: 62px 0 52px;
    }

    .hero-copy {
        gap: 18px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-lead {
        font-size: 20px;
    }

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

    .hero-facts div {
        min-height: 0;
    }

    .section {
        padding: 58px 0;
    }

    .section-intro h2,
    .profile-copy h2,
    .contact-copy h2 {
        font-size: 32px;
    }

    .section-intro p,
    .profile-copy p,
    .contact-copy p {
        font-size: 16px;
    }

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

    .project-heading h3 {
        font-size: 22px;
    }

    .contact-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-row strong {
        text-align: left;
        overflow-wrap: anywhere;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button,
    .project-links a,
    .project-media img {
        transition: none;
    }
}
