* { box-sizing: border-box; }

:root {
    --bg: #08111f;
    --panel: #101b2d;
    --panel-2: #14233a;
    --text: #eef4ff;
    --muted: #93a4bd;
    --line: rgba(148, 163, 184, .22);
    --accent: #3dd6a3;
    --accent-2: #60a5fa;
}

html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(96, 165, 250, .18), transparent 30%),
        radial-gradient(circle at 88% 0%, rgba(61, 214, 163, .16), transparent 28%),
        var(--bg);
}

a { color: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    backdrop-filter: blur(16px);
}

.brand {
    font-weight: 800;
    text-decoration: none;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.topnav a,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(16, 27, 45, .76);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.btn.primary {
    border-color: rgba(61, 214, 163, .55);
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    color: #06111f;
}

main {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 360px;
    gap: 24px;
    align-items: stretch;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 27, 45, .94), rgba(20, 35, 58, .78));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
    max-width: 820px;
    margin-bottom: 16px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: .95;
}

h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.lead {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.55;
}

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

.profile-card {
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 17, 31, .48);
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.profile-card a {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.quick-facts,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.quick-facts article,
.skills-grid article,
.section {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(16, 27, 45, .78);
}

.quick-facts article {
    padding: 18px;
}

.quick-facts span,
.job-meta span,
.skills-grid p,
.section p,
li {
    color: var(--muted);
    line-height: 1.55;
}

.quick-facts strong {
    display: block;
    margin-top: 8px;
    font-size: 19px;
}

.section {
    margin-top: 18px;
    padding: 28px;
}

.split {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
}

.section-head {
    margin-bottom: 22px;
}

.skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.skills-grid article {
    padding: 20px;
}

.timeline {
    display: grid;
    gap: 16px;
}

.job {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 17, 31, .38);
}

.job-meta strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-2);
}

ul {
    margin: 0;
    padding-left: 20px;
}

li + li { margin-top: 7px; }

.edu-list p:last-child { margin-bottom: 0; }

@media (max-width: 920px) {
    .hero,
    .split,
    .job {
        grid-template-columns: 1fr;
    }

    .quick-facts,
    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-card {
        grid-template-columns: 180px minmax(0, 1fr);
        align-items: center;
    }
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topnav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero,
    .section {
        padding: 20px;
        border-radius: 12px;
    }

    .profile-card,
    .quick-facts,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .hero-actions .btn {
        width: 100%;
    }
}


/* Content refinements v3 */
.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(16, 27, 45, .78);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.language-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.language-toggle i {
    position: relative;
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .24);
}

.language-toggle i::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    transition: transform .2s ease;
}

.language-toggle input:checked + i::before {
    transform: translateX(20px);
}

.about-section .section-head {
    max-width: 820px;
}

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

.about-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 17, 31, .34);
}

.about-card.wide {
    grid-column: 1 / -1;
}

.about-card p:last-child,
.about-card ul:last-child {
    margin-bottom: 0;
}

.about-card h3 {
    margin-bottom: 12px;
    color: var(--accent-2);
}

@media (max-width: 920px) {
    .topbar {
        flex-wrap: wrap;
    }

    .language-toggle {
        margin-left: auto;
    }

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

@media (max-width: 640px) {
    .language-toggle {
        width: 100%;
        justify-content: center;
    }
}


/* Header behavior v4 */
.topbar {
    position: static;
}
