* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0f; --surface: #12121a; --surface-light: #1a1a25;
    --primary: #7c5cfc; --primary-glow: #a78bfa; --secondary: #00d4aa;
    --text: #e4e4ec; --text-muted: #8b8b9e;
    --border: rgba(255, 255, 255, 0.05); --radius: 20px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html { font-size: 16px; }
body {
    font-family: var(--font-sans); background: var(--bg); color: var(--text);
    overflow: hidden; height: 100vh; width: 100vw; -webkit-font-smoothing: antialiased;
}

.cursor-glow {
    position: fixed; pointer-events: none; width: 500px; height: 500px;
    border-radius: 50%; transform: translate(-50%, -50%); z-index: 0;
    background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, transparent 70%);
}

.bg-orb { position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.15; z-index: 0; pointer-events: none; }
.bg-orb-1 { width:600px; height:600px; background:#7c5cfc; top:-200px; left:-150px; }
.bg-orb-2 { width:500px; height:500px; background:#00d4aa; bottom:-150px; right:-100px; }
.bg-orb-3 { width:400px; height:400px; background:#f97316; top:40%; left:60%; }

.app { position: relative; z-index: 1; width: 100vw; height: 100vh; overflow: hidden; }
.sections-wrapper { display: flex; height: 100%; will-change: transform; }

.section {
    flex: 0 0 100vw; height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem; position: relative;
}
.section-content { width: 100%; max-width: 1200px; margin: 0 auto; }

/* Hero */
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(124,92,252,0.1); border: 1px solid rgba(124,92,252,0.3);
    border-radius: 50px; padding: 0.3rem 1rem; font-size: 0.85rem; font-weight: 500;
    color: var(--primary-glow); margin-bottom: 1.5rem; backdrop-filter: blur(10px);
}
.status-dot { width:8px; height:8px; border-radius:50%; background:var(--secondary); box-shadow:0 0 8px var(--secondary); animation:pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

.hero-name { font-size: clamp(2.8rem,7vw,5rem); font-weight:800; line-height:1.05; margin-bottom:0.5rem; }
.hero-name-line { display: block; }
.hero-name-line-accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-title { font-size:1.2rem; font-weight:500; color:var(--text-muted); margin-bottom:1.5rem; font-family:var(--font-mono); letter-spacing:0.5px; }
.hero-bio { color:rgba(255,255,255,0.7); line-height:1.6; margin-bottom:2rem; max-width:480px; }
.hero-meta { display:flex; gap:1.5rem; margin-bottom:2rem; flex-wrap:wrap; }
.hero-location, .hero-exp { display:flex; align-items:center; gap:0.4rem; font-size:0.9rem; color:var(--text-muted); }
.icon-sm { width:18px; height:18px; }
.hero-actions { display:flex; gap:1rem; flex-wrap:wrap; }

.btn {
    display:inline-flex; align-items:center; gap:0.5rem; padding:0.75rem 1.8rem;
    border-radius:50px; font-weight:600; font-size:0.9rem; cursor:pointer;
    text-decoration:none; transition: all 0.3s ease; border:none;
}
.btn-primary { background:var(--primary); color:white; box-shadow:0 8px 25px rgba(124,92,252,0.3); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(124,92,252,0.5); }
.btn-secondary { background:transparent; border:1px solid rgba(255,255,255,0.2); color:white; backdrop-filter:blur(5px); }
.btn-secondary:hover { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.4); transform:translateY(-2px); }

.hero-right { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.hero-photo-wrapper { position:relative; width:280px; height:280px; }
.hero-photo-ring {
    position:absolute; inset:-10px;
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    border:2px solid rgba(124,92,252,0.4); animation: morphRotate 8s linear infinite;
}
@keyframes morphRotate {
    0% { border-radius:40% 60% 60% 40%/40% 40% 60% 60%; transform:rotate(0deg); }
    50% { border-radius:60% 40% 40% 60%/60% 60% 40% 40%; }
    100% { border-radius:40% 60% 60% 40%/40% 40% 60% 60%; transform:rotate(360deg); }
}
.hero-photo-inner { width:100%; height:100%; border-radius:50%; overflow:hidden; background:var(--surface-light); display:flex; align-items:center; justify-content:center; box-shadow:0 20px 40px rgba(0,0,0,0.5); }
.hero-photo { width:100%; height:100%; object-fit:cover; }
.hero-photo-fallback { font-size:5rem; font-weight:800; color:var(--primary); }
.hero-photo-glow { position:absolute; inset:-20px; background:radial-gradient(circle, rgba(124,92,252,0.2) 0%, transparent 70%); border-radius:50%; z-index:-1; animation:glowPulse 3s ease-in-out infinite; }
@keyframes glowPulse { 0%,100%{opacity:0.5; transform:scale(1);} 50%{opacity:1; transform:scale(1.05);} }
.hero-tagline { margin-top:2rem; font-size:0.8rem; letter-spacing:6px; color:var(--text-muted); font-weight:600; }

.scroll-hint { position:absolute; bottom:2rem; display:flex; flex-direction:column; align-items:center; gap:0.5rem; color:var(--text-muted); font-size:0.75rem; letter-spacing:1px; }
.scroll-hint-arrow { width:20px; animation: bounce 2s infinite; }
@keyframes bounce { 0%,20%,50%,80%,100%{transform:translateY(0);} 40%{transform:translateY(8px);} 60%{transform:translateY(4px);} }

.section-header { margin-bottom:3rem; }
.section-title { font-size:clamp(2rem,4vw,3rem); font-weight:700; margin:0.5rem 0; }
.section-subtitle { color:var(--text-muted); font-size:1rem; }

/* Skills */
.skills-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1.5rem; }
.skill-card {
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    padding:2rem 1.5rem; text-align:center; transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
    backdrop-filter:blur(5px);
}
.skill-card:hover { transform:translateY(-8px) scale(1.02); border-color:rgba(124,92,252,0.4); box-shadow:0 20px 40px rgba(0,0,0,0.4); }
.skill-icon { width:48px; margin:0 auto 1rem; }

/* Новый класс для изображений в навыках */
.skill-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px; /* лёгкое скругление, как у иконок */
}

.skill-card h3 { font-size:1.1rem; margin-bottom:0.5rem; }
.skill-card p { font-size:0.8rem; color:var(--text-muted); line-height:1.5; }

/* Education / Work */
.edu-work-grid { display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:start; }
.edu-work-column { display:flex; flex-direction:column; gap:1.5rem; }
.edu-work-main-title { font-size:2rem; font-weight:700; margin-bottom:0.2rem; }
.edu-work-column .section-subtitle { margin-bottom: 1rem; }
.edu-work-list { display:flex; flex-direction:column; gap:1rem; }

.edu-work-card {
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    padding:1.5rem; position:relative; transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}
.edu-work-card:hover { border-color:rgba(124,92,252,0.3); transform:translateX(8px); box-shadow:0 10px 30px rgba(0,0,0,0.3); }

.edu-badge-current, .edu-badge-year {
    font-family:var(--font-mono); font-size:0.8rem; font-weight:600;
    display:inline-block; padding:0.2rem 0.8rem; border-radius:50px; margin-bottom:0.8rem;
}
.edu-badge-current { background:rgba(0,212,170,0.15); color:var(--secondary); }
.edu-badge-year { background:rgba(255,255,255,0.05); color:var(--text-muted); }

.edu-work-card h4 { font-size:1.2rem; margin-bottom:0.3rem; }
.card-subtitle { font-size:0.9rem; color:var(--text-muted); margin-bottom:0.5rem; }
.card-desc { font-size:0.9rem; color:rgba(255,255,255,0.6); line-height:1.5; }

/* Projects */
.projects-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:1.5rem; }
.project-card {
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    padding:2rem; display:flex; flex-direction:column; justify-content:space-between;
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}
.project-card:hover { transform:translateY(-8px); border-color:rgba(124,92,252,0.3); box-shadow:0 20px 40px rgba(0,0,0,0.3); }
.project-icon { margin-bottom:1rem; }

