/* ===============================================
   THEME STYLES - Dark & Light Mode
   K.A. Muhammad Aasif Portfolio
   =============================================== */

/* ===== DEFAULT THEME (DARK) ===== */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --card-bg: #141414;
    --nav-bg: rgba(10, 10, 10, 0.95);
    
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-glow: rgba(249, 115, 22, 0.3);
    
    --border-color: #262626;
    
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ===== LIGHT THEME ===== */
body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
    
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    
    --accent: #ea580c;
    --accent-hover: #f97316;
    --accent-glow: rgba(234, 88, 12, 0.15);
    
    --border-color: #e5e5e5;
    
    --shadow-color: rgba(10, 10, 10, 0.08);
}

/* Smooth transition when switching themes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== THEME-SPECIFIC ADJUSTMENTS ===== */

/* Dark Theme: Particle canvas more visible */
body:not(.light-theme) #particle-canvas {
    opacity: 0.4;
}

/* Light Theme: Particle canvas more subtle */
body.light-theme #particle-canvas {
    opacity: 0.15;
}

/* Dark Theme: Card shadows */
body:not(.light-theme) .service-card,
body:not(.light-theme) .feature-card,
body:not(.light-theme) .project-card,
body:not(.light-theme) .cert-card,
body:not(.light-theme) .tech-category {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Light Theme: Card shadows */
body.light-theme .service-card,
body.light-theme .feature-card,
body.light-theme .project-card,
body.light-theme .cert-card,
body.light-theme .tech-category {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Light Theme: Stronger borders for definition */
body.light-theme .navbar,
body.light-theme .service-card,
body.light-theme .feature-card,
body.light-theme .project-card,
body.light-theme .cert-card,
body.light-theme .tech-category,
body.light-theme .contact-info,
body.light-theme .contact-form-container {
    border-width: 2px;
}

/* Dark Theme: Glow effects on hover */
body:not(.light-theme) .service-card:hover,
body:not(.light-theme) .feature-card:hover,
body:not(.light-theme) .project-card:hover,
body:not(.light-theme) .cert-card:hover {
    box-shadow: 0 0 30px var(--accent-glow), 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Light Theme: Softer hover effects */
body.light-theme .service-card:hover,
body.light-theme .feature-card:hover,
body.light-theme .project-card:hover,
body.light-theme .cert-card:hover {
    box-shadow: 0 0 20px var(--accent-glow), 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Light Theme: Hero title gradient adjustment */
body.light-theme .hero-title {
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light Theme: Input fields */
body.light-theme .form-group input,
body.light-theme .form-group textarea {
    background: #f1f5f9;
    border: 2px solid var(--border-color);
}

body.light-theme .form-group input:focus,
body.light-theme .form-group textarea:focus {
    background: #ffffff;
}

/* Light Theme: Tech items */
body.light-theme .tech-item {
    background: #f8fafc;
}

body.light-theme .tech-item:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Light Theme: Tags and badges */
body.light-theme .tag,
body.light-theme .skill-tag,
body.light-theme .project-industry {
    background: var(--accent);
    color: #ffffff;
}

body.light-theme .tech-badge {
    background: #f1f5f9;
    color: var(--accent);
    border-color: var(--border-color);
}

/* Light Theme: Buttons */
body.light-theme .btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

body.light-theme .btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

body.light-theme .btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

body.light-theme .btn-secondary:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Light Theme: Service icons and feature icons */
body.light-theme .service-icon,
body.light-theme .feature-icon,
body.light-theme .cert-icon {
    color: var(--accent);
}

/* Light Theme: Navigation */
body.light-theme .navbar {
    background: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Light Theme: Footer */
body.light-theme .footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
}

/* Light Theme: Modal */
body.light-theme .modal {
    background: rgba(0, 0, 0, 0.7);
}

body.light-theme .modal-content {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

/* Light Theme: Highlight text box */
body.light-theme .highlight-text {
    background: #f1f5f9;
    border-left-color: var(--accent);
}

/* Light Theme: Scroll indicator */
body.light-theme .mouse {
    border-color: var(--accent);
}

body.light-theme .wheel {
    background: var(--accent);
}

/* Light Theme: Contact icons */
body.light-theme .contact-icon {
    background: var(--accent);
    color: #ffffff;
}

/* Light Theme: Social icons */
body.light-theme .social-icons a,
body.light-theme .footer-social a {
    background: #f1f5f9;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.light-theme .social-icons a:hover,
body.light-theme .footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* Dark Theme: Text selections */
body:not(.light-theme) ::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Light Theme: Text selections */
body.light-theme ::selection {
    background: var(--accent);
    color: #ffffff;
}

/* Theme Toggle Icon Animation */
.theme-toggle i {
    transition: transform 0.3s ease;
}

body:not(.light-theme) .theme-toggle i.fa-moon {
    display: inline-block;
}

body:not(.light-theme) .theme-toggle i.fa-sun {
    display: none;
}

body.light-theme .theme-toggle i.fa-moon {
    display: none;
}

body.light-theme .theme-toggle i.fa-sun {
    display: inline-block;
}

/* ===== PREFERS COLOR SCHEME (System preference) ===== */
@media (prefers-color-scheme: light) {
    /* Users who prefer light mode by default will see light theme */
    /* This can be overridden by the theme toggle */
}

@media (prefers-color-scheme: dark) {
    /* Users who prefer dark mode by default will see dark theme */
    /* This is the default state */
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .theme-toggle,
    .hamburger,
    .scroll-indicator,
    #particle-canvas,
    .btn,
    .contact-form {
        display: none !important;
    }
    
    .hero,
    .section {
        page-break-inside: avoid;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
    }
    
    body.light-theme {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}
