/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Theme Variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border: #e2e8f0;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border: #475569;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
}

/* Theme Utility Classes */
.theme-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
}

.theme-secondary {
    background-color: var(--bg-secondary);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Navigation sticky */
.nav-sticky {
    backdrop-filter: blur(10px);
    background-color: var(--bg-primary);
    opacity: 0.95;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border);
    z-index: 9999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

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

/* Mobile menu backdrop */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, backdrop-filter 0.3s ease;
}

.mobile-menu-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* Blur the main content when mobile menu is open */
body.mobile-menu-open>*:not(nav) {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    transition: filter 0.3s ease;
}

body.mobile-menu-open nav {
    filter: none;
    -webkit-filter: none;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

html.mobile-menu-open,
body.mobile-menu-open {
    overflow: hidden;
}

/* Theme toggle button */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle.dark::before {
    transform: translateX(30px);
}

/* Legacy styles (keeping for compatibility) */
header {
    background-color: #333;
    color: white;
    padding: 10px;
}

nav a {
    color: var(--text-primary) !important;
    margin: 10px;
    text-decoration: none;
}

nav a:hover {
    color: #3b82f6 !important;
}

/* Mobile menu text colors */
.mobile-menu a,
.mobile-menu h2 {
    color: var(--text-primary) !important;
}

section {
    margin: 20px;
}

.project {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px;
}