/* ============================================================
   Gottlieb's Deep Sky Observations — Global Styles
   Dark space aesthetic with scientific precision
   ============================================================ */

/* --- Reset & Variables --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep:       #0a0e17;
    --bg-primary:    #0f1520;
    --bg-card:       #141c2b;
    --bg-card-hover: #1a2436;
    --bg-input:      #111827;
    --bg-alt:        #0d1219;

    --text-primary:  #e8ecf4;
    --text-secondary:#94a3b8;
    --text-muted:    #7a8ba0;
    --text-bright:   #ffffff;

    --accent:        #60a5fa;  /* Blue */
    --accent-hover:  #93c5fd;
    --accent-dim:    #1e3a5f;
    --gold:          #f59e0b;
    --gold-dim:      #78540a;
    --green:         #34d399;
    --red:           #f87171;
    --purple:        #a78bfa;

    --border:        #1e293b;
    --border-light:  #334155;

    --radius:        8px;
    --radius-lg:     12px;
    --shadow:        0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);

    --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif:    'Crimson Pro', Georgia, serif;

    --nav-height:    64px;
    --max-width:     1200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

/* --- Full-page background image --- */
#starfield-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: #0a0e17 url('../img/rho_ophiuchi_bg.jpg') center top / cover no-repeat;
    filter: brightness(0.55) saturate(0.85);
}
/* Shooting stars overlay canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

::selection {
    background: rgba(96, 165, 250, 0.35);
    color: var(--text-bright);
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-bright);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
}

.nav-logo-icon {
    font-size: 1.4rem;
    color: var(--gold);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-bright);
    background: rgba(96, 165, 250, 0.1);
}

.nav-links a.active {
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Short labels and icons hidden on desktop */
.nav-short { display: none; }
.nav-full { display: inline; }
.nav-icon { display: none; }

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 14, 23, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 120px 24px 80px;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 48px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-desc strong {
    color: var(--text-bright);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: fadeInUp 2s ease infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes fadeInUp {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-bright);
    border-color: var(--text-secondary);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 4px 0;
}
.btn-link:hover { color: var(--accent-hover); }

/* --- Section Layout --- */
.section {
    padding: 96px 0;
    position: relative;
    background: rgba(10, 14, 23, 0.75);
}

.section-alt {
    background: rgba(13, 18, 25, 0.8);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 16px;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* --- About Section (compact) --- */
#about.section {
    padding: 40px 0 24px;
}

.about-compact {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.about-lead {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.8;
    font-style: italic;
}

.btn-bio-toggle {
    display: inline-block;
    background: transparent;
    color: var(--accent);
    border: none;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.4);
    padding: 4px 2px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}
.btn-bio-toggle:hover {
    border-bottom-color: var(--accent);
    color: var(--text-bright);
}

/* --- Bio Modal --- */
.bio-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}
.bio-modal-overlay.open {
    display: flex;
}
.bio-modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 720px;
    width: 100%;
    padding: 48px 40px 40px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.35s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.bio-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 4px 8px;
}
.bio-modal-close:hover {
    color: var(--text-bright);
}
.bio-modal-header {
    text-align: center;
    margin-bottom: 32px;
}
.bio-modal-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 58% 8%;
    border: 3px solid rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 16px;
}
.bio-modal-header h2 {
    color: var(--text-bright);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.bio-modal-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.bio-modal-body p {
    margin-bottom: 16px;
}
.bio-modal-body em {
    color: var(--text-primary);
}

/* --- Introduction Section --- */
.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-carousel-wrap {
    float: left;
    width: 320px;
    margin: 0 32px 20px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Photo Carousel */
.about-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
    aspect-ratio: 3/4;
    background: var(--bg-card);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dot:hover {
    background: rgba(255,255,255,0.6);
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.25);
}

/* (about-text-col removed — now using about-compact + bio modal) */

.telescopes-with-photo {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.telescopes-with-photo .telescope-list {
    flex: 1;
    min-width: 0;
}
.telescopes-photo {
    width: 280px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
}

.telescope-list {
    list-style: none;
    margin: 0 0 16px 0;
}

.telescope-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: var(--text-secondary);
}

.telescope-list li::before {
    content: '◈';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
    top: 10px;
}

.telescope-list li strong {
    color: var(--text-primary);
}

/* (old bio toggle/expandable removed — now using bio modal) */

.intro-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.intro-text::after {
    content: '';
    display: table;
    clear: both;
}

.intro-text p {
    margin-bottom: 20px;
}

.intro-text a {
    color: var(--accent);
}

/* --- Database Explorer --- */
.explorer-quick {
    max-width: 600px;
    margin: 0 auto 32px;
}

.quick-lookup label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.quick-search-row {
    display: flex;
    gap: 8px;
}

.quick-search-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.quick-search-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.quick-search-row input::placeholder {
    color: var(--text-muted);
}

.suggestions-dropdown {
    position: relative;
    z-index: 100;
}

.suggestions-list {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.suggestion-item:last-child { border-bottom: none; }

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--bg-card-hover);
}

