/* ==========================================================================
   Base Styles - Reset & Typography
   ========================================================================== */

/* ===== CSS RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Remove default styling */
ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-4xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-3xl);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

small {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

code,
pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

code {
    background: var(--glass-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--accent-secondary);
}

pre {
    background: var(--bg-tertiary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    overflow-x: auto;
    border: 1px solid var(--glass-border);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) var(--bg-secondary);
}

/* ===== FOCUS STATES ===== */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ===== 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;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fadeIn {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-slideUp {
    animation: slideUp var(--transition-slow) ease-out;
}