/* ============================================
   QUANTOSMART — Design System & Styles
   ============================================ */

/* ---------- Intro Splash ---------- */
.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #030712;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-splash.morphing {
    pointer-events: none;
}

/* Gradient burst flash */
.intro-splash .intro-flash {
    position: absolute;
    inset: -50%;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 1) 0%,
        rgba(196, 225, 255, 0.9) 20%,
        rgba(96, 165, 250, 0.6) 50%,
        rgba(34, 211, 238, 0.3) 70%,
        transparent 90%);
}

.intro-splash.flashing .intro-flash {
    animation: intro-burst 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes intro-burst {
    0%   { opacity: 0; transform: scale(0.1); }
    15%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.6); }
}

.intro-splash.done {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.intro-video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    border-radius: 0;
    transition: all 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-splash.morphing .intro-video {
    border-radius: 50%;
    box-shadow:
        0 0 60px rgba(59, 130, 246, 0.3),
        0 0 120px rgba(6, 182, 212, 0.15);
}

.skip-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    animation: skip-btn-fade-in 0.8s ease 1s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.skip-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

@keyframes skip-btn-fade-in {
    to { opacity: 1; }
}

.intro-splash.done .skip-btn {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .skip-btn {
        bottom: 60px;
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* ---- Cinematic Hero Reveal ---- */
body.splash-active .navbar,
body.splash-active .hero .hero-text,
body.splash-active .hero .scroll-indicator {
    opacity: 0;
}

/* Navbar reveal */
body:not(.splash-active) .navbar {
    animation: reveal-glow-navbar 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes reveal-glow-navbar {
    0%   { opacity: 0; filter: blur(10px) brightness(2); transform: translateY(-30px); }
    100% { opacity: 1; filter: blur(0) brightness(1); transform: translateY(0); }
}

/* Hero elements reveal — glowing and settling */
body:not(.splash-active) .hero-badge {
    animation: reveal-glow 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

body:not(.splash-active) .hero-title {
    animation: reveal-glow-title 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

body:not(.splash-active) .hero-subtitle {
    animation: reveal-glow 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

body:not(.splash-active) .hero-actions {
    animation: reveal-glow 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

body:not(.splash-active) .hero-stats {
    animation: reveal-glow 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

body:not(.splash-active) .scroll-indicator {
    animation: reveal-glow 1s ease 0.6s both;
}

@keyframes reveal-glow {
    0%   { opacity: 0; filter: blur(12px) brightness(2); transform: scale(0.95) translateY(20px); }
    30%  { opacity: 1; filter: blur(5px) brightness(1.5); }
    100% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1) translateY(0); }
}

@keyframes reveal-glow-title {
    0%   { opacity: 0; filter: blur(20px) brightness(2.5); transform: scale(0.9) translateY(30px); }
    40%  { opacity: 1; filter: blur(8px) brightness(1.5); }
    100% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1) translateY(0); }
}

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Core palette — deep space blues with electric accents */
    --bg-primary: #030712;
    --bg-secondary: #0a1128;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(30, 41, 64, 0.8);

    --surface-border: rgba(99, 152, 255, 0.12);
    --surface-border-hover: rgba(99, 152, 255, 0.3);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;

    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #8b5cf6 100%);
    --gradient-text: linear-gradient(135deg, #60a5fa, #22d3ee, #a78bfa);
    --gradient-glow: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15), transparent 70%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing & Sizing */
    --nav-height: 72px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

ul {
    list-style: none;
}

/* ---------- Particle Canvas ---------- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.4s var(--ease-out);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--surface-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 3px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 24px;
}

/* Burger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: calc(var(--nav-height) + 40px) 24px 40px;
}

.hero-video-wrap {
    flex-shrink: 0;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 60px rgba(59, 130, 246, 0.2),
        0 0 120px rgba(6, 182, 212, 0.1);
    animation: hero-float 6s ease-in-out infinite;
}

.hero-video-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: -1;
    animation: spin-slow 8s linear infinite;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

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

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

.hero-text {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 24px;
    animation: fade-in-up 0.8s var(--ease-out) 0.2s both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}

.hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    animation: fade-in-up 0.8s var(--ease-out) 0.4s both;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 32px;
    animation: fade-in-up 0.8s var(--ease-out) 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    animation: fade-in-up 0.8s var(--ease-out) 0.8s both;
}

.hero-stats {
    display: flex;
    gap: 40px;
    animation: reveal-glow 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
    align-items: flex-start;
}

.stat-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    height: 2.4rem; /* Фиксированная высота для выравнивания */
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 2px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    animation: fade-in-up 0.8s var(--ease-out) 1.2s both;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 3px;
    animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--surface-border-hover);
    background: rgba(59, 130, 246, 0.05);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.05rem;
}

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

/* ============================================
   SECTIONS (General)
   ============================================ */
.section {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    opacity: 0.7;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--surface-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.4s var(--ease-out);
}

.service-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent-blue);
    transition: all 0.4s var(--ease-out);
}

.service-card:hover .service-icon {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.service-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

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

.service-tags li {
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

/* ============================================
   ABOUT
   ============================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 20px;
}

.about-text strong {
    color: var(--text-primary);
}

.about-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
}

.feature-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Code Window */
.code-window {
    background: #0c1222;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

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

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

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

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28c840; }

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

.code-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: #e2e8f0;
    overflow-x: auto;
}

.code-keyword { color: #c084fc; }
.code-type { color: #22d3ee; }
.code-string { color: #34d399; }
.code-prop { color: #60a5fa; }
.code-func { color: #fbbf24; }
.code-comment { color: #64748b; }

/* ============================================
   TECH STACK
   ============================================ */
.tech {
    background: var(--bg-secondary);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.tech-category {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.4s var(--ease-out);
}

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

.tech-category h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-cyan);
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-pill {
    padding: 8px 18px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid var(--surface-border);
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out);
}

.tech-pill:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.portfolio-card--large {
    grid-column: span 2;
}

.portfolio-card-bg {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--accent, var(--accent-blue));
    opacity: 0.06;
    filter: blur(60px);
    transition: all 0.5s var(--ease-out);
}

.portfolio-card:hover {
    border-color: var(--surface-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-card:hover .portfolio-card-bg {
    opacity: 0.12;
    transform: scale(1.2);
}

.portfolio-card-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    width: fit-content;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.portfolio-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    flex: 1;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.portfolio-tech span {
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-purple);
}

/* ============================================
   CTA
   ============================================ */
.cta {
    padding: 80px 0;
}

.cta-card {
    position: relative;
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.cta-card h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.cta-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    position: relative;
}

/* ============================================
   CONTACTS
   ============================================ */
.contacts-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(59, 130, 246, 0.04);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s var(--ease-out);
}

.contact-card:hover {
    border-color: var(--surface-border-hover);
    background: var(--bg-card-hover);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.contact-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-blue);
}

.contact-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--surface-border);
    padding: 60px 0 40px;
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 4px;
}

.footer-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

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

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

.footer-inn {
    margin-top: 4px;
    opacity: 0.7;
}

/* ============================================
   SCROLL REVEAL (data-aos)
   ============================================ */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s var(--ease-out);
}

[data-aos].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-card--large {
        grid-column: span 2;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(3, 7, 18, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s var(--ease-out);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 12px 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: calc(var(--nav-height) + 30px);
    }

    .hero-video-wrap {
        width: 240px;
        height: 240px;
    }

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

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

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

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

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

    .portfolio-card--large {
        grid-column: span 1;
    }

    .tech-categories {
        grid-template-columns: 1fr;
    }

    .contacts-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 24px;
        align-items: center;
        margin-bottom: 80px; /* Чтобы не налезало на мышку */
    }

    .stat-item {
        min-width: unset;
        text-align: center;
        align-items: center;
    }

    .stat-value {
        height: auto;
        justify-content: center;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .contact-form {
        padding: 24px;
    }
}