.suggestion-name {
    font-weight: 500;
    color: var(--text-bright);
}

.suggestion-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(100,116,139,0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.suggestion-alt {
    font-size: 0.8rem;
    color: var(--purple);
    margin-left: 6px;
    font-style: italic;
}

/* --- Quick Collection Buttons --- */
.quick-collection-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.btn-collection {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: rgba(20, 28, 43, 0.85);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.02em;
}
.btn-collection:hover {
    border-color: var(--accent);
    color: var(--text-bright);
    background: rgba(96, 165, 250, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.1);
}
.btn-collection.active {
    border-color: var(--accent);
    color: var(--text-bright);
    background: rgba(96, 165, 250, 0.18);
    box-shadow: 0 0 16px rgba(96, 165, 250, 0.2);
}

@media (max-width: 600px) {
    .quick-collection-buttons {
        gap: 8px;
    }
    .btn-collection {
        padding: 8px 16px;
        font-size: 0.82rem;
    }
    .blog-card {
        flex-wrap: wrap;
        gap: 2px 12px;
        padding: 8px 10px;
    }
    .blog-card-date {
        width: auto;
        font-size: 0.76rem;
    }
    .blog-card-title {
        flex-basis: 100%;
        font-size: 0.92rem;
    }
    .blog-year-heading {
        font-size: 1.25rem;
    }
}

/* --- Filters --- */
.explorer-filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.filter-arrow {
    transition: transform 0.3s;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.filter-toggle.open .filter-arrow {
    transform: rotate(180deg);
}

.filter-body {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
}

.filter-body.open {
    display: block;
    padding-top: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.filter-group select option {
    background: var(--bg-card);
}

.mag-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mag-range span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.mag-range input {
    width: 80px;
}

.filter-actions {
    display: flex;
    gap: 12px;
}

/* --- Type Legend --- */
.type-legend-toggle {
    text-align: center;
    margin-bottom: 16px;
}

.type-legend {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.legend-item {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
}

.legend-abbr {
    color: var(--accent);
    font-weight: 600;
    min-width: 55px;
    text-align: right;
}

.legend-full {
    color: var(--text-secondary);
}

/* --- Results --- */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

#results-count {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-sort label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.results-sort select {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.results-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#load-more-container {
    text-align: center;
    padding: 24px 0;
}

/* --- Object Card (in results list) --- */
.object-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-dim);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.object-card:hover {
    border-color: var(--border-light);
    border-left-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-bright);
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-nickname {
    font-size: 0.85rem;
    color: var(--gold);
    margin-top: 2px;
}

.card-alt-match {
    font-size: 0.82rem;
    color: var(--purple);
    margin-top: 4px;
    font-style: italic;
}

.card-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-type {
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent);
}

.badge-top {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold);
}

.badge-orion {
    background: rgba(167, 139, 250, 0.15);
    color: var(--purple);
}

.badge-messier {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-secondary);
}

.card-obs-preview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Object Detail (slide-over panel) --- */
.object-detail {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    bottom: 0;
    width: min(700px, 90vw);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 32px;
    overflow-y: auto;
    z-index: 500;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.object-detail.open {
    transform: translateX(0);
}

.detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 499;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.detail-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 901px) {
    .detail-backdrop.open {
        opacity: 0.3;
    }
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-sans);
    margin-bottom: 20px;
    padding: 0;
}
.detail-back:hover { color: var(--accent-hover); }

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

