/* Dark Mode Styles */
:root {
    /* Light mode colors (default) */
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-secondary: #666666;
    --header-bg: #111111;
    --link-color: #0087cc;
    --border-color: #e0e0e0;
    --card-bg: #f5f5f5;
}

.dark-mode {
    /* Dark mode colors */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --header-bg: #0a0a0a;
    --link-color: #4db8ff;
    --border-color: #333333;
    --card-bg: #2a2a2a;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--header-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* ===================================================================
 * Comprehensive Dark Mode Styles
 * ------------------------------------------------------------------- */

/* Apply dark mode to body and main elements */
.dark-mode body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Header */
.dark-mode .s-header {
    background-color: var(--header-bg) !important;
    border-bottom-color: var(--border-color);
}

.dark-mode .s-header__nav a {
    color: var(--text-color) !important;
}

.dark-mode .s-header__nav a:hover {
    color: #11ABB0 !important;
}

.dark-mode .s-header__nav .current a {
    color: #11ABB0 !important;
}

/* Hero Section */
.dark-mode .s-hero {
    background-color: #0f0f0f !important;
}

.dark-mode .s-hero__bg {
    background:
        radial-gradient(ellipse at top left, rgba(17, 171, 176, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(17, 171, 176, 0.08) 0%, transparent 50%),
        linear-gradient(135deg,
            #050810 0%,
            #0a0e1a 25%,
            #0f1520 50%,
            #0a0e1a 75%,
            #050810 100%
        ) !important;
}

.dark-mode .s-hero__bg::before {
    opacity: 0.8 !important;
}

.dark-mode .s-hero__bg::after {
    background: radial-gradient(circle at 30% 50%, rgba(17, 171, 176, 0.06) 0%, transparent 25%) !important;
}

.dark-mode .s-hero__content-about h1 {
    color: #ffffff !important;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9) !important;
}

.dark-mode .s-hero__content-about h3 {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8) !important;
}

.dark-mode .s-hero__content-about h3 span {
    color: #11ABB0 !important;
    text-shadow: 0 0 12px rgba(17, 171, 176, 0.6) !important;
}

.dark-mode .s-hero__content-about p {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .scroll-text {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.dark-mode .s-hero__scroll-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark-mode .s-hero__scroll-link:hover {
    color: #11ABB0 !important;
}

/* About Section */
.dark-mode .s-about {
    background-color: #141414 !important;
}

.dark-mode .s-about__content h3 {
    color: #ffffff !important;
}

.dark-mode .s-about__content p {
    color: var(--text-color) !important;
}

/* Resume Section */
.dark-mode .s-resume {
    background-color: #1a1a1a !important;
}

.dark-mode .section-header-allcaps {
    color: #11ABB0 !important;
}

.dark-mode .resume-block {
    border-bottom-color: var(--border-color) !important;
}

.dark-mode .resume-block__header h4 {
    color: #ffffff !important;
}

.dark-mode .resume-block__header-meta {
    color: var(--text-secondary) !important;
}

.dark-mode .resume-block__header-date {
    color: #11ABB0 !important;
}

.dark-mode .resume-block p {
    color: var(--text-color) !important;
}

.dark-mode .resume-block ul li {
    color: var(--text-color) !important;
}

/* Portfolio/Certifications Section */
.dark-mode .s-portfolio {
    background-color: #0f0f0f !important;
}

.dark-mode .s-portfolio__header h3 {
    color: #ffffff !important;
}

/* Footer */
.dark-mode .s-footer {
    background-color: #0a0a0a !important;
    color: var(--text-color) !important;
}

.dark-mode .s-footer a {
    color: var(--text-color) !important;
}

.dark-mode .s-footer a:hover {
    color: #11ABB0 !important;
}

/* Links */
.dark-mode a {
    color: #4db8ff !important;
}

.dark-mode a:hover {
    color: #11ABB0 !important;
}

.dark-mode .smoothscroll {
    color: #11ABB0 !important;
}

/* Buttons - keep their original styling */
.dark-mode .btn,
.dark-mode .btn--download {
    background: #11ABB0 !important;
    color: #ffffff !important;
    border-color: #11ABB0 !important;
}

.dark-mode .btn:hover,
.dark-mode .btn--download:hover {
    background: #15c4c9 !important;
    color: #ffffff !important;
}

/* General headings */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #ffffff !important;
}

/* Paragraphs and text */
.dark-mode p,
.dark-mode li,
.dark-mode span {
    color: var(--text-color) !important;
}

/* Special case: keep brand color spans */
.dark-mode .s-hero__content-about h3 span {
    color: #11ABB0 !important;
}

/* Counter styling */
.dark-mode #counter {
    color: #11ABB0 !important;
}

/* HR elements */
.dark-mode hr {
    background: linear-gradient(
        to right,
        transparent,
        var(--border-color) 20%,
        var(--border-color) 80%,
        transparent
    ) !important;
}

/* Email and special links */
.dark-mode a[href^="mailto"] {
    color: #11ABB0 !important;
}

/* SVG icons */
.dark-mode svg {
    fill: currentColor;
}

/* Scroll arrow */
.dark-mode .scroll-arrow svg {
    fill: var(--text-color) !important;
}

/* Back to top button */
.dark-mode .ss-go-top {
    background-color: var(--header-bg) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .ss-go-top svg {
    fill: var(--text-color) !important;
}

/* Mobile menu */
.dark-mode .s-header__menu-icon {
    background-color: var(--text-color) !important;
}

.dark-mode .s-header__menu-icon::before,
.dark-mode .s-header__menu-icon::after {
    background-color: var(--text-color) !important;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Performance: will-change for animations */
.dark-mode-toggle,
.smoothscroll {
    will-change: transform;
}

/* Accessibility: 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;
    }
}

/* Accessibility: Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

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

/* Performance: Optimize font loading */
@font-face {
    font-display: swap;
}

/* Accessibility: Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

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