/* TheOzoneLayer - Main Styles */

:root {
    --primary: #00b4d8;
    --secondary: #0077b6;
    --accent: #90e0ef;
    --dark: #000814;
    --darker: #000000;
    --light: #caf0f8;
    --grey: #8b8c8e;
    --grid: rgba(0, 180, 216, 0.08);
}

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

html, body {
    background: var(--darker);
    color: var(--light);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
}

/* Background Elements */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at 50% 20%, rgba(0, 180, 216, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(0, 119, 182, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating Particles */
.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-30px) translateX(20px); }
    50% { transform: translateY(-60px) translateX(-20px); }
    75% { transform: translateY(-30px) translateX(30px); }
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(0, 8, 20, 0.85);
    border-bottom: 1px solid rgba(0, 180, 216, 0.15);
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-cube {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary);
    position: relative;
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.2) 0%, transparent 100%);
}

.logo-cube::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

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

.nav-version {
    font-size: 0.7rem;
    color: var(--grey);
    letter-spacing: 0.1em;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 4rem;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    font-weight: 500;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 180, 216, 0.3);
    background: rgba(0, 180, 216, 0.05);
}

.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.hero-title {
    background: linear-gradient(135deg, var(--light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 180, 216, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 180, 216, 0.5)); }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    max-width: 800px;
    line-height: 1.6;
    color: var(--grey);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.tech-highlight {
    color: var(--primary);
    font-weight: 500;
}

/* Components Section */
.components-section {
    padding: 8rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

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

.section-label {
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

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

.component-card {
    background: rgba(0, 180, 216, 0.03);
    border: 1px solid rgba(0, 180, 216, 0.15);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.component-card:hover {
    background: rgba(0, 180, 216, 0.08);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.component-card:hover::before {
    transform: scaleX(1);
}

.component-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 2rem;
    position: relative;
}

.icon-box {
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(0, 180, 216, 0.05);
}

.component-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.component-tagline {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.component-description {
    color: var(--grey);
    line-height: 1.8;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Capabilities Section */
.capabilities-section {
    padding: 8rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(0, 180, 216, 0.15);
    margin-top: 3rem;
}

.capability-item {
    background: var(--darker);
    padding: 3rem;
    transition: all 0.3s ease;
    border: none;
}

.capability-item:hover {
    background: rgba(0, 180, 216, 0.05);
}

.capability-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.capability-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.capability-description {
    color: var(--grey);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Architecture Section */
.architecture-section {
    padding: 8rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.architecture-visual {
    margin-top: 4rem;
    padding: 4rem;
    background: rgba(0, 180, 216, 0.03);
    border: 1px solid rgba(0, 180, 216, 0.15);
    position: relative;
}

.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.arch-layer {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    border: 2px solid var(--primary);
    background: rgba(0, 180, 216, 0.05);
    text-align: center;
    position: relative;
}

.arch-layer::after {
    content: '↓';
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.5;
}

.arch-layer:last-child::after {
    display: none;
}

.arch-layer-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.arch-layer-desc {
    font-size: 0.85rem;
    color: var(--grey);
}

/* Stats Section */
.stats-section {
    padding: 6rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    border: 1px solid rgba(0, 180, 216, 0.15);
}

.stat-box {
    padding: 3rem 2rem;
    text-align: center;
    border-right: 1px solid rgba(0, 180, 216, 0.15);
    transition: all 0.3s ease;
}

.stat-box:last-child {
    border-right: none;
}

.stat-box:hover {
    background: rgba(0, 180, 216, 0.05);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

/* Footer */
footer {
    padding: 4rem 4rem 3rem;
    border-top: 1px solid rgba(0, 180, 216, 0.15);
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--grey);
    letter-spacing: 0.05em;
}

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

.footer-link {
    color: var(--grey);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .main-nav {
        padding: 1.5rem 2rem;
    }

    .hero,
    .components-section,
    .capabilities-section,
    .architecture-section,
    .stats-section {
        padding: 4rem 2rem;
    }

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

    .stat-box {
        border-right: none;
        border-bottom: 1px solid rgba(0, 180, 216, 0.15);
    }

    .stat-box:last-child {
        border-bottom: none;
    }

    .architecture-visual {
        padding: 2rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--darker);
}

/* Loader */
#global_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 8, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 180, 216, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.nav-logo-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}
