:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #f7f8fa;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --accent: #0a66c2;
    --accent-soft: #eaf3ff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.06);
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
}

.brand {
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0;
}

nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: 178px minmax(0, 720px);
    align-items: center;
    justify-content: center;
    gap: 34px;
    padding: 72px 0 64px;
}

.profile-photo-wrap {
    width: 158px;
    height: 158px;
    align-self: center;
    border-radius: 50%;
    padding: 4px;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 31%;
}

.profile-line,
.section-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero h2 {
    max-width: 720px;
    margin: 22px 0 0;
    color: #344054;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: 0;
}

.intro {
    max-width: 650px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    font-size: 0.94rem;
    font-weight: 650;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.contact-links a:hover {
    transform: translateY(-1px);
    border-color: #b9d8f8;
    background: var(--accent-soft);
    color: var(--accent);
}

.contact-links .primary-link {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.contact-links .primary-link:hover {
    background: #004182;
    color: #ffffff;
}

.email-copy {
    width: fit-content;
    margin: 14px 0 0;
    color: #344054;
    font-size: 0.98rem;
    font-weight: 650;
    user-select: all;
}

.content-section {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 56px;
    padding: 76px 0;
    border-top: 1px solid var(--line);
}

.section-heading {
    position: sticky;
    top: 94px;
    align-self: start;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.12;
    letter-spacing: 0;
}

.entry {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.entry-list .entry + .entry,
.project-list .entry + .entry {
    margin-top: 18px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
}

.entry h3,
.skills-grid h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.18rem;
    line-height: 1.3;
}

.entry-role {
    margin: 8px 0 0;
    color: #344054;
    font-weight: 650;
}

.entry p {
    margin: 12px 0 0;
    color: var(--muted);
}

.entry ul {
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.entry li + li {
    margin-top: 8px;
}

.text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
}

.text-links a {
    color: var(--accent);
    font-size: 0.94rem;
    font-weight: 700;
}

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

.skills-grid > div {
    min-height: 150px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-subtle);
}

.skills-grid p {
    margin: 12px 0 0;
    color: var(--muted);
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

footer p {
    margin: 0;
}

body.motion-ready .section-step {
    transition: opacity 360ms ease, transform 360ms ease;
}

body.motion-ready .section-step.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 820px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px 0;
    }

    nav {
        width: 100%;
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        justify-content: start;
        gap: 22px;
        padding: 34px 0 52px;
    }

    .profile-photo-wrap {
        width: 132px;
        height: 132px;
    }

    .content-section {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 58px 0;
    }

    .section-heading {
        position: static;
    }

    .entry {
        padding: 22px;
    }

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

@media (max-width: 520px) {
    main,
    .site-header,
    footer {
        width: min(100% - 28px, 1120px);
    }

    .hero h1 {
        font-size: clamp(2.75rem, 16vw, 4.5rem);
    }

    .hero h2 {
        font-size: 1.17rem;
    }

    .contact-links a {
        flex: 1 1 120px;
    }

    footer {
        flex-direction: column;
    }
}
