/* ===== CORE STYLES ===== */
/* CSS Variables, Theme System, and Base Styles */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* CSS Variables for Theme Support */
:root {
    /* Light theme variables */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --border-light: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --shadow-hover: rgba(0, 0, 0, 0.1);
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #374151;
    --border-light: #4b5563;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --shadow-hover: rgba(0, 0, 0, 0.3);
}

/* Base Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    /* Enhanced font rendering for crisp text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button Styles */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.footer-theme-toggle {
    margin-left: auto;
}

/* Utility Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.error {
    background: #fee;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin: 1rem 0;
}

[data-theme="dark"] .error {
    background: #2d1b1b;
    color: #fc8181;
    border-color: #4a2d2d;
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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