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

:root {
    --accent: #a855f7;
    --accent2: #d946ef;
    --accent_dark: #7c3aed;
    --accent_soft: rgba(168, 85, 247, 0.25);
    --accent_soft2: rgba(217, 70, 239, 0.18);
    --accent_text: #a855f7;
}

body[data-theme="blue"] {
    --accent: #38bdf8;
    --accent2: #818cf8;
    --accent_dark: #0ea5e9;
    --accent_soft: rgba(56, 189, 248, 0.25);
    --accent_soft2: rgba(129, 140, 248, 0.18);
    --accent_text: #38bdf8;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #07070a;
    color: #e0e0e8;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

code {
    background: rgba(99, 179, 237, 0.12);
    color: #63b3ed;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ===== BACKGROUND EFFECTS ===== */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent_soft), transparent 70%);
    top: -200px;
    left: -100px;
    animation: blobFloat1 20s ease-in-out infinite;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent_soft2), transparent 70%);
    top: 40%;
    right: -150px;
    animation: blobFloat2 25s ease-in-out infinite;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15), transparent 70%);
    bottom: -100px;
    left: 30%;
    animation: blobFloat3 22s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.1); }
    66% { transform: translate(-40px, 30px) scale(0.95); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -40px) scale(1.05); }
    66% { transform: translate(40px, -20px) scale(0.9); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 40px) scale(0.92); }
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06), transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 12px 0;
}

.nav-shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 26px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    overflow: hidden;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.navbar.scrolled .nav-glass {
    background: rgba(10, 10, 14, 0.82);
    border-color: rgba(255, 255, 255, 0.09);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 1001;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: translateZ(0);
    image-rendering: auto;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    display: block;
}

.logo-icon {
    color: var(--accent_text);
    font-size: 1.4rem;
}

.nav-logo.has-logo .logo-icon {
    display: none;
}

.logo-text {
    color: #fff;
}

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
    transition: left 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

body[data-theme="blue"] .theme-toggle::after {
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

body[data-theme="blue"] .theme-toggle.active::after {
    left: 23px;
}

body:not([data-theme="blue"]) .theme-toggle.active::after {
    left: 23px;
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-avatar-fallback {
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
}

.nav-avatar.fallback {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(139, 92, 246, 0.14));
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: var(--accent_text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

body[data-theme="blue"] .nav-cta {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-cta:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}

body[data-theme="blue"] .nav-cta:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.5);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    z-index: 1001;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 500px;
    margin: 0 auto;
}

.text-accent {
    color: var(--accent_text);
}

/* ===== PAGE HERO ===== */
.page-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.7;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent_text);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 78vw;
        max-width: 360px;
        background: rgba(7, 7, 10, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: -12px 0 30px rgba(0, 0, 0, 0.35);
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        padding: calc(env(safe-area-inset-top) + 96px) 24px 28px;
        overflow-y: auto;
        z-index: 999;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease;
    }

    .nav-links.open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links .nav-link {
        font-size: 1.3rem;
    }

    .nav-burger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .nav-avatar {
        display: none;
    }

    .section-title,
    .page-title {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .section {
        padding: 60px 0;
    }

    .page-hero {
        padding: 120px 0 40px;
    }
}

@media (max-width: 480px) {
    .nav-shell {
        padding: 0 14px;
    }

    .nav-container {
        padding: 12px 14px;
    }

    .nav-logo {
        font-size: 1.05rem;
        gap: 8px;
    }

    .logo-img {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .nav-right {
        gap: 8px;
    }

    .theme-toggle {
        width: 42px;
        height: 24px;
    }

    .theme-toggle::after {
        width: 18px;
        height: 18px;
    }

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