/* --- ПЕРЕМЕННЫЕ И ГЛОБАЛЬНЫЙ RESET --- */
:root {
    --dark-navy: #020c1b;
    --navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --navy-shadow: rgba(2, 12, 27, 0.7);
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --font-sans: 'Calibre', 'San Francisco', 'SF Pro Text', -apple-system, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    background-color: var(--navy);
    color: var(--slate);
    font-family: var(--font-sans);
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}

/* --- ОСНОВНАЯ СТРУКТУРА --- */
#content { padding: 0 150px; }
.section { margin: 0 auto; padding-top: 100px; padding-bottom: 100px; max-width: 1000px; }
#education { padding-top: 0; }
.section-title { display: flex; align-items: center; margin-bottom: 40px; font-size: clamp(26px, 5vw, 32px); color: var(--lightest-slate); white-space: nowrap; }
.section-title span { color: var(--green); font-family: var(--font-mono); margin-right: 10px; font-size: 20px; }
.section-title::after { content: ''; display: block; position: relative; top: -1px; width: 100%; height: 1px; margin-left: 20px; background-color: var(--lightest-navy); }
.footer { text-align: center; padding: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--slate); }

/* --- НАВИГАЦИЯ И БОКОВЫЕ ПАНЕЛИ --- */
.navbar { position: fixed; top: 0; width: 100%; z-index: 11; background-color: rgba(10, 25, 47, 0.85); backdrop-filter: blur(10px); transition: top 0.3s ease-in-out; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 0 50px; height: 100px; }
.nav-logo { color: var(--green); font-family: var(--font-mono); font-size: 24px; text-decoration: none; }
.nav-menu { list-style: none; display: flex; gap: 40px; }
.nav-menu a { color: var(--lightest-slate); text-decoration: none; font-family: var(--font-mono); font-size: 14px; }
.nav-menu span { color: var(--green); margin-right: 5px; }

.left-sidebar, .right-sidebar { width: 40px; position: fixed; bottom: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.left-sidebar { left: 40px; }
.right-sidebar { right: 40px; }
.left-sidebar a, .right-sidebar a { font-size: 20px; color: var(--slate); transition: all 0.25s; }
.left-sidebar a:hover, .right-sidebar a:hover { color: var(--green); transform: translateY(-3px); }
.right-sidebar a { writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.1em; text-decoration: none; }
.left-sidebar::after, .right-sidebar::after { content: ''; display: block; width: 1px; height: 90px; margin-top: 20px; background-color: var(--slate); }

/* --- СЕКЦИИ --- */
.hero { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding-top: 0; padding-bottom: 0; }
.hero-intro { color: var(--green); font-family: var(--font-mono); margin-bottom: 20px; font-size: 16px; }
.hero-title { font-size: clamp(40px, 8vw, 80px); color: var(--lightest-slate); margin: 0; line-height: 1.1; }
.hero-subtitle { font-size: clamp(40px, 8vw, 70px); color: var(--slate); margin: 0; line-height: 1.1; }
.hero-desc { max-width: 540px; margin-top: 25px; }
.cta-button {
    color: var(--green);
    background-color: transparent;
    border: 1px solid var(--green);
    border-radius: 4px;
    padding: 1.25rem 2rem;
    font-size: 16px;
    font-family: var(--font-mono);
    text-decoration: none;
    line-height: 1;
    transition: all 0.25s;
    margin-top: 50px;
    display: inline-block;
    cursor: pointer;
}
.cta-button:hover { background-color: rgba(100, 255, 218, 0.1); }

.about-text p { margin-bottom: 15px; }
.tech-list { display: grid; grid-template-columns: repeat(2, minmax(140px, 200px)); gap: 10px; padding: 0; margin-top: 20px; list-style: none; }
.tech-list li { position: relative; padding-left: 20px; font-family: var(--font-mono); font-size: 14px; }
.tech-list li::before { content: '▹'; position: absolute; left: 0; color: var(--green); }

.experience-tabs { display: flex; gap: 30px; min-height: 340px; }
.tabs { display: flex; flex-direction: column; }
.tab-button { background: transparent; border: none; border-left: 2px solid var(--lightest-navy); padding: 10px 20px; text-align: left; color: var(--slate); cursor: pointer; transition: all 0.25s; font-family: var(--font-mono); white-space: nowrap; }
.tab-button:hover, .tab-button.active { color: var(--green); background-color: var(--light-navy); border-left-color: var(--green); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content h3 { font-size: 22px; color: var(--lightest-slate); margin-bottom: 5px; }
.tab-content .company { color: var(--green); }
.tab-content .date { font-family: var(--font-mono); font-size: 13px; margin-bottom: 20px; }
.tab-content ul { padding: 0; list-style: none; }
.tab-content li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.tab-content li::before { content: '▹'; position: absolute; left: 0; color: var(--green); }

.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.education-card { background-color: var(--light-navy); padding: 1.75rem; border-radius: 4px; border-left: 3px solid var(--green); }
.education-card h3 { color: var(--lightest-slate); font-size: 20px; margin-bottom: 5px; }
.education-card .university { font-family: var(--font-sans); font-size: 16px; color: var(--slate); }
.education-card .years { font-family: var(--font-mono); font-size: 13px; color: var(--light-slate); margin-top: 10px; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.project-card { background-color: var(--light-navy); padding: 2rem 1.75rem; border-radius: 4px; transition: all 0.25s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px -15px var(--navy-shadow); }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.project-header .fa-folder { color: var(--green); font-size: 40px; }
.project-links { display: flex; align-items: center; gap: 15px; }
.project-links a { color: var(--light-slate); font-size: 22px; transition: color 0.25s; }
.project-links a:hover { color: var(--green); }
.project-title { font-size: 22px; color: var(--lightest-slate); margin-bottom: 10px; }
.project-desc { font-size: 17px; flex-grow: 1; }
.project-tech { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 15px; font-family: var(--font-mono); color: var(--slate); font-size: 12px; }

.contact-section { text-align: center; }
.section-title-contact { font-size: 16px; font-family: var(--font-mono); color: var(--green); margin-bottom: 10px; }
.contact-title { font-size: clamp(40px, 5vw, 60px); color: var(--lightest-slate); }
.contact-desc { max-width: 600px; margin: 0 auto 50px; }

/* --- АНИМАЦИИ И ОТЗЫВЧИВОСТЬ --- */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }

@media (max-width: 1080px) {
    #content { padding: 0 100px; }
    .left-sidebar, .right-sidebar { display: none; }
}
@media (max-width: 768px) {
    #content { padding: 0 25px; }
    .nav-container { padding: 0 25px; }
    .nav-menu { display: none; }
    .experience-tabs { flex-direction: column; }
    .tabs { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--lightest-navy); margin-bottom: 20px; }
    .tab-button { border-left: none; border-bottom: 2px solid transparent; }
    .tab-button.active { border-bottom-color: var(--green); }
}