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

:root {
    --color-primary: #007AFF;
    --color-primary-rgb: 0, 122, 255;
    --color-secondary: #5856D6;
    --color-secondary-rgb: 88, 86, 214;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-background: #FFFFFF;
    --color-card: #F9FAFB;
    --color-card-hover: #F3F4F6;
    --color-border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-base: all 0.3s ease;
    --border-radius-base: 8px;
    --font-size-base: 16px;
    --line-height-base: 1.5;
    --letter-spacing-base: -0.01em;
}

.dark {
    --color-primary: #3B82F6;
    --color-primary-rgb: 59, 130, 246;
    --color-secondary: #8B5CF6;
    --color-secondary-rgb: 139, 92, 246;
    --color-text: #F9FAFB;
    --color-text-light: #D1D5DB;
    --color-background: #111827;
    --color-card: #1F2937;
    --color-card-hover: #374151;
    --color-border: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Base styles with improved readability */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    letter-spacing: var(--letter-spacing-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Text styling */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Content card animations */
.content-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    background-color: var(--color-card);
    border-radius: var(--border-radius-base);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: var(--transition-base);
}

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

.content-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tab navigation */
.tab-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-button.active {
    background-color: var(--color-primary);
    color: white;
}

.tab-button:not(.active) {
    background-color: var(--color-card);
    border-color: var(--color-border);
}

.tab-button:not(.active):hover {
    border-color: var(--color-primary);
}

/* Loading spinner */
.loading-spinner {
    display: none;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner.visible {
    display: flex;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--color-card) 25%,
            var(--color-card-hover) 50%,
            var(--color-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Navigation styles */
.nav-link {
    position: relative;
    color: var(--color-text-light);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 500;
}

/* Header with blur effect */
.header-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

/* Animation delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Theme toggle */
.theme-toggle {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* Mobile menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background);
    z-index: 50;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav-menu.open {
    transform: translateX(0);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-card);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Accessibility improvements */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 999;
    transition: top 0.3s;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    top: 0;
    height: auto;
    width: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
    }

    .tab-buttons-container {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }

    .tab-button {
        flex: 0 0 auto;
        margin-right: 0.5rem;
    }

    button,
    a,
    .tab-button,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-button {
        padding: 10px;
    }
}

@media (max-width: 640px) {
    :root {
        --font-size-base: 14px;
    }

    .grid {
        grid-template-columns: 1fr !important;
    }
}