/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */
   :root {
    /* Colors */
    --primary-blue: #2563eb;
    --primary-green: #10b981;
    --dark-blue: #1e40af;
    --light-blue: #dbeafe;
    --light-green: #d1fae5;
    
    /* Text Colors */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    
    /* Backgrounds */
    --bg-light: #f9fafb;
    --bg-dark-start: #0f172a;
    --bg-dark-end: #1e293b;
    
    /* Gradients */
    --bg-dark-grad: linear-gradient(180deg, var(--bg-dark-start) 0%, var(--bg-dark-end) 100%);
    --accent-grad: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    
    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-hero: 'Oswald', sans-serif;
    --font-accent: 'Montserrat', sans-serif;
    
    /* Effects & Glassmorphism */
    --glass-bg: rgba(10, 18, 35, 0.85);
    --glass-border: rgba(37, 99, 235, 0.35);
    --shadow-light: 0 8px 40px rgba(0, 0, 0, 0.08);
    --shadow-dark-glow: 0 0 40px rgba(37, 99, 235, 0.2);
    
    /* Radii */
    --radius-pill: 9999px;
    --radius-card: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
.hero-title {
    font-family: var(--font-hero);
    font-size: clamp(3rem, 6vw, 5rem);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.eyebrow {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1; /* Lighter variant for dark background */
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

.section-title {
    font-family: var(--font-hero);
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-pill {
    border-radius: var(--radius-pill);
    padding: 0.875rem 2rem;
}

.btn-primary {
    background: var(--accent-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: rgba(37, 99, 235, 0.05);
}

.btn-category {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem;
}

.btn-category:hover, .btn-category.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-dark-glow);
}

/* ==========================================================================
   Navigation (Glassmorphism)
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-img {
    height: 34px;
    width: 34px;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-family: var(--font-hero);
    color: white;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
}

.logo .highlight {
    color: var(--primary-green);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.nav-cta-mobile {
    display: none;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-family: var(--font-accent);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-green);
}

/* ==========================================================================
   Hero Section (Dark Immersive & Animated)
   ========================================================================== */
@keyframes heroFadeUp {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orbPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
}

@keyframes floatBackground {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.hero-section {
    background: var(--bg-dark-grad);
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 8rem; /* Account for fixed nav */
    padding-bottom: 6rem;
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}

/* Tech Grid Pattern on Background */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    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: 0;
    pointer-events: none;
    animation: floatBackground 20s linear infinite;
}

/* Decorative background glowing orb */
.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 1000px;
    max-height: 1000px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(16, 185, 129, 0.1) 40%, rgba(15, 23, 42, 0) 70%);
    z-index: 0;
    pointer-events: none;
    animation: orbPulse 8s alternate infinite ease-in-out;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Staggered Animations for Text */
.hero-content .eyebrow {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.hero-content .hero-title {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
    opacity: 0;
}
.hero-content .hero-subtitle {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}
.hero-content .category-filters {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.45s;
    opacity: 0;
}

.mobile-ticker {
    display: none;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* ==========================================================================
   Events Feed Section (Light & Clean)
   ========================================================================== */
.events-feed {
    padding: 6rem 0;
    background: var(--bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.feed-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.feed-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-pill);
    background-color: white;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.feed-select:hover, .feed-select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.events-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   Event Card
   ========================================================================== */
.event-card {
    display: flex;
    background: white;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.event-score-badge {
    background: var(--accent-grad);
    color: white;
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.event-score-badge.val-8 {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.score-label {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    cursor: help;
    opacity: 0.7;
    transition: var(--transition);
}

.info-icon:hover {
    opacity: 1;
}

.score-value {
    font-family: var(--font-hero);
    font-size: 3rem;
    line-height: 1;
}

.event-content {
    padding: 2rem;
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing on long titles */
}

.event-category {
    color: var(--dark-blue);
}

.event-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.event-perks {
    display: flex;
    gap: 0.75rem;
}

.perk {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.badge-green {
    background: var(--light-green);
    color: #065f46;
}

.badge-blue {
    background: var(--light-blue);
    color: var(--dark-blue);
}

.badge-grey {
    background: #f1f5f9;
    color: var(--text-muted);
}

.event-footer {
    padding: 2rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid rgba(0,0,0,0.05);
    min-width: 250px;
}

.organizer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.organizer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.organizer-info strong {
    color: var(--text-main);
    display: block;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-buttons .btn {
    width: 100%;
}

.calendar-wrapper {
    position: relative;
    width: 100%;
}

.calendar-btn {
    border-color: #cbd5e1;
    color: var(--text-muted);
    width: 100%;
}

.calendar-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.calendar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 10;
    flex-direction: column;
    overflow: hidden;
}

.calendar-dropdown.active {
    display: flex;
}

.cal-link {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.cal-link:last-child {
    border-bottom: none;
}

.cal-link:hover {
    background: #f8fafc;
    color: var(--primary-blue);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--bg-dark-start);
    padding: 4rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-hero);
    color: white;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

.footer-logo .highlight {
    color: var(--text-muted);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   Responsive — Tablet
   ============================================================ */
@media (max-width: 900px) {
    .event-card {
        flex-direction: column;
    }

    .event-score-badge {
        width: 100%;
        padding: 1rem 1.5rem;
        flex-direction: row;
        gap: 1rem;
        border-radius: 0;
    }

    .score-value {
        font-size: 2rem;
    }

    .event-footer {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.05);
        min-width: unset;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 640px) {

    /* Nav */
    .glass-nav {
        top: 0.5rem;
        width: 95%;
        padding: 0.6rem 1.25rem;
        border-radius: 1rem;
    }

    .nav-cta-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-cta-mobile {
        display: list-item;
    }

    #main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 1rem;
        padding: 1rem 0;
        z-index: 99;
    }

    #main-nav.open {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .nav-links li a {
        display: block;
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        transition: background 0.2s;
    }

    .nav-links li:last-child a {
        border-bottom: none;
        color: var(--primary-green);
    }

    .nav-links li a:hover {
        background: rgba(255,255,255,0.05);
        color: var(--primary-green);
    }

    /* Hero — Premium Mobile Layout */
    .hero-section {
        padding-top: 8rem;
        padding-bottom: 3.5rem;
        min-height: unset;
        text-align: center;
        display: block; /* Fixed: Flexbox was causing the ticker to blow up the width */
    }

    .hero-section::before {
        width: 150vw;
        height: 150vw;
        top: 0;
        left: -25%;
        opacity: 0.6;
        animation: orbPulse 8s alternate infinite ease-in-out;
    }

    .hero-section::after {
        opacity: 0.6;
        animation: floatBackground 20s linear infinite;
    }

    .hero-content .eyebrow {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        margin-bottom: 1rem;
        color: var(--primary-green);
    }

    .hero-title {
        font-size: clamp(2.4rem, 11vw, 3.2rem);
        margin-bottom: 1.5rem;
        line-height: 1.15;
        letter-spacing: 0.02em; /* Gives the Oswald font breathing room */
        hyphens: none;
    }

    /* Subtitle — elegant und lesbar */
    .hero-subtitle {
        display: block;
        font-size: 1.05rem;
        line-height: 1.5;
        color: rgba(255,255,255,0.8);
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Ticker */
    .mobile-ticker {
        display: flex;
        overflow: hidden;
        width: 100%;
        margin-top: 1rem;
        margin-bottom: 2.5rem;
        border-top: 1px solid rgba(255,255,255,0.06);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 0.85rem 0;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0) 100%);
    }

    .mobile-ticker-inner {
        display: flex;
        gap: 1.5rem;
        animation: ticker 15s linear infinite;
        white-space: nowrap;
        align-items: center;
    }

    @keyframes ticker {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }

    .mobile-ticker span {
        font-family: var(--font-accent);
        font-size: 0.7rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.6);
        flex-shrink: 0;
    }

    .mobile-ticker span.dot {
        color: var(--primary-green);
        letter-spacing: 0;
        font-weight: 700;
    }

    /* Category Pills — elegant horizontal scroll */
    .category-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 1.5rem;
        gap: 0.75rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 0;
        scroll-snap-type: x mandatory;
        padding-left: 1rem; /* Clean edge padding */
        padding-right: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .btn-category {
        scroll-snap-align: center;
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.65rem 1.4rem;
        font-size: 0.8rem;
        width: auto;
        border-radius: var(--radius-pill);
    }

    /* Events Feed */
    .events-feed {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .feed-controls {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .control-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        width: 100%;
    }

    .control-group label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
    }

    .feed-select {
        width: 100%;
        font-size: 0.82rem;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Event Card */
    .event-card {
        border-radius: 0.75rem;
    }

    .event-score-badge {
        padding: 0.75rem 1rem;
        border-radius: 0.75rem 0.75rem 0 0;
    }

    .score-value {
        font-size: 1.75rem;
    }

    .event-content {
        padding: 1.25rem;
    }

    .event-title {
        font-size: 1.2rem;
    }

    .event-meta {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .event-footer {
        padding: 1.25rem;
    }

    .action-buttons {
        gap: 0.75rem;
    }

    .btn-pill {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        padding: 2.5rem 0;
    }
}
