/* ========================================
   Base & Reset
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0A0A0A;
    --bg-card: #141414;
    --bg-surface: #1E1E1E;
    --bg-elevated: #252525;
    --border: #2A2A2A;
    --border-light: #333333;
    --text-primary: #EDEDED;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent: #C8C8C8;
    --accent-hover: #E0E0E0;
    --accent-subtle: rgba(200, 200, 200, 0.08);
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1080px;
    --section-padding: 140px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

::selection {
    background: rgba(200, 200, 200, 0.2);
    color: var(--text-primary);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base);
}

.nav--scrolled {
    border-bottom-color: var(--border);
}

.nav__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-primary);
    transition: opacity var(--transition-fast);
}

.nav__logo:hover {
    opacity: 0.7;
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 36px;
}

.nav__links a {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    transition: color var(--transition-base);
    letter-spacing: 0.3px;
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition-base);
}

.nav__links a:hover {
    color: var(--text-primary);
}

.nav__links a:hover::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav__menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 18px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}

.nav__menu span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-primary);
    transition: all var(--transition-base);
    transform-origin: center;
}

.nav__menu.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__menu.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Language Toggle
   ======================================== */
.lang-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.lang-toggle:hover {
    border-color: var(--border-light);
    background: var(--accent-subtle);
}

.lang-toggle__label {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 450;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn--outline:hover {
    border-color: var(--text-secondary);
    background: var(--accent-subtle);
}

.btn--large {
    padding: 18px 48px;
    font-size: 14px;
}

/* ========================================
   Section Label
   ======================================== */
.section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 48px;
    display: inline-block;
    position: relative;
    padding-bottom: 16px;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 1px;
    background: var(--accent);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
}

.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 100px;
    align-items: center;
}

.hero__greeting {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero__name {
    font-size: clamp(52px, 6vw, 80px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 28px;
    color: var(--text-primary);
}

.hero__title {
    font-size: 17px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

.hero__desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 460px;
    margin-bottom: 48px;
    line-height: 1.8;
}

.hero__actions {
    display: flex;
    gap: 16px;
}

.hero__image {
    display: flex;
    justify-content: center;
}

.hero__image-wrapper {
    width: 340px;
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    position: relative;
    border: 1px solid var(--border);
}

.hero__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.about__content {
    max-width: 680px;
}

.about__heading {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 300;
    line-height: 1.35;
    margin-bottom: 36px;
    letter-spacing: -0.5px;
}

.about__text p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.85;
}

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

/* ========================================
   Experience & Education Timeline
   ======================================== */
.experience,
.education {
    padding: var(--section-padding) 0;
}

.experience {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.experience__container,
.education__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.experience__heading,
.education__heading {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 300;
    margin-bottom: 64px;
    letter-spacing: -0.5px;
}

.experience__timeline,
.education__timeline {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.experience__item,
.education__item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 48px;
    position: relative;
}

.experience__period,
.education__period {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    padding-top: 6px;
    letter-spacing: 0.3px;
}

.experience__details,
.education__details {
    border-left: 1px solid var(--border);
    padding-left: 40px;
    position: relative;
}

.experience__details::before,
.education__details::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1.5px solid var(--accent);
}

.experience__role,
.education__degree {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.education__degree {
    margin-bottom: 8px;
}

.experience__company,
.education__school {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 400;
}

.experience__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.experience__role {
    margin-bottom: 0;
}

.experience__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
}

.experience__desc,
.education__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.experience__list,
.education__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.experience__list li,
.education__list li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
}

.experience__list li::before,
.education__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 1px;
    background: var(--accent);
}

.experience__photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.experience__photo-box {
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: zoom-in;
    transition: all var(--transition-base);
}

.experience__photo-box:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.experience__photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.experience__photo-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========================================
   Skills & Languages Sections
   ======================================== */
.skills,
.languages {
    padding: var(--section-padding) 0;
}

.skills {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.skills__container,
.languages__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.skills__heading,
.languages__heading {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 300;
    margin-bottom: 64px;
    letter-spacing: -0.5px;
}

.skills__grid,
.languages__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 48px;
}

.skill-bar,
.language-bar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-bar__header,
.language-bar__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.skill-bar__title,
.language-bar__title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
}

.skill-bar__percentage,
.language-bar__level {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.skill-bar__track,
.language-bar__track {
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar__fill,
.language-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.projects__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.projects__heading {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 300;
    margin-bottom: 64px;
    letter-spacing: -0.5px;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-card__image {
    aspect-ratio: 16/10;
    background: var(--bg-card);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.carousel__track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    user-select: none;
    -webkit-user-drag: none;
    filter: blur(3px);
}

.carousel__slide.active {
    opacity: 1;
}

.project-card:hover .carousel__slide {
    filter: blur(2px);
}

.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    opacity: 0;
    z-index: 2;
}

.carousel__arrow svg {
    width: 18px;
    height: 18px;
}

.carousel__arrow--prev {
    left: 12px;
}

.carousel__arrow--next {
    right: 12px;
}

.project-card:hover .carousel__arrow {
    opacity: 1;
}

.carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (hover: none) {
    .carousel__arrow {
        opacity: 0.7;
    }
}

.carousel__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all var(--transition-base);
}

.carousel__dot.active {
    background: var(--text-primary);
}

.project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.project-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-light);
}

.project-card__placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.project-card__content {
    padding: 28px 28px 32px;
}

.project-card__tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: block;
}

.project-card__title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.project-card__desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.75;
}

.project-card__link {
    font-size: 13px;
    font-weight: 400;
    color: var(--accent);
    transition: color var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-card__link:hover {
    color: var(--accent-hover);
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--section-padding) 0;
    text-align: center;
}

.contact__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.contact__heading {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 300;
    margin-bottom: 28px;
    letter-spacing: -1.5px;
}

.contact__desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 460px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.contact__links {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin-top: 72px;
}

.contact__link {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color var(--transition-base);
    position: relative;
}

.contact__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition-base);
}

.contact__link:hover {
    color: var(--text-primary);
}

.contact__link:hover::after {
    width: 100%;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

.footer__text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.5px;
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 1001;
    line-height: 1;
}

.lightbox__close:hover {
    color: var(--text-primary);
}

.lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    user-select: none;
    -webkit-user-drag: none;
}

[data-zoom] {
    cursor: zoom-in;
}

[data-zoom] img {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 100px;
    }
    
    .hero__container {
        gap: 60px;
    }
    
    .skills__grid,
    .languages__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }
    
    .nav__links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 24px 48px;
        gap: 20px;
    }
    
    .nav__links.active {
        display: flex;
    }
    
    .nav__menu {
        display: flex;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }
    
    .hero__desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero__actions {
        justify-content: center;
    }
    
    .hero__image-wrapper {
        width: 260px;
        height: 320px;
    }
    
    .experience__item,
    .education__item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .experience__details,
    .education__details {
        border-left: none;
        padding-left: 0;
    }
    
    .experience__details::before,
    .education__details::before {
        display: none;
    }
    
    .experience__photos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills__grid,
    .languages__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .projects__grid {
        grid-template-columns: 1fr;
    }
    
    .contact__links {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .nav__container,
    .hero__container,
    .about__container,
    .experience__container,
    .education__container,
    .skills__container,
    .languages__container,
    .projects__container,
    .contact__container,
    .footer__container {
        padding: 0 24px;
    }
    
    .hero__name {
        letter-spacing: -2px;
    }
    
    .hero__actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-label {
        margin-bottom: 32px;
    }
    
    .experience__photos {
        grid-template-columns: 1fr;
    }
}
