/* Cursor-Themed (Dark/Graphite Blue) Theme */
[data-theme="dark"] {
    --bg-primary: #171b23; /* dark blue/graphite */
    --bg-secondary: #202736;
    --section-bg: #141923;
    --card-bg: rgba(60, 72, 98, 0.12);
    --hover-bg: rgba(93, 155, 255, 0.12);
    --input-bg: rgba(60, 72, 98, 0.16);

    --text-primary: #d1e2fa;
    --text-secondary: #8eb2d9;

    --accent-color: #5d9bff;
    --accent-gradient-start: #5d9bff;
    --accent-hover: #3486ec;
    --secondary-accent: #33ffc2;
    --accent-gradient-end: #33ffc2;
    --success-color: #27c79c;

    --border-color: rgba(81, 164, 253, 0.12);
    --border-hover: rgba(81, 164, 253, 0.22);

    --badge-bg: rgba(93, 155, 255, 0.13);
    --badge-text: #aed9fb;
    --badge-border: rgba(93, 155, 255, 0.22);

    --tech-bg: rgba(123, 168, 255, 0.10);
    --tech-text: #e6f0fa;
    --tech-border: rgba(93, 155, 255, 0.14);

    --shadow-small: 0 2px 8px rgba(36, 68, 142, 0.21);
    --shadow-medium: 0 8px 32px rgba(36, 68, 142, 0.36);
    --shadow-large: 0 20px 64px rgba(36, 68, 142, 0.51);
    --shadow-accent: rgba(93,155,255, 0.18);

    --navbar-bg: rgba(23, 27, 35, 0.92);

    /* GitHub Contributions Colors - Dark Theme */
    --contribution-bg: #151b27;
    --contribution-border: #34405a;
    --contribution-hover-border: #5d9bff;
    --contribution-level-0: #232940;
    --contribution-level-1: #304272;
    --contribution-level-2: #4c85d1;
    --contribution-level-3: #5d9bff;
    --contribution-level-4: #78c0ff;
    --tooltip-bg: #243d5c;
    --tooltip-text: #d1e2fa;
    --tooltip-border: #34405a;
}

/* Pleasant Eye-Friendly Light Theme (Lighter Beige/Sand) */
[data-theme="light"] {
    --bg-primary: #fcfaf7; /* slightly lighter beige/sand */
    --bg-secondary: #f8f4ec;
    --section-bg: #f7f2ea;
    --card-bg: rgba(245, 233, 210, 0.88);
    --hover-bg: rgba(211, 188, 145, 0.09);
    --input-bg: #fbf7ee;

    --text-primary: #59483f; /* a bit lighter than #3f3531 */
    --text-secondary: #ac9878;

    --accent-color: #e2bc88;
    --accent-hover: #ceb271;
    --accent-gradient-start: #59483f;
    --accent-gradient-end: #ffe4b7;
    --secondary-accent: #ffe4b7;
    --success-color: #92bc9b;

    --border-color: rgba(211, 188, 145, 0.16);
    --border-hover: rgba(211, 188, 145, 0.23);

    --badge-bg: rgba(226, 188, 136, 0.09);
    --badge-text: #a18656;
    --badge-border: rgba(226, 188, 136, 0.12);

    --tech-bg: rgba(246, 238, 217, 0.11);
    --tech-text: #a18656;
    --tech-border: rgba(211, 188, 145, 0.10);
    
    --shadow-small: 0 2px 8px rgba(226, 188, 136, 0.07);
    --shadow-medium: 0 8px 32px rgba(226, 188, 136, 0.13);
    --shadow-large: 0 20px 64px rgba(226, 188, 136, 0.17);
    --shadow-accent: rgba(255, 228, 183, 0.08);

    --navbar-bg: rgba(252, 246, 237, 0.82);

    /* GitHub Contributions Colors - Light (Beige) Theme */
    --contribution-bg: #fcf5ea;
    --contribution-border: #efdcc4;
    --contribution-hover-border: #e2bc88;
    --contribution-level-0: #fbf7ee;
    --contribution-level-1: #f4ebd6;
    --contribution-level-2: #efdebc;
    --contribution-level-3: #e2bc88;
    --contribution-level-4: #ceb271;
    --tooltip-bg: #fffaf3;
    --tooltip-text: #59483f;
    --tooltip-border: #efdcc4;
}

/* Theme-specific styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.navbar {
    background: var(--navbar-bg);
}

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

/* Theme toggle animations */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-icon {
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-icon {
    transform: rotate(180deg);
}

/* Interactive background colors for themes */
.bg-line {
    stroke: var(--accent-color);
    opacity: 0.3;
}

.bg-particle {
    fill: var(--accent-color);
    opacity: 0.6;
}

/* Light theme specific adjustments */
[data-theme="light"] .floating-card {
    box-shadow: var(--shadow-medium);
    background: rgba(242, 228, 202, 0.94);
    backdrop-filter: blur(9px);
}

[data-theme="light"] .project-card,
[data-theme="light"] .tech-stack,
[data-theme="light"] .form {
    background: rgba(242, 228, 202, 0.94);
    backdrop-filter: blur(9px);
    box-shadow: var(--shadow-medium);
}

/* Dark theme specific adjustments */
[data-theme="dark"] .floating-card {
    background: rgba(60, 72, 98, 0.10);
    border: 1px solid rgba(81, 164, 253, 0.12);
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .tech-stack,
[data-theme="dark"] .form {
    background: rgba(60, 72, 98, 0.10);
    border: 1px solid rgba(81, 164, 253, 0.12);
}