/* Новый класс для изображений в проектах */
.project-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.project-card h3 { font-size:1.2rem; margin-bottom:0.8rem; }
.project-card p { color:rgba(255,255,255,0.6); font-size:0.9rem; line-height:1.5; margin-bottom:1.5rem; }
.project-tags { display:flex; flex-wrap:wrap; gap:0.5rem; }
.project-tags span { background:rgba(255,255,255,0.05); padding:0.3rem 0.8rem; border-radius:50px; font-size:0.7rem; font-weight:600; letter-spacing:0.5px; color:var(--text-muted); }

/* Contacts */
.contacts-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:1.5rem; }
.contact-card {
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    padding:2rem 1.5rem; text-align:center; text-decoration:none; color:var(--text);
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1); display:flex;
    flex-direction:column; align-items:center; gap:0.5rem;
}
.contact-card:hover { transform:translateY(-8px); border-color:rgba(124,92,252,0.5); background:var(--surface-light); box-shadow:0 15px 35px rgba(0,0,0,0.4); }
.contact-card-icon { width:40px; height:40px; margin-bottom:0.5rem; }
.contact-card-icon svg { width:100%; height:100%; }
.contact-card h3 { font-size:1rem; }
.contact-card span { font-size:0.85rem; color:var(--primary-glow); font-weight:500; }
.contact-card small { font-size:0.7rem; color:var(--text-muted); }

