:root {
    /* Default Dark Blue Theme */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #0ea5e9;
    --accent: #22d3ee;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(2, 6, 23, 0.82);
}

body.light-theme {
    --bg-dark: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(248, 250, 252, 0.85);
    --primary-glow: rgba(59, 130, 246, 0.2);
}

body.grey-theme {
    --bg-dark: #2c3035;
    /* Saturation down 15%, Contrast (darker) up 10% */
    --card-bg: rgba(60, 65, 70, 0.7);
    --text-main: #ffffff;
    /* Contrast up 10% */
    --text-muted: #d1d5db;
    /* Saturation down 15%, Contrast up */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(44, 48, 53, 0.9);
    --primary-glow: rgba(59, 130, 246, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 50px);
    }
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    padding-top: calc(1.2rem + env(safe-area-inset-top));
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1001;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions {
    display: flex;
    gap: 0.8rem;
}

.control-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.theme-btn,
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-btn:hover,
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.theme-btn svg,
.lang-btn svg {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    padding-top: 12rem;
    padding-bottom: 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .gradient-text {
    background: linear-gradient(to right, #020617, #1e293b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Cards & Sections */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-glow);
}

.card:hover::before {
    left: 150%;
}

.card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover i {
    transform: scale(1.2) rotate(10deg);
    color: var(--accent);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Curriculum Timeline */
.curriculum {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 4rem 2rem;
    border: 1px solid var(--glass-border);
}

.week-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    padding-left: 1rem;
}

.week-item:hover {
    background: rgba(59, 130, 246, 0.05);
    padding-left: 2rem;
    border-radius: 12px;
}

.week-num {
    flex-shrink: 0;
    width: 100px;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.week-item:hover .week-num {
    color: var(--accent);
    transform: scale(1.1);
}

.week-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.week-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Professor Section */
.professor-card {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: var(--card-bg);
    padding: 4rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    margin: 6rem 0;
}

.prof-image {
    width: 192px;
    height: 192px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.prof-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.prof-info .title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 6px 25px var(--primary-glow);
    transform: scale(1.05);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    header {
        padding: 0.8rem 0;
        padding-top: calc(0.8rem + env(safe-area-inset-top));
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .controls {
        justify-content: center;
        width: 100%;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding-top: 10rem;
        padding-bottom: 4rem;
    }

    .professor-card {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .prof-image {
        width: 160px;
        height: 160px;
        margin-bottom: 1rem;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

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

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-actions .btn {
        flex: 1;
        text-align: center;
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .week-item {
        flex-direction: column;
        gap: 0.5rem;
        padding-left: 0;
    }

    .week-num {
        width: auto;
    }

    .btn-sm {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}