/* ============================================
   FOUNDATIONAL STYLES & CSS VARIABLES
   ============================================ */

:root {
    --primary-color: #0A84FF;
    --secondary-color: #5E5CE6;
    --accent-color: #FF3B30;
    --background-dark: #000814;
    --surface-light: rgba(255, 255, 255, 0.08);
    --surface-lighter: rgba(255, 255, 255, 0.04);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
    --blur-amount: 20px;
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;
    --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(
        135deg,
        #000814 0%,
        #0a1931 25%,
        #001a4d 50%,
        #0a0f2c 75%,
        #000814 100%
    );
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CANVAS & GLOBE CONTAINER
   ============================================ */

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ============================================
   HEADER & BRANDING
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 40px;
    background: linear-gradient(
        180deg,
        rgba(0, 8, 20, 0.8) 0%,
        rgba(0, 8, 20, 0.4) 100%
    );
    backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--border-color);
    animation: slideDown var(--duration-base) var(--easing-smooth);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0A84FF, #5E5CE6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.tagline {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================================
   INFO PANEL (GLASSMORPHISM)
   ============================================ */

.info-panel {
    position: fixed;
    top: 120px;
    left: 40px;
    z-index: 50;
    max-width: 380px;
    animation: slideInLeft var(--duration-base) var(--easing-smooth) 0.1s both;
}

.info-content {
    padding: 24px;
    background: var(--surface-light);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--duration-base) var(--easing-smooth);
}

.info-content:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.info-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.info-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: all var(--duration-fast) var(--easing-smooth);
    cursor: default;
}

.stat-item:hover {
    background: rgba(10, 132, 255, 0.1);
    border-color: rgba(10, 132, 255, 0.3);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

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

/* ============================================
   ALUMNI PREVIEW CARD (HOVER TOOLTIP)
   ============================================ */

.alumni-preview {
    position: fixed;
    z-index: 150;
    padding: 12px 16px;
    background: var(--surface-light);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.9);
    transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.alumni-preview.visible {
    opacity: 1;
    transform: translateY(-12px) scale(1);
}

.preview-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

/* ============================================
   ALUMNI CARD (GLASS CARD MODAL)
   ============================================ */

.alumni-card {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 360px;
    max-height: 500px;
    z-index: 200;
    padding: 28px;
    background: var(--surface-light);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.alumni-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--easing-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.close-btn:active {
    transform: scale(0.95);
}

.card-content {
    animation: contentFadeIn 350ms cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.card-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.card-year {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
}

.card-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================
   BUTTONS & INTERACTIONS
   ============================================ */

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-smooth);
    letter-spacing: 0.3px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
    background: #0071E3;
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* ============================================
   LOADING INDICATOR
   ============================================ */

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 300;
    text-align: center;
    opacity: 1;
    transition: opacity var(--duration-base) var(--easing-smooth);
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid rgba(10, 132, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   CONTROLS HINT
   ============================================ */

.controls-hint {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 50;
    padding: 12px 20px;
    background: rgba(0, 8, 20, 0.6);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    animation: slideInUp var(--duration-base) var(--easing-smooth) 0.2s both;
}

.controls-hint p {
    margin: 0;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        filter: blur(2px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes smoothPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(10, 132, 255, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(10, 132, 255, 0.8));
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

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

@media (max-width: 768px) {
    .header {
        padding: 16px 20px;
    }

    .logo {
        font-size: 22px;
    }

    .info-panel {
        top: 100px;
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .alumni-card {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: 360px;
    }

    .controls-hint {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        text-align: center;
    }

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

    .stat-item:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 16px;
    }

    .logo {
        font-size: 18px;
    }

    .info-panel {
        top: 90px;
        left: 16px;
        right: 16px;
    }

    .info-content {
        padding: 16px;
    }

    .alumni-card {
        padding: 20px;
        width: auto;
        max-width: none;
        border-radius: 16px;
    }

    .card-header {
        gap: 12px;
    }

    .card-image {
        width: 56px;
        height: 56px;
    }

    .card-actions {
        grid-template-columns: 1fr;
    }
}
