/* 
   Modern Light Academic Aesthetic 
   Refined for Production - 2024
*/

:root {
    /* Color Palette - LIGHT THEME */
    --bg-deep: #f8f9fa;
    /* Soft Off-White */
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;

    --text-primary: #1f2937;
    /* Deep Charcoal */
    --text-secondary: #4b5563;
    /* Slate */
    --text-tertiary: #64748b;

    --accent-primary: #0284c7;
    /* Cerulean Blue */
    --accent-glow: rgba(2, 132, 199, 0.15);

    --border-subtle: #e2e8f0;
    --border-highlight: #bae6fd;

    /* Typography */
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Animation */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(124, 58, 237, 0.03) 0%, transparent 50%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s var(--ease-out);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-gradient {
    /* More subtle gradient for light mode */
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

/* Components: Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-sm) 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Added subtle shadow */
}

/* Language Switcher */
.language-switcher {
    padding: 2px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
    line-height: 1.2;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: #fff;
    color: var(--accent-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
    /* Changed to accent color for better visibility */
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-lg) 0;
    /* Reduced vertical padding for density */
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: var(--space-xl);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-lg);
    align-items: center;
}

.hero-content {
    animation: fadeIn 0.8s var(--ease-out);
}

.hero-tagline {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
    display: block;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: 50ch;
}

.btn-group {
    display: flex;
    gap: var(--space-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    /* White text for primary button */
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
    background: #0ea5e9;
    /* Slightly lighter shade on hover */
}

.btn-outline {
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--bg-deep);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    padding: var(--space-sm);
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s var(--ease-out);
    animation: float 6s ease-in-out infinite;
}

.hero-visual:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-visual img {
    border-radius: calc(var(--radius-lg) - 4px);
    width: 100%;
    height: auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Increased min-width for density */
    gap: var(--space-sm);
    /* Tighter gap */
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.card-meta {
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
    display: block;
    font-weight: 500;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* News List */
.news-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-subtle);
    align-items: baseline;
}

.news-date {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-weight: 600;
    min-width: 100px;
}

.news-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

/* Scrolling News Ticker */
.news-ticker-section {
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 0;
    overflow: hidden;
    position: relative;
    margin-bottom: var(--space-lg);
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    animation: ticker 60s linear infinite;
    padding-left: 100%;
    /* Start off-screen */
}

.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-subtle);
}

.ticker-item strong {
    color: var(--accent-primary);
    margin-right: 0.5rem;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-lg) 0 var(--space-md);
    margin-top: var(--space-xl);
    background: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.1em;
    font-weight: 700;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--accent-primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: perspective(1000px) rotateY(-5deg) translateY(0);
    }

    50% {
        transform: perspective(1000px) rotateY(-5deg) translateY(-15px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .container,
    .nav-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Fix Hero Button Group on Mobile */
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .btn {
        /* Ensure buttons don't overflow */
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
        padding: 0.6rem 1rem;
    }

    /* Reduce White Space on Mobile */
    .section {
        padding: var(--space-md) 0;
    }

    .hero {
        min-height: auto;
        padding-top: var(--space-lg);
        padding-bottom: var(--space-lg);
    }

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
        margin-top: var(--space-md);
        padding: var(--space-md);
    }

    /* Ensure no horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }


    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: var(--space-lg) var(--space-md);
        gap: 1.5rem;
        text-align: center;
        border-bottom: 1px solid var(--border-subtle);
        transform: translateY(-120%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        color: var(--text-primary);
        overflow-y: auto;
        max-height: 80vh;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

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

    .hero-visual {
        order: -1;
        max-width: 400px;
        margin: 0 auto var(--space-md);
        transform: none;
        animation: none;
    }

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

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

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

/* Status Card */
.status-card {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.status-badge {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

.news-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.news-card-full {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.news-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.news-img-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--bg-deep);
}

.news-card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    display: inline-block;
    background: var(--bg-deep);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    align-self: flex-start;
}

@media (min-width: 768px) {
    .news-card-full {
        flex-direction: row;
        align-items: stretch;
    }

    .news-img-container {
        width: 350px;
        /* Fixed width for desktop */
        height: auto;
        flex-shrink: 0;
    }
}