*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    color: var(--text-primary);
    background: var(--bg-dark);
    scroll-padding-top: 80px;
}

body {
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-dark);
}

img {
    display: block;
    max-width: 100%;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================
   COMMON LAYOUTS
   ========================================== */

.panel {
    position: relative;
    min-height: auto;

    padding:
        10rem
        2rem;

    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-light {
    background-color: var(--bg-light-panel);
    color: var(--text-dark);
}

.bg-light .text-content h2,
.bg-light .section-title {
    color: var(--text-dark);
}

.bg-light .text-content p {
    color: var(--text-dark-muted);
}

.bg-white {
    background: var(--bg-surface);
    color: var(--text-primary);

    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    gap: 4rem;

    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-content h2,
.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);

    font-weight: 800;

    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;

    background:
        linear-gradient(
            135deg,
            var(--text-dark) 0%,
            var(--primary) 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.text-content p {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;

    --grad-hero:
        linear-gradient(
            135deg,
            #07090e 0%,
            #0f172a 40%,
            #1e1b4b 100%
        );

    --grad-accent:
        linear-gradient(
            135deg,
            var(--accent-cyan) 0%,
            var(--primary) 50%,
            var(--accent-purple) 100%
        );

    --grad-card:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.7) 0%,
            rgba(15, 23, 42, 0.8) 100%
        );

    --grad-card-hover:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.9) 0%,
            rgba(30, 27, 75, 0.6) 100%
        );

    --bg-dark: #07090e;
    --bg-surface: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-light-panel: #f1f5f9;
    --bg-white-panel: #ffffff;

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    --text-dark-muted: #475569;

    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(99, 102, 241, 0.3);
    --border-active: rgba(6, 182, 212, 0.6);

    --shadow-glow-cyan:
        0 0 25px rgba(6, 182, 212, 0.25);

    --shadow-glow-purple:
        0 0 25px rgba(168, 85, 247, 0.25);

    --shadow-card:
        0 20px 30px -10px rgba(0, 0, 0, 0.3);

    --discord-color: #5865f2;
    --github-color: #181717;

    --radius-md: 14px;
    --radius-lg: 24px;

    --transition:
        0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   SVG WAVE
   ========================================== */

.custom-shape-divider-bottom {
    position: absolute;

    bottom: -1px;
    left: 0;

    width: 100%;

    overflow: hidden;
    line-height: 0;

    pointer-events: none;
}

.custom-shape-divider-bottom svg {
    position: relative;

    display: block;

    width: calc(100% + 1.3px);
    height: 70px;
}

.custom-shape-divider-bottom path {
    fill: var(--bg-light-panel);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer-panel {
    min-height: auto;

    background: var(--bg-dark);
    color: var(--text-primary);

    padding:
        2rem
        2rem;

    text-align: center;

    border-top: 1px solid var(--border-glass);
}

.footer-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            var(--accent-cyan) 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.footer-links a {
    width: 44px;
    height: 44px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid var(--border-glass);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.25rem;
    color: var(--text-primary);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    background: var(--grad-accent);
    border-color: transparent;

    transform: translateY(-4px);

    box-shadow: var(--shadow-glow-cyan);
}

/* ==========================================
   NAVIGATION
   ========================================== */

#navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    z-index: 1000;

    background: rgba(7, 9, 14, 0.85);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-bottom: 1px solid var(--border-glass);

    transition:
        background-color 0.35s ease,
        box-shadow 0.35s ease;
}

#navbar.scrolled {
    background: rgba(7, 9, 14, 0.94);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    width: min(1200px, 100%);
    min-height: 76px;

    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.1rem 2rem;

    transition:
        min-height 0.35s ease,
        padding 0.35s ease;
}

#navbar.scrolled .nav-container {
    min-height: 64px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.logo img {
    height: 42px;
    width: auto;
    border-radius: 50%;

    box-shadow:
        0 0 12px rgba(99, 102, 241, 0.4);

    transition: height 0.35s ease;
}

#navbar.scrolled .logo img {
    height: 36px;
}

.logo h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.8px;

    background:
        linear-gradient(
            315deg,
            #ffffff 30%,
            var(--accent-cyan) 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-links a {
    position: relative;

    color: var(--text-muted);

    font-weight: 500;
    font-size: 0.95rem;

    padding: 0.25rem 0;

    transition:
        color 0.25s ease;
}

.nav-links a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -2px;

    width: 0;
    height: 2px;

    background: var(--grad-accent);

    border-radius: 2px;

    transition:
        width 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    width: 100%;
}

.hamburger {
    display: none;

    width: 44px;
    height: 44px;

    align-items: center;
    justify-content: center;

    border: 0;
    background: transparent;

    color: var(--text-primary);
    font-size: 1.5rem;

    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;

    min-height: 48px;

    padding:
        0.9rem
        2rem;

    border-radius: 50px;

    font-weight: 600;
    font-size: 1rem;

    transition:
        box-shadow 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;

    will-change: transform;
}



/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
    .nav-links {
        gap: 1.25rem;
    }

    .two-col {
        gap: 3rem;
    }

    .hero-donut {
        display: none
    }
}

@media (max-width: 768px) {
    .nav-container {
        min-height: 68px;
        padding:
            0.85rem
            1.25rem;
    }

    #navbar.scrolled .nav-container {
        min-height: 62px;
        padding:
            0.55rem
            1.25rem;
    }

    .logo h2 {
        font-size: 1.3rem;
    }

    .logo img {
        height: 36px;
    }

    #navbar.scrolled .logo img {
        height: 34px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;

        top: 100%;
        left: 0;

        width: 100%;

        background:
            rgba(7, 9, 14, 0.97);

        border-bottom:
            1px solid var(--border-glass);

        flex-direction: column;

        align-items: center;

        gap: 0;

        padding:
            0.75rem
            1.5rem
            1.5rem;

        /*
         * Don't use display:none here.
         * It prevents smooth animation and can cause layout jumps.
         */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform:
            translateY(-10px);

        transition:
            opacity 0.25s ease,
            visibility 0.25s ease,
            transform 0.25s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform:
            translateY(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        width: 100%;

        padding:
            0.85rem
            0;
    }

    .nav-links a::after {
        bottom: 3px;
    }

    .hero {
        min-height: 100svh;

        padding:
            6.5rem
            1.25rem
            8rem;
    }

    .hero h1 {
        font-size:
            clamp(2.1rem, 9vw, 2.8rem);
    }

    .hero-text {
        margin-bottom: 2rem;
    }

    .cta-buttons {
        gap: 0.85rem;
    }

    .btn {
        width: min(100%, 280px);
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .panel {
        padding:
            5rem
            1.25rem;
    }

    .about-logo {
        max-width: 220px;
    }

    .icon-badge {
        width: 160px;
        height: 160px;
    }

    .shield-icon {
        font-size: 4rem;
    }

    .mvv-card {
        padding: 1.25rem;
    }

    .projects-grid {
        gap: 1.25rem;
    }

    .project-card {
        padding:
            2.75rem
            1.5rem;
    }

    .custom-shape-divider-bottom svg {
        height: 55px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 0.98rem;
    }

    .text-content p {
        font-size: 1rem;
    }

    .mvv-card {
        gap: 0.9rem;
    }

    .mvv-icon-wrapper {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .mvv-body h3 {
        font-size: 1.05rem;
    }

    .mvv-body p {
        font-size: 0.9rem;
    }

    .section-title {
        margin-bottom: 2.25rem;
    }

    .footer-panel {
        padding:
            3.5rem
            1rem;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}