/**
 * Base Styles - EduProd
 */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, var(--text-6xl));
}

h2 {
    font-size: clamp(2rem, 5vw, var(--text-5xl));
}

h3 {
    font-size: clamp(1.5rem, 4vw, var(--text-3xl));
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    line-height: 1.7;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-orange);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: var(--z-tooltip);
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: var(--font-semibold);
}

.skip-link:focus {
    top: 0;
}

.text-muted {
    color: var(--text-muted);
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--physics-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Selection */
::selection {
    background: var(--physics-primary);
    color: var(--physics-bg);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg,
            var(--physics-bg) 0%,
            var(--brand-navy) 25%,
            var(--chemistry-dark) 50%,
            var(--math-primary) 75%,
            var(--biology-primary) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    /* Changed from 20s to 12s */
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}


@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}