/* ============================================
   ROHIT - AI THEMED PORTFOLIO
   Dark Mode | Glass Morphism | 3D Animations
   ============================================ */

/* ========== CSS Variables ========== */
:root {
    /* Colors - AI Dark Theme */
    --bg-primary: #050510;
    --bg-secondary: #0a0a1a;
    --bg-tertiary: #0f0f2e;
    --bg-card: rgba(15, 15, 46, 0.6);
    --bg-glass: rgba(15, 15, 46, 0.4);
    --bg-glass-hover: rgba(15, 15, 46, 0.6);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #06b6d4, #10b981);
    --gradient-hero: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-accent: #a5b4fc;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent-primary));
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

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

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

/* ========== Loading Screen ========== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--glass-border);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loader-progress {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

/* ========== Custom Cursor ========== */
.cursor {
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: screen;
}

.cursor-follower {
    width: 35px;
    height: 35px;
    border: 1.5px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, border-color 0.4s;
}

.cursor.hover {
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.3);
}

.cursor-follower.hover {
    width: 50px;
    height: 50px;
    border-color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none !important;
    }
}

/* ========== Particle Canvas ========== */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ========== Neural Background ========== */
.neural-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

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

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all var(--transition-base);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.logo-bracket {
    color: var(--accent-primary);
    transition: color var(--transition-base);
}

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

.logo-slash {
    color: var(--accent-tertiary);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.3rem 0;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

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

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

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

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    transform: translateY(20px);
    opacity: 0;
}

.mobile-nav-overlay.active .mobile-nav-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }

.mobile-nav-link:hover {
    color: var(--accent-primary);
    transform: translateX(10px);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }
}

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
    animation: float-slow 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    width: fit-content;
    backdrop-filter: blur(10px);
}

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

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Hero Title */
.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2.5rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.hero-highlight {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 850;
    line-height: 1.05;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(99,102,241,0.25));
    animation: text-glow-pulse 4s ease-in-out infinite;
}

@keyframes text-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(99,102,241,0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(6,182,212,0.6)); }
}

/* Typing Effect */
.hero-typing {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-accent);
    min-height: 1.8rem;
}

.typing-prefix {
    color: var(--text-secondary);
}

.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
    font-weight: 300;
}

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

/* Hero Description */
.hero-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 540px;
}

/* CTA Buttons */
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover .btn-glow {
    opacity: 1;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.btn-icon {
    transition: transform var(--transition-base);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Hero Visual - 3D Orb */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.hero-3d-container {
    width: 400px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
}

/* Orbit Rings */
.orbit-ring {
    position: absolute;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    animation: orbit-spin 20s linear infinite;
}

.ring-1 {
    width: 320px;
    height: 320px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    animation-duration: 15s;
}

.ring-2 {
    width: 260px;
    height: 260px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(60deg);
    animation-duration: 20s;
    animation-direction: reverse;
    border-color: rgba(6, 182, 212, 0.15);
}

.ring-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(120deg);
    animation-duration: 25s;
    border-color: rgba(139, 92, 246, 0.15);
}

@keyframes orbit-spin {
    from { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg); }
    to { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg); }
}

.orbit-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: 50%;
    box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(99, 102, 241, 0.3);
}

.ring-2 .orbit-dot {
    background: var(--accent-tertiary);
    box-shadow: 0 0 10px var(--accent-tertiary), 0 0 20px rgba(6, 182, 212, 0.3);
}

.ring-3 .orbit-dot {
    background: var(--accent-secondary);
    box-shadow: 0 0 10px var(--accent-secondary), 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Avatar / AI Brain */
.hero-avatar-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 190px;
    height: 190px;
}

.avatar-glow {
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.15) 50%, transparent 75%);
    animation: glow-pulse 3s ease-in-out infinite;
}

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

.avatar-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                var(--gradient-hero) border-box;
    animation: ring-rotate 8s linear infinite;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Avatar Photo - Cartoon/Illustration optimized */
.avatar-img {
    width: 115%;
    height: 115%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 32px rgba(139, 92, 246, 0.25)) brightness(1.05) contrast(1.02);
    transition: transform var(--transition-base), filter var(--transition-slow);
    border-radius: 0;
    position: relative;
    z-index: 2;
    margin-top: 10px;
}

.avatar-inner:hover .avatar-img {
    transform: scale(1.06) translateY(-4px);
    filter: drop-shadow(0 0 24px rgba(99, 102, 241, 0.8)) drop-shadow(0 0 48px rgba(139, 92, 246, 0.35)) brightness(1.08) contrast(1.03);
}

.avatar-scanline {
    display: none;
}

@keyframes scanline-anim {
    from { background-position: 0 0; }
    to { background-position: 0 100%; }
}

.avatar-hologram {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 25px rgba(99, 102, 241, 0.35), inset 0 0 50px rgba(139, 92, 246, 0.15);
    pointer-events: none;
    border-radius: 50%;
    animation: holo-pulse 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes holo-pulse {
    0%, 100% { box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.3), inset 0 0 40px rgba(139, 92, 246, 0.1); opacity: 0.7; }
    50% { box-shadow: inset 0 0 40px rgba(139, 92, 246, 0.5), inset 0 0 70px rgba(99, 102, 241, 0.2); opacity: 1; }
}

