:root {
    /* Color Palette - Light Mode Default */
    --clr-bg: #f8fafc;
    --clr-bg-subtle: #e2e8f0;
    --clr-surface: rgba(255, 255, 255, 0.85);
    --clr-surface-border: rgba(0, 0, 0, 0.1);

    --clr-primary: #2563eb;
    --clr-primary-glow: rgba(37, 99, 235, 0.2);
    --clr-secondary: #7c3aed;
    --clr-accent: #0891b2;

    --clr-text: #0f172a;
    --clr-text-muted: #475569;
    --clr-text-inverse: #f8fafc;
    --clr-footer-bg: #f1f5f9;
    --clr-form-input: rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-width: 1200px;
}

[data-theme="dark"] {
    --clr-bg: #030712;
    --clr-bg-subtle: #111827;
    --clr-surface: rgba(17, 24, 39, 0.7);
    --clr-surface-border: rgba(255, 255, 255, 0.1);

    --clr-primary: #3b82f6;
    --clr-primary-glow: rgba(59, 130, 246, 0.5);
    --clr-secondary: #8b5cf6;
    --clr-accent: #06b6d4;

    --clr-text: #f9fafb;
    --clr-text-muted: #9ca3af;
    --clr-text-inverse: #030712;
    --clr-footer-bg: #000000;
    --clr-form-input: rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--clr-secondary), transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--clr-primary), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 10%) scale(1.1);
    }
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(to right, var(--clr-primary), var(--clr-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--clr-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--clr-surface-border);
    border-radius: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    box-shadow: 0 4px 15px var(--clr-primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px var(--clr-primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(128, 128, 128, 0.1);
    color: var(--clr-text);
    border: 1px solid var(--clr-surface-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(128, 128, 128, 0.2);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--clr-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--clr-surface-border);
    color: var(--clr-primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: var(--clr-surface);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--clr-surface-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-text);
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-primary);
}

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

.nav-links a {
    color: var(--clr-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 1rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Interactive Hero Graphic */
.hero-graphic {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.interactive-panel {
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--clr-surface-border);
}

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

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

.panel-header .dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--clr-surface-border);
}

.panel-header .dots span:nth-child(1) {
    background: #ef4444;
}

.panel-header .dots span:nth-child(2) {
    background: #f59e0b;
}

.panel-header .dots span:nth-child(3) {
    background: #10b981;
}

.panel-title {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.panel-body {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
}

.server-rack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.server-unit {
    background: var(--clr-bg-subtle);
    border: 1px solid var(--clr-surface-border);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.unit-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.server-unit.active .unit-indicator {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.server-unit.warning .unit-indicator {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}

.server-unit span {
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1;
}

.unit-load {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--clr-primary-glow);
    z-index: 0;
    transition: width 0.5s ease;
}

.network-graph {
    border-top: 1px dashed var(--clr-surface-border);
    padding-top: 1.5rem;
}

.graph-line {
    stroke: var(--clr-primary);
    stroke-width: 2;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: dash 4s linear infinite;
}

.graph-point {
    fill: var(--clr-accent);
    filter: drop-shadow(0 0 5px var(--clr-accent));
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Services */
.services {
    padding: 6rem 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--clr-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

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

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-accent);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--clr-primary);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

/* Stats */
.stats {
    padding: 4rem 0;
    background: var(--clr-bg-subtle);
    border-top: 1px solid var(--clr-surface-border);
    border-bottom: 1px solid var(--clr-surface-border);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.stat-number {
    font-size: 3rem;
    background: linear-gradient(to right, var(--clr-text), var(--clr-text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--clr-accent);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
}

.cta-container {
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clr-surface);
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: var(--clr-text-muted);
}

/* Footer */
.footer {
    background: var(--clr-footer-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--clr-surface-border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--clr-text-muted);
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.9rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--clr-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--clr-surface-border);
    color: var(--clr-text-muted);
    font-size: 0.85rem;
}

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

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

    .hero-content {
        align-items: center;
        margin: 0 auto;
    }

    .hero-graphic {
        margin-top: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 3rem 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 1rem auto 0;
    }
}