/* Base Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: hidden;
    cursor: none;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Particle Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

.cursor.expand {
    width: 60px;
    height: 60px;
    border-color: var(--secondary);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.2s ease;
    opacity: 0.5;
    mix-blend-mode: difference;
}

/* Horizontal Scroll Container */
.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    display: flex;
    position: relative;
    z-index: 1;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: var(--border-secondary);
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Scene Styles */
.scene {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-md);
}

/* Parallax Background Elements */
.parallax-bg {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
}

.parallax-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}
/* Accessibility CSS - Add this to base.css */

/* Skip Link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    z-index: 100000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Better focus for custom elements */
.sphere-item:focus span,
.indicator-dot:focus,
.project-card:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Remove outline for mouse users (keeps it for keyboard) */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #ff8c00;
        --border-primary: rgba(255, 255, 255, 0.5);
    }
    
    .project-card,
    .card,
    .contact-container {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sphere {
        animation: none;
    }
    
    .scroll-container {
        scroll-behavior: auto;
    }
}

/* Better color contrast for text */
body.light-mode {
    --text-primary: #1a1423;
    --text-secondary: #2a2435;
}

/* Ensure sufficient contrast ratios */
.tag,
.project-link {
    background: rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Live region for announcements */
.sr-live {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

[aria-live="polite"] {
    position: absolute;
    left: -10000px;
}
/* Optimized Cursor Styles - Add this to your base.css or replace existing cursor styles */

/* Custom Cursor */
/* .cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    top: 10px;
    left: 10px;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    /* Remove transition for instant response */
    will-change: transform;
}

/* .cursor.expand {
    width: 60px;
    height: 60px;
    border-color: var(--secondary);
    transition: width 0.2s ease, height 0.2s ease;
} */

/* .cursor {
    transform: translate3d(0, 0, 0) scale(1);
}

.cursor.expand {
    transform: scale(3);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
    mix-blend-mode: difference;
    /* Smooth animation is handled by JavaScript */
    /* will-change: transform; */
/* }  */ 


.cursor,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    will-change: transform;
    mix-blend-mode: difference;
}

.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 10000;
}

.cursor.expand {
    transform: scale(3);
    border-color: var(--secondary);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 9999;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor,
    .cursor-follower {
        display: none;
    }
}
