/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Clean Blue Design */
    --purple-dark: #2563eb;
    --purple-main: #3b82f6;
    --purple-light: #eff6ff;
    --blue-dark: #2563eb;
    --blue-main: #3B82F6;
    --blue-light: #eff6ff;
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-alt: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-main: 'Poppins', sans-serif;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-purple: 0 10px 30px rgba(59, 130, 246, 0.3);
    --shadow-blue: 0 10px 30px rgba(59, 130, 246, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   Top Navigation Bar
   =================================== */
.top-nav {
    position: sticky;
    top: 44px; /* Height of sub-header */
    background: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 998;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode navigation - Purple gradient */
body.dark-mode .top-nav {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gray-900);
}

.nav-brand .material-icons {
    font-size: 1.8rem;
    color: var(--purple-main);
}

.nav-brand .brand-logo {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.25));
    transition: transform 0.3s ease;
}

.nav-brand:hover .brand-logo {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link .material-icons {
    display: none;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--purple-main);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--purple-main);
    font-weight: 600;
}

/* Dark mode navigation links - White text */
body.dark-mode .nav-brand {
    color: white;
}

body.dark-mode .nav-brand .material-icons {
    color: white;
}

body.dark-mode .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

body.dark-mode .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: var(--purple-main);
}

body.dark-mode .mobile-menu-toggle {
    color: white;
}

.mobile-menu-toggle .material-icons {
    font-size: 1.8rem;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 1.2rem;
    margin-left: 2px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xs) 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

body.dark-mode .dropdown-menu {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .dropdown-link {
    color: rgba(255, 255, 255, 0.9);
}

.dropdown-link:hover {
    background: var(--gray-50);
    color: var(--purple-main);
}

body.dark-mode .dropdown-link:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.dropdown-link .material-icons {
    font-size: 1.2rem;
}

/* Notification Badge */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 6px;
}

/* ===================================
   User Authentication & Profile
   =================================== */
.nav-auth {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Login Button */
.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-login .material-icons {
    font-size: 18px;
}

/* Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.profile-trigger:hover {
    border-color: var(--purple-main);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.15);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar .material-icons {
    color: white;
    font-size: 24px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: capitalize;
}

.dropdown-arrow {
    font-size: 20px;
    color: var(--gray-600);
    transition: transform 0.3s ease;
}

.user-profile-dropdown:hover .dropdown-arrow,
.profile-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--gray-200);
}

.user-profile-dropdown:hover .profile-dropdown-menu,
.profile-trigger[aria-expanded="true"] + .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.dropdown-user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.dropdown-user-email {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--purple-main);
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

.dropdown-item .material-icons {
    font-size: 20px;
    color: inherit;
}

/* ===================================
   Sub-Header with User Info
   =================================== */
.sub-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sub-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sub-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.welcome-text .material-icons {
    font-size: 16px;
    color: #fbbf24;
}

.welcome-text strong {
    color: #ffffff;
    font-weight: 600;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.sub-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.quick-link .material-icons {
    font-size: 16px;
}

/* Compact Profile Dropdown */
.user-profile-compact {
    position: relative;
}

.profile-trigger-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.profile-trigger-compact:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.profile-avatar-compact {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar-compact .material-icons {
    color: white;
    font-size: 18px;
}

.dropdown-arrow-compact {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease;
}

.user-profile-compact:hover .dropdown-arrow-compact,
.profile-trigger-compact[aria-expanded="true"] .dropdown-arrow-compact {
    transform: rotate(180deg);
}

.profile-dropdown-menu-compact {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10001;
    border: 1px solid var(--gray-200);
    pointer-events: none;
}

/* Invisible bridge to prevent dropdown from closing when mouse moves to it */
.profile-dropdown-menu-compact::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
}

/* Show dropdown on hover or when clicked (aria-expanded) */
.user-profile-compact:hover .profile-dropdown-menu-compact,
.profile-trigger-compact[aria-expanded="true"] + .profile-dropdown-menu-compact {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header-compact {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.dropdown-user-name-compact {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.dropdown-user-email-compact {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.dropdown-user-role-compact {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    color: white;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-divider-compact {
    height: 1px;
    background: var(--gray-200);
    margin: 6px 0;
}

.dropdown-item-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.dropdown-item-compact:hover {
    background: var(--gray-50);
    color: var(--purple-main);
}

.dropdown-item-compact.logout {
    color: #ef4444;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.dropdown-item-compact.logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

.dropdown-item-compact .material-icons {
    font-size: 18px;
    color: inherit;
}

/* Compact Login Button */
.btn-login-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.btn-login-compact:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.btn-login-compact .material-icons {
    font-size: 16px;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    overflow: hidden;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.dark-mode-toggle .material-icons {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.dark-mode-toggle .light-icon {
    display: block;
}

.dark-mode-toggle .dark-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle .light-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle .dark-icon {
    display: block;
}

body.dark-mode .dark-mode-toggle {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(251, 191, 36, 0.6);
}

body.dark-mode .dark-mode-toggle:hover {
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* ===================================
   Dark Mode Global Styles
   =================================== */
body.dark-mode {
    background-color: #0f172a;
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .container {
    background-color: transparent;
}

/* Dark mode for page content */
body.dark-mode .page-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: white;
}

body.dark-mode p {
    color: rgba(255, 255, 255, 0.85);
}

/* Light mode card backgrounds */
.card,
.section,
.week-card,
.announcement-card,
.resource-card,
.contact-card,
.quick-link-item,
.tutorial-section,
.tutorial-container,
.empty-state,
.quick-links {
    background-color: white;
}

.announcement-card.pinned {
    background: linear-gradient(135deg, #fff9e6 0%, white 100%);
}

/* Main content backgrounds */
.main-content,
.schedule-main,
.contact-main,
main {
    background-color: white;
}

/* Dark mode for cards and sections */
body.dark-mode .card,
body.dark-mode .section,
body.dark-mode .week-card,
body.dark-mode .announcement-card,
body.dark-mode .resource-card,
body.dark-mode .contact-card,
body.dark-mode .quick-link-item,
body.dark-mode .tutorial-section,
body.dark-mode .tutorial-container,
body.dark-mode .code-block,
body.dark-mode .guideline-item,
body.dark-mode .hours-item,
body.dark-mode .contact-item,
body.dark-mode .stat-item,
body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select,
body.dark-mode .empty-state,
body.dark-mode .quick-links {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .announcement-card.pinned {
    background: linear-gradient(135deg, #422006 0%, #1e293b 100%) !important;
}

/* Dark mode for specific text elements in cards */
body.dark-mode .card p,
body.dark-mode .section p,
body.dark-mode .week-card p,
body.dark-mode .announcement-card p,
body.dark-mode .resource-card p,
body.dark-mode .contact-card p,
body.dark-mode .tutorial-section p,
body.dark-mode .guideline-item p,
body.dark-mode .resource-description,
body.dark-mode .announcement-content,
body.dark-mode .week-dates {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Dark mode for links in cards */
body.dark-mode .resource-link,
body.dark-mode .quick-link-btn,
body.dark-mode .dropdown-item-compact {
    color: #60a5fa !important;
}

body.dark-mode .resource-link:hover,
body.dark-mode .quick-link-btn:hover {
    color: #93c5fd !important;
}

/* Profile Dropdown Dark Mode */
body.dark-mode .profile-dropdown-menu-compact {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .dropdown-header-compact {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .dropdown-user-name-compact {
    color: white !important;
}

body.dark-mode .dropdown-user-email-compact {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dark-mode .dropdown-divider-compact {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .dropdown-item-compact {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-mode .dropdown-item-compact:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

body.dark-mode .dropdown-item-compact.logout {
    color: #f87171 !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

body.dark-mode .dropdown-item-compact.logout:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
}

/* Dark mode for special cards */
body.dark-mode .week-card.spring-break {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a7b 100%) !important;
}

body.dark-mode .week-card.highlight {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
}

/* Dark mode for form elements */
body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    background-color: #0f172a !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .form-group label {
    color: rgba(255, 255, 255, 0.9);
}

/* Dark mode for main content areas */
body.dark-mode .main-content,
body.dark-mode .schedule-main,
body.dark-mode .contact-main,
body.dark-mode main {
    background-color: #0f172a;
}

body.dark-mode .nav-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

/* Dark mode for buttons */
body.dark-mode .btn-secondary {
    background: #1e293b;
    color: #60a5fa;
    border-color: #3b82f6;
}

body.dark-mode .btn-secondary:hover {
    background: #3b82f6;
    color: white;
}

body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

body.dark-mode .btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* Dark mode for headings in cards */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: white !important;
}

/* Dark mode footer */
body.dark-mode .footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   ACCESSIBILITY FEATURES
   ============================================ */

/* Accessibility Toggle Button - Blue (Universal Accessibility Color) */
.accessibility-toggle {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.accessibility-toggle .material-icons {
    font-size: 18px;
}

.accessibility-toggle:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.accessibility-toggle:active {
    transform: translateY(0);
}

body.dark-mode .accessibility-toggle {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.dark-mode .accessibility-toggle:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.accessibility-panel.active {
    right: 0;
}

body.dark-mode .accessibility-panel {
    background: #1e293b;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

/* Accessibility Panel Header */
.accessibility-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.accessibility-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.accessibility-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.accessibility-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Accessibility Panel Content */
.accessibility-panel-content {
    padding: 24px;
}

/* Accessibility Option */
.accessibility-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.accessibility-option:hover {
    background: var(--gray-100);
    box-shadow: var(--shadow-md);
}

body.dark-mode .accessibility-option {
    background: #0f172a;
}

body.dark-mode .accessibility-option:hover {
    background: #334155;
}

.option-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.option-info .material-icons {
    color: var(--purple-main);
    font-size: 28px;
    flex-shrink: 0;
}

body.dark-mode .option-info .material-icons {
    color: #60a5fa;
}

.option-info div {
    flex: 1;
}

.option-info strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

body.dark-mode .option-info strong {
    color: white;
}

.option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

body.dark-mode .option-info p {
    color: rgba(255, 255, 255, 0.7);
}

/* Accessibility Switch */
.accessibility-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.accessibility-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.accessibility-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.accessibility-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.accessibility-switch input:checked + .slider {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.accessibility-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Accessibility Reset Button */
.accessibility-reset {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.accessibility-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* Accessibility Overlay */
.accessibility-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.accessibility-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive Design */
@media (max-width: 768px) {
    .accessibility-panel {
        width: 90%;
        max-width: 400px;
        right: -90%;
    }

    .accessibility-panel.active {
        right: 0;
    }
}

/* ============================================
   ACCESSIBILITY MODE CLASSES
   ============================================ */

/* High Contrast Mode */
body.high-contrast {
    --purple-main: #000000;
    --purple-light: #000000;
    --gray-900: #000000;
    --gray-700: #000000;
    --gray-600: #444444;
}

body.high-contrast a,
body.high-contrast .nav-link {
    color: #0000EE;
    font-weight: 600;
}

body.high-contrast .btn-primary,
body.high-contrast .btn {
    background: #000000 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
}

/* Grayscale Mode */
body.grayscale {
    filter: grayscale(100%);
}

/* Underline Links */
body.underline-links a {
    text-decoration: underline !important;
}

/* Readable Font (OpenDyslexic alternative - using Arial) */
body.readable-font {
    font-family: 'Comic Sans MS', 'Arial', sans-serif !important;
}

body.readable-font * {
    font-family: 'Comic Sans MS', 'Arial', sans-serif !important;
}

/* Text Spacing */
body.text-spacing {
    letter-spacing: 0.12em;
    word-spacing: 0.16em;
}

body.text-spacing p,
body.text-spacing li,
body.text-spacing span {
    line-height: 2 !important;
}

/* Large Text */
body.large-text {
    font-size: 120% !important;
}

body.large-text * {
    font-size: inherit !important;
}

/* Big Cursor */
body.big-cursor,
body.big-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="black" stroke="white" stroke-width="2" d="M3,3 L11,27 L15,17 L27,15 Z"/></svg>') 8 8, auto !important;
}

body.big-cursor a,
body.big-cursor button,
body.big-cursor .nav-link {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><path fill="black" stroke="white" stroke-width="2" d="M20,5 L15,18 L5,15 L20,35 L25,18 L35,15 Z"/></svg>') 20 20, pointer !important;
}

/* Reading Guide */
body.reading-guide {
    position: relative;
}

.reading-guide-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #2563eb 20%, #2563eb 80%, transparent 100%);
    pointer-events: none;
    z-index: 9998;
    transition: top 0.1s ease;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

.reading-guide-line::before,
.reading-guide-line::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 50px;
    left: 0;
}

.reading-guide-line::before {
    top: -50px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.reading-guide-line::after {
    bottom: -50px;
    background: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

/* Stop Animations */
body.stop-animations,
body.stop-animations * {
    animation: none !important;
    transition: none !important;
}

/* Hide Images */
body.hide-images img,
body.hide-images svg:not(.material-icons):not([class*="hero"]) {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Text Align Left */
body.text-align-left * {
    text-align: left !important;
}

body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .section h2,
body.dark-mode .section h3,
body.dark-mode .announcement-card h2,
body.dark-mode .resource-card h3,
body.dark-mode .contact-card h2,
body.dark-mode .guideline-item h3 {
    color: white !important;
}

/* Dark mode for strong/bold text */
body.dark-mode strong,
body.dark-mode .contact-item strong {
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive Sub-Header */
@media (max-width: 768px) {
    .sub-header {
        padding: 6px 0;
    }

    .sub-header-container {
        gap: 8px;
    }

    .sub-header-right {
        gap: 12px;
    }

    .welcome-text {
        font-size: 0.75rem;
    }

    .quick-actions {
        display: none;
    }
}

/* ===================================
   Inner Pages Navigation
   =================================== */
.inner-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 999;
    border-bottom: 1px solid var(--gray-200);
}

.inner-nav .nav-menu {
    display: flex;
    gap: var(--spacing-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.inner-nav .nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.inner-nav .nav-link .material-icons {
    font-size: 1.2rem;
}

.inner-nav .nav-link:hover {
    background: var(--gray-100);
    color: var(--purple-main);
}

.inner-nav .nav-link.active {
    background: var(--gradient-main);
    color: var(--white);
}

.inner-nav .nav-link.active .material-icons {
    color: var(--white);
}

/* ===================================
   Page Header (for inner pages)
   =================================== */
.page-header {
    background: var(--gradient-main);
    padding: var(--spacing-2xl) 0;
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.schedule-main {
    padding: var(--spacing-2xl) 0;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: var(--gradient-hero);
    padding: calc(var(--spacing-2xl) + var(--spacing-lg)) 0 var(--spacing-2xl);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-shape.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.hero-shape.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 10%;
    animation-delay: 2s;
}

.hero-shape.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -50px;
    animation-delay: 4s;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 50px;
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge .material-icons {
    font-size: 1.1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 400;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn .material-icons {
    font-size: 1.3rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.btn-secondary {
    background: var(--white);
    color: var(--purple-main);
    border: 2px solid var(--purple-main);
}

.btn-secondary:hover {
    background: var(--purple-main);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero section specific button overrides */
.hero .btn-primary {
    background: var(--white);
    color: var(--purple-main);
}

.hero .btn-primary:hover {
    background: var(--gray-50);
}

.hero .btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--purple-main);
}

/* ===================================
   Modern Page Hero (Inner Pages)
   =================================== */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.page-hero .hero-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 0;
}

.page-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 20px 60px;
}

.page-hero .hero-icon {
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScale 0.6s ease-out;
}

.page-hero .hero-icon .material-icons {
    font-size: 40px;
    color: white;
}

.page-hero h1 {
    color: white;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.page-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Button sizes */
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

.btn-lg .material-icons {
    font-size: 1.5rem;
}

.hero-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-align: left;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.info-card .material-icons {
    font-size: 2.5rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* ===================================
   Section Styles
   =================================== */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   About Section
   =================================== */
.about-section {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--gray-50);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-purple);
}

.feature-icon-wrapper {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon {
    font-size: 2.5rem !important;
    color: var(--white);
    display: block;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--gray-700);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* ===================================
   Objectives Section
   =================================== */
.objectives-section {
    background: var(--gray-100);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.objective-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--purple-main);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.objective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-main);
    transition: width 0.3s ease;
}

.objective-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.objective-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.objective-number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.objective-card p {
    font-size: 1rem;
    color: var(--gray-800);
    position: relative;
    z-index: 1;
}

/* ===================================
   Projects Section
   =================================== */
.projects-section {
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background: var(--gray-50);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--blue-main);
}

.project-card.highlight {
    background: var(--gradient-main);
    color: var(--white);
    border-color: transparent;
}

.project-card.highlight:hover {
    box-shadow: var(--shadow-purple);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.project-icon {
    font-size: 2.5rem !important;
    color: var(--purple-main);
}

.project-weight {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-alt);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card.highlight .project-weight {
    color: var(--white);
    -webkit-text-fill-color: var(--white);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--gray-900);
}

.project-card.highlight h3 {
    color: var(--white);
}

.project-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--purple-main);
    margin-bottom: var(--spacing-md);
}

.project-card.highlight .project-date {
    color: rgba(255, 255, 255, 0.9);
}

.project-card > p {
    color: var(--gray-700);
    margin-bottom: var(--spacing-md);
}

.project-card.highlight > p {
    color: rgba(255, 255, 255, 0.95);
}

.project-features {
    list-style: none;
    padding: 0;
}

.project-features li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-md);
    position: relative;
    color: var(--gray-700);
}

.project-card.highlight .project-features li {
    color: rgba(255, 255, 255, 0.9);
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--purple-main);
    font-weight: bold;
}

.project-card.highlight .project-features li::before {
    color: var(--white);
}

/* ===================================
   Grading Section
   =================================== */
.grading-section {
    background: var(--gray-100);
}

.grading-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.grade-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.grade-card:hover::before {
    opacity: 1;
}

.grade-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-xl);
}

.grade-card.highlight {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.grade-card.highlight:hover {
    border-color: #f59e0b;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3);
}

.grade-card.featured {
    transform: scale(1.05);
    border-width: 3px;
}

.grade-card.featured:hover {
    transform: translateY(-10px) scale(1.05);
}

.grade-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-md);
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.grade-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grade-card.highlight .grade-percent,
.grade-card.featured .grade-percent {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grade-icon {
    font-size: 2rem !important;
    color: var(--purple-main);
    margin-bottom: var(--spacing-sm);
    display: block;
    transition: all 0.3s ease;
}

.grade-card:hover .grade-icon {
    transform: scale(1.2) rotate(5deg);
}

.grade-card.highlight .grade-icon,
.grade-card.featured .grade-icon {
    color: #f59e0b;
}

.grade-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.grade-card p {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0;
}

/* ===================================
   Schedule Section
   =================================== */
.schedule-section {
    background: var(--white);
}

.weeks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .weeks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.week-card {
    background: var(--gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--gray-200);
    display: block;
    position: relative;
    overflow: hidden;
}

.week-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.week-card:hover::before {
    transform: scaleX(1);
}

.week-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--purple-light);
}

.week-card.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: var(--purple-main);
}

.week-card.spring-break {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #fdcb6e;
    cursor: default;
}

.week-card.spring-break:hover {
    transform: scale(1.02);
}

.week-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    line-height: 1;
    text-align: center;
}

.week-icon {
    font-size: 3rem !important;
    display: block;
    margin-bottom: var(--spacing-md);
    color: #e67e22;
}

.week-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.week-card p {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.week-dates {
    display: inline-block;
    background: var(--blue-main);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.week-card.spring-break .week-dates {
    background: rgba(0, 0, 0, 0.2);
}

/* ===================================
   Resources Preview Section
   =================================== */
.resources-preview-section {
    background: var(--gray-100);
}

.resources-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.resource-preview-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.resource-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.resource-preview-card:hover::before {
    transform: scaleX(1);
}

.resource-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--purple-light);
}

.resource-preview-card.ai-highlight {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.resource-preview-card.ai-highlight::before {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.resource-preview-card.ai-highlight:hover {
    border-color: #f59e0b;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.3);
}

.resource-preview-card.view-all {
    background: var(--gradient-main);
    color: var(--white);
    border-color: transparent;
}

.resource-preview-card.view-all:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-purple);
}

.preview-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.resource-preview-card:hover .preview-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.preview-icon-wrapper .material-icons {
    font-size: 2.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-icon-wrapper.ai-icon {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
}

.preview-icon-wrapper.ai-icon .material-icons {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.resource-preview-card.view-all .preview-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
}

.resource-preview-card.view-all .preview-icon-wrapper .material-icons {
    color: var(--white);
    background: none;
    -webkit-text-fill-color: var(--white);
}

.resource-preview-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
}

.resource-preview-card.view-all h3 {
    color: var(--white);
}

.resource-preview-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.resource-preview-card.view-all p {
    color: rgba(255, 255, 255, 0.9);
}

.preview-arrow {
    font-size: 1.5rem !important;
    color: var(--purple-main);
    transition: transform 0.3s ease;
}

.resource-preview-card:hover .preview-arrow {
    transform: translateX(5px);
}

.resource-preview-card.ai-highlight .preview-arrow {
    color: #f59e0b;
}

.resource-preview-card.view-all .preview-arrow {
    color: var(--white);
}

/* ===================================
   Modern Footer
   =================================== */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    position: relative;
    margin-top: 0;
    padding: 64px 0 0;
    border-top: none;
}

/* Main Footer Grid */
.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
}

/* About Section */
.footer-about {
    max-width: 340px;
}

.footer-brand {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 24px 0;
}

/* Course Meta */
.footer-course-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.meta-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Footer Headings */
.footer-heading {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links li a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--blue-main);
    transition: width 0.3s ease;
}

.footer-links li a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-links li a:hover::before {
    width: 20px;
}

/* Contact Info */
.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}

.contact-email {
    color: #60a5fa;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-email:hover {
    color: var(--white);
    padding-left: 4px;
}

.contact-hours {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

.contact-hours span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-bottom: 4px;
}

/* Footer Bottom */
.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.footer-meta {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 998;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6);
}

.back-to-top .material-icons {
    font-size: 1.5rem;
}

/* Footer Responsive Design */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-about {
        grid-column: 1 / -1;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .footer {
        margin-top: 60px;
        padding: 48px 0 0;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 32px;
    }

    .footer-about {
        grid-column: 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer {
        margin-top: var(--spacing-xl);
    }

    .footer-main {
        padding: var(--spacing-xl) 0;
        gap: var(--spacing-lg);
    }

    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .footer-brand .brand-icon {
        font-size: 2rem;
    }

    .footer-brand h3 {
        font-size: 1.3rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .back-to-top .material-icons {
        font-size: 1.2rem;
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .top-nav {
        top: 38px; /* Smaller sub-header height on mobile */
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 0 0;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--gray-200);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-menu.active {
        max-height: 600px;
        opacity: 1;
        visibility: visible;
        padding: var(--spacing-md) 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        border-radius: 0;
        justify-content: flex-start;
    }

    .nav-link:hover {
        background: var(--gray-50);
    }

    .nav-link.active {
        background: var(--purple-light);
        color: var(--purple-main);
        -webkit-text-fill-color: var(--purple-main);
    }

    /* Mobile Dropdown Navigation */
    .nav-dropdown > .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-dropdown > .nav-link .dropdown-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        margin: -8px -8px -8px 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 50%;
        background: transparent;
    }

    .nav-dropdown > .nav-link .dropdown-icon:hover {
        background: rgba(139, 92, 246, 0.1);
    }

    .nav-dropdown.active > .nav-link .dropdown-icon {
        transform: rotate(180deg);
        background: rgba(139, 92, 246, 0.15);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--gray-50);
        margin-top: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.3s ease;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: var(--spacing-xs) 0;
    }

    .dropdown-link {
        padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) calc(var(--spacing-lg) + var(--spacing-md));
        border-left: 3px solid transparent;
    }

    .dropdown-link:hover {
        background: white;
        border-left-color: var(--purple-main);
    }

    /* Dark Mode Mobile Navigation */
    body.dark-mode .nav-menu {
        background: #1e293b;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.dark-mode .nav-link {
        color: rgba(255, 255, 255, 0.9);
    }

    body.dark-mode .nav-link:hover {
        background: rgba(59, 130, 246, 0.2);
        color: #60a5fa;
    }

    body.dark-mode .nav-link.active {
        background: rgba(59, 130, 246, 0.3);
        color: #60a5fa;
        -webkit-text-fill-color: #60a5fa;
    }

    body.dark-mode .dropdown-menu {
        background: #0f172a;
    }

    body.dark-mode .dropdown-link:hover {
        background: rgba(59, 130, 246, 0.2);
        color: #60a5fa;
    }

    body.dark-mode .nav-dropdown > .nav-link .dropdown-icon:hover {
        background: rgba(167, 139, 250, 0.15);
    }

    body.dark-mode .nav-dropdown.active > .nav-link .dropdown-icon {
        background: rgba(167, 139, 250, 0.2);
    }

    .nav-brand .brand-text {
        font-size: 1rem;
    }

    .hero {
        padding: calc(var(--spacing-xl) + var(--spacing-md)) 0 var(--spacing-xl);
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .info-card {
        flex-direction: row;
        text-align: left;
    }

    section {
        padding: var(--spacing-xl) 0;
    }

    .features-grid,
    .objectives-grid,
    .projects-grid,
    .weeks-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .grading-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .grade-card.featured {
        transform: scale(1);
    }

    .grade-card.featured:hover {
        transform: translateY(-10px) scale(1);
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .nav-container {
        padding: var(--spacing-sm);
    }

    .nav-brand {
        font-size: 1rem;
    }

    .nav-brand .material-icons {
        font-size: 1.5rem;
    }

    .nav-brand .brand-logo {
        width: 28px;
        height: 28px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.9rem;
    }

    .grading-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .grade-circle {
        width: 100px;
        height: 100px;
    }

    .progress-ring {
        width: 100px;
        height: 100px;
    }

    .grade-percent {
        font-size: 1.5rem;
    }
}

/* ===================================
   Contact Page
   =================================== */
.contact-main {
    padding: var(--spacing-2xl) 0;
    background: var(--gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
}

.contact-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.contact-card.full-width {
    grid-column: 1 / -1;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--purple-main);
}

.contact-card-header .contact-icon {
    font-size: 2.5rem;
    background: var(--white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--gray-200);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .material-icons {
    color: var(--purple-main);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.contact-item strong {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
    margin: 0;
    color: var(--gray-600);
}

.contact-item a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--purple-main);
    text-decoration: underline;
}

.office-hours,
.quick-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hours-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--purple-main);
}

.hours-item .material-icons {
    color: var(--purple-main);
    font-size: 1.5rem;
}

.hours-item strong {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.hours-item p {
    margin: 0;
    color: var(--gray-600);
}

.hours-note {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(124, 58, 237, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--blue-main);
}

.hours-note .material-icons {
    color: var(--blue-main);
    font-size: 1.5rem;
}

.hours-note p {
    margin: 0;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.quick-link-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid var(--purple-main);
}

.quick-link-item:hover {
    background: var(--purple-light);
    transform: translateX(5px);
}

.quick-link-item .material-icons {
    color: var(--purple-main);
    font-size: 1.5rem;
}

.quick-link-item strong {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.quick-link-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.guideline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.guideline-item:hover {
    background: var(--purple-light);
    transform: translateY(-5px);
}

.guideline-item .material-icons {
    font-size: 3rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.guideline-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.guideline-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .sidebar {
        display: none;
    }

    .hero,
    .footer {
        background: none;
        color: black;
    }

    .week-card,
    .feature-card,
    .project-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   COMPREHENSIVE DARK MODE FIXES
   ============================================ */

/* Dark mode section backgrounds */
body.dark-mode .section,
body.dark-mode .resource-section,
body.dark-mode .quizzes-section,
body.dark-mode .tutorials-section,
body.dark-mode .projects-section,
body.dark-mode .schedule-section {
    background-color: #0f172a !important;
}

body.dark-mode .resource-section.bg-white,
body.dark-mode .resource-section.bg-gray,
body.dark-mode .resource-section.bg-blue {
    background: #0f172a !important;
}

body.dark-mode .quizzes-section {
    background: #0f172a !important;
}

/* Dark mode cards */
body.dark-mode .quiz-card,
body.dark-mode .tutorial-card,
body.dark-mode .project-card,
body.dark-mode .resource-card,
body.dark-mode .week-card,
body.dark-mode .announcement-card {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .quiz-card:hover,
body.dark-mode .tutorial-card:hover,
body.dark-mode .project-card:hover,
body.dark-mode .resource-card:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2) !important;
}

/* Dark mode card headers */
body.dark-mode .quiz-card-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
}

/* Dark mode card body text */
body.dark-mode .quiz-card-body h3,
body.dark-mode .tutorial-card h3,
body.dark-mode .project-card h3,
body.dark-mode .resource-card h3,
body.dark-mode .category-header h2 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.dark-mode .quiz-description,
body.dark-mode .tutorial-description,
body.dark-mode .project-description,
body.dark-mode .resource-description {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Dark mode stat items */
body.dark-mode .stat-item,
body.dark-mode .quiz-card-stats .stat-item {
    color: rgba(255, 255, 255, 0.7) !important;
    background: transparent !important;
}

body.dark-mode .stat-item .material-icons {
    color: #60a5fa !important;
}

/* Dark mode card footer */
body.dark-mode .quiz-card-footer {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark mode buttons */
body.dark-mode .quiz-start-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

body.dark-mode .quiz-start-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
}

/* Dark mode category headers */
body.dark-mode .category-header {
    border-bottom-color: #3b82f6 !important;
}

body.dark-mode .category-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
}

/* Dark mode quick links */
body.dark-mode .quick-links {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .quick-link-btn {
    background: #0f172a !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .quick-link-btn:hover {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

body.dark-mode .quick-link-btn .material-icons {
    color: #60a5fa !important;
}

/* Dark mode resource icons */
body.dark-mode .resource-icon {
    background: rgba(59, 130, 246, 0.15) !important;
}

/* Dark mode resource tags */
body.dark-mode .resource-tag {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* Dark mode empty states */
body.dark-mode .empty-state-page,
body.dark-mode .empty-category {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .empty-state-page h2,
body.dark-mode .empty-category h2 {
    color: #ffffff !important;
}

body.dark-mode .empty-state-page p,
body.dark-mode .empty-category p {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .empty-state-page .material-icons,
body.dark-mode .empty-category .material-icons {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Dark mode guideline items */
body.dark-mode .guideline-item {
    background: #1e293b !important;
}

body.dark-mode .guideline-item:hover {
    background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-mode .guideline-item h3 {
    color: #ffffff !important;
}

body.dark-mode .guideline-item p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Dark mode tutorial navigation */
body.dark-mode .tutorial-nav-btn {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .tutorial-nav-btn:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3b82f6 !important;
}

/* Dark mode tutorial content */
body.dark-mode .tutorial-content {
    background: #1e293b !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-mode .tutorial-content h1,
body.dark-mode .tutorial-content h2,
body.dark-mode .tutorial-content h3,
body.dark-mode .tutorial-content h4 {
    color: #ffffff !important;
}

body.dark-mode .tutorial-content p,
body.dark-mode .tutorial-content li {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.dark-mode .tutorial-content code {
    background: #0f172a !important;
    color: #60a5fa !important;
}

body.dark-mode .tutorial-content pre {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark mode playground */
body.dark-mode .playground-main {
    background: #0f172a !important;
}

body.dark-mode .playground-toolbar {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .playground-info {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark mode modals */
body.dark-mode .modal-content {
    background: #1e293b !important;
}

body.dark-mode .modal-header {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .modal-header h3 {
    color: #ffffff !important;
}

body.dark-mode .modal-body p {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.dark-mode .share-input-group input {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Dark mode back-to-top button */
body.dark-mode .back-to-top {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

body.dark-mode .back-to-top:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6) !important;
}
