/* =========================================
   MODERN THEME CSS (Premium Dark Mode)
   ========================================= */

:root {
    /* Colors */
    --bg-base: #070c22; /* Very dark navy from book */
    --bg-surface: #0a1230; /* Dark navy */
    --bg-panel: rgba(34, 45, 76, 0.6); /* Lighter navy panel */
    
    --text-primary: #e7e8e6; /* Off-white */
    --text-secondary: #a6adbb; /* Light muted gray-blue */
    
    --accent-blue: #2c4d68; /* Steel blue */
    --accent-indigo: #5f5360; /* Muted purple */
    --accent-purple: #96665c; /* Dusty rose */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(44, 77, 104, 0.5) 0%, rgba(150, 102, 92, 0.5) 100%);
    
    /* Glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(150, 102, 92, 0.4);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.125rem; font-weight: 300; }
a { color: var(--accent-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-indigo); }

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}
.container-sm { max-width: 800px; }
.text-center { text-align: center; }

/* Background Glow Effects */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: pulse 15s infinite alternate ease-in-out;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
    top: -200px;
    left: -200px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.2) translate(100px, 50px); opacity: 0.3; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding var(--transition-normal);
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem; /* Account for navbar */
    position: relative;
    overflow: hidden;
}

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

.hero-text {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: white;
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    margin: 0 auto;
    max-width: 600px;
}

.divider {
    height: 4px;
    width: 60px;
    background: var(--gradient-primary);
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* Glass Panels / Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-normal);
    color: inherit;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(150, 102, 92, 0.4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-surface);
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

/* Make featured card stand out */
.featured-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 10;
    pointer-events: none;
}

.card-content {
    padding: 2.5rem 2rem;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-icon {
    position: absolute;
    top: -24px;
    left: 2rem;
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    z-index: 2;
    transition: all var(--transition-normal);
}

.card:hover .card-icon {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-4px);
}

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

.card p {
    margin-bottom: 0;
    font-size: 1rem;
    flex-grow: 1;
}

/* Glass Panel for Moodle */
.alt-bg {
    position: relative;
}

.alt-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjMDYxMjI0Ij48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDBMOCA4Wk04IDBMMCA4WiIgc3Ryb2tlPSIjMGUxYjMzIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KPC9zdmc+') repeat;
    opacity: 0.5;
    z-index: -1;
}

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 4rem 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
}

.highlight-icon {
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--bg-base);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 10;
}

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

.footer-col h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-col h3 i {
    color: var(--accent-blue);
}

.footer-col p {
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-highlight);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a full app, we'd add a hamburger menu here */
    }
    
    .hero {
        text-align: center;
    }
    
    .hero-text {
        margin: 0 auto;
    }
    
    .hero p {
        margin: 0 auto 2.5rem;
    }
    
    .glass-panel {
        padding: 2.5rem 1.5rem;
    }
}
