:root {
    --navy: #0d2733;
    --navy-light: #183c49;
    --teal: #2bbfaf;
    --teal-dark: #14796f;
    --surface: #f7f9f8;
    --surface-muted: #eef2f2;
    --white: #ffffff;
    --ink: #132a34;
    --body-ink: #52656c;
    --line: #d3dddd;
    --nav-height: 68px;
    --radius: 12px;
    --shell: 1140px;
    --shadow: 0 14px 36px rgba(13, 39, 51, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background: var(--surface);
    color: var(--body-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body,
button,
a {
    font-family: inherit;
}

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

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 20px;
    z-index: 1100;
    padding: 10px 14px;
    border-radius: 7px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

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

strong {
    color: var(--ink);
    font-weight: 700;
}

.shell {
    width: min(calc(100% - 48px), var(--shell));
    margin-inline: auto;
}

.site-header {
    position: relative;
    padding-top: var(--nav-height);
    background:
        radial-gradient(circle at 82% 22%, rgba(43, 191, 175, 0.1), transparent 28%),
        var(--navy);
    color: var(--white);
}

.site-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding-inline: max(24px, calc((100vw - var(--shell)) / 2));
    background: rgba(13, 39, 51, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-mark {
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 38px);
}

.nav-bar-links {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #b9c9ce;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 160ms ease;
}

.nav-bar-links span {
    margin-right: 0.38rem;
    color: var(--teal);
    font-size: 0.64rem;
}

.nav-bar-links::after {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
}

.nav-bar-links:hover,
.nav-bar-links.active {
    color: var(--white);
}

.nav-bar-links:hover::after,
.nav-bar-links.active::after {
    transform: scaleX(1);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    align-items: center;
    gap: clamp(48px, 8vw, 112px);
    min-height: 570px;
    padding-block: clamp(72px, 10vw, 128px);
}

.eyebrow,
.section-kicker,
.project-number {
    color: var(--teal);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 18px 0 24px;
    color: var(--white);
    font-size: clamp(3rem, 6.2vw, 5.8rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 0.96;
}

.hero h1 span {
    display: block;
    color: #d4e2e4;
}

.hero-summary {
    max-width: 580px;
    color: #b8c9ce;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.7;
}

.portrait {
    justify-self: end;
    width: clamp(240px, 26vw, 318px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(119, 217, 205, 0.52);
    border-radius: 50%;
    background: var(--navy-light);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.26);
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 24%;
}

.proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, calc(var(--shell) / 3)));
    justify-content: center;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.proof-strip > div {
    min-width: 0;
    padding: 28px clamp(24px, 4vw, 48px);
    border-right: 1px solid var(--line);
}

.proof-strip > div:first-child {
    border-left: 1px solid var(--line);
}

.proof-strip strong {
    display: block;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.proof-strip span {
    display: block;
    margin-top: 7px;
    color: var(--body-ink);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.portfolio-section {
    padding-block: clamp(78px, 9vw, 120px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    scroll-margin-top: var(--nav-height);
}

.surface-muted {
    background: var(--surface-muted);
}

.section-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 88px);
}

.section-label {
    color: var(--teal-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.section-content h2,
.contact-panel h2 {
    max-width: 780px;
    margin: 14px 0 22px;
    color: var(--ink);
    font-size: clamp(2.15rem, 4.3vw, 3.75rem);
    font-weight: 750;
    letter-spacing: -0.052em;
    line-height: 1.04;
}

.section-kicker,
.project-number {
    color: var(--teal-dark);
}

.section-intro {
    max-width: 720px;
    margin-bottom: 36px;
    color: var(--body-ink);
    font-size: 1.02rem;
}

.about-copy > p:not(.section-kicker) {
    max-width: 72ch;
    margin-top: 20px;
    color: var(--body-ink);
    font-size: clamp(1rem, 1.15vw, 1.08rem);
}

.about-copy strong {
    color: var(--ink);
}

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

.skill-group {
    min-width: 0;
    padding: 26px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.skill-group h3 {
    margin-bottom: 18px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.skills-list,
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills-list li {
    padding: 7px 10px;
    border-radius: 999px;
    background: #e1eceb;
    color: #285c58;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
}

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

.project-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    padding: clamp(24px, 3vw, 32px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
    border-color: #a9c7c4;
    box-shadow: 0 18px 44px rgba(13, 39, 51, 0.1);
    transform: translateY(-2px);
}

.project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.project-head h3 {
    max-width: 520px;
    margin-top: 10px;
    color: var(--ink);
    font-size: clamp(1.18rem, 1.8vw, 1.42rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.22;
}

.project-meta {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 7px;
}

.project-meta a,
.project-meta .chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cbd9d9;
    border-radius: 6px;
    color: #3f6065;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.project-meta a:hover {
    background: #e5f1ef;
    border-color: #a7c9c5;
    color: var(--teal-dark);
}

.project-meta .chip {
    background: #f0f4f3;
}

.tech-badges {
    margin: 24px 0 22px;
}

.badge {
    padding: 6px 8px;
    border-radius: 4px;
    background: #edf2f2;
    color: #51656a;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
}

.project-points {
    margin: auto 0 0;
    padding-left: 1.15rem;
    color: #5e7075;
    list-style: disc;
}

.project-points li {
    margin-top: 10px;
    padding-left: 0.25rem;
    font-size: 0.88rem;
    line-height: 1.62;
}

.project-points strong {
    color: #314b51;
}

.contact-panel {
    padding-block: clamp(70px, 8vw, 104px);
    background: var(--navy);
    color: #b8c9ce;
    scroll-margin-top: var(--nav-height);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 48px;
}

.contact-panel .section-label {
    color: var(--teal);
}

.contact-panel h2 {
    margin-bottom: 14px;
    color: var(--white);
}

.copyright {
    margin-top: 18px;
    color: #8fa6ac;
    font-size: 0.76rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid #41636d;
    border-radius: 7px;
    color: #c8f6ef;
    font-size: 0.83rem;
    font-weight: 700;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.contact-links a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--navy);
}

a:focus-visible {
    border-radius: 3px;
    outline: 3px solid var(--teal);
    outline-offset: 4px;
}

[data-reveal] {
    opacity: 1;
    transform: none;
}

.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
        gap: 40px;
    }

    .section-layout {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 44px;
    }

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

@media (max-width: 800px) {
    :root {
        --nav-height: 62px;
    }

    .shell {
        width: min(calc(100% - 40px), var(--shell));
    }

    .site-nav {
        padding-inline: 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-bar-links span {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 44px;
        min-height: auto;
        padding-block: 80px 68px;
    }

    .hero h1 {
        max-width: 680px;
    }

    .portrait {
        justify-self: start;
        width: min(280px, 70vw);
    }

    .proof-strip {
        grid-template-columns: 1fr;
    }

    .proof-strip > div {
        width: min(calc(100% - 40px), var(--shell));
        margin-inline: auto;
        padding-inline: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .proof-strip > div:first-child {
        border-left: 0;
    }

    .proof-strip > div:last-child {
        border-bottom: 0;
    }

    .section-layout,
    .skill-groups,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .section-layout {
        gap: 22px;
    }

    .skill-groups {
        gap: 12px;
    }

    .contact-layout {
        align-items: start;
        gap: 32px;
    }

    .contact-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .shell {
        width: min(calc(100% - 32px), var(--shell));
    }

    .site-mark {
        display: none;
    }

    .nav-links {
        justify-content: space-between;
        width: 100%;
        gap: 6px;
    }

    .nav-bar-links {
        font-size: 0.64rem;
    }

    .hero {
        padding-block: 64px 56px;
    }

    .hero h1 {
        font-size: clamp(2.65rem, 14vw, 4rem);
    }

    .portfolio-section {
        padding-block: 70px;
    }

    .section-content h2,
    .contact-panel h2 {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }

    .skill-group,
    .project-card {
        padding: 22px;
    }

    .project-head {
        flex-direction: column;
    }

    .project-meta {
        width: 100%;
    }

    .contact-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
