/* ============================================================================
   KRIZ OBSERVATORY - MAIN STYLESHEET
   Deep space theme with glowing accents and heavy animations
   ============================================================================ */

:root {
    --color-bg-dark: #0a0a1a;
    --color-bg-darker: #050510;
    --color-bg-card: #0d1117;
    --color-text-light: #e8e8f0;
    --color-text-secondary: #b0b0c0;
    --color-cyan: #00f5ff;
    --color-cyan-glow: #00d4ff;
    --color-purple: #8b5cf6;
    --color-purple-glow: #7c3aed;
    --color-orange: #f59e0b;
    --color-green: #10b981;
    --color-pink: #ec4899;

    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.15s ease-out;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

a {
    color: var(--color-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-cyan-glow);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-cyan);
    white-space: nowrap;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--color-cyan);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-cyan);
}

.navbar-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.navbar-menu a {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    position: relative;
    padding-bottom: 2px;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-cyan);
    transition: var(--transition-fast);
    box-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
}

.navbar-menu a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-cyan);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #0d1117 50%, #0a0a1a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

#starfield-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-cyan);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    color: var(--color-bg-dark);
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.6), 0 10px 25px rgba(139, 92, 246, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--color-cyan);
    border: 2px solid var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.cta-button.secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.4);
}

/* ============================================================================
   SECTION STYLES
   ============================================================================ */

section {
    position: relative;
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

/* ============================================================================
   DATA COUNTERS
   ============================================================================ */

.data-counters {
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.8) 0%, rgba(10, 10, 26, 0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 4rem 2rem;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.1), inset 0 0 40px rgba(0, 245, 255, 0.05);
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.counter-card {
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.counter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.1) 0%, transparent 70%);
    animation: pulse-bg 4s ease-in-out infinite;
    opacity: 0;
}

.counter-card:hover {
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.3), inset 0 0 20px rgba(0, 245, 255, 0.1);
    transform: translateY(-8px);
}

.counter-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-cyan);
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.counter-unit {
    font-size: 0.9rem;
    color: var(--color-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.counter-label {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* ============================================================================
   DATASTREAM SECTION
   ============================================================================ */

.datastream-section {
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.5) 0%, rgba(10, 10, 26, 0.5) 100%);
    border: 1px solid rgba(0, 245, 255, 0.15);
    border-radius: 20px;
    padding: 4rem 2rem;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
}

.datastream-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#datastream-canvas {
    width: 100%;
    height: 300px;
    display: block;
    margin-bottom: 2rem;
    border-radius: 15px;
    background: rgba(5, 5, 16, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.pipeline-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================================================
   HIGHLIGHTS / CARDS
   ============================================================================ */

.highlights-grid,
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.highlight-card,
.program-card {
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.highlight-card::before,
.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(0, 245, 255, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.highlight-card:hover,
.program-card:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3), inset 0 0 30px rgba(0, 245, 255, 0.05);
}

.highlight-card:hover::before,
.program-card:hover::before {
    opacity: 1;
}

.highlight-icon,
.program-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.highlight-card h3,
.program-card h3 {
    color: var(--color-cyan);
    margin-bottom: 1rem;
}

.program-card p {
    margin-bottom: 1.5rem;
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.meta-tag {
    display: inline-block;
    background: rgba(0, 245, 255, 0.1);
    color: var(--color-cyan);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

/* ============================================================================
   PARTNERS
   ============================================================================ */

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.partner-logo {
    background: rgba(13, 17, 23, 0.8);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    font-weight: 700;
    color: var(--color-text-secondary);
    transition: var(--transition);
}

.partner-logo:hover {
    border-color: var(--color-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    color: var(--color-cyan);
}

/* ============================================================================
   OPEN DATA SECTION
   ============================================================================ */

.open-data {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(0, 245, 255, 0.1) 100%);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 4rem 3rem;
}

.open-data-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.open-data-content h2 {
    color: var(--color-cyan);
    margin-bottom: 1.5rem;
}

.open-data-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat {
    background: rgba(10, 10, 26, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-orange);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   PUBLICATIONS
   ============================================================================ */

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.pub-item {
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.pub-item:hover {
    border-color: rgba(0, 245, 255, 0.4);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.2);
}

.pub-date {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    color: var(--color-orange);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pub-item h3 {
    color: var(--color-cyan);
    margin-bottom: 0.8rem;
}

.pub-item h3 a {
    color: var(--color-cyan);
}

.pub-authors {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.pub-excerpt {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.view-all-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1.05rem;
    color: var(--color-cyan);
    position: relative;
}

.view-all-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-cyan);
    transition: var(--transition-fast);
}

.view-all-link:hover::after {
    width: 100%;
}

/* ============================================================================
   NEWSLETTER
   ============================================================================ */

.newsletter {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(0, 245, 255, 0.1) 100%);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 4rem 3rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-content h2 {
    color: var(--color-cyan);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.9rem 1.5rem;
    background: rgba(10, 10, 26, 0.8);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.newsletter-form input::placeholder {
    color: var(--color-text-secondary);
}

.newsletter-form .btn-submit {
    padding: 0.9rem 2rem;
}

.newsletter-note {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ============================================================================
   PAGE HERO (SECONDARY PAGES)
   ============================================================================ */

.page-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #0d1117 50%, #0a0a1a 100%);
    padding: 4rem 2rem;
    overflow: hidden;
}

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

.page-hero-content h1 {
    font-size: 3.2rem;
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
}

.page-hero-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.3;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 60px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50px 50px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s ease-in-out infinite;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--color-cyan);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--color-cyan);
    padding-left: 5px;
}

.footer-section p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ============================================================================
   FORM STYLES
   ============================================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: var(--color-text-light);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
    background: rgba(13, 17, 23, 0.95);
}

.form-group input::placeholder {
    color: var(--color-text-secondary);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.form-group.checkbox input {
    width: auto;
}

.form-group.checkbox label {
    margin: 0;
}

.btn-submit {
    padding: 0.95rem 2rem;
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    color: var(--color-bg-dark);
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .navbar-menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    section {
        padding: 3rem 1.5rem;
    }

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

    .counters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights-grid,
    .programs-grid {
        grid-template-columns: 1fr;
    }

    .page-hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .counters-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}
