:root {
    --accent: #1687e8;
    --accent-dark: #0d6fc5;
    --ink: #20242a;
    --muted: #707780;
    --line: #e7e9ed;
    --page: #ffffff;
    --canvas: #eef1f5;
    --shadow: 0 18px 50px rgba(31, 41, 55, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: clamp(14px, 2.2vw, 30px);
    display: grid;
    grid-template-columns: clamp(220px, 20vw, 290px) minmax(0, 1fr);
    justify-content: stretch;
    align-items: start;
    color: var(--ink);
    background: var(--canvas);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

header {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: clamp(14px, 2.2vw, 30px);
    height: calc(100dvh - clamp(28px, 4.4vw, 60px));
    min-height: 560px;
    z-index: 5;
    background: var(--page);
    border-right: 1px solid var(--line);
    border-radius: 18px 0 0 18px;
    box-shadow: var(--shadow);
}

.container {
    width: 100%;
}

header .container {
    height: 100%;
    padding: clamp(28px, 4vh, 48px) clamp(18px, 2.2vw, 28px) 24px;
    display: flex;
    flex-direction: column;
}

.hero {
    display: contents;
}

.profile-photo {
    width: 102px;
    height: 102px;
    margin: 0 auto 18px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 27%;
    box-shadow: 0 0 0 6px #f3f7fb;
}

.hero h1 {
    margin: 0;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.25;
}

.hero > p {
    margin: 5px 0 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.sidebar-socials,
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.sidebar-socials {
    margin-bottom: 28px;
}

.sidebar-socials a,
.social-links a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.sidebar-socials a:hover,
.social-links a:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.sidebar-socials img,
.social-links img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

nav {
    order: 2;
    margin-top: 12px;
}

.brand {
    display: none;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-links a {
    position: relative;
    padding: 9px 4px 9px 28px;
    color: #3e444c;
    text-decoration: none;
    font-size: 0.84rem;
}

.nav-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 2px;
    background: #d7dce2;
    transform: translateY(-50%);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.nav-links a:hover::before,
.nav-links a:focus-visible::before {
    width: 20px;
    background: var(--accent);
}

.hero > .button {
    display: none;
}

main {
    grid-column: 2;
    min-width: 0;
    padding: clamp(38px, 5vw, 58px) clamp(28px, 5vw, 62px) 35px;
    background: var(--page);
    border-radius: 0 18px 0 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

section {
    padding: 58px 0;
    scroll-margin-top: 24px;
    border-bottom: 1px solid var(--line);
}

section:first-child {
    padding-top: 0;
}

section:last-child {
    border-bottom: 0;
}

#about {
    min-height: min(570px, calc(100dvh - 120px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(270px, 0.95fr);
    gap: clamp(26px, 4vw, 44px);
    align-items: center;
}

.about-copy {
    min-width: 0;
}

.page-kicker {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.78rem;
}

#about h2 {
    margin: 0 0 18px;
    font-size: clamp(2.15rem, 5vw, 3.8rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

#about h2::after {
    content: ".";
    color: var(--accent);
}

#about p {
    margin: 0 0 14px;
    color: #5d646d;
    font-size: 0.92rem;
}

.about-photo-panel {
    height: clamp(350px, 42vw, 470px);
    align-self: center;
    overflow: hidden;
    background: #e7eaee;
    border-radius: 4px;
}

.about-photo-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 54% 28%;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.button,
.main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid #d8dde3;
    border-radius: 4px;
    color: #3c4249;
    background: #fff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.main-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.12);
}

.button.primary,
.main-button:not(.secondary) {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.button.primary:hover,
.main-button:not(.secondary):hover {
    background: var(--accent-dark);
}

.about-highlights {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.about-highlights li {
    padding: 15px;
    color: #5b626b;
    background: #f7f9fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.78rem;
}

.about-highlights strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

section > h2 {
    position: relative;
    margin: 0 0 30px;
    padding-bottom: 12px;
    font-size: 1.75rem;
    line-height: 1.2;
}

section > h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 38px;
    height: 3px;
    background: var(--accent);
}

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

.card,
.company-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.card h3,
.company-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.35;
}

.card,
.company-card,
.contact,
.about-highlights li {
    overflow-wrap: anywhere;
}

.card p,
.company-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.date {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
}

.company-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.1);
}

.company-card img {
    width: 100%;
    height: 112px;
    margin-bottom: 18px;
    padding: 8px;
    object-fit: contain;
}

.company-link {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.skills,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.skill,
.tags li {
    padding: 8px 13px;
    color: #3f4852;
    background: #f5f8fb;
    border: 1px solid #dfe6ed;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}

.contact-card,
.contact {
    padding: 34px;
    color: #fff;
    background: #202a35;
    border-radius: 8px;
}

.contact-card h2,
.contact h2 {
    margin: 0 0 20px;
    font-size: 2rem;
}

.contact-card p,
.contact p {
    margin: 6px 0;
    color: #d7dde4;
}

.contact-card a,
.contact a {
    color: #fff;
    font-weight: 700;
}

.section-intro {
    max-width: 620px;
    margin: -16px 0 26px;
    color: var(--muted);
    font-size: 0.88rem;
}

.company-link-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

footer {
    grid-column: 2;
    padding: 25px 30px 30px;
    text-align: center;
    color: var(--muted);
    background: var(--page);
    border-radius: 0 0 18px 0;
    box-shadow: var(--shadow);
}

footer p {
    margin: 0 0 12px;
    font-size: 0.8rem;
}

@media (max-width: 1050px) {
    body {
        display: block;
        padding: clamp(12px, 2.5vw, 24px);
    }

    header {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 14px 14px 0 0;
    }

    header .container {
        padding: 28px 24px 20px;
    }

    .profile-photo {
        width: 82px;
        height: 82px;
    }

    .sidebar-socials {
        margin-bottom: 15px;
    }

    nav {
        margin-top: 0;
    }

    .nav-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 7px 10px;
    }

    .nav-links a::before {
        display: none;
    }

    main {
        padding: clamp(36px, 6vw, 52px) clamp(24px, 6vw, 48px) 25px;
        border-radius: 0;
    }

    footer {
        border-radius: 0 0 14px 14px;
    }
}

@media (max-width: 720px) {
    body {
        padding: 0;
        background: #fff;
    }

    header,
    main,
    footer {
        border-radius: 0;
        box-shadow: none;
    }

    main {
        padding: 34px clamp(18px, 5vw, 28px) 20px;
    }

    #about {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-photo-panel {
        width: min(100%, 480px);
        height: clamp(340px, 112vw, 520px);
        margin-inline: auto;
        grid-row: 1;
    }

    .about-copy {
        grid-row: 2;
    }

    .about-highlights,
    .grid,
    .company-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 44px 0;
    }

    .contact-card,
    .contact {
        padding: 26px 22px;
    }
}

@media (max-width: 480px) {
    header .container {
        padding-inline: 16px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 4px 8px;
        text-align: center;
    }

    .nav-links a {
        width: 100%;
        padding: 7px 5px;
    }

    #about h2 {
        font-size: clamp(2rem, 12vw, 2.7rem);
    }

    .about-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .about-actions .main-button {
        width: 100%;
    }

    .card,
    .company-card {
        padding: 18px;
    }

    .company-card {
        min-height: 220px;
    }

    .contact h2 {
        font-size: 1.65rem;
    }
}

@media (max-height: 680px) and (min-width: 1051px) {
    header {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
    }

    header .container {
        min-height: calc(100dvh - 28px);
        padding-top: 24px;
    }

    .profile-photo {
        width: 78px;
        height: 78px;
        margin-bottom: 12px;
    }

    .sidebar-socials {
        margin-bottom: 14px;
    }

    .nav-links a {
        padding-block: 6px;
    }
}

@media print {
    body {
        display: block;
        padding: 0;
        background: #fff;
    }

    header {
        position: static;
        height: auto;
        min-height: 0;
        border: 0;
        box-shadow: none;
    }

    main,
    footer {
        padding: 24px;
        box-shadow: none;
    }
}
