:root {
    --bg: #050508;
    --violet: #8b5cf6;
    --violet-glow: 0 0 20px rgba(139, 92, 246, 0.6);
    --text: #e5e5e5;
    --muted: #9ca3af;
}

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

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;

}

/* GRID TEXTURE */
body::before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}


/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 16px 24px;
    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.25);
    z-index: 1000;
}

/* CONTAINER */
.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.logo {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--violet);
}

/* LINKS */
.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: white;

}

/* ACTIONS */
.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* MAIN SITE */
.main-site,
.join {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.main-site:hover,
.join:hover {
    color: var(--violet);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* CTA */
.cta-btn {
    background: var(--violet);
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.cta-btn:hover {
    color: black;
    background: #7c3aed;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: white;
    transition: 0.4s;
}

/* ANIMATION → X */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MOBILE */
@media(max-width:900px) {

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background: rgba(10, 10, 20, 0.85);
        backdrop-filter: blur(40px);
        padding: 30px 0;
        gap: 25px;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: 0.4s ease;
    }

    /* SLIDE DOWN */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* HIDE DESKTOP ACTIONS */
    .nav-actions {
        display: none;
    }

    /* SHOW MOBILE BUTTONS */
    .mobile-only {
        display: block;
    }

}

/* DESKTOP HIDE MOBILE */
.mobile-only {
    display: none;
}

/* HERO SECTION */
.hero-section {
    position: relative;
    overflow: hidden;
}

/* BACKGROUND GLOW */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
    filter: blur(120px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* BADGE */
.badge {
    display: inline-block;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;

    border: 1px solid rgba(255, 255, 255, 0.1);

    color: #aaa;
    backdrop-filter: blur(10px);
}

/* LOGO */
.logo-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 90px;
    z-index: 2;
}

/* ROTATING RING */
.logo-ring {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;

    border: 2px dashed rgba(139, 92, 246, 0.6);

    box-shadow:
        0 0 20px rgba(139, 92, 246, 0.4),
        inset 0 0 20px rgba(139, 92, 246, 0.2);

    animation: spinRing 14s linear infinite;
}

@keyframes spinRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* TITLE */
.hero-title {
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    font-family: gagalin, sans-serif;
    background: linear-gradient(90deg, #cb5eef, #714ace, #22d3ee, #cb5eef);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 6s linear infinite;
    text-shadow:
        0 0 10px rgba(139, 92, 246, 0.5),
        0 0 20px rgba(139, 92, 246, 0.3);
    color: #e5e5e5;
}

@media(min-width:768px) {
    .hero-title {
        font-size: 5rem;
    }
}

/* TITLE ANIMATION */
@keyframes gradientMove {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* DESCRIPTION */
.hero-desc {
    max-width: 600px;
    color: #9ca3af;
    line-height: 1.7;
}

/* BUTTONS */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* PRIMARY BUTTON */
.btn-primary {
    padding: 12px 28px;
    border-radius: 8px;

    background: #8b5cf6;
    color: white;

    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
}

/* SECONDARY BUTTON */
.btn-secondary {
    padding: 12px 28px;
    border-radius: 8px;

    border: 1px solid #8b5cf6;
    color: #8b5cf6;

    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #8b5cf6;
    color: black;
}

/* CURSOR BLINK */
.cursor {
    color: #8b5cf6;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* about card */
.about-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.mission-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.category-card,
.about-card,
.mission-card {
    will-change: transform;
}

/* CATEGORY CARD */
.category-card {
    position: relative;
    padding: 30px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s ease;
}

/* INNER BG */
.category-card::after,
.mission-card::after,
.about-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: #0a0a12;
    border-radius: inherit;
    z-index: -1;
}

/* BORDER GLOW */
.category-card::before,
.mission-card::before,
.about-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(120deg,
            transparent,
            #8b5cf6,
            #22d3ee,
            transparent);
    background-size: 300% 300%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -2;
}

/* HOVER */
.category-card:hover,
.mission-card:hover,
.about-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.category-card:hover::before,
.mission-card:hover::before,
.about-card:hover::before {
    opacity: 1;
    animation: borderFlow 3s linear infinite;
    filter: blur(2px);
}

/* BORDER ANIMATION */
@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* ICON */
.icon-wrapper {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(139, 92, 246, 0.12);

    margin-bottom: 16px;
}

.icon-wrapper i {
    font-size: 22px;
    color: #8b5cf6;
}

/* TITLE */
.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* TEXT */
.category-card p {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.6;
}


/* resources */
.resource-list {

    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #9ca3af;
    font-size: 14px;
}

.resource-list i {
    color: #8b5cf6;
    margin-right: 6px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
}

.resource-item i {
    color: #8b5cf6;

}

/* writeups */
/* cards */
.category-card {
    position: relative;
    padding: 30px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s ease;
}

/* inner bg */
.category-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: #0a0a12;
    border-radius: inherit;
    z-index: -1;
}

/* glow border */
.category-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;

    background: linear-gradient(120deg,
            transparent,
            #8b5cf6,
            #22d3ee,
            transparent);

    background-size: 300% 300%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -2;
}

/* hover */
.category-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.category-card:hover::before {
    opacity: 1;
    animation: borderFlow 3s linear infinite;
    filter: blur(2px);
}

@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* filter buttons */
.writeup-filter {
    padding: 8px 18px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 20px;
    color: #9ca3af;
    transition: 0.3s;
}

.writeup-filter:hover {
    color: white;
    background: #8b5cf6;
}

.writeup-filter.active {
    background: #8b5cf6;
    color: white;
}

/* footer */
.footer-link{
transition:0.3s;
}

.footer-link:hover{
color:white;
text-shadow:0 0 8px rgba(139,92,246,0.6);
}

.social-icon{
font-size:20px;
color:#9ca3af;
transition:0.3s;
}

.social-icon:hover{
color:#8b5cf6;
transform:translateY(-3px) scale(1.1);
text-shadow:0 0 10px rgba(139,92,246,0.6);
}