/* Floating Tags */
.floating-tag {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: float-tag 6s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tag-icon {
    font-size: 0.9rem;
}

.tag-1 { top: 10%; left: 5%; animation-delay: 0s; }
.tag-2 { top: 5%; right: 0%; animation-delay: 1.5s; }
.tag-3 { bottom: 15%; left: 0%; animation-delay: 3s; }
.tag-4 { bottom: 10%; right: 5%; animation-delay: 4.5s; }

@keyframes float-tag {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    75% { transform: translateY(8px) rotate(-1deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.scroll-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: var(--glass-border);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    width: 3px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 3px;
    position: absolute;
    left: -1px;
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: 0; opacity: 0; }
    30% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ========== Section Styles ========== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.title-dot {
    color: var(--accent-primary);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ========== Glass Card ========== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-base);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.08);
}

/* ========== About Section ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image-glass {
    width: 100%;
    aspect-ratio: 4/5;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.about-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    width: 120px;
    height: 120px;
}

.code-svg {
    width: 100%;
    height: 100%;
}

.about-image-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-line {
    position: absolute;
    background: var(--gradient-primary);
    border-radius: 4px;
}

.deco-line-1 {
    width: 60px;
    height: 3px;
    top: -8px;
    right: 30px;
}

.deco-line-2 {
    width: 3px;
    height: 60px;
    bottom: 30px;
    left: -8px;
}

.deco-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
}

.deco-dot-1 {
    background: var(--accent-tertiary);
    top: -15px;
    left: 40px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.deco-dot-2 {
    background: var(--accent-pink);
    bottom: -15px;
    right: 40px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gradient-primary);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

.exp-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.exp-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

/* About Content */
.about-content-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

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

.about-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.detail-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.detail-icon {
    font-size: 1.3rem;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== Services Section ========== */
.services-section {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    padding: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card-inner {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    position: relative;
    z-index: 1;
    transition: all var(--transition-base);
}

.service-card:hover .service-icon {
    border-color: rgba(99, 102, 241, 0.3);
    transform: rotate(5deg) scale(1.05);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-icon-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, var(--glow-color, rgba(99, 102, 241, 0.3)), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
}

.service-card:hover .service-icon-glow {
    opacity: 1;
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    transition: color var(--transition-base);
}

.service-card:hover .service-title {
    color: var(--accent-primary);
}

.service-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.2rem;
    position: relative;
}

.service-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.service-card-border {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, var(--border-color-1, #6366f1), transparent 50%, var(--border-color-2, #8b5cf6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

/* ========== Skills Section ========== */
.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.category-icon {
    font-size: 1.4rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 14px;
    transition: all var(--transition-base);
    cursor: default;
}

.skill-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

.skill-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.skill-item:hover .skill-icon-wrapper {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.skill-emoji {
    font-size: 1.3rem;
}

.skill-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.skill-level {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-item.visible .skill-bar {
    width: var(--skill-width);
}

/* ========== Portfolio Section ========== */
.portfolio-section {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
}

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

.portfolio-card {
    overflow: hidden;
    cursor: pointer;
}

.portfolio-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ph-color-1), var(--ph-color-2));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-placeholder {
    transform: scale(1.05);
}

.ph-pattern {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.ph-icon {
    font-size: 2.5rem;
}

.ph-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 16, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-view {
    font-weight: 600;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    transition: all var(--transition-base);
}

.portfolio-view:hover {
    background: rgba(255, 255, 255, 0.1);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.ptag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-accent);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.portfolio-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.portfolio-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== Testimonials Section ========== */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    padding: 2rem;
}

.testimonial-stars {
    color: var(--accent-amber);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.author-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ========== Contact Section ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

.contact-info-card {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-info-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.contact-detail-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.contact-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

/* Contact Form */
.contact-form {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 0.8rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-base);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    position: absolute;
    top: 50%;
    left: 0.8rem;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all var(--transition-base);
}

.form-textarea ~ .form-label {
    top: 1.2rem;
    transform: none;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -8px;
    left: 0.6rem;
    font-size: 0.72rem;
    color: var(--accent-primary);
    background: var(--bg-primary);
    padding: 0 0.3rem;
}

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

.form-textarea:focus ~ .form-label,
.form-textarea:not(:placeholder-shown) ~ .form-label {
    top: -8px;
    transform: none;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 1rem;
}

/* ========== Footer ========== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

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

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
}

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

.footer-divider {
    width: 60px;
    height: 1px;
    background: var(--glass-border);
}

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

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ========== Scroll Animations ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ========== Responsive Design ========== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        align-items: center;
    }

    .hero-description {
        max-width: 600px;
    }

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

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

    .hero-3d-container {
        width: 300px;
        height: 300px;
    }

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

    .about-image-col {
        max-width: 400px;
        margin: 0 auto;
    }

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

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

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

    .testimonials-slider .testimonial-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

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

/* ========== TOUCH RIPPLE EFFECT ========== */
.touch-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    transform: scale(0);
    animation: ripple-expand 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple-expand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    70% {
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Touch glow ring effect */
.touch-glow {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.5);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 9999;
    animation: touch-glow-anim 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes touch-glow-anim {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Touch particle burst */
.touch-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: particle-burst 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes particle-burst {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ========== MOBILE TOUCH ACTIVE STATES ========== */
@media (hover: none) and (pointer: coarse) {
    /* Better tap targets */
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Service cards touch state */
    .service-card {
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    border-color 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .service-card.touch-active {
        transform: scale(0.97) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.15),
                    inset 0 0 20px rgba(99, 102, 241, 0.05) !important;
    }

    .service-card.touch-active .service-icon {
        border-color: rgba(99, 102, 241, 0.4);
        transform: rotate(5deg) scale(1.08);
    }

    .service-card.touch-active .service-icon-glow {
        opacity: 1;
    }

    .service-card.touch-active .service-title {
        color: var(--accent-primary);
    }

    .service-card.touch-active .service-card-border {
        opacity: 1;
    }

    /* Portfolio cards touch state */
    .portfolio-card {
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .portfolio-card.touch-active {
        transform: scale(0.97) !important;
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.12) !important;
    }

    .portfolio-card.touch-active .portfolio-placeholder {
        transform: scale(1.05);
    }

    .portfolio-card.touch-active .portfolio-overlay {
        opacity: 1;
    }

    /* Skill items touch state */
    .skill-item {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .skill-item.touch-active {
        background: rgba(99, 102, 241, 0.08) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        transform: scale(0.95) !important;
    }

    .skill-item.touch-active .skill-icon-wrapper {
        border-color: var(--accent-primary);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
        transform: scale(1.1);
    }

    /* Button touch states */
    .btn {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .btn:active,
    .btn.touch-active {
        transform: scale(0.95) !important;
    }

    .btn-primary:active,
    .btn-primary.touch-active {
        box-shadow: 0 2px 30px rgba(99, 102, 241, 0.5) !important;
    }

    .btn-secondary:active,
    .btn-secondary.touch-active {
        border-color: var(--accent-primary) !important;
        background: rgba(99, 102, 241, 0.1) !important;
    }

    /* Detail items touch state */
    .detail-item {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s ease;
    }

    .detail-item.touch-active {
        border-color: var(--accent-primary) !important;
        background: rgba(99, 102, 241, 0.06) !important;
        transform: translateX(8px) scale(0.98) !important;
    }

    /* Contact detail items */
    .contact-detail-item {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s ease;
    }

    .contact-detail-item.touch-active {
        background: rgba(99, 102, 241, 0.08) !important;
        transform: translateX(8px) !important;
    }

    /* Social links touch state */
    .social-link {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s ease;
    }

    .social-link:active,
    .social-link.touch-active {
        color: var(--accent-primary) !important;
        border-color: var(--accent-primary) !important;
        transform: scale(0.9) !important;
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3) !important;
    }

    /* Testimonial card touch state */
    .testimonial-card {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.3s ease;
    }

    .testimonial-card.touch-active {
        transform: scale(0.97) !important;
        border-color: rgba(99, 102, 241, 0.2) !important;
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.1) !important;
    }

    /* Mobile nav link touch */
    .mobile-nav-link {
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s ease;
    }

    .mobile-nav-link:active {
        color: var(--accent-primary) !important;
        transform: translateX(15px) scale(1.05) !important;
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }

    /* Form inputs touch focus */
    .form-input:focus {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    }

    /* Disable hover effects on touch */
    .glass-card:hover {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        box-shadow: none;
    }
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    :root {
        --section-padding: 70px;
    }

    /* Safe area for notched phones */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Better mobile container */
    .container {
        padding: 0 20px;
    }

    /* Navbar mobile */
    .navbar {
        padding: 0.8rem 0;
    }

    .navbar.scrolled {
        padding: 0.6rem 0;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    /* Mobile nav overlay enhanced */
    .mobile-nav-overlay {
        background: rgba(5, 5, 16, 0.97);
        backdrop-filter: blur(40px);
    }

    .mobile-nav-link {
        font-size: 1.8rem;
        padding: 0.5rem 2rem;
        border-radius: 12px;
        width: 100%;
        text-align: center;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 90px 0 50px;
        min-height: 100svh;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-content {
        align-items: center;
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.35rem 1rem;
    }

    .hero-greeting {
        font-size: 1.1rem;
    }

    .hero-name {
        font-size: clamp(2.8rem, 12vw, 4rem);
    }

    .hero-typing {
        font-size: 0.9rem;
        justify-content: center;
    }

    .hero-description {
        font-size: 0.92rem;
        max-width: 100%;
        padding: 0 0.5rem;
        line-height: 1.7;
    }

    .hero-cta {
        justify-content: center;
        width: 100%;
    }

    .hero-cta .btn {
        flex: 1;
        justify-content: center;
        max-width: 180px;
    }

    /* Stats mobile - horizontal scroll */
    .hero-stats {
        flex-direction: row;
        gap: 0;
        justify-content: center;
        width: 100%;
        padding: 1.2rem 0;
    }

    .stat-item {
        flex: 1;
        align-items: center;
        text-align: center;
        padding: 0 0.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-suffix {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

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

    /* 3D container mobile */
    .hero-3d-container {
        width: 230px;
        height: 230px;
    }

    .ring-1 { width: 220px; height: 220px; }
    .ring-2 { width: 175px; height: 175px; }
    .ring-3 { width: 135px; height: 135px; }

    .hero-avatar-wrapper {
        width: 110px;
        height: 110px;
    }

    .brain-core {
        width: 22px;
        height: 22px;
    }

    .brain-node {
        width: 4px;
        height: 4px;
    }

    /* Floating tags on mobile - show 2 tags */
    .floating-tag {
        display: flex;
        font-size: 0.65rem;
        padding: 0.35rem 0.7rem;
    }

    .tag-icon {
        font-size: 0.75rem;
    }

    .tag-1 { top: 2%; left: 2%; }
    .tag-2 { top: 2%; right: -2%; }
    .tag-3 { bottom: 8%; left: 2%; display: flex; }
    .tag-4 { bottom: 8%; right: -2%; display: flex; }

    .scroll-indicator {
        display: none;
    }

    /* Section headers mobile */
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-tag {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    /* About mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image-col {
        max-width: 320px;
        margin: 0 auto;
    }

    .about-heading {
        font-size: 1.35rem;
        text-align: center;
    }

    .about-description {
        font-size: 0.92rem;
        text-align: center;
    }

    .about-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .detail-item {
        padding: 0.7rem 0.8rem;
    }

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

    .detail-label {
        font-size: 0.65rem;
    }

    .detail-value {
        font-size: 0.8rem;
    }

    .about-cta {
        display: flex;
        justify-content: center;
    }

    .experience-badge {
        bottom: -15px;
        right: -10px;
        padding: 0.8rem 1rem;
    }

    .exp-number {
        font-size: 1.5rem;
    }

    /* Services mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card-inner {
        padding: 1.5rem;
    }

    .service-icon-wrapper {
        width: 52px;
        height: 52px;
        margin-bottom: 1rem;
    }

    .service-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        padding: 12px;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-description {
        font-size: 0.85rem;
        line-height: 1.65;
    }

    .service-features li {
        font-size: 0.8rem;
    }

    /* Skills mobile */
    .skill-category {
        padding: 1.5rem;
    }

    .category-title {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .skill-item {
        padding: 0.8rem 0.4rem;
        gap: 0.35rem;
    }

    .skill-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .skill-emoji {
        font-size: 1.1rem;
    }

    .skill-name {
        font-size: 0.65rem;
    }

    /* Portfolio mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .portfolio-image {
        aspect-ratio: 16/9;
    }

    .ph-icon {
        font-size: 2rem;
    }

    .ph-text {
        font-size: 0.95rem;
    }

    .portfolio-info {
        padding: 1.2rem;
    }

    .portfolio-title {
        font-size: 1rem;
    }

    .portfolio-desc {
        font-size: 0.82rem;
    }

    /* Testimonials mobile - horizontal scroll */
    .testimonials-slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 1.5rem;
        scrollbar-width: none;
    }

    .testimonials-slider::-webkit-scrollbar {
        display: none;
    }

    .testimonial-card {
        min-width: 85vw;
        scroll-snap-align: center;
        flex-shrink: 0;
        padding: 1.5rem;
    }

    .testimonials-slider .testimonial-card:last-child {
        grid-column: auto;
        max-width: none;
    }

    .testimonial-text {
        font-size: 0.88rem;
    }

    /* Swipe indicator for testimonials */
    .testimonials-section .section-subtitle::after {
        content: '← Swipe →';
        display: block;
        font-size: 0.7rem;
        color: var(--text-tertiary);
        margin-top: 0.5rem;
        font-family: var(--font-mono);
        letter-spacing: 0.1em;
        animation: swipe-hint 2s ease-in-out infinite;
    }

    @keyframes swipe-hint {
        0%, 100% { opacity: 0.4; }
        50% { opacity: 1; }
    }

    /* Contact mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    .contact-info-title {
        font-size: 1.3rem;
    }

    .contact-info-desc {
        font-size: 0.88rem;
    }

    .contact-detail-item {
        padding: 0.8rem;
    }

    .social-links {
        justify-content: center;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.9rem 0.8rem 0.7rem;
    }

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

    /* Footer mobile */
    .footer {
        padding: 2rem 0;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }

    /* Back to top mobile */
    .back-to-top {
        bottom: calc(1.5rem + env(safe-area-inset-bottom));
        right: 1.2rem;
        width: 40px;
        height: 40px;
    }

    /* Reduce animation complexity for performance */
    .animate-on-scroll {
        transform: translateY(25px);
        transition-duration: 0.6s;
    }
}

/* ========== SMALL MOBILE (iPhone SE, etc.) ========== */
@media (max-width: 380px) {
    .container {
        padding: 0 14px;
    }

    .hero-name {
        font-size: 2.4rem;
    }

    .hero-greeting {
        font-size: 1rem;
    }

    .hero-typing {
        font-size: 0.8rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .hero-cta .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.82rem;
    }

    .hero-3d-container {
        width: 200px;
        height: 200px;
    }

    .ring-1 { width: 190px; height: 190px; }
    .ring-2 { width: 150px; height: 150px; }
    .ring-3 { width: 115px; height: 115px; }

    .hero-avatar-wrapper {
        width: 90px;
        height: 90px;
    }

    .floating-tag {
        display: none;
    }

    .stat-number, .stat-suffix {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

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

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

    .skill-item {
        padding: 0.7rem;
    }

    .testimonial-card {
        min-width: 90vw;
        padding: 1.2rem;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 70px 0 30px;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content {
        order: 1;
        text-align: left;
        align-items: flex-start;
    }

    .hero-visual {
        order: 2;
    }

    .hero-3d-container {
        width: 180px;
        height: 180px;
    }

    .hero-stats {
        flex-direction: row;
    }

    :root {
        --section-padding: 50px;
    }
}

/* ========== EXTRA ANIMATIONS ========== */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Tilt 3D Effect for cards */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

/* Glitch Effect (used sparingly) */
@keyframes glitch {
    0%, 100% { text-shadow: none; }
    20% { text-shadow: -2px 0 #ec4899, 2px 0 #06b6d4; }
    40% { text-shadow: 2px 0 #ec4899, -2px 0 #06b6d4; }
    60% { text-shadow: -1px 0 #ec4899, 1px 0 #06b6d4; }
    80% { text-shadow: 1px 0 #ec4899, -1px 0 #06b6d4; }
}

.hero-name:hover .name-letter {
    animation: glitch 0.5s ease-in-out;
}

/* Grid Lines Background (subtle) */
.services-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Radial Gradient Overlays */
.skills-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06), transparent 70%);
    top: 50%;
    left: -200px;
    transform: translateY(-50%);
    pointer-events: none;
}

.contact-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05), transparent 70%);
    bottom: -200px;
    right: -200px;
    pointer-events: none;
}

/* ========== MOBILE TOUCH ANIMATIONS (additional keyframes) ========== */
@keyframes touch-scale-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes touch-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes mobile-float-in {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Touch shine effect on buttons */
@media (hover: none) and (pointer: coarse) {
    .btn-primary::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        pointer-events: none;
    }

    .btn-primary:active::after {
        animation: touch-shine 0.6s ease forwards;
    }

    /* Active state for glass cards */
    .glass-card {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========== Nav Controls (Theme & Audio) ========== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-right: 1.5rem;
}

.nav-control-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(5px);
}

.nav-control-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--accent-primary);
    transform: scale(1.1);
}

.nav-control-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .nav-controls {
        margin-right: 0.5rem;
    }
    .nav-control-btn {
        width: 32px;
        height: 32px;
    }
}

/* ========== Theme Overrides ========== */
body.theme-cyberpunk {
    --bg-primary: #0f0c1b;
    --bg-secondary: #1a1333;
    --bg-tertiary: #2d1b54;
    --accent-primary: #f0f;
    --accent-secondary: #0ff;
    --accent-tertiary: #ff0;
    --gradient-primary: linear-gradient(135deg, #f0f, #0ff);
    --gradient-secondary: linear-gradient(135deg, #ff0, #f0f);
    --gradient-hero: linear-gradient(135deg, #f0f, #0ff, #ff0);
    --text-primary: #fff;
    --text-secondary: #e2d9f3;
}

body.theme-matrix {
    --bg-primary: #050a05;
    --bg-secondary: #0a140a;
    --bg-tertiary: #0f240f;
    --accent-primary: #0f0;
    --accent-secondary: #0a0;
    --accent-tertiary: #3f3;
    --gradient-primary: linear-gradient(135deg, #0f0, #0a0);
    --gradient-secondary: linear-gradient(135deg, #3f3, #0f0);
    --gradient-hero: linear-gradient(135deg, #0f0, #3f3, #0a0);
    --text-primary: #cfc;
    --text-secondary: #8f8;
}

/* ========== Chatbot Assistant ========== */
.chatbot-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10000;
    font-family: var(--font-primary);
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    position: relative;
    transition: transform var(--transition-base);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
}

.chatbot-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.5;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    height: 450px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    transform-origin: bottom left;
}

.chatbot-container.open .chatbot-window {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chatbot-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.chatbot-title h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.chatbot-status {
    font-size: 0.75rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chatbot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
}

.chatbot-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chat-msg.bot {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
}

.msg-bubble {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-msg.bot .msg-bubble {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 5px;
}

.chat-msg.user .msg-bubble {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-input-area {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.2);
}

#chatbotInput {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

#chatbotInput:focus {
    border-color: var(--accent-primary);
}

#chatbotSend {
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

#chatbotSend:hover {
    transform: scale(1.1);
}

#chatbotSend svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: 300px;
        height: 400px;
    }
}

/* =============================================
   EPIC CONNECT CARDS — Telegram & Facebook
   ============================================= */

/* Tagline strip */
.connect-tagline {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.2rem 2rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.tagline-inner {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
    z-index: 1;
}

.tagline-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-tertiary);
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.tagline-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tagline-orbs {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.t-orb {
    border-radius: 50%;
    animation: orb-pulse 2s ease-in-out infinite;
}

.t-orb-1 {
    width: 10px; height: 10px;
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary);
    animation-delay: 0s;
}
.t-orb-2 {
    width: 7px; height: 7px;
    background: var(--accent-tertiary);
    box-shadow: 0 0 10px var(--accent-tertiary);
    animation-delay: 0.4s;
}
.t-orb-3 {
    width: 5px; height: 5px;
    background: var(--accent-pink);
    box-shadow: 0 0 8px var(--accent-pink);
    animation-delay: 0.8s;
}

@keyframes orb-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Cards grid */
.connect-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Base card */
.connect-card {
    position: relative;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
    cursor: pointer;
    min-height: 300px;
}

.connect-card:hover {
    transform: translateY(-8px) scale(1.01);
}

/* Background gradient layer */
.connect-card__bg {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0.06;
    transition: opacity 0.4s ease;
}

.connect-card:hover .connect-card__bg {
    opacity: 0.12;
}

/* Telegram colors */
.connect-card--telegram {
    background: rgba(10, 10, 30, 0.7);
    border: 1px solid rgba(0, 170, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 170, 255, 0.05);
}

.connect-card--telegram:hover {
    border-color: rgba(0, 170, 255, 0.4);
    box-shadow: 0 20px 60px rgba(0, 136, 204, 0.25), 0 0 0 1px rgba(0, 170, 255, 0.2), 0 0 40px rgba(0, 170, 255, 0.1);
}

.connect-card--telegram .connect-card__bg {
    background: linear-gradient(135deg, #0088cc, #00aaff, #2ca5e0);
}

.connect-card--telegram .connect-card__glow {
    background: radial-gradient(circle at 70% 30%, rgba(0, 170, 255, 0.15) 0%, transparent 70%);
}

.connect-card--telegram .connect-icon {
    background: linear-gradient(135deg, #0088cc, #2ca5e0);
    box-shadow: 0 0 30px rgba(0, 136, 204, 0.5), 0 0 60px rgba(0, 136, 204, 0.15);
    color: #fff;
}

.connect-card--telegram .connect-icon-ring {
    border-color: rgba(0, 170, 255, 0.3);
    animation-name: ring-spin-tg;
}

.connect-card--telegram .connect-platform {
    color: #2ca5e0;
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.2);
}

.connect-card--telegram .connect-btn {
    background: linear-gradient(135deg, #0088cc, #2ca5e0);
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
}

.connect-card--telegram .connect-btn:hover,
.connect-card--telegram:hover .connect-btn {
    box-shadow: 0 6px 30px rgba(0, 136, 204, 0.6);
}

.connect-card--telegram .status-dot {
    background: #2ca5e0;
    box-shadow: 0 0 8px #2ca5e0;
}

.connect-card--telegram .connect-card__border {
    background: linear-gradient(135deg, rgba(0,170,255,0.5), transparent 50%, rgba(0,136,204,0.3));
}

.connect-card--telegram .cp {
    background: rgba(0, 170, 255, 0.6);
    box-shadow: 0 0 6px rgba(0, 170, 255, 0.8);
}

/* Facebook colors */
.connect-card--facebook {
    background: rgba(10, 10, 30, 0.7);
    border: 1px solid rgba(24, 119, 242, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(24, 119, 242, 0.05);
}

.connect-card--facebook:hover {
    border-color: rgba(24, 119, 242, 0.4);
    box-shadow: 0 20px 60px rgba(24, 119, 242, 0.25), 0 0 0 1px rgba(24, 119, 242, 0.2), 0 0 40px rgba(24, 119, 242, 0.1);
}

.connect-card--facebook .connect-card__bg {
    background: linear-gradient(135deg, #1877f2, #3b9bff, #166fe5);
}

.connect-card--facebook .connect-card__glow {
    background: radial-gradient(circle at 70% 30%, rgba(24, 119, 242, 0.15) 0%, transparent 70%);
}

.connect-card--facebook .connect-icon {
    background: linear-gradient(135deg, #1877f2, #3b9bff);
    box-shadow: 0 0 30px rgba(24, 119, 242, 0.5), 0 0 60px rgba(24, 119, 242, 0.15);
    color: #fff;
}

.connect-card--facebook .connect-icon-ring {
    border-color: rgba(24, 119, 242, 0.3);
    animation-name: ring-spin-fb;
}

.connect-card--facebook .connect-platform {
    color: #3b9bff;
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.2);
}

.connect-card--facebook .connect-btn {
    background: linear-gradient(135deg, #1877f2, #3b9bff);
    box-shadow: 0 4px 20px rgba(24, 119, 242, 0.4);
}

.connect-card--facebook .connect-btn:hover,
.connect-card--facebook:hover .connect-btn {
    box-shadow: 0 6px 30px rgba(24, 119, 242, 0.6);
}

.connect-card--facebook .status-dot {
    background: #3b9bff;
    box-shadow: 0 0 8px #3b9bff;
}

.connect-card--facebook .connect-card__border {
    background: linear-gradient(135deg, rgba(24,119,242,0.5), transparent 50%, rgba(59,155,255,0.3));
}

.connect-card--facebook .cp {
    background: rgba(24, 119, 242, 0.6);
    box-shadow: 0 0 6px rgba(24, 119, 242, 0.8);
}

/* Glow overlay */
.connect-card__glow {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    pointer-events: none;
    z-index: 0;
}

/* Floating particles */
.connect-card__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    border-radius: 24px;
}

.cp {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: float-cp 4s ease-in-out infinite;
    opacity: 0;
}

.cp-1 { top: 15%; left: 10%; animation-delay: 0s; animation-duration: 3.5s; }
.cp-2 { top: 60%; left: 85%; animation-delay: 0.8s; animation-duration: 4.2s; }
.cp-3 { top: 80%; left: 20%; animation-delay: 1.5s; animation-duration: 3.8s; }
.cp-4 { top: 30%; left: 75%; animation-delay: 2.2s; animation-duration: 4.5s; }
.cp-5 { top: 50%; left: 50%; animation-delay: 0.4s; animation-duration: 3.2s; }

@keyframes float-cp {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 0.6; }
    100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

/* Card border glow */
.connect-card__border {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    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 ease;
    z-index: 0;
    pointer-events: none;
}

.connect-card:hover .connect-card__border {
    opacity: 1;
}

/* Card inner layout */
.connect-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.2rem;
    height: 100%;
}

/* Icon section */
.connect-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.connect-icon-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed;
    opacity: 0.4;
    animation: ring-spin-tg 8s linear infinite;
}

@keyframes ring-spin-tg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ring-spin-fb {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.connect-icon {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}

.connect-card:hover .connect-icon {
    transform: rotate(-5deg) scale(1.1);
}

/* Text info */
.connect-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connect-platform {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    border: 1px solid;
    width: fit-content;
}

.connect-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.connect-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Action area */
.connect-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    border-radius: 100px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.connect-btn svg {
    transition: transform 0.3s ease;
}

.connect-card:hover .connect-btn svg {
    transform: translateX(4px);
}

.connect-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: status-blink 2s ease-in-out infinite;
    flex-shrink: 0;
}

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

/* Bottom CTA bar */
.connect-bottom {
    margin-top: 1rem;
}

.connect-bottom-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 2rem;
    border-radius: 18px;
    flex-wrap: wrap;
}

.cb-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.cb-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.cb-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cb-text span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cb-badges {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cb-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.cb-badge--tg {
    color: #2ca5e0;
    background: rgba(0, 170, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.2);
}

.cb-badge--fb {
    color: #3b9bff;
    background: rgba(24, 119, 242, 0.08);
    border-color: rgba(24, 119, 242, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .connect-cards {
        grid-template-columns: 1fr;
    }
    .connect-tagline {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .tagline-orbs {
        justify-content: center;
    }
    .connect-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
    .cb-badges {
        justify-content: center;
    }
    .connect-action {
        flex-direction: column;
        align-items: flex-start;
    }
    .connect-card__inner {
        padding: 1.6rem;
    }
}

@media (max-width: 480px) {
    .connect-title {
        font-size: 1.1rem;
    }
    .connect-icon {
        width: 64px;
        height: 64px;
    }
    .connect-icon-wrap {
        width: 64px;
        height: 64px;
    }
    .connect-icon svg {
        width: 26px !important;
        height: 26px !important;
    }
}

/* =======================================================
   AI MASTERY SECTION
   ======================================================= */

.ai-mastery-section {
    background: linear-gradient(180deg, var(--bg-primary), rgba(10,5,30,0.95), var(--bg-primary));
    position: relative;
    overflow: hidden;
}

.ai-card-mega {
    position: relative;
    background: rgba(10, 8, 28, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 28px;
    padding: 2.5rem;
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.05);
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

.ai-card-mega:hover {
    border-color: rgba(139,92,246,0.3);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.1), 0 0 100px rgba(99,102,241,0.08);
}

.ai-neural-bg {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    pointer-events: none;
    overflow: hidden;
    border-radius: 28px;
}

.ai-neural-bg svg {
    width: 100%;
    height: 100%;
}

.ai-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.ai-card-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #10b981;
    text-transform: uppercase;
}

.ai-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-live 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-live {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px #10b981; }
    50% { transform: scale(1.4); opacity: 0.6; box-shadow: 0 0 20px #10b981; }
}

.ai-card-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 100px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-accent);
}

.ai-level-tag {
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.2));
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 6px;
    padding: 0.2rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #a855f7;
    text-transform: uppercase;
    margin-left: auto;
}

.ai-card-title-block {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.ai-main-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.7rem;
    color: var(--text-primary);
}

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

.ai-main-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
}

.ai-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.ai-panel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.ai-panel:hover {
    transform: translateY(-6px);
}

/* Prompt Panel — Purple */
.ai-panel--prompt {
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.ai-panel--prompt:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(99,102,241,0.2), 0 0 0 1px rgba(99,102,241,0.1);
}

.ai-panel--prompt .ai-panel-glow {
    background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.15), transparent 65%);
}

.ai-panel--prompt .ai-panel-tag {
    color: #a5b4fc;
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.25);
}

.ai-panel--prompt .ai-panel-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 25px rgba(99,102,241,0.5);
}

.ai-panel--prompt .ai-panel-icon-ring {
    border-color: rgba(99,102,241,0.3);
    animation: ring-ai-spin-left 10s linear infinite;
}

.ai-panel--prompt .ai-chip {
    border-color: rgba(99,102,241,0.25);
    color: #a5b4fc;
    background: rgba(99,102,241,0.06);
}

.ai-panel--prompt .ai-chip:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.5);
}

.ai-panel--prompt .ai-panel-border {
    background: linear-gradient(135deg, rgba(99,102,241,0.6), transparent 50%, rgba(139,92,246,0.4));
}

/* Media Panel — Pink */
.ai-panel--media {
    background: rgba(236, 72, 153, 0.04);
    border: 1px solid rgba(236, 72, 153, 0.18);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.ai-panel--media:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 12px 40px rgba(236,72,153,0.2), 0 0 0 1px rgba(236,72,153,0.1);
}

.ai-panel--media .ai-panel-glow {
    background: radial-gradient(circle at 80% 20%, rgba(236,72,153,0.15), transparent 65%);
}

.ai-panel--media .ai-panel-tag {
    color: #f9a8d4;
    background: rgba(236,72,153,0.12);
    border-color: rgba(236,72,153,0.25);
}

.ai-panel--media .ai-panel-icon {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 0 25px rgba(236,72,153,0.5);
}

.ai-panel--media .ai-panel-icon-ring {
    border-color: rgba(236,72,153,0.3);
    animation: ring-ai-spin-right 10s linear infinite;
}

.ai-panel--media .ai-chip {
    border-color: rgba(236,72,153,0.25);
    color: #f9a8d4;
    background: rgba(236,72,153,0.06);
}

.ai-panel--media .ai-chip:hover {
    background: rgba(236,72,153,0.15);
    border-color: rgba(236,72,153,0.5);
}

.ai-panel--media .ai-panel-border {
    background: linear-gradient(135deg, rgba(236,72,153,0.6), transparent 50%, rgba(244,63,94,0.4));
}

.ai-panel-glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
}

.ai-panel-inner {
    position: relative;
    z-index: 1;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ai-panel-icon-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.ai-panel-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-panel:hover .ai-panel-icon {
    transform: rotate(-8deg) scale(1.1);
}

.ai-panel-icon-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px dashed;
    opacity: 0.4;
}

@keyframes ring-ai-spin-left {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ring-ai-spin-right {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.ai-panel-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ai-panel-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 5px;
    border: 1px solid;
    width: fit-content;
}

.ai-panel-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.ai-panel-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ai-chip {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 100px;
    border: 1px solid;
    cursor: default;
    transition: all 0.25s ease;
}

.ai-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.ai-metric-bar {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ai-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.ai-bar-val {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.ai-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-bar-fill.animated {
    width: var(--target-w);
}

.ai-panel-border {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    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 ease;
    pointer-events: none;
}

.ai-panel:hover .ai-panel-border {
    opacity: 1;
}

.ai-card-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.ai-stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ai-stat-val {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.ai-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ai-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.ai-mega-border {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0.5), transparent 40%, rgba(236,72,153,0.3) 70%, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    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.5s ease;
    pointer-events: none;
}

.ai-card-mega:hover .ai-mega-border {
    opacity: 1;
}

@media (max-width: 900px) {
    .ai-panels { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .glass-card, .ai-card-mega { 
        backdrop-filter: none !important; 
        -webkit-backdrop-filter: none !important;
        background: rgba(15, 15, 46, 0.85);
    }
    .ai-mega-border { display: none; }
    .ai-card-mega { padding: 1.5rem; border: 1px solid rgba(139, 92, 246, 0.2); }
    .ai-main-title { font-size: 1.2rem; }
    .ai-stat-val { font-size: 1.2rem; }
    .ai-stat-divider { display: none; }
    .ai-stat-item { min-width: 45%; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 1rem; margin-bottom: 0.5rem; }
    .ai-panel-inner { padding: 1.3rem; }
    .ai-card-header { flex-direction: column; align-items: flex-start; }
    .ai-level-tag { margin-left: 0; }
}

/* =======================================================
   DYNAMIC ISLAND (MOBILE ACTION HUB)
   ======================================================= */
.dynamic-island {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 8, 22, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(139, 92, 246, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    /* Default collapsed state */
    width: 140px;
    height: 45px;
}

/* Hidden on desktop */
@media (min-width: 769px) {
    .dynamic-island {
        display: none !important;
    }
}

.di-content-collapsed {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    position: absolute;
    transition: opacity 0.3s ease;
}

.di-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: di-pulse-anim 2s infinite;
}

@keyframes di-pulse-anim {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.di-content-expanded {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 0 15px;
}

.di-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.di-icon {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 50%;
}

/* Expanded State */
.dynamic-island.expanded {
    width: 90vw;
    max-width: 350px;
    height: 80px;
    border-radius: 25px;
    background: rgba(15, 12, 32, 0.9);
}

.dynamic-island.expanded .di-content-collapsed {
    opacity: 0;
    pointer-events: none;
}

.dynamic-island.expanded .di-content-expanded {
    opacity: 1;
    pointer-events: all;
}

.dynamic-island.expanded .di-action {
    transform: translateY(0);
}

/* Scroll Hide State */
.dynamic-island.hidden-scroll {
    bottom: -60px;
    opacity: 0.3;
}
