/* ========== RESET ========== */

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

html,
body {
    min-height: 100vh;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: #f0f7f2;
    color: #1a2f23;
    position: relative;
    overflow-x: hidden;
}

/* Grainy noise texture overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

/* ========== ANIMATED BACKGROUND ========== */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(16, 185, 129, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(52, 211, 153, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
    pointer-events: none;
    animation: gridPulse 12s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

body.dark::before {
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 80%, rgba(5, 150, 105, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(52, 211, 153, 0.03) 0%, transparent 70%);
}

body.dark::after {
    background-image:
        linear-gradient(rgba(52, 211, 153, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.035) 1px, transparent 1px);
}

a {
    text-decoration: none;
}

/* ========== CONTENT ========== */

.content {
    padding: 40px;
}

h1 {
    margin-bottom: 24px;
}

#content {
    transition: opacity 0.18s ease;
}

#content.fade-out {
    opacity: 0;
}

/* ========== DARK MODE (base) ========== */

body.dark {
    background: #0c0f0d;
    color: #e2ebe6;
}
