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

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

body {
    background-color: #020614;
    color: #ffffff;
    overflow-x: hidden;
}

::selection {
    background: rgba(45, 184, 138, 0.3);
    color: #ffffff;
}

/* ===== Geometric Background Shapes ===== */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.4;
}

.geo-circle-1 {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 184, 138, 0.12) 0%, transparent 70%);
    top: 10%;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 184, 138, 0.08) 0%, transparent 70%);
    bottom: 20%;
    left: -80px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-rect-1 {
    width: 200px;
    height: 200px;
    background: rgba(45, 184, 138, 0.05);
    border: 1px solid rgba(45, 184, 138, 0.1);
    top: 35%;
    left: 5%;
    transform: rotate(45deg);
    animation: float-slow 18s ease-in-out infinite;
}

.geo-rect-2 {
    width: 150px;
    height: 150px;
    background: rgba(45, 184, 138, 0.04);
    border: 1px solid rgba(45, 184, 138, 0.08);
    bottom: 10%;
    right: 8%;
    transform: rotate(20deg);
    animation: float-slow 22s ease-in-out infinite reverse;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(45, 184, 138, 0.04);
    top: 55%;
    right: 15%;
    animation: float-slow 16s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-30px) rotate(var(--rotation, 0deg)); }
}

.geo-rect-1 { --rotation: 45deg; }
.geo-rect-2 { --rotation: 20deg; }

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(2, 6, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== Reveal Animations ===== */
.reveal-section {
    /* Default: visible — progressive enhancement via JS */
}

.reveal-section.revealed {
    animation: revealIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.reveal-section > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-section.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section.revealed > *:nth-child(1) { transition-delay: 0.0s; }
.reveal-section.revealed > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-section.revealed > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-section.revealed > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-section.revealed > *:nth-child(5) { transition-delay: 0.32s; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .geo-shape {
        animation: none;
    }
    
    .reveal-section > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    img {
        transition: none;
    }
}

/* ===== Focus styles ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid rgba(45, 184, 138, 0.8);
    outline-offset: 3px;
    border-radius: 4px;
}

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

::-webkit-scrollbar-track {
    background: #020614;
}

::-webkit-scrollbar-thumb {
    background: rgba(45, 184, 138, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 184, 138, 0.5);
}
