:root {
    /* Base Dark Theme Colors */
    --bg-color: #0d0d0f;
    --bg-secondary: #111115;
    --primary-red: #a30d11;
    --primary-red-hover: #c41014;
    --accent-gold: #ffc824;
    --accent-gold-hover: #ffe066;
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.light-theme {
    /* Light Theme Overrides */
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Typography Utilities */
h1, h2, h3, h4, .role, .logo, .counter {
    font-family: var(--font-heading);
}

.highlight {
    color: var(--accent-gold);
}

body.light-theme .highlight {
    color: var(--primary-red); /* More contrast in light mode */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Backgrounds */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

body.light-theme #particles-js {
    opacity: 0.2;
}

.hero-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.5;
}

body.light-theme .hero-video {
    opacity: 0.1;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(163, 13, 17, 0.2) 0%, var(--bg-color) 80%);
    z-index: -1;
}

/* Glassmorphism Class */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background: var(--bg-color);
    opacity: 0.95;
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 2px;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
    transition: border-color 0.3s ease;
}

.logo:hover .logo-img {
    border-color: var(--accent-gold);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-links a, .theme-switch {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-body);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover, .theme-switch:hover {
    color: var(--accent-gold);
}

.theme-switch {
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(163, 13, 17, 0.4);
}

body.light-theme .btn-primary:hover {
    color: var(--primary-red);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: var(--glass-bg);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Sections General */
section {
    padding: 100px 5%;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.clickable {
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Vision Section */
.vision-section {
    background: linear-gradient(to bottom, transparent, var(--bg-secondary));
}

.vision-card {
    padding: 4rem;
    text-align: center;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-top: 2px solid rgba(163, 13, 17, 0.3);
}

.vision-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--accent-gold);
}

.quote-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    opacity: 0.2;
    margin-bottom: 1.5rem;
}

body.light-theme .quote-icon {
    opacity: 0.5;
}

.vision-card p {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.8;
}

/* Impact Section */
.impact-section {
    padding: 50px 5%;
    background-color: var(--bg-secondary);
}

.impact-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.impact-stat {
    flex: 1;
    min-width: 250px;
    padding: 2.5rem;
    text-align: center;
    border-bottom: 3px solid var(--accent-gold);
}

body.light-theme .impact-stat {
    border-bottom-color: var(--primary-red);
}

.counter {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.impact-stat p {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hierarchy Section */
.hierarchy-section {
    background-color: var(--bg-secondary);
}

.tree-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.node-level {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.node-level::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    width: 2px;
    height: 1rem;
    background: var(--glass-border);
}
.lead-level::after, .mid-level::after {
    display: block;
}
.core-level::after {
    display: none;
}

.org-card {
    padding: 1.5rem;
    width: 280px;
    text-align: center;
    transition: border-color 0.3s ease;
    border-top: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.org-card:hover {
    border-top-color: var(--primary-red);
}

.org-card.leader {
    border-top-color: var(--accent-gold);
    width: 320px;
}

.role {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

body.light-theme .role {
    color: var(--primary-red);
}

.name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.org-card:hover .card-icon {
    color: var(--primary-red);
    opacity: 1;
}

.new-role .badge {
    position: absolute;
    top: 10px;
    right: -25px;
    background: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 30px;
    transform: rotate(45deg);
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

/* Timeline (Events Section) */
.events-section {
    background: linear-gradient(to top, var(--bg-color), var(--bg-secondary));
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--glass-border);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--primary-red);
    z-index: 2;
}

.future-dot {
    background: transparent;
    border: 3px solid var(--accent-gold);
    box-shadow: none;
}

.highlight-dot {
    background: var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-gold);
}

body.light-theme .highlight-dot {
    background: var(--primary-red);
    box-shadow: 0 0 15px var(--primary-red);
}

.event-card {
    width: 45%;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.event-img-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(163, 13, 17, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-red);
    border: 1px solid rgba(163, 13, 17, 0.3);
    transition: all 0.3s ease;
}

.event-card:hover .event-img-placeholder {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 0 20px rgba(163, 13, 17, 0.4);
}

.event-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.event-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    background: var(--glass-bg);
    border-radius: 20px;
    color: var(--text-muted);
}

.timeline-date.highlight {
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

body.light-theme .timeline-date.highlight {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.highlight-event {
    border: 1px solid rgba(255, 200, 36, 0.3);
}

body.light-theme .highlight-event {
    border-color: rgba(163, 13, 17, 0.3);
}

.highlight-event .event-img-placeholder {
    color: var(--accent-gold);
    border-color: rgba(255, 200, 36, 0.3);
}

body.light-theme .highlight-event .event-img-placeholder {
    color: var(--primary-red);
    border-color: rgba(163, 13, 17, 0.3);
}

/* Join Section */
.join-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.join-card {
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.step-num {
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(128, 128, 128, 0.1);
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

body.light-theme .step-num {
    color: rgba(0, 0, 0, 0.05);
}

.join-card:hover .step-num {
    color: rgba(163, 13, 17, 0.1);
}

.join-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.join-card p {
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.cta-container {
    text-align: center;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo .logo-img {
    height: 50px;
    border: 2px solid var(--accent-gold);
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
}

.socials a:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.light-theme .modal {
    background-color: rgba(255, 255, 255, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    margin: auto;
    padding: 3rem;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    position: relative;
    transform: translateY(50px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--text-muted);
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary-red);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-top: 1rem;
}

body.light-theme .modal-header h2 {
    color: var(--primary-red);
}

.member-img-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 2px solid var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-red);
}

.modal-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.modal-details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-details p {
    margin-bottom: 0.5rem;
}

.modal-details strong {
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    .nav-links li:not(:last-child) {
        display: none; /* simple mobile behavior, only show theme switch */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .vision-card {
        padding: 2rem;
    }
    .org-card, .org-card.leader {
        width: 100%;
    }
    
    .timeline-line {
        left: 20px;
    }
    .timeline-dot {
        left: 20px;
    }
    .timeline-item {
        justify-content: flex-end;
    }
    .event-card {
        width: calc(100% - 50px);
    }
}
