:root {
    --bg: #09090b;
    --bg-elevated: #18181b;
    --bg-glass: rgba(24, 24, 27, 0.6);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent-1: #60a5fa;
    --accent-2: #a78bfa;
    --accent-3: #f472b6;
    --gradient: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --toggle-bg: rgba(255, 255, 255, 0.1);
    --toggle-knob: #fafafa;
    --code-bg: #1e1e2e;
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text: #18181b;
    --text-secondary: #52525b;
    --text-tertiary: #71717a;
    --accent-1: #3b82f6;
    --accent-2: #7c3aed;
    --accent-3: #ec4899;
    --gradient: linear-gradient(135deg, #3b82f6, #7c3aed, #ec4899);
    --toggle-bg: rgba(0, 0, 0, 0.1);
    --toggle-knob: #18181b;
    --code-bg: #f4f4f5;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-2) transparent;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-2);
    color: var(--bg);
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -200px;
    right: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -150px;
    left: -150px;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.glass:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* NAV */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
}

.logo-bracket {
    color: var(--accent-2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    padding: 8px 20px !important;
    background: var(--gradient);
    border-radius: 999px;
    color: var(--bg) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    opacity: 0.9;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

.theme-toggle {
    width: 48px;
    height: 26px;
    background: var(--toggle-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--toggle-knob);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

[data-theme="light"] .theme-toggle::after {
    transform: translateX(22px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    transition: opacity 0.3s;
}

.theme-toggle .icon-sun {
    left: 5px;
    opacity: 1;
}

.theme-toggle .icon-moon {
    right: 5px;
    opacity: 0;
}

[data-theme="light"] .theme-toggle .icon-sun {
    opacity: 0;
}

[data-theme="light"] .theme-toggle .icon-moon {
    opacity: 1;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-line {
    display: block;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font);
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg);
}

.btn-primary:hover {
    box-shadow: 0 4px 24px rgba(96, 165, 250, 0.4);
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: var(--bg-glass);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.stat-plus {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-2);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-visual {
    flex: 1;
    min-width: 0;
}

.code-window {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--code-bg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:nth-child(3) { background: #22c55e; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
}

.code-body code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.code-body .kw { color: #c678dd; }
.code-body .cls { color: #e5c07b; }
.code-body .fn { color: #61afef; }
.code-body .str { color: #98c379; }
.code-body .num { color: #d19a66; }
.code-body .var { color: #e06c75; }
.code-body .cm { color: #5c6370; font-style: italic; }

/* SECTIONS */
section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.about-card {
    padding: 32px;
    border-radius: var(--radius);
}

.about-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(96, 165, 250, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* STACK */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.stack-category h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.stack-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.stack-icon {
    font-size: 1.2rem;
}

.stack-level {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-2);
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(167, 139, 250, 0.1);
}

/* TIMELINE */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 32px;
}

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

.timeline-item {
    position: relative;
    padding: 28px 32px;
    border-radius: var(--radius);
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 32px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent-2);
    z-index: 1;
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 8px 0;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    padding: 32px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.service-number {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    top: 16px;
    right: 24px;
    line-height: 1;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tags span {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(167, 139, 250, 0.08);
    color: var(--accent-2);
    border: 1px solid rgba(167, 139, 250, 0.15);
}

/* CONTACT */
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px;
    border-radius: var(--radius);
}

.contact-content .section-tag {
    margin-bottom: 12px;
}

.contact-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-link svg {
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.2s;
}

.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.form-message--success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-message--error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-message--warning {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

#yandex-captcha {
    display: flex;
    justify-content: center;
    min-height: 40px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 0.7rem;
    background: var(--bg-elevated);
    padding: 0 6px;
    color: var(--accent-2);
}

/* FOOTER */
.footer {
    padding: 32px 24px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-link {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
    font-family: var(--font);
}

.footer-link:hover {
    color: var(--text-secondary);
}

/* SCROLL PROGRESS */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 101;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* PARTICLES CANVAS */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* MAGNETIC CURSOR */
.magnetic {
    position: relative;
    display: inline-flex;
}

/* CARD TILT */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.15s ease-out, box-shadow 0.3s;
}

/* GRADIENT BORDER ANIMATION */
.gradient-border {
    position: relative;
    overflow: hidden;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* TEXT SCRAMBLE */
.scramble-text {
    display: inline-block;
}

/* GLITCH LOGO */
.logo-glitch {
    position: relative;
}

.logo-glitch::before,
.logo-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.logo-glitch:hover::before {
    animation: glitch-1 0.3s linear;
    color: var(--accent-1);
    opacity: 0.8;
}

.logo-glitch:hover::after {
    animation: glitch-2 0.3s linear;
    color: var(--accent-3);
    opacity: 0.8;
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(92% 0 1% 0); transform: translate(1px, -1px); }
    40% { clip-path: inset(43% 0 1% 0); transform: translate(-1px, 2px); }
    60% { clip-path: inset(25% 0 58% 0); transform: translate(2px, 1px); }
    80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, -1px); }
    100% { clip-path: inset(58% 0 43% 0); transform: translate(0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(65% 0 13% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(15% 0 62% 0); transform: translate(-1px, 2px); }
    40% { clip-path: inset(79% 0 2% 0); transform: translate(1px, -2px); }
    60% { clip-path: inset(2% 0 78% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(36% 0 49% 0); transform: translate(2px, 2px); }
    100% { clip-path: inset(91% 0 1% 0); transform: translate(0); }
}

/* SPOTLIGHT EFFECT */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(167, 139, 250, 0.12), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.spotlight-card:hover::after {
    opacity: 1;
}

/* PROFILE IMAGE */
.profile-glow {
    position: relative;
    display: inline-block;
}

.profile-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient);
    filter: blur(16px);
    opacity: 0.5;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* FLOATING BADGE */
.float-badge {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* SECTION REVEAL */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* STAGGER CHILDREN */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* HOVER LIFT */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hover-lift:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* TYPEWRITER CURSOR */
.typewriter-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent-2);
    margin-left: 2px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ANIMATED UNDERLINE */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-underline:hover::after {
    width: 100%;
}

/* NUMBER COUNTER GLOW */
.stat-number {
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

/* SMOOTH SCROLLBAR TRACK */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        max-width: 500px;
    }

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

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

    .contact-inner {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 40px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }
}

@media (max-width: 600px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .about-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

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

    section {
        padding: 60px 16px;
    }

    .contact-inner {
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    overflow: hidden;
    pointer-events: none;
}

.checkbox-mark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--bg-elevated);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-mark svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.15s ease;
}

.checkbox-group.checked .checkbox-mark {
    background: var(--accent-1);
    border-color: var(--accent-1);
}

.checkbox-group.checked .checkbox-mark svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-group.error .checkbox-mark {
    border-color: #ef4444;
    animation: checkShake 0.4s ease;
}

.checkbox-group.error .checkbox-text {
    color: #ef4444;
}

@keyframes checkShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.checkbox-group input:focus-visible + .checkbox-mark {
    outline: 2px solid var(--accent-1);
    outline-offset: 2px;
}

.checkbox-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-text a {
    color: var(--accent-1);
    text-decoration: underline;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

.cookie-banner-inner p {
    flex: 1;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-banner-inner a {
    color: var(--accent-1);
    text-decoration: underline;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* =============================================
   3D FLOATING GEOMETRY — Decorative shapes
   ============================================= */
.float-geo {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    perspective: 1200px;
    overflow: hidden;
}

.geo-shape {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Cube */
.geo-cube {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 10%;
    animation: geoFloatCube 20s ease-in-out infinite;
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1.5px solid rgba(167, 139, 250, 0.15);
    background: rgba(167, 139, 250, 0.03);
    border-radius: 8px;
}

.cube-face.front  { transform: translateZ(40px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(40px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(40px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(40px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(40px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes geoFloatCube {
    0%, 100% { transform: rotateX(-15deg) rotateY(0deg) translateY(0px); }
    25%      { transform: rotateX(-10deg) rotateY(90deg) translateY(-20px); }
    50%      { transform: rotateX(-5deg) rotateY(180deg) translateY(-5px); }
    75%      { transform: rotateX(-10deg) rotateY(270deg) translateY(-25px); }
}

/* Pyramid */
.geo-pyramid {
    width: 70px;
    height: 70px;
    bottom: 25%;
    left: 5%;
    animation: geoFloatPyramid 25s ease-in-out infinite;
}

.pyramid-face {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 60px solid rgba(96, 165, 250, 0.06);
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.04));
}

.pyramid-face.base {
    width: 70px;
    height: 70px;
    border: none;
    background: rgba(96, 165, 250, 0.03);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transform: rotateX(90deg) translateZ(-35px);
}

.pyramid-face.side-1 { transform: rotateY(0deg) rotateX(30deg) translateZ(35px); border-bottom-color: rgba(96, 165, 250, 0.06); }
.pyramid-face.side-2 { transform: rotateY(90deg) rotateX(30deg) translateZ(35px); border-bottom-color: rgba(96, 165, 250, 0.04); }
.pyramid-face.side-3 { transform: rotateY(180deg) rotateX(30deg) translateZ(35px); border-bottom-color: rgba(96, 165, 250, 0.06); }
.pyramid-face.side-4 { transform: rotateY(270deg) rotateX(30deg) translateZ(35px); border-bottom-color: rgba(96, 165, 250, 0.04); }

@keyframes geoFloatPyramid {
    0%, 100% { transform: rotateX(10deg) rotateY(0deg) translateY(0px) scale(1); }
    33%      { transform: rotateX(15deg) rotateY(120deg) translateY(-15px) scale(0.95); }
    66%      { transform: rotateX(5deg) rotateY(240deg) translateY(-30px) scale(1.05); }
}

/* Ring / Torus */
.geo-ring {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 15%;
    transform-style: preserve-3d;
    animation: geoFloatRing 30s linear infinite;
}

.ring-inner {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(244, 114, 182, 0.1);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.03), inset 0 0 30px rgba(244, 114, 182, 0.03);
}

.ring-inner::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1.5px solid rgba(244, 114, 182, 0.06);
    border-radius: 50%;
    border-top-color: rgba(244, 114, 182, 0.2);
    animation: ringSpin 4s linear infinite;
}

.ring-inner::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1.5px solid rgba(244, 114, 182, 0.04);
    border-radius: 50%;
    border-bottom-color: rgba(244, 114, 182, 0.15);
    animation: ringSpin 3s linear infinite reverse;
}

@keyframes ringSpin {
    to { transform: rotate(360deg); }
}

@keyframes geoFloatRing {
    0%, 100% { transform: rotateX(60deg) rotateY(0deg) translateY(0px); }
    50%      { transform: rotateX(60deg) rotateY(180deg) translateY(-15px); }
}

/* =============================================
   BLOCK 2 — PROBLEMS (Проблемы клиентов)
   ============================================= */
.problems {
    position: relative;
    z-index: 1;
}

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

.problem-card {
    padding: 40px 32px;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}

.problem-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.08), transparent 70%);
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity 0.4s;
    opacity: 0;
}

.problem-card:hover .problem-glow {
    opacity: 1;
}

.problem-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    perspective: 600px;
}

.problem-icon-3d {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, 0.08);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s, border-color 0.3s;
    transform-style: preserve-3d;
}

.problem-svg {
    display: block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.problem-card:hover .problem-svg {
    transform: translateZ(20px) scale(1.1);
}

.problem-card:hover .problem-icon-3d {
    transform: rotateY(12deg) rotateX(-6deg) translateZ(15px);
    box-shadow: -6px 8px 30px rgba(167, 139, 250, 0.2), 0 0 40px rgba(167, 139, 250, 0.08);
    border-color: var(--accent-2);
}

.problem-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =============================================
   BLOCK 5 — PROCESS (Как проходит работа)
   ============================================= */
.process {
    position: relative;
    z-index: 1;
}

.process-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 0;
}

.process-connector {
    display: none;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 32px 36px;
    border-radius: var(--radius);
    position: relative;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
    transition: border-color 0.4s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
    perspective: 800px;
}

.process-step:hover {
    border-left-color: var(--accent-2);
    transform: translateX(8px) translateZ(10px);
    box-shadow: -8px 8px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .process-step:hover {
    box-shadow: -8px 8px 30px rgba(0, 0, 0, 0.08);
}

.process-step-3d {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.process-step:hover .process-step-3d {
    transform: rotateY(-15deg) rotateX(5deg) translateZ(20px);
}

.process-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(167, 139, 250, 0.15);
    transition: all 0.4s;
}

.process-step:hover .process-ring {
    border-color: var(--accent-2);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
    transform: scale(1.15);
}

.process-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-2);
    z-index: 1;
    transition: transform 0.4s;
}

.process-step:hover .process-number {
    transform: translateZ(15px);
}

.process-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.process-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =============================================
   BLOCK 3 — SERVICES (Новый блок услуг)
   ============================================= */
.services-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card-new {
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    perspective: 1000px;
}

.service-card-3d-inner {
    padding: 40px 32px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.service-card-new:hover .service-card-3d-inner {
    transform: translateZ(15px);
}

.service-card-icon-3d {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(96, 165, 250, 0.08);
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
    transform-style: preserve-3d;
}

.service-card-new:hover .service-card-icon-3d {
    transform: rotateY(8deg) rotateX(-4deg) translateZ(20px);
    box-shadow: -4px 4px 20px rgba(96, 165, 250, 0.15);
}

.service-icon-front {
    display: block;
    transform: translateZ(6px);
}

.service-card-3d-inner h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
}

.service-card-new:hover .service-list li {
    color: var(--text);
}

.service-list li:hover {
    transform: translateX(6px);
    color: var(--text) !important;
}

.check-icon {
    color: var(--accent-1);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.1);
    transition: background 0.3s, transform 0.3s;
}

.service-list li:hover .check-icon {
    background: rgba(96, 165, 250, 0.2);
    transform: scale(1.15);
}

/* =============================================
   BLOCK 4 — WHY ME (Почему один разработчик)
   ============================================= */
.why-me {
    position: relative;
    z-index: 1;
}

.why-me-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 48px 56px;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.why-me-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(167, 139, 250, 0.03), transparent 70%);
    pointer-events: none;
}

.why-me-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.why-me-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.4s,
                box-shadow 0.4s;
    text-align: left;
    perspective: 500px;
}

.why-me-item:hover {
    transform: translateX(8px) translateZ(5px);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.05);
}

.why-me-cross-wrap {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.12);
    transition: all 0.4s;
}

.why-me-item:hover .why-me-cross-wrap {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
    transform: rotate(90deg) scale(1.05);
}

.why-me-cross-line {
    position: absolute;
    width: 18px;
    height: 2px;
    background: #ef4444;
    border-radius: 1px;
}

.why-me-cross-line.a {
    transform: rotate(45deg);
}

.why-me-cross-line.b {
    transform: rotate(-45deg);
}

.why-me-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.why-me-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.why-me-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.why-me-divider {
    width: 60px;
    height: 2px;
    background: var(--gradient);
    margin: 0 auto 28px;
    border-radius: 1px;
}

.why-me-final-text {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.why-me-signature {
    display: inline-block;
}

.why-me-signature-line {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-2);
    opacity: 0.6;
    letter-spacing: 0.02em;
}

/* =============================================
   3D SCROLL REVEAL ANIMATIONS
   ============================================= */
[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate="fade-up"].visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-left"] {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate="fade-left"].visible {
    opacity: 1;
    transform: translateX(0);
}

/* 3D perspective reveal variants */
[data-animate="rotate-in"] {
    opacity: 0;
    transform: perspective(800px) rotateX(10deg) translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="rotate-in"].visible {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) translateY(0);
}

[data-animate="flip-in"] {
    opacity: 0;
    transform: perspective(800px) rotateY(-15deg) translateX(-30px) scale(0.95);
    transform-origin: left center;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="flip-in"].visible {
    opacity: 1;
    transform: perspective(800px) rotateY(0deg) translateX(0) scale(1);
}

/* 3D depth hover effect on all glass cards */
.glass {
    transform-style: preserve-3d;
    will-change: transform;
}

/* =============================================
   RESPONSIVE — New blocks
   ============================================= */
@media (max-width: 900px) {
    .problems-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .services-grid-new {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .why-me-content {
        padding: 32px 24px;
    }

    .process-step {
        padding: 24px;
    }

    .process-step:hover {
        transform: translateX(4px);
    }
}

@media (max-width: 600px) {
    .problem-card {
        padding: 28px 24px;
    }

    .problem-icon-wrap {
        width: 64px;
        height: 64px;
    }

    .service-card-3d-inner {
        padding: 28px 24px;
    }

    .service-card-icon-3d {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .why-me-item {
        padding: 16px;
    }

    .geo-cube { display: none; }
    .geo-pyramid { display: none; }
    .geo-ring { display: none; }
}
