/* ===== CSS Variables ===== */
:root {
    --color-primary: #1a2b3c;
    --color-primary-dark: #0f1a24;
    --color-accent: #0891b2;
    --color-accent-light: #06b6d4;
    --color-secondary: #475569;
    --color-tertiary: #64748b;
    --color-text: #1e293b;
    --color-text-light: #475569;
    --color-text-muted: #64748b;
    --color-background: #ffffff;
    --color-background-alt: #f8fafc;
    --color-border: #e2e8f0;
    --font-serif: 'Crimson Text', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
}

/* ===== Password Gate ===== */
.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a2b3c 0%, #2d3748 50%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-gate.hidden {
    display: none;
}

.password-modal {
    background: white;
    padding: 48px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.password-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.password-modal > p {
    color: var(--color-text-light);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.password-modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-modal input {
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.password-modal input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.password-modal button {
    padding: 14px 24px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.password-modal button:hover {
    background: var(--color-primary-dark);
}

.password-error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-top: 12px;
    min-height: 1.2em;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
}

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

a:hover {
    color: var(--color-accent);
}

ul {
    list-style: none;
}

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

/* ===== Layout ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    text-align: center;
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 60px;
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo:hover {
    color: var(--color-primary);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 8px 0;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--color-primary);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 120px;
    background: linear-gradient(135deg, #1a2b3c 0%, #2d3748 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 16px 36px;
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--color-accent-light);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(196, 18, 48, 0.3);
}

/* ===== Buttons ===== */
.button {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: var(--color-primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ===== Research Section ===== */
.research-areas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.research-card {
    background: var(--color-background);
    padding: 40px 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    color: var(--color-accent);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.research-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* ===== Research Papers Section ===== */
.research-papers {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 800px;
    margin: 0 auto;
}

.paper-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.paper-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230891b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.paper-details {
    flex: 1;
}

.paper-card h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.5;
    font-weight: 400;
}

.paper-card h3 a {
    color: var(--color-primary);
}

.paper-card h3 a:hover {
    color: var(--color-accent);
}

.paper-meta {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.paper-authors {
    color: var(--color-text);
}

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


/* ===== Fellowship Section ===== */
.fellowship-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.fellowship-info h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.fellowship-info p {
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.fellowship-info h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.fellowship-info ul {
    list-style: none;
}

.fellowship-info li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--color-text-light);
}

.fellowship-info li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.apply-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, #334155 100%);
    padding: 40px;
    border-radius: 8px;
    color: #ffffff;
}

.apply-card h4 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.apply-card p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.apply-card .button {
    background-color: var(--color-accent);
    color: #ffffff;
}

.apply-card .button:hover {
    background-color: var(--color-accent-light);
}

/* ===== Workshop Section ===== */
.workshops-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.workshop-card {
    display: flex;
    gap: 32px;
    padding: 32px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.workshop-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.workshop-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    padding: 16px;
    background: var(--color-background-alt);
    border-radius: 8px;
}

.workshop-date .month {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.workshop-date .day {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-serif);
}

.workshop-details h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.workshop-details p {
    color: var(--color-text-light);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.workshop-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ===== Course Section ===== */
.course-highlight {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.course-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--color-primary) 0%, #334155 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.course-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.course-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--color-accent);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
}

.course-content h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.course-content > p {
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.course-features {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
}

.feature strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.feature span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ===== Newsletter Section ===== */
.newsletter-section {
    background: var(--color-primary);
    padding: 80px 0;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    color: #ffffff;
    margin-bottom: 16px;
}

.newsletter-content > p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
}

.newsletter-form .form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-sans);
}

.newsletter-form input[type="email"]:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.newsletter-form .button {
    background-color: var(--color-accent);
    color: #ffffff;
    white-space: nowrap;
}

.newsletter-form .button:hover {
    background-color: var(--color-accent-light);
}

.form-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.stat {
    text-align: center;
    padding: 32px 24px;
    background: var(--color-background-alt);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #1a2b3c 0%, #2d3748 50%, #334155 100%);
    color: #ffffff;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 48px;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.footer-brand .footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.footer-brand .footer-affiliation {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 24px;
    line-height: 1.5;
}

.footer-logos {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo {
    height: 45px;
    width: auto;
}

.footer h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .research-areas {
        grid-template-columns: repeat(2, 1fr);
    }

    .fellowship-content,
    .course-highlight,
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .course-image {
        max-width: 500px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-background);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        padding: 16px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

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

    .tagline {
        font-size: 1.1rem;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section-intro {
        margin-bottom: 40px;
    }

    .research-areas {
        grid-template-columns: 1fr;
    }

    .workshop-card {
        flex-direction: column;
        gap: 20px;
    }

    .workshop-date {
        width: 100%;
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .course-features {
        flex-direction: column;
        gap: 20px;
    }

    .newsletter-form .form-group {
        flex-direction: column;
    }

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

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

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

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

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

/* Active nav link styling */
.nav-links a.active {
    color: var(--color-primary);
}

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