/* Navigation */
.section-nav {
    position: fixed; right: 1.5rem; top: 50%; transform: translateY(-50%);
    z-index: 10; display: flex; align-items: center; gap: 1rem;
}
.nav-labels {
    display: flex; flex-direction: column; gap: 0.5rem;
}
.nav-label {
    font-size: 0.7rem; letter-spacing: 0.5px; color: var(--text-muted);
    cursor: pointer; text-transform: uppercase; font-weight: 600;
    opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.nav-label.active {
    opacity: 1; color: var(--text); pointer-events: auto;
}
.section-nav:hover .nav-label {
    opacity: 1; pointer-events: auto;
}

.nav-dots { display: flex; flex-direction: column; gap: 0.8rem; }
.nav-dot {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.2);
    border: none; cursor: pointer; transition: all 0.3s ease; position: relative;
}
.nav-dot-inner { position: absolute; inset: -3px; border-radius: 50%; border: 1px solid transparent; transition: border-color 0.3s; }
.nav-dot.active { background: var(--primary); box-shadow: 0 0 15px var(--primary); }
.nav-dot.active .nav-dot-inner { border-color: var(--primary-glow); }

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    body { overflow: auto; }
    .app { height: auto; overflow: visible; }
    .sections-wrapper {
        display: block;
        transform: none !important;
        height: auto;
    }
    .section {
        flex: none;
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 3rem 1.5rem;
        justify-content: flex-start;
    }
    .section-content { max-width: 100%; }

    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero-left { order: 2; }
    .hero-right { order: 1; }
    .hero-bio { max-width: 100%; }
    .hero-meta, .hero-actions { justify-content: center; }
    .hero-photo-wrapper { width: 180px; height: 180px; margin: 0 auto; }
    .hero-tagline { margin-top: 1rem; }
    .scroll-hint { display: none; }

    .skills-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; }
    .skill-card { padding: 1.5rem 1rem; }

    .edu-work-grid { grid-template-columns: 1fr; gap: 3rem; }
    .edu-work-main-title { font-size: 1.8rem; }
    .section-title { font-size: 1.8rem; }
    .section-header { margin-bottom: 2rem; }

    .projects-grid { grid-template-columns: 1fr; }
    .contacts-grid { grid-template-columns: 1fr 1fr; }

    .section-nav { display: none; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 2.2rem; }
    .hero-title { font-size: 1rem; }
    .btn { padding: 0.6rem 1.2rem; font-size: 0.8rem; }
    .section { padding: 2rem 1rem; }
    .contacts-grid { grid-template-columns: 1fr; }
}