/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #0a3d62;
    --primary-light: #1e6f9f;
    --accent: #00b4d8;
    --accent-glow: #48cae4;
    --dark: #0b1929;
    --dark-card: #0f2640;
    --dark-surface: #132f4c;
    --light: #f0f8ff;
    --gray: #94a3b8;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #00b4d8, #0077b6, #023e8a);
    --gradient-text: linear-gradient(135deg, #48cae4, #00b4d8, #0096c7);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: #1e293b;
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(11, 25, 41, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-logo img {
    height: 42px;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.navbar.scrolled .nav-logo img {
    height: 36px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 64px;
    background: rgba(11, 25, 41, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    z-index: 900;
    transition: var(--transition);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.sidebar:hover {
    background: rgba(11, 25, 41, 0.7);
    border-color: rgba(0, 180, 216, 0.3);
}

.sidebar-top, .sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.sidebar-icon, .sidebar-social, .sidebar-scroll-top {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
}

.sidebar-icon:hover, .sidebar-icon.active {
    color: var(--white);
    background: rgba(0, 180, 216, 0.2);
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
}

.sidebar-icon.active::before {
    content: '';
    position: absolute;
    left: -10px;
    width: 4px;
    height: 16px;
    background: var(--accent);
    border-radius: 4px;
}

.sidebar-social:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.sidebar-scroll-top {
    background: var(--gradient);
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.sidebar-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sidebar-scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.5);
}

.sidebar-line {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: var(--dark);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(175deg, hsla(205, 81%, 21%, 0.3) 0%, rgba(0, 0, 0, 0.6) 50%, hsla(205, 81%, 21%, 0.3) 100%);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--accent-glow);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 32px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 180, 216, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0)
    }

    40% {
        transform: translateY(-10px)
    }

    60% {
        transform: translateY(-5px)
    }
}

/* ===== Stats ===== */
.stats-bar {
    background: var(--dark);
    padding: 48px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(0, 119, 182, 0.15));
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 12px;
}

.section-dark .section-header h2 {
    color: var(--white);
}

.section-desc {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.about-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 180, 216, 0.08);
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(0, 180, 216, 0.2);
}

.about-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.4rem;
    color: var(--white);
}

.about-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.about-card p {
    color: #64748b;
    font-size: 0.92rem;
}

.about-image-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.about-img-card {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.about-img-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.about-img-card:hover img {
    transform: scale(1.05);
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Programs ===== */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.program-card {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.program-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 180, 216, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.program-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.program-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.program-card:hover .program-img img {
    transform: scale(1.08);
}

.program-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--gradient);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.program-content {
    padding: 24px;
}

.program-content h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--white);
}

.program-content p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.program-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.program-tags span {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(0, 180, 216, 0.15);
}

/* ===== Publications ===== */
.pubs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.pub-category h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pub-category h3 i {
    color: var(--accent);
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pub-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.pub-item:hover {
    border-color: rgba(0, 180, 216, 0.2);
    transform: translateX(4px);
}

.pub-item.featured {
    border: 1px solid rgba(0, 180, 216, 0.3);
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.05), rgba(0, 119, 182, 0.05));
}

.pub-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
}

.pub-item h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--primary);
}

.pub-item p {
    font-size: 0.82rem;
    color: #64748b;
}

.pub-special {
    grid-column: 1/-1;
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contact-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateX(4px);
}

.contact-card i {
    font-size: 1.3rem;
    color: var(--accent);
    margin-top: 4px;
}

.contact-card h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.88rem;
    color: #64748b;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.4);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    transition: var(--transition);
    background: var(--light);
    color: #1e293b;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.contact-form textarea {
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    padding: 60px 0 0;
    color: var(--gray);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand img {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.82rem;
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media(max-width:1024px) {
    .sidebar { display: none; }
}

@media(max-width:968px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        transition: var(--transition);
    }

    .nav-links.active {
        display: flex;
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

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

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

@media(max-width:480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .about-image-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 160px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}