:root {
    --bg: #07111f;
    --bg-elevated: rgba(10, 21, 38, 0.78);
    --bg-solid: #0e1b30;
    --surface: rgba(12, 27, 48, 0.72);
    --surface-strong: rgba(16, 36, 61, 0.92);
    --surface-soft: rgba(128, 163, 202, 0.08);
    --text-primary: #f4f7fb;
    --text-secondary: #b8c5d6;
    --text-muted: #8aa0b8;
    --line: rgba(136, 173, 214, 0.16);
    --primary: #7dd3fc;
    --primary-strong: #38bdf8;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --success: #34d399;
    --shadow-lg: 0 22px 70px rgba(2, 10, 22, 0.38);
    --shadow-md: 0 12px 35px rgba(2, 10, 22, 0.22);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container: 1180px;
    --grid-gap: clamp(1rem, 2vw, 1.5rem);
    --gradient-main: linear-gradient(135deg, rgba(125, 211, 252, 0.22), rgba(245, 158, 11, 0.18));
    --gradient-line: linear-gradient(180deg, rgba(125, 211, 252, 0.9), rgba(245, 158, 11, 0.45));
}

[data-theme="light"] {
    --bg: #f3f7fb;
    --bg-elevated: rgba(255, 255, 255, 0.78);
    --bg-solid: #ffffff;
    --surface: rgba(255, 255, 255, 0.74);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --surface-soft: rgba(10, 48, 92, 0.04);
    --text-primary: #0d1b2b;
    --text-secondary: #42566c;
    --text-muted: #68829b;
    --line: rgba(13, 27, 43, 0.1);
    --primary: #2563eb;
    --primary-strong: #0f4ed8;
    --accent: #ea580c;
    --accent-soft: rgba(234, 88, 12, 0.12);
    --success: #059669;
    --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.1);
    --shadow-md: 0 12px 32px rgba(17, 24, 39, 0.08);
    --gradient-main: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(234, 88, 12, 0.1));
    --gradient-line: linear-gradient(180deg, rgba(37, 99, 235, 0.8), rgba(234, 88, 12, 0.42));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.15), transparent 32%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.12), transparent 30%),
        var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

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

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: radial-gradient(circle at center, black 52%, transparent 100%);
}

#canvas3d {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.scroll-progress-bar {
    position: fixed;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 2000;
}

.scroll-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 24px rgba(125, 211, 252, 0.45);
}

.nav-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 2rem), var(--container));
    padding: 0.9rem 1rem 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-elevated);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.nav-brand {
    text-decoration: none;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--text-primary);
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.language-option,
.theme-toggle {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.language-option {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    min-width: 46px;
}

.language-option.active,
.language-option:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    padding: 0.7rem;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--text-primary);
}

.menu-toggle span + span {
    margin-top: 5px;
}

.section-indicators {
    position: fixed;
    top: 50%;
    right: 1.35rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 900;
}

.indicator {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.indicator.active {
    transform: scale(1.25);
    background: var(--accent);
    border-color: var(--accent);
}

.content-container {
    position: relative;
    z-index: 1;
    padding-top: 7.5rem;
}

.content-section {
    padding: clamp(3.25rem, 6vw, 5rem) 1.25rem;
    min-height: auto;
    display: flex;
    align-items: center;
}

.section-content-wrapper {
    width: min(100%, var(--container));
    margin: 0 auto;
}

.hero-shell {
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-copy,
.about-card,
.experience-item,
.skill-category,
.education-item,
.contact-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-md);
}

.hero-copy {
    padding: clamp(1.5rem, 3vw, 2.4rem) 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-kicker::before,
.section-eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: currentColor;
    opacity: 0.75;
}

.hero-title,
.section-title,
.experience-position,
.skill-category-title {
    font-family: 'Instrument Sans', sans-serif;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin-bottom: 1.25rem;
}

.title-line {
    display: block;
}

.hero-subtitle {
    max-width: 44rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-description {
    max-width: 44rem;
    margin-top: 1.3rem;
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.9;
}

.hero-buttons,
.contact-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.hero-buttons {
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.9rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #06111d;
    background: linear-gradient(135deg, var(--primary), #fde68a);
    box-shadow: 0 14px 30px rgba(125, 211, 252, 0.22);
}

.btn-secondary,
.btn-ghost {
    color: var(--text-primary);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover,
.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.hero-spotlight {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.about-card::before,
.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-main);
    opacity: 0.55;
    pointer-events: none;
}

.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.profile-image-wrapper {
    position: relative;
    display: inline-flex;
}

.profile-image {
    width: min(100%, 360px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 28px;
    border: 0;
    box-shadow: none;
}

.section-header {
    margin-bottom: 1.35rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.section-divider {
    width: 88px;
    height: 4px;
    margin-top: 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.about-card,
.contact-card {
    border-radius: var(--radius-xl);
    padding: clamp(1.4rem, 3vw, 2.5rem);
    overflow: hidden;
}

.stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}

.stat-card {
    padding: 1.3rem 1.2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-family: 'Instrument Sans', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline {
    position: relative;
    display: grid;
    gap: 1.2rem;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--gradient-line);
}

.experience-item {
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.5rem 1.7rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 1.7rem;
    left: -1.97rem;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experience-position {
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.experience-location {
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.experience-period {
    white-space: nowrap;
    color: var(--accent);
    border-radius: 999px;
    background: var(--accent-soft);
    padding: 0.55rem 0.95rem;
    border: 1px solid rgba(245, 158, 11, 0.26);
    font-size: 0.9rem;
    font-weight: 800;
}

.experience-responsibilities,
.skill-list {
    list-style: none;
}

.experience-responsibilities li,
.skill-list li {
    position: relative;
    color: var(--text-secondary);
    padding-left: 1.15rem;
}

.experience-responsibilities li + li,
.skill-list li + li {
    margin-top: 0.6rem;
}

.experience-responsibilities li::before,
.skill-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--primary);
}

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

.skill-category,
.education-item {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.skill-category-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.education-list {
    display: grid;
    gap: 0.85rem;
}

.education-text {
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.contact-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.2rem;
}

.contact-info,
.contact-actions {
    position: relative;
    z-index: 1;
}

.contact-info {
    display: grid;
    gap: 0.85rem;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-item a {
    color: var(--primary);
    word-break: break-word;
}

.contact-label {
    color: var(--text-muted);
    font-weight: 800;
    min-width: 130px;
}

.contact-actions {
    align-content: center;
}

.footer {
    position: relative;
    z-index: 1;
    padding: 0 1.25rem 2.5rem;
    color: var(--text-muted);
    text-align: center;
}

.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: hover) {
    .experience-item:hover,
    .skill-category:hover,
    .education-item:hover,
    .about-card:hover,
    .contact-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 1100px) {
    .hero-content,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-container {
        top: 12px;
        width: calc(100% - 1rem);
        border-radius: 28px;
        padding: 0.7rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 0.85rem;
        background: var(--surface-strong);
        border: 1px solid var(--line);
        border-radius: 24px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: inline-block;
    }

    .section-indicators {
        display: none;
    }

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

@media (max-width: 680px) {
    .content-container {
        padding-top: 6.8rem;
    }

    .content-section {
        padding-block: 2.4rem;
        padding-inline: 1rem;
    }

    .language-switcher {
        order: 2;
    }

    .hero-title {
        font-size: clamp(2.6rem, 15vw, 4rem);
    }

    .hero-subtitle {
        letter-spacing: 0.08em;
    }

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

    .experience-header,
    .contact-item {
        flex-direction: column;
    }

    .contact-label {
        min-width: 0;
    }

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

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    #canvas3d {
        opacity: 0.22;
    }
}
