:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #1A1A1A;
    --bg-card: rgba(255,255,255,0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #D1D5DB;
    --border-light: rgba(255,255,255,0.08);
    --border-heavy: rgba(255,255,255,0.2);
    --shadow-light: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-heavy: 0 20px 60px rgba(0,0,0,0.4);
}

[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-card: rgba(255,255,255,0.8);
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --border-light: rgba(0,0,0,0.08);
    --border-heavy: rgba(0,0,0,0.15);
    --shadow-light: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-heavy: 0 20px 60px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 1002;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.theme-switcher:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.theme-icon {
    font-size: 1.1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 1002;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--border-heavy);
    transform: translateY(-1px);
}

/* Hero */
.hero {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 40px 80px;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

.hero-main-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 400;
}

.hero-info span {
    background: var(--bg-card);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    max-width: 100%;
    margin-bottom: 32px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-modern {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    justify-content: center;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-heavy);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Hero Photo */
.hero-photo {
    position: relative;
    height: 700px;
    border-radius: 20px;
    overflow: hidden;
    /* background: var(--text-primary); */
    box-shadow: var(--shadow-heavy);
}

.hero-photo img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-photo-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(8rem, 15vw, 10rem);
    color: var(--bg-primary);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}

/* Sections */
.section {
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
}
.section
.section:nth-child(odd) {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 50px;
    text-align: center;
    letter-spacing: -1px;
}

/* Timeline */
.timeline {
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(80px);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: -30px;
    width: 2px;
    background: var(--border-heavy);
    border-radius: 2px;
}

.timeline-date {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-primary);
    font-weight: 700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1.5px;
    align-self: center;
    text-align: center;
}

.timeline-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: clamp(24px, 4vw, 40px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text-primary);
}

.timeline-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.timeline-title {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.timeline-company {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.timeline-desc {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

.timeline-desc h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: clamp(1rem, 1.8vw, 1.1rem);
}

.timeline-desc p {
    margin-bottom: 6px;
}

/* Content cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: clamp(28px, 4vw, 40px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text-primary);
    border-radius: 20px 20px 0 0;
}

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

.content-card h3 {
    font-size: clamp(1.2rem, 2vw, 1.35rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.6;
}

.skill-item {
    margin-bottom: 28px;
    text-align: left;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.9rem, 1.5vw, 0.98rem);
    color: var(--text-secondary);
    gap: 8px;
    flex-wrap: wrap;
}

.skill-bar {
    height: 10px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-heavy);
}

.skill-progress {
    height: 100%;
    background: var(--text-primary);
    border-radius: 6px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-large, .contact-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 600;
    margin-top: 12px;
    color: var(--text-primary);
    word-break: break-word;
}

/* Desktop Large Screens - дополнительные ограничения */
@media (min-width: 1600px) {
    .hero-main-text h1 {
        font-size: 3.8rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.15rem;
    }
    
    .section-title {
        font-size: 3.2rem;
    }
    
    .timeline-title {
        font-size: 2rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 0;
    }
    
    .hero {
        padding: 100px 40px;
    }
    
    .section {
        padding: 70px 40px;
    }
    
    .timeline-item {
        gap: 30px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .theme-switcher {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar {
        top: 80px;
        left: 0;
        right: 0;
        transform: translateX(0);
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }
    
    .navbar.active {
        max-height: 500px;
        opacity: 1;
        pointer-events: all;
        padding: 20px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 16px 20px;
        text-align: center;
        border-radius: 12px;
        margin-bottom: 8px;
    }
    
    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }
    
    .hero-content {
        gap: 40px;
        text-align: center;
    }
    
    .hero-main-text {
        order: 2;
    }
    
    .hero-photo {
        order: 1;
        height: 400px;
        margin: 0 auto;
        
    }


    .hero-info {
        justify-content: center;
        gap: 8px;
    }
    
    .hero-info span {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-modern {
        width: 100%;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
        margin-bottom: 50px;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-date {
        writing-mode: horizontal-tb;
        text-orientation: unset;
        text-align: left;
        font-size: 0.9rem;
        padding-bottom: 8px;
        border-bottom: 2px solid var(--border-heavy);
    }
    
    .timeline-content {
        padding: 24px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .content-card {
        padding: 32px 24px;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .hero-main-text h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .timeline-title {
        font-size: 1.3rem;
    }
    
    .timeline-company {
        font-size: 0.95rem;
    }
    
    .timeline-desc {
        font-size: 0.9rem;
    }
    
    .btn-modern {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/* Skill category title */
.skill-category-title {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-heavy);
}

/* Text-only skill items (without bars) */
.skill-item-text {
    margin-bottom: 16px;
    text-align: left;
}

.skill-item-text:last-child {
    margin-bottom: 0;
}

.skill-label-text {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    color: var(--text-secondary);
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.skill-label-text:hover {
    background: var(--border-light);
    border-color: var(--border-heavy);
}

.skill-level {
    font-weight: 700;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: nowrap;
    padding: 4px 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 20px;
    font-size: 0.85rem;
}