/* --- Aladin Lite Sky Atlas viewer --- */
.aladin-wrapper {
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}
#aladin-lite-div {
    width: 100%;
    height: 400px;
}
.aladin-survey-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #ccc;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
}
@media (max-width: 600px) {
    #aladin-lite-div {
        height: 280px;
    }
}

/* Override Aladin Lite UI panel colors for readability */
#aladin-lite-div .aladin-layersControl-container,
#aladin-lite-div .aladin-box {
    background: rgba(20, 20, 30, 0.95) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}
#aladin-lite-div .aladin-box select,
#aladin-lite-div .aladin-box input {
    background: rgba(40, 40, 55, 0.9) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}
#aladin-lite-div .aladin-box label,
#aladin-lite-div .aladin-box span,
#aladin-lite-div .aladin-box p,
#aladin-lite-div .aladin-box div {
    color: #e0e0e0 !important;
}
#aladin-lite-div .aladin-box a {
    color: #8cb4ff !important;
}
#aladin-lite-div .aladin-box button {
    background: rgba(60, 60, 80, 0.9) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.detail-title-group h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-bright);
    font-family: var(--font-serif);
}

.detail-title-group .detail-nickname {
    font-size: 1rem;
    color: var(--gold);
    margin-top: 4px;
}

.detail-title-group .detail-other {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius);
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
}

.field-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.field-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

/* NGC Description */
.detail-ngc-desc {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--gold-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.detail-ngc-desc h4 {
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-ngc-desc p {
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
}

/* Observations */
.detail-observations {
    margin-bottom: 28px;
}

.detail-observations h4 {
    font-size: 1.1rem;
    color: var(--text-bright);
    margin-bottom: 16px;
    font-weight: 600;
}

.observation {
    margin-bottom: 16px;
    padding: 16px 20px;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-dim);
}

.obs-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.obs-aperture {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.obs-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.obs-text {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

/* Historical */
.detail-historical {
    margin-bottom: 24px;
}

.detail-historical h4 {
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.historical-text {
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.8;
}

/* --- Articles Section --- */
.articles-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.article-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: center;
    margin-bottom: 4px;
    transition: background 0.2s;
}

.article-item:hover {
    background: var(--bg-card-hover);
}

.article-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(96, 165, 250, 0.45);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.article-info h4 {
    color: var(--text-bright);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-link {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--radius);
    background: rgba(96,165,250,0.1);
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-link:hover {
    background: rgba(96,165,250,0.2);
    color: var(--accent-hover);
}

/* --- Observing Reports Listing --- */
.blog-filters {
    max-width: 560px;
    margin: 0 auto 36px;
}

.blog-search-input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.blog-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.blog-search-input::placeholder {
    color: var(--text-muted);
}

.blog-grid {
    max-width: 800px;
    margin: 0 auto;
}

/* Year group headings */
.blog-year-group {
    margin-bottom: 12px;
}
.blog-year-heading {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    padding: 8px 0 6px;
    margin: 0;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    margin-bottom: 4px;
}
.blog-year-group:not(:first-child) .blog-year-heading {
    margin-top: 24px;
}

/* Individual report row */
.blog-card {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    border-left: 3px solid transparent;
}
.blog-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--accent);
    transform: translateX(4px);
}

.blog-card-date {
    flex-shrink: 0;
    width: 110px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.blog-card-title {
    flex: 1;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-bright);
    line-height: 1.45;
}

.blog-card-images {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--accent);
    opacity: 0.7;
}

.blog-report-count {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

#blog-load-more-container {
    text-align: center;
    padding: 24px 0;
}

/* --- Footer --- */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h4 {
    color: var(--text-bright);
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-photo-credit {
    margin-top: 8px;
    font-size: 0.75rem !important;
    color: var(--text-muted);
    opacity: 0.7;
}
.footer-photo-credit a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* --- Multi-select constellation filter --- */
.multi-select {
    position: relative;
}
.multi-select input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
}
.multi-select input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.multi-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.multi-select-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}
.multi-select-tag button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 2px;
    line-height: 1;
}
.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow-lg);
}
.multi-select-dropdown.open {
    display: block;
}
.multi-select-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.multi-select-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-bright);
}
.multi-select-option.selected {
    color: var(--accent);
    background: rgba(96, 165, 250, 0.08);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .intro-carousel-wrap {
        float: none;
        width: 100%;
        max-width: 360px;
        margin: 0 auto 24px;
    }

    .telescopes-with-photo {
        flex-direction: column;
    }
    .telescopes-photo {
        width: 100%;
        max-width: 320px;
        align-self: center;
    }

    .bio-modal {
        padding: 32px 20px 24px;
        margin: 20px 0;
    }

    .bio-modal-photo {
        width: 120px;
        height: 120px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-item {
        grid-template-columns: 40px 1fr;
    }

    .article-link {
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    /* Always-visible compact nav bar on mobile */
    #main-nav {
        height: auto;
    }

    .nav-container {
        flex-wrap: wrap;
        padding: 0 8px;
        height: auto;
    }

    .nav-logo {
        height: 48px;
        font-size: 0.9rem;
        gap: 6px;
    }

    .nav-logo-icon {
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
        width: 100%;
        gap: 0;
        justify-content: space-around;
        border-top: 1px solid var(--border);
        padding: 4px 0 2px;
    }

    .nav-links li {
        flex: 1;
        text-align: center;
    }

    .nav-links a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding: 4px 2px;
        font-size: 0.62rem;
        border-radius: 4px;
        white-space: nowrap;
        line-height: 1.2;
    }

    .nav-links a.active {
        box-shadow: none;
        background: rgba(96, 165, 250, 0.15);
        color: var(--text-bright);
    }

    /* Show icons + short labels, hide full labels */
    .nav-icon {
        display: block;
        font-size: 1.05rem;
        line-height: 1;
    }
    .nav-short { display: block; }
    .nav-full { display: none; }

    /* Adjust scroll padding for taller nav */
    html { scroll-padding-top: 88px; }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 24px;
        justify-items: center;
    }

    .stat-num {
        font-size: 1.3rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-header {
        flex-direction: column;
    }

    .hero-content {
        padding: 100px 16px 60px;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .object-detail {
        width: 100vw;
    }

    .hero-desc {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 32px;
    }

    .hero-scroll-hint {
        bottom: 16px;
    }

    .card-meta {
        gap: 8px 12px;
    }

    .intro-text {
        font-size: 1.05rem;
    }

    .section-desc {
        font-size: 0.95rem;
        margin-bottom: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .results-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .legend-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .about-lead {
        font-size: 1rem;
    }

    .nav-links a {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .bio-modal-overlay {
        padding: 20px 12px;
    }

    .detail-title-group h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .quick-search-row {
        flex-direction: column;
    }

    .card-header {
        flex-direction: column;
        gap: 8px;
    }

    .results-header {
        flex-direction: column;
        gap: 8px;
    }

    .object-detail {
        padding: 20px 16px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-title-group h3 {
        font-size: 1.3rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .hero-content {
        padding: 80px 12px 50px;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .hero-scroll-hint {
        display: none;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-desc {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .container {
        padding: 0 12px;
    }

    .nav-container {
        padding: 0 12px;
    }

    .bio-modal {
        padding: 24px 16px 20px;
    }

    .bio-modal-photo {
        width: 100px;
        height: 100px;
    }

    .bio-modal-header {
        margin-bottom: 20px;
    }

    .bio-modal-header h2 {
        font-size: 1.25rem;
    }

    .bio-modal-body {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .card-meta {
        gap: 6px 10px;
        font-size: 0.8rem;
    }

    .card-obs-preview {
        font-size: 0.85rem;
    }

    .observation {
        padding: 12px 14px;
    }

    .obs-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .detail-ngc-desc {
        padding: 12px 14px;
    }

    .object-card {
        padding: 14px;
    }

    .stat-num {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .article-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 14px;
    }

    .article-num {
        display: none;
    }

    .article-link {
        grid-column: 1;
        justify-self: start;
    }

    .intro-text {
        font-size: 0.95rem;
    }

    #about.section {
        padding: 24px 0 16px;
    }

    .footer-bottom p {
        font-size: 0.78rem;
    }

    .filter-toggle {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .filter-body {
        padding: 0 14px 14px;
    }

    .filter-body.open {
        padding-top: 14px;
    }

    .quick-search-row input::placeholder {
        font-size: 0.85rem;
    }

    .explorer-quick {
        margin-bottom: 24px;
    }

    .detail-grid {
        padding: 14px;
    }

    .detail-actions {
        flex-wrap: wrap;
    }

    .card-name {
        font-size: 1.05rem;
    }
}

/* --- Extra small screens (≤360px) --- */
@media (max-width: 360px) {
    .hero-content {
        padding: 72px 8px 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nav-logo-text {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        width: 100%;
    }

    .hero-actions {
        width: 100%;
    }

    .stat-num {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .btn-collection {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .detail-title-group h3 {
        font-size: 1.15rem;
    }

    .intro-carousel-wrap {
        max-width: 280px;
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Loading overlay for initial data load --- */
.data-loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 10000;
    transition: opacity 0.5s;
}

.data-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- Spinning Galaxy Loader --- */
.galaxy-spinner-img {
    width: 180px;
    height: 180px;
    animation: galaxy-rotate 20s linear infinite;
}

@keyframes galaxy-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.data-loading-overlay span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   Visual Upgrade — Nebula Backgrounds, Dividers, Animations
   ============================================================ */

/* --- Sections: position context for pseudo-element overlays --- */
.section {
    position: relative;
    overflow: hidden;
}
.section > .container {
    position: relative;
    z-index: 1;
}

/* Section nebula overlays removed — canvas starfield provides all background visuals */

/* --- Cosmic Dividers --- */
.cosmic-divider {
    position: relative;
    height: 80px;
    background: transparent;
    overflow: hidden;
}
.cosmic-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(96, 165, 250, 0.25) 20%,
        rgba(167, 139, 250, 0.4) 50%,
        rgba(96, 165, 250, 0.25) 80%,
        transparent 100%);
}
.cosmic-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 60px;
    background: radial-gradient(ellipse at center,
        rgba(96, 165, 250, 0.07) 0%,
        transparent 70%);
    pointer-events: none;
}

.cosmic-divider-gold::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245, 158, 11, 0.2) 20%,
        rgba(245, 158, 11, 0.35) 50%,
        rgba(245, 158, 11, 0.2) 80%,
        transparent 100%);
}
.cosmic-divider-gold::after {
    background: radial-gradient(ellipse at center,
        rgba(245, 158, 11, 0.06) 0%,
        transparent 70%);
}

.cosmic-divider-purple::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(167, 139, 250, 0.2) 20%,
        rgba(167, 139, 250, 0.35) 50%,
        rgba(167, 139, 250, 0.2) 80%,
        transparent 100%);
}
.cosmic-divider-purple::after {
    background: radial-gradient(ellipse at center,
        rgba(167, 139, 250, 0.06) 0%,
        transparent 70%);
}

/* section-alt divider transitions */
.cosmic-divider-to-alt {
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.75) 0%, rgba(13, 18, 25, 0.8) 100%);
}
.cosmic-divider-from-alt {
    background: linear-gradient(180deg, rgba(13, 18, 25, 0.8) 0%, rgba(10, 14, 23, 0.75) 100%);
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Glow Effects --- */
.section-title {
    text-shadow: 0 0 40px rgba(96, 165, 250, 0.12);
}
.hero-title {
    text-shadow: 0 0 80px rgba(96, 165, 250, 0.18),
                 0 0 160px rgba(96, 165, 250, 0.06);
}
.stat-num {
    text-shadow: 0 0 25px rgba(96, 165, 250, 0.3);
}
.section-title::after {
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.3);
}

/* --- Enhanced Footer --- */
.site-footer {
    background: linear-gradient(180deg, rgba(15, 21, 32, 0.85) 0%, rgba(6, 10, 18, 0.92) 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 200px;
    background: radial-gradient(ellipse at center,
        rgba(96, 165, 250, 0.05) 0%,
        transparent 70%);
    pointer-events: none;
}
.site-footer > .container {
    position: relative;
    z-index: 1;
}
