/* Global Settings */
:root {
    --primary-color: #0a192f;
    /* Deep Navy Blue */
    --secondary-color: #112240;
    /* Lighter Navy */
    --accent-color: #ffc400;
    /* Gold/Photonics glow */
    --text-color: #e6f1ff;
    /* Very light blue/white */
    --text-secondary: #8892b0;
    /* Muted blue-gray */
    --bg-color: #0a192f;
    --card-bg: #112240;
    --font-main: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    --header-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Removed global snap and height height constraints */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    /* Removed global height constraint */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-color);
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background-color: var(--accent-color);
    margin-top: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent-color);
}

.lang-switch {
    margin-left: 20px;
    padding: 5px 10px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: bold;
}

.lang-switch:hover {
    background: rgba(255, 196, 0, 0.1);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.line {
    width: 25px;
    height: 3px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

/* --- HOME PAGE SCROLL CONTAINER --- */
.home-scroll-container {
    /* Removed scroll snap for smoother "gradually visible" effect */
    height: 100vh;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

/* Home Container Sections */
.home-scroll-container section {
    min-height: 100vh;
    /* Ensure each section is a complete block */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: 20px;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at center, #112240 0%, #0a192f 100%);
    position: relative;
    /* If NOT in home-scroll-container (fallback), it should still look decent */
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4rem;
    background: linear-gradient(90deg, #e6f1ff, #ffc400);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    color: var(--accent-color);
    font-size: 1rem;
    transition: var(--transition);
}

.btn:hover {
    background-color: rgba(255, 196, 0, 0.1);
}

/* Highlights Section */
.highlights-section {
    background-color: var(--secondary-color);
    flex-direction: column;
    /* For home page, alignment is handled by .home-scroll-container section rule */
}

/* Welcome Section */
.welcome-section {
    background-color: var(--bg-color);
}

.carousel-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 40px auto 0;
    background-color: var(--bg-color);
    /* Darker card feel */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 40px 60px;
    /* Space for arrow buttons */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-track-container {
    overflow: hidden;
    height: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    padding: 0;
    margin: 0;
    list-style: none;
}

.carousel-slide {
    min-width: 100%;
}

.slide-content {
    text-align: center;
    padding: 10px;
}

.slide-content h3 {
    font-size: 1.5rem;
    margin: 15px 0;
    color: var(--text-color);
}

.slide-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag.award {
    background-color: rgba(255, 196, 0, 0.2);
    color: #ffc400;
}

.tag.publication {
    background-color: rgba(100, 255, 218, 0.2);
    color: #64ffda;
}

.tag.news {
    background-color: rgba(230, 241, 255, 0.2);
    color: #e6f1ff;
}

.slide-link {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.slide-link:hover {
    text-decoration: underline;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.carousel-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 196, 0, 0.1);
}

.carousel-button--left {
    left: 10px;
}

.carousel-button--right {
    right: 10px;
}

.carousel-button.is-hidden {
    display: none;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-indicator {
    border: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.current-slide {
    background: var(--accent-color);
    transform: scale(1.2);
}

.section-bg {
    background-color: var(--card-bg);
}

/* Footer logic */
footer {
    background-color: #020c1b;
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    height: auto;
    min-height: auto;
}

/* Footer inside home container only */
.home-scroll-container footer {
    scroll-snap-align: start;
    /* Optional: make it full height? usually no, footer is small.
       If we want footer to be last snap point, align start is good. */
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        background-color: var(--card-bg);
        flex-direction: column;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding: 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .carousel-container {
        padding: 40px 20px;
    }

    .carousel-button {
        width: 30px;
        height: 30px;
    }

    .home-scroll-container section {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        /* More padding on mobile */
        padding-bottom: 50px;
    }
}