/* ============================================
   Course Page Shared Styles
   Modular CSS for all course landing pages
   Dr. Tianle Ma - Oakland University
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - DeepMind Inspired */
:root {
    --primary-dark: #1a1a2e;
    --primary-mid: #16213e;
    --accent: #667eea;
    --accent-light: #818cf8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --highlight-gradient: linear-gradient(90deg, #00d4ff 0%, #7b2cbf 100%);
    
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Google Sans', 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.15);
    
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* Top Navigation Bar - Auto-hide */
.top-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-nav.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Hover zone at top of page to reveal nav */
.nav-trigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 99;
}

.nav-trigger:hover + .top-nav,
.top-nav:hover {
    transform: translateY(0);
    opacity: 1;
}

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

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: var(--gray-100);
    color: var(--accent);
}

/* Main Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    background: var(--highlight-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-meta {
    color: var(--gray-600);
    font-size: 1rem;
}

.hero-meta strong {
    color: var(--gray-800);
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.info-card span {
    font-size: 1.25rem;
}

.info-card p {
    margin: 0;
    color: var(--gray-800);
    font-size: 0.95rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Lecture Grid */
.lecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 4rem;
}

.lecture-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
}

.lecture-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lecture-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: transparent;
}

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

.lecture-card:nth-child(1) { animation-delay: 0.1s; }
.lecture-card:nth-child(2) { animation-delay: 0.15s; }
.lecture-card:nth-child(3) { animation-delay: 0.2s; }
.lecture-card:nth-child(4) { animation-delay: 0.25s; }
.lecture-card:nth-child(5) { animation-delay: 0.3s; }
.lecture-card:nth-child(6) { animation-delay: 0.35s; }

.lecture-num {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.lecture-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0.5rem 0 1rem;
}

.lecture-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lecture-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lecture-links a:hover {
    background: var(--accent);
    color: var(--white);
}

.lecture-links a.primary {
    background: var(--accent-gradient);
    color: var(--white);
}

.lecture-links a.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Resource badges for demos/notebooks */
.lecture-resources {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.resource-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.resource-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.resource-badges a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: var(--gray-50);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-badges a:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.resource-badges a.demo {
    border-color: #10b981;
    color: #059669;
}

.resource-badges a.demo:hover {
    background: #10b981;
    color: var(--white);
}

.resource-badges a.notebook {
    border-color: #f97316;
    color: #ea580c;
}

.resource-badges a.notebook:hover {
    background: #f97316;
    color: var(--white);
}

/* Resource Card (standalone) */
.resource-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

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

.resource-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.resource-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.resource-content p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.resource-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Coming Soon State */
.coming-soon {
    opacity: 0.6;
    pointer-events: none;
}

.coming-soon .lecture-card::before {
    background: var(--gray-400);
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.25rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .lecture-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-card {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 0.75rem;
    }
}
