:root {
    --page-bg: #1d1d1d;
    --sidebar: #323332;
    --sidebar-soft: #3d3f3e;
    --paper: #f6f6f3;
    --paper-2: #ffffff;
    --text: #252728;
    --muted: #6f7478;
    --line: #dedfda;
    --sidebar-text: #f3f3ef;
    --sidebar-muted: #c7cac7;
    --accent: #4bb5d8;
    --radius: 7px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--page-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(255,255,255,0.035), transparent 35%),
        var(--page-bg);
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.35);
}

.sidebar {
    padding: 34px 30px 38px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), transparent 38%),
        var(--sidebar);
    color: var(--sidebar-text);
}

.person-switcher-wrap {
    margin: -10px 0 12px;
}

.person-switcher {
    width: 100%;
    height: 32px;
    padding: 0 31px 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    outline: none;
    color: rgba(255, 255, 255, 0.52);
    background-color: rgba(255, 255, 255, 0.035);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.person-switcher:hover,
.person-switcher:focus {
    opacity: 1;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.person-switcher option {
    color: #222;
    background: #f4f4f1;
}

.portrait-wrap {
    overflow: hidden;
    border-radius: var(--radius);
    background: #777a77;
    aspect-ratio: 4 / 4.55;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    filter: saturate(0.84) contrast(0.98);
}

.sidebar-section {
    padding-top: 27px;
}

.sidebar h1 {
    margin: 4px 0 5px;
    font-size: 29px;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.role {
    margin: 0;
    color: var(--sidebar-muted);
    font-size: 14px;
    line-height: 1.5;
}

.eyebrow {
    margin: 0 0 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #c9cdca;
}

.eyebrow.dark {
    color: #7d8386;
}

.sidebar h2,
.content h3 {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.sidebar h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.details {
    margin: 0;
}

.details > div {
    margin: 0 0 13px;
}

.details dt {
    margin-bottom: 3px;
    color: #9fa5a1;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.details dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.details a {
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.language-list {
    display: grid;
    gap: 12px;
}

.language-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.language-name {
    font-size: 13px;
}

.language-dots {
    display: flex;
    gap: 5px;
}

.language-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.language-dot.filled {
    background: var(--dot-color);
    border-color: var(--dot-color);
}

.muted {
    margin: 0 0 13px;
    color: var(--sidebar-muted);
    font-size: 12px;
    line-height: 1.55;
}

.contact-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background 150ms ease, border-color 150ms ease;
}

.contact-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

.content {
    padding: 50px 58px 32px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.75), transparent 260px),
        var(--paper);
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 31px;
    border-bottom: 1px solid var(--line);
}

.topbar h2 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 750;
}

.language-switcher {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-button {
    appearance: none;
    border: 1px solid #d5d7d5;
    background: #fff;
    color: #55595c;
    padding: 9px 11px;
    border-radius: 4px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.lang-button:hover {
    border-color: #aeb2b4;
}

.lang-button.active {
    color: #fff;
    border-color: #313433;
    background: #313433;
}

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

.content h3 {
    color: #4b4f51;
}

.lead {
    max-width: 760px;
    margin: 0;
    font-size: 17px;
    line-height: 1.75;
    color: #44494b;
}

.section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 17px;
}

.section-heading-row h3 {
    margin-bottom: 0;
}

.section-note {
    color: #969a9c;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.skill {
    min-width: 0;
}

.skill-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

.skill-name {
    font-size: 13px;
    font-weight: 700;
}

.skill-value {
    font-size: 10px;
    color: #8b9092;
    font-variant-numeric: tabular-nums;
}

.skill-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e3df;
}

.skill-fill {
    width: var(--level);
    height: 100%;
    border-radius: inherit;
    background: var(--bar-color);
    transform-origin: left center;
    animation: grow 700ms cubic-bezier(.2,.75,.3,1) both;
}

@keyframes grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.projects-list {
    display: grid;
    gap: 14px;
}

.project-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    min-height: 112px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e0e1dc;
    border-radius: 5px;
    background: var(--paper-2);
}

.project-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 16px;
    background: #ecece8;
    color: #7e8385;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    overflow: hidden;
}

.project-media img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
    display: block;
}

.project-media:hover {
    background: #e4e5e0;
}

.project-content {
    padding: 18px 18px 18px 0;
    align-self: center;
}

.project-title {
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 800;
    color: #303335;
}

.project-title a {
    color: inherit;
    text-decoration: none;
    transition: color 150ms ease;
}

.project-title a:hover {
    color: #4bb5d8;
}

.project-description {
    margin: 0;
    color: #676c6e;
    font-size: 13px;
    line-height: 1.65;
}

.projects-secret {
    margin: 18px 0 0;
    color: #929698;
    font-size: 11px;
    font-style: italic;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
}

.statement {
    margin: 0;
    font-size: clamp(25px, 4vw, 39px);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.body-copy {
    margin: 0;
    color: #5b6062;
    line-height: 1.7;
    font-size: 14px;
}

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

.highlight-card {
    min-height: 112px;
    padding: 16px;
    border: 1px solid #e0e1dc;
    border-radius: 5px;
    background: var(--paper-2);
}

.highlight-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.highlight-card span {
    display: block;
    color: #74797b;
    font-size: 12px;
    line-height: 1.55;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    color: #999d9e;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 16px);
    padding: 10px 13px;
    border-radius: 4px;
    background: #202221;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .page-shell {
        width: 100%;
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .sidebar {
        padding: 24px 22px 30px;
    }

    .content {
        padding: 36px 30px 28px;
    }

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

    .topbar {
        flex-direction: column;
    }

    .language-switcher {
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .page-shell {
        display: block;
    }

    .sidebar {
        padding: 22px;
    }

    .portrait-wrap {
        max-width: 320px;
        margin: 0 auto;
    }

    .content {
        padding: 30px 22px 24px;
    }

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

    .project-content {
        padding: 0 16px 18px;
    }

    .project-media {
        min-height: 92px;
    }

    .split-section,
    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        display: block;
    }

    .section-note {
        display: block;
        margin-top: 6px;
    }
}

@media print {
    html,
    body {
        background: #fff;
    }

    .page-shell {
        width: 100%;
        min-height: auto;
        box-shadow: none;
    }

    .language-switcher,
    .toast {
        display: none;
    }

    .content,
    .sidebar {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
