/* --- Typography Imports & Fonts --- */
:root {
    --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --max-width: 1200px; /* Decreased max-width for more compact layout */

    /* Professional Black & White Palette (Light Mode Defaults) */
    --primary-color: #000000;      /* Pure Black */
    --secondary-color: #555555;    /* Dark Charcoal */
    --background-color: #ffffff;   /* Pure White */
    --text-color: #111111;         /* Deepest Charcoal */
    --text-secondary: #555555;
    --border-color: rgba(0, 0, 0, 0.08);
    --highlight-gold: #333333;     /* Dark Charcoal Highlight */
    --highlight-core: #666666;     /* Slate Grey Highlight */
    --section-bg: #fafafa;
    --card-bg: #ffffff;
    --link-hover: #444444;
    --accent: #111111;

    /* Light Mode Semantic Sync */
    --bg-main: #ffffff;
    --bg-secondary: #fafafa;
    --bg-card: #ffffff;
    --border-hover: rgba(0, 0, 0, 0.2);
    --text-primary: #111111;
    --text-accent: #222222;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --grid-color: rgba(0, 0, 0, 0.15);
}

/* Dark Mode Overrides - Elite Absolute Black & White */
body.dark-mode {
    --primary-color: #ffffff;      /* Pure White */
    --secondary-color: #aaaaaa;    /* Light Grey */
    --background-color: #000000;   /* Pure Black */
    --text-color: #eeeeee;         /* Crisp Off-White */
    --text-secondary: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.1);
    --highlight-gold: #ffffff;
    --highlight-core: #cccccc;
    --section-bg: #0a0a0a;
    --card-bg: #111111;
    --link-hover: #cccccc;
    --accent: #ffffff;

    /* Dark Mode Semantic Sync */
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --border-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #ffffff;
    --text-accent: #eeeeee;
    --bg-nav: rgba(0, 0, 0, 0.95);
    --grid-color: rgba(255, 255, 255, 0.12);
}

/* Birthday Mode Overrides - Festive Gold, Violet & Cosmic Sparkle (17 April 2009 Special) */
body.birthday-theme {
    --primary-color: #ffd700;      /* Festive Gold */
    --secondary-color: #f39c12;    /* Warm Amber */
    --background-color: #0b071a;   /* Deep Cosmic Violet Night */
    --text-color: #fdfbf7;         /* Radiant Warm White */
    --text-secondary: #d1c4e9;     /* Soft Violet Glow */
    --border-color: rgba(255, 215, 0, 0.25);
    --highlight-gold: #ffd700;     /* Electric Gold */
    --highlight-core: #ff4081;     /* Vibrant Party Pink */
    --section-bg: #130c27;
    --card-bg: #1a1235;
    --link-hover: #ffe066;
    --accent: #ffd700;

    /* Semantic Sync for Birthday Theme */
    --bg-main: #0b071a;
    --bg-secondary: #130c27;
    --bg-card: #1a1235;
    --border-hover: rgba(255, 215, 0, 0.5);
    --text-primary: #ffffff;
    --text-accent: #ffd700;
    --bg-nav: rgba(11, 7, 26, 0.92);
    --grid-color: rgba(255, 215, 0, 0.2);
}

body.birthday-theme .hero h1 .highlight-core,
body.birthday-theme .highlight-core {
    background: linear-gradient(135deg, #ffd700 0%, #ff4081 50%, #7c4dff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(255, 64, 129, 0.3);
}

body.birthday-theme .badge.highlight-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 64, 129, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.6);
    color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

body.birthday-theme .project-row,
body.birthday-theme .spec-card,
body.birthday-theme .education-block {
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.15);
    background: #1a1235;
}

body.birthday-theme .project-row:hover,
body.birthday-theme .spec-card:hover {
    border-color: rgba(255, 215, 0, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}

body.birthday-theme .btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ff4081 100%);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

body.birthday-theme .btn-primary:hover {
    box-shadow: 0 0 25px rgba(255, 64, 129, 0.6);
}

/* Birthday Celebration Floating Banner - Styled with Site Design Language */
.birthday-banner {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.15);
    font-family: var(--font-sans);
    align-items: center;
    gap: 1.25rem;
    white-space: nowrap;
    animation: birthdayPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.birthday-theme .birthday-banner {
    display: flex;
}

@keyframes birthdayPop {
    0% { transform: translateY(15px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.birthday-banner-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffd700;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 0.35rem 0.65rem;
    border-radius: 2px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.birthday-banner-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    white-space: nowrap;
}

.birthday-banner-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.birthday-pill-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.birthday-banner-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.birthday-banner-sub .highlight-code {
    color: #ffd700;
}

.birthday-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.birthday-banner-btn {
    background: #ffd700;
    border: 1px solid #ffd700;
    color: #000000;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.55rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    white-space: nowrap;
}

.birthday-banner-btn:hover {
    background: #ffe066;
    border-color: #ffe066;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.birthday-banner-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.55rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    white-space: nowrap;
}

.birthday-banner-close:hover {
    background: rgba(255, 64, 129, 0.15);
    border-color: rgba(255, 64, 129, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .birthday-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        white-space: normal;
    }
    .birthday-banner-content {
        white-space: normal;
    }
    .birthday-banner-title {
        flex-wrap: wrap;
        white-space: normal;
    }
    .birthday-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Birthday Canvas Confetti Overlay */
#birthday-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    display: none;
}

body.birthday-theme #birthday-canvas {
    display: block;
}

/* --- Custom Sliding Loading Screen --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: all;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-wrapper.loaded {
    transform: translateY(-100%);
    pointer-events: none;
}

.loader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1;
}

.loader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 300px;
    padding: 1.5rem;
}

.loader-title {
    font-family: var(--font-mono);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: pulseLoader 2s infinite ease-in-out;
}

.loader-bar-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: #ffffff;
    transition: width 0.4s ease;
}

.loader-status {
    font-family: var(--font-mono);
    color: #aaaaaa;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@keyframes pulseLoader {
    0%, 100% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* --- Custom Cursor --- */
.custom-cursor-dot,
.custom-cursor-outline {
    display: none;
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .custom-cursor-dot,
    .custom-cursor-outline {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999999;
        pointer-events: none !important;
        transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
    }

    .custom-cursor-dot {
        width: 6px;
        height: 6px;
        background-color: var(--primary-color);
    }

    .custom-cursor-outline {
        width: 32px;
        height: 32px;
        border: 1px solid var(--primary-color);
        opacity: 0.5;
    }

    /* Hover effects for interactive items */
    body.cursor-hover .custom-cursor-dot {
        width: 8px;
        height: 8px;
        background-color: var(--primary-color);
    }

    body.cursor-hover .custom-cursor-outline {
        width: 44px;
        height: 44px;
        border-color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.05);
        opacity: 0.8;
    }

    body, html, a, button, input, textarea, select, .admin-modal-overlay, .admin-modal-container, .admin-btn, .admin-action-btn, .admin-close-btn, .admin-filter-btn, .admin-secret-pill {
        cursor: none !important;
    }
}

@media (max-width: 991px), (hover: none), (pointer: coarse) {
    body, html, a, button, input, textarea, select, .admin-modal-overlay, .admin-modal-container, .admin-btn, .admin-action-btn, .admin-close-btn, .admin-filter-btn, .admin-secret-pill {
        cursor: auto !important;
    }
    button, a, .admin-secret-pill, .admin-filter-btn, .admin-action-btn, .admin-close-btn {
        cursor: pointer !important;
    }
}

/* --- WebGL Background --- */
#webgl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg-main);
    transition: opacity 0.6s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s, color 0.5s; /* Smooth transition for theme change */
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition), border-color var(--transition), top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.nav-hidden {
    top: -80px; /* Hide navbar on scroll down */
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.85rem 1.75rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
    justify-self: start;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    transition: border-color var(--transition), transform var(--transition);
}

.logo:hover .logo-img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-self: end;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-sans);
    text-transform: none;
    letter-spacing: normal;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: color var(--transition), background-color var(--transition);
    white-space: nowrap;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--highlight-core);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--highlight-core);
    border-radius: 2px;
}

.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--highlight-core);
    background: var(--bg-main);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
}

/* --- Hero Section --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

.hero-content {
    width: 100%;
}

.hero h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 3rem;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    background-color: var(--bg-secondary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 5rem;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-main) !important;
    border: 1px solid var(--primary-color);
}

.btn-primary::before {
    background-color: var(--text-primary);
}

body.dark-mode .btn-primary::before {
    background-color: #ffffff;
}

.btn-primary:hover {
    color: var(--background-color) !important;
    border-color: var(--text-primary);
}

body.dark-mode .btn-primary:hover {
    color: var(--background-color) !important;
    border-color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary::before {
    background-color: var(--primary-color);
}

.btn-secondary:hover {
    color: #ffffff !important;
    border-color: var(--primary-color);
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

/* --- Layout --- */
main {
    padding-top: 5rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    padding: 1.5rem 0;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Layout Sections --- */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 2rem;
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.bg-alt {
    max-width: 100%;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.bg-alt > .section-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 5rem;
}

.section-sidebar {
    position: sticky;
    top: 7rem;
    height: fit-content;
}

.section-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-sidebar h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-accent-text {
    font-size: 0.95rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}

.sidebar-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Section Main --- */
.section-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.lead-text {
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 300;
}

.body-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- Profile Specs --- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.spec-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 2px;
}

.spec-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.spec-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* --- Ecosystem --- */
.ecosystem-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.ecosystem-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.group-title {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-row {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 2px;
    transition: border-color var(--transition);
}

.project-row:hover {
    border-color: var(--border-hover);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.row-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-weight: 400;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color var(--transition);
}

.project-links a:hover {
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-accent);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
}

/* --- Jobs Block --- */
.job-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 2px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.job-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.job-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.job-meta {
    display: flex;
    gap: 0.5rem;
}

.job-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
}

.job-details {
    list-style: none;
}

.job-details li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.job-details li:last-child {
    margin-bottom: 0;
}

.job-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-accent);
    font-weight: bold;
}

/* --- Capability Matrix --- */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.matrix-column h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.matrix-list {
    list-style: none;
}

.matrix-list li {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* --- Education --- */
.education-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 2px;
}

.education-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.edu-inst {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-top: 0.25rem;
}

.edu-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Contact Gateways --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
    text-decoration: none;
    min-width: 0; /* Prevents overflow in flex layout */
}

.contact-card:hover {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.01);
    transform: translateY(-2px);
}

.contact-card-icon {
    font-size: 1.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.2rem;
    height: 3.2rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.contact-card:hover .contact-card-icon {
    color: var(--bg-main);
    background-color: var(--accent);
    border-color: var(--accent);
}

.contact-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0; /* Prevents overflow in flex layout */
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    overflow-wrap: break-word;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-main);
    padding: 4rem 2rem;
}

.footer-content-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition);
}

.footer-socials a:hover {
    background: var(--bg-card);
    color: var(--highlight-core);
    border-color: var(--highlight-core);
    transform: translateY(-2px);
}

.x-social-svg {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    transition: fill var(--transition);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Fade In System --- */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Layout Rules --- */
@media (max-width: 992px) {
    .custom-cursor-dot,
    .custom-cursor-outline {
        display: none !important;
    }
    body, html, a, button, input, textarea, select {
        cursor: auto !important;
    }
    .section-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .section-sidebar {
        position: static;
    }
    .job-header {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 1080px) {
    .navbar {
        height: 64px;
        background-color: var(--bg-nav);
    }
    .nav-content {
        padding: 0 1.25rem;
        height: 100%;
        gap: 0.5rem;
    }
    .logo-img {
        width: 28px;
        height: 28px;
    }
    .logo span {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        color: var(--text-primary);
        cursor: pointer;
        transition: all var(--transition);
        z-index: 1001;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    .mobile-menu-toggle:hover {
        border-color: var(--highlight-core);
        color: var(--highlight-core);
    }
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        background-color: var(--bg-nav);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 2.5rem 1.5rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        border-top: 1px solid var(--border-color);
        overflow-y: auto;
        align-items: center;
    }
    .nav-links.active {
        transform: translateX(0);
    }
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links a {
        display: block;
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transition: background-color var(--transition);
    }
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    body.light-mode .nav-links a:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }
    .nav-links li:has(#theme-toggle),
    .nav-links li:has(#music-toggle) {
        display: inline-block;
        width: auto;
        margin: 0 0.5rem;
    }
    .nav-links li:has(#theme-toggle) button,
    .nav-links li:has(#music-toggle) button {
        font-size: 1.25rem;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 50%;
        width: 44px;
        height: 44px;
        margin: 0 auto;
        display: inline-flex;
    }
    .section {
        padding: 4rem 1.25rem;
    }
    .bg-alt > .section-layout {
        padding: 4rem 1.25rem;
    }
    .hero {
        padding: 6.5rem 1.25rem 3rem 1.25rem;
        min-height: auto;
    }
    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    .hero h2 {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
        line-height: 1.3;
    }
    .hero .subtitle {
        margin-bottom: 2rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-bottom: 3rem;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.25rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding-top: 1.5rem;
    }
    .stat-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .stat-label {
        font-size: 0.7rem;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none;
    }
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .project-links {
        width: 100%;
        justify-content: flex-start;
        gap: 1.25rem;
    }
    .project-row {
        padding: 1.25rem;
    }
    .job-block {
        padding: 1.5rem;
    }
    .education-block {
        padding: 1.5rem;
    }
    .contact-form-container {
        padding: 1.75rem;
        margin-top: 2.5rem;
    }
    .form-subtitle {
        font-size: 1.5rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .footer-content-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #060608;
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* --- Custom Monospace UI Badges ("Emojis") --- */
.custom-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: rgba(30, 30, 36, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.35rem;
    border-radius: 2px;
    margin-right: 0.5rem;
    text-transform: uppercase;
    vertical-align: middle;
    letter-spacing: 0.05em;
    transition: all var(--transition);
}

.nav-links a:hover .custom-emoji {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background-color: rgba(51, 51, 61, 0.6);
}

.section-sidebar .custom-emoji {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* --- Static Grid Overlay --- */
.grid-lines-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg-main);
    background-size: 80px 80px;
    background-image: 
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.grid-lines-overlay.active {
    opacity: 1;
}

/* --- Contact Form --- */
.contact-form-container {
    margin-top: 4rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 2px;
}

.form-title {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.form-intro {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border-radius: 2px;
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--border-hover);
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Premium Greyscale Highlights --- */
.highlight-gold {
    color: var(--text-primary);
    border-bottom: 1px solid var(--text-primary);
    font-weight: 700;
}

body.light-mode .highlight-gold {
    color: #000000;
}

.highlight-tech {
    color: var(--text-primary);
    font-weight: 600;
    opacity: 0.85;
}
body.light-mode .highlight-tech {
    color: #333333;
}

.highlight-metrics {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.light-mode .highlight-metrics {
    color: #111111;
}

.highlight-core {
    color: var(--text-primary);
    font-weight: 700;
}
body.light-mode .highlight-core {
    color: #000000;
}

/* ==========================================
   WEATHER THEMES & ATMOSPHERIC STYLING
   ========================================== */

#weather-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2; /* Sits above WebGL bg, below content */
}

/* ☀️ 1. SUNNY / GOLDEN HOUR THEME */
body.weather-sunny {
    --primary-color: #f39c12;
    --background-color: #120e03;
    --bg-main: #120e03;
    --bg-secondary: #1d1607;
    --bg-card: #281e09;
    --text-primary: #fffdf5;
    --text-secondary: #e6c88b;
    --highlight-core: #ffd700;
    --border-color: rgba(255, 215, 0, 0.25);
    --border-hover: rgba(255, 215, 0, 0.6);
    --bg-nav: rgba(18, 14, 3, 0.92);
    --grid-color: rgba(255, 215, 0, 0.15);
}

body.light-mode.weather-sunny {
    --primary-color: #d97706;
    --background-color: #fffdf5;
    --bg-main: #fffdf5;
    --bg-secondary: #fff9e6;
    --bg-card: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #854d0e;
    --highlight-core: #d97706;
    --border-color: rgba(217, 119, 6, 0.25);
    --border-hover: rgba(217, 119, 6, 0.6);
    --bg-nav: rgba(255, 253, 245, 0.95);
    --grid-color: rgba(217, 119, 6, 0.12);
}

body.weather-sunny .highlight-core,
body.light-mode.weather-sunny .highlight-core {
    color: var(--highlight-core);
}

/* 🌧️ 2. RAINY / CYBER STORM THEME */
body.weather-rainy {
    --primary-color: #3498db;
    --background-color: #060c18;
    --bg-main: #060c18;
    --bg-secondary: #0a1426;
    --bg-card: #0e1c36;
    --text-primary: #e0f2fe;
    --text-secondary: #93c5fd;
    --highlight-core: #38bdf8;
    --border-color: rgba(56, 189, 248, 0.25);
    --border-hover: rgba(56, 189, 248, 0.6);
    --bg-nav: rgba(6, 12, 24, 0.92);
    --grid-color: rgba(56, 189, 248, 0.15);
}

body.light-mode.weather-rainy {
    --primary-color: #0284c7;
    --background-color: #f0f9ff;
    --bg-main: #f0f9ff;
    --bg-secondary: #e0f2fe;
    --bg-card: #ffffff;
    --text-primary: #0c4a6e;
    --text-secondary: #0369a1;
    --highlight-core: #0284c7;
    --border-color: rgba(2, 132, 199, 0.25);
    --border-hover: rgba(2, 132, 199, 0.6);
    --bg-nav: rgba(240, 249, 255, 0.95);
    --grid-color: rgba(2, 132, 199, 0.12);
}

body.weather-rainy .highlight-core,
body.light-mode.weather-rainy .highlight-core {
    color: var(--highlight-core);
}

/* ❄️ 3. SNOWY / ARCTIC FROST THEME */
body.weather-snowy {
    --primary-color: #74b9ff;
    --background-color: #07121e;
    --bg-main: #07121e;
    --bg-secondary: #0e1f32;
    --bg-card: #152b45;
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --highlight-core: #7dd3fc;
    --border-color: rgba(125, 211, 252, 0.3);
    --border-hover: rgba(125, 211, 252, 0.7);
    --bg-nav: rgba(7, 18, 30, 0.92);
    --grid-color: rgba(186, 230, 253, 0.18);
}

body.light-mode.weather-snowy {
    --primary-color: #2563eb;
    --background-color: #f8fafc;
    --bg-main: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --highlight-core: #2563eb;
    --border-color: rgba(148, 163, 184, 0.25);
    --border-hover: rgba(37, 99, 235, 0.5);
    --bg-nav: rgba(248, 250, 252, 0.95);
    --grid-color: rgba(148, 163, 184, 0.12);
}

body.weather-snowy .highlight-core,
body.light-mode.weather-snowy .highlight-core {
    color: var(--highlight-core);
}

/* 🌫️ 4. FOGGY / MISTY OVERCAST THEME */
body.weather-foggy {
    --primary-color: #95a5a6;
    --background-color: #0f1215;
    --bg-main: #0f1215;
    --bg-secondary: #171b20;
    --bg-card: #21262d;
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --highlight-core: #cbd5e1;
    --border-color: rgba(148, 163, 184, 0.25);
    --border-hover: rgba(148, 163, 184, 0.5);
    --bg-nav: rgba(15, 18, 21, 0.92);
    --grid-color: rgba(148, 163, 184, 0.12);
}

body.light-mode.weather-foggy {
    --primary-color: #475569;
    --background-color: #f1f5f9;
    --bg-main: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --highlight-core: #334155;
    --border-color: rgba(100, 116, 139, 0.25);
    --border-hover: rgba(71, 85, 105, 0.5);
    --bg-nav: rgba(241, 245, 249, 0.95);
    --grid-color: rgba(100, 116, 139, 0.12);
}

body.weather-foggy .highlight-core,
body.light-mode.weather-foggy .highlight-core {
    color: var(--highlight-core);
}

/* 🌌 5. AURORA / COSMIC NIGHT THEME */
body.weather-aurora {
    --primary-color: #2ecc71;
    --background-color: #03140e;
    --bg-main: #03140e;
    --bg-secondary: #082119;
    --bg-card: #0d3024;
    --text-primary: #f0fdf4;
    --text-secondary: #86efac;
    --highlight-core: #4ade80;
    --border-color: rgba(74, 222, 128, 0.3);
    --border-hover: rgba(74, 222, 128, 0.7);
    --bg-nav: rgba(3, 20, 14, 0.92);
    --grid-color: rgba(74, 222, 128, 0.18);
}

body.light-mode.weather-aurora {
    --primary-color: #16a34a;
    --background-color: #f0fdf4;
    --bg-main: #f0fdf4;
    --bg-secondary: #dcfce7;
    --bg-card: #ffffff;
    --text-primary: #052e16;
    --text-secondary: #15803d;
    --highlight-core: #16a34a;
    --border-color: rgba(34, 197, 94, 0.25);
    --border-hover: rgba(22, 163, 74, 0.55);
    --bg-nav: rgba(240, 253, 244, 0.95);
    --grid-color: rgba(34, 197, 94, 0.12);
}

body.weather-aurora .highlight-core {
    background: linear-gradient(135deg, #4ade80 0%, #38bdf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}

body.light-mode.weather-aurora .highlight-core {
    background: none;
    -webkit-text-fill-color: initial;
    color: #16a34a;
}

body.light-mode.birthday-theme {
    --primary-color: #d97706;
    --background-color: #fffdf0;
    --bg-main: #fffdf0;
    --bg-secondary: #fef3c7;
    --bg-card: #ffffff;
    --text-primary: #1e1b4b;
    --text-secondary: #6b21a8;
    --border-color: rgba(217, 119, 6, 0.3);
    --border-hover: rgba(217, 119, 6, 0.6);
    --highlight-gold: #d97706;
    --highlight-core: #c026d3;
    --bg-nav: rgba(255, 253, 240, 0.95);
    --grid-color: rgba(217, 119, 6, 0.12);
}


/* --- WEATHER DROPDOWN UI CONTROLS (Sharp Engineering Language) --- */
.weather-selector-wrapper {
    position: relative;
}

.weather-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 270px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-mode .weather-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
}

.weather-dropdown.open {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.weather-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.weather-dropdown-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-secondary);
}

.weather-active-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--highlight-core);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.weather-options {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.weather-opt-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.weather-opt-btn i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.weather-opt-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

body.light-mode .weather-opt-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

.weather-opt-btn.active {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

body.light-mode .weather-opt-btn.active {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.2);
    color: #000000;
}

.weather-auto-footer {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.weather-auto-btn {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.weather-auto-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

/* --- ADMIN TERMINAL MODAL STYLES --- */
.admin-secret-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.admin-secret-pill kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 0.65rem;
}

body.light-mode .admin-secret-pill kbd {
    background: rgba(0, 0, 0, 0.08);
}

.admin-secret-pill:hover {
    color: var(--highlight-core);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-overlay.active .admin-modal-container {
    transform: scale(1) translateY(0);
}

body.light-mode .admin-modal-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Header */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.admin-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 0.25rem 0.55rem;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

body.light-mode .admin-badge {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
}

.admin-title-group h3 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.admin-count-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 2px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-close-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.admin-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.admin-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.admin-btn-secondary {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.admin-btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--border-hover);
}

/* Toolbar & Filters */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.admin-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.admin-search-wrapper .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-search-wrapper input {
    width: 100%;
    padding: 0.5rem 0.85rem 0.5rem 2.2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    transition: var(--transition);
}

.admin-search-wrapper input:focus {
    outline: none;
    border-color: var(--highlight-core);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.admin-filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-filter-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.admin-filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.admin-filter-btn.active {
    background: var(--bg-secondary);
    border-color: var(--highlight-core);
    color: var(--highlight-core);
}

/* Body & Message List */
.admin-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 320px;
    max-height: 55vh;
}

.admin-loading-state,
.admin-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: center;
}

.admin-empty-state i {
    font-size: 2.2rem;
    opacity: 0.5;
}

/* Message Item Card */
.admin-msg-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
}

.admin-msg-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.admin-msg-card.unread {
    border-left: 3px solid #ffd700;
    background: rgba(255, 215, 0, 0.03);
}

body.light-mode .admin-msg-card.unread {
    border-left: 3px solid #d97706;
    background: rgba(217, 119, 6, 0.04);
}

.admin-msg-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-sender-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-sender-name {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-unread-dot {
    width: 7px;
    height: 7px;
    background: #ffd700;
    border-radius: 50%;
    display: inline-block;
}

body.light-mode .admin-unread-dot {
    background: #d97706;
}

.admin-sender-email {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--highlight-core);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-sender-email:hover {
    text-decoration: underline;
}

.admin-msg-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-time-stamp {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.admin-status-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    letter-spacing: 0.04em;
}

.admin-status-tag.status-unread {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

body.light-mode .admin-status-tag.status-unread {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.4);
    color: #d97706;
}

.admin-status-tag.status-read {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.admin-msg-body {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-msg-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.3rem;
}

.admin-action-btn {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.admin-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.admin-action-btn.btn-danger:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

/* Footer */
.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-footer-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.admin-shortcut-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 2px;
    border: 1px solid var(--border-color);
}

body.light-mode .admin-shortcut-hint kbd {
    background: rgba(0, 0, 0, 0.08);
}

/* --- MOBILE, TABLET & PC RESPONSIVE ADAPTATIONS FOR ADMIN CONSOLE --- */
@media (max-width: 640px) {
    .admin-modal-overlay {
        padding: 0.5rem;
    }

    .admin-modal-container {
        max-height: 94vh;
        border-radius: 8px;
    }

    .admin-header {
        padding: 0.85rem 1rem;
    }

    .admin-title-group {
        gap: 0.4rem;
    }

    .admin-title-group h3 {
        font-size: 0.95rem;
    }

    .admin-header-actions {
        gap: 0.35rem;
    }

    .admin-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .admin-toolbar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .admin-search-wrapper {
        min-width: 100%;
    }

    .admin-filter-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .admin-filter-btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.7rem;
        white-space: nowrap;
        min-height: 38px;
    }

    .admin-body {
        padding: 0.85rem 1rem;
        gap: 0.85rem;
        max-height: 60vh;
    }

    .admin-msg-card {
        padding: 0.85rem 1rem;
    }

    .admin-msg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .admin-msg-meta {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.2rem;
    }

    .admin-msg-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.4rem;
    }

    .admin-action-btn {
        padding: 0.45rem 0.65rem;
        font-size: 0.7rem;
        min-height: 38px;
        flex: 1 1 auto;
        justify-content: center;
    }

    .admin-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

@media (min-width: 641px) and (max-width: 991px) {
    .admin-modal-overlay {
        padding: 1rem;
    }

    .admin-modal-container {
        max-height: 88vh;
    }

    .admin-msg-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-action-btn {
        padding: 0.4rem 0.65rem;
        min-height: 36px;
    }
}

/* --- MUSIC SELECTOR DROPDOWN STYLES --- */
.music-selector-wrapper {
    position: relative;
}

.music-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 330px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: dropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-mode .music-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0, 0, 0, 0.08);
}

.music-dropdown.open {
    display: block;
}

.music-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-color);
}

/* Tab Switcher */
.music-tab-nav {
    display: flex;
    gap: 0.35rem;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.music-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.music-tab-btn:hover {
    color: var(--text-primary);
}

.music-tab-btn.active {
    background: var(--bg-card);
    color: var(--highlight-core);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.light-mode .music-tab-btn.active {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.music-tab-btn.spotify-tab.active {
    color: #1DB954;
}

.music-tab-btn.spotify-tab i {
    font-size: 0.85rem;
}

.music-tab-btn.spotify-tab.active i {
    color: #1DB954;
}

.music-tab-pane {
    display: none;
}

.music-tab-pane.active {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

/* Spotify Tab Styles */
.spotify-embed-wrapper {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.65rem;
    background: #000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.spotify-embed-wrapper iframe {
    display: block;
    border: 0;
}

.spotify-curated-section {
    margin-bottom: 0.65rem;
}

.spotify-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.spotify-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.spotify-label i {
    color: #1DB954;
}

.spotify-open-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #1DB954;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: opacity 0.2s ease;
}

.spotify-open-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Genre Filter Chips */
.spotify-genre-filters {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.spotify-genre-chip {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.spotify-genre-chip:hover {
    color: var(--text-primary);
    border-color: rgba(29, 185, 84, 0.4);
}

.spotify-genre-chip.active {
    background: #1DB954;
    border-color: #1DB954;
    color: #000000;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(29, 185, 84, 0.25);
}

.spotify-genre-chip i {
    font-size: 0.62rem;
}

/* Spotify Track Items List */
.spotify-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 175px;
    overflow-y: auto;
    padding-right: 3px;
}

.spotify-items-list::-webkit-scrollbar {
    width: 4px;
}

.spotify-items-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.spotify-items-list::-webkit-scrollbar-thumb:hover {
    background: #1DB954;
}

.spotify-track-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    width: 100%;
}

.spotify-track-item.hidden-by-genre {
    display: none !important;
}

.spotify-track-item .item-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.spotify-track-item .item-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.spotify-track-item .item-title {
    font-family: var(--font-sans);
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-track-item .item-sub {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-track-item .item-badge {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-featured {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.badge-phonk {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-electro {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-focus {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.spotify-track-item:hover {
    background: rgba(29, 185, 84, 0.1);
    border-color: rgba(29, 185, 84, 0.4);
    transform: translateX(2px);
}

.spotify-track-item:hover .item-icon {
    color: #1DB954;
}

.spotify-track-item.active {
    background: rgba(29, 185, 84, 0.16);
    border-color: #1DB954;
}

.spotify-track-item.active .item-icon {
    color: #1DB954;
}

.spotify-track-item.active .item-title {
    color: #1DB954;
}

.spotify-custom-url-box {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--border-color);
}

.spotify-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.15rem 0.25rem 0.15rem 0.5rem;
    gap: 0.35rem;
    transition: border-color 0.2s ease;
}

.spotify-input-wrapper:focus-within {
    border-color: #1DB954;
    box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.3);
}

.spotify-input-icon {
    color: #1DB954;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.spotify-custom-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-primary);
    min-width: 0;
}

.spotify-custom-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.65;
    font-size: 0.7rem;
}

.spotify-custom-load-btn {
    background: #1DB954;
    color: #000;
    border: none;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.spotify-custom-load-btn:hover {
    background: #1ed760;
    transform: scale(1.08);
}

.spotify-helper-text {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    text-align: center;
    opacity: 0.8;
}

.music-dropdown-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--text-primary);
}

.music-dropdown-title i {
    color: var(--highlight-core);
    font-size: 0.95rem;
}

.fa-spin-slow {
    animation: fa-spin 6s linear infinite;
}

.music-now-playing-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--highlight-core);
    font-weight: 700;
    letter-spacing: 0.04em;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-playlist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.2rem;
    margin-bottom: 0.85rem;
}

.music-playlist::-webkit-scrollbar {
    width: 4px;
}

.music-playlist::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.music-track-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.music-track-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.music-track-btn.active {
    background: var(--bg-secondary);
    border-color: var(--highlight-core);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.music-track-btn .track-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
}

.music-track-btn.active .track-icon {
    color: var(--highlight-core);
}

.music-track-btn .track-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    overflow: hidden;
}

.music-track-btn .track-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-btn.active .track-title {
    color: var(--highlight-core);
}

.music-track-btn .track-artist {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.music-track-btn .track-badge {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 2px;
}

.music-controls-footer {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
}

.music-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-progress-wrapper .time-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: center;
}

.music-seek-bar,
.music-volume-bar {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.music-seek-bar::-webkit-slider-thumb,
.music-volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--highlight-core);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.music-seek-bar::-webkit-slider-thumb:hover,
.music-volume-bar::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.music-btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
    box-sizing: border-box;
}

.music-ctrl-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.music-ctrl-btn:hover {
    border-color: var(--highlight-core);
    color: var(--highlight-core);
    transform: translateY(-1px);
}

.music-ctrl-btn.play-btn {
    background: var(--highlight-core);
    border-color: var(--highlight-core);
    color: #000000;
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

body.light-mode .music-ctrl-btn.play-btn {
    color: #ffffff;
}

.music-ctrl-btn.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.music-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 85px;
    max-width: 85px;
    flex-shrink: 0;
    min-width: 0;
    box-sizing: border-box;
}

.music-ctrl-btn.mini {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    border: none;
    background: transparent;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .music-dropdown {
        right: -10px;
        width: min(300px, calc(100vw - 20px));
        box-sizing: border-box;
    }
}

/* ==========================================
   HEADER VIEW SWITCHER PILL & SANDBOX TAB
   ========================================== */
.view-switcher-pill {
    display: inline-flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 20px;
    margin: 0 0.75rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    justify-self: center;
}

.view-pill-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.view-pill-btn i {
    font-size: 0.8rem;
}

.view-pill-btn:hover {
    color: var(--text-primary);
}

.view-pill-btn.active {
    background: var(--bg-main);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

.view-pill-btn.sandbox-glow.active {
    border-color: var(--highlight-core);
    color: var(--highlight-core);
}

.pill-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--highlight-gold);
    color: #000000;
    letter-spacing: 0.5px;
    margin-left: 0.15rem;
}

/* Standalone Sandbox Tab View Mode Styles */
.sandbox-dedicated-header {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.view-mode-sandbox .sandbox-dedicated-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dedicated-header-info h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.25rem 0;
}

.dedicated-header-info p {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.dedicated-badge {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--highlight-gold);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Hide other non-sandbox main sections when in Standalone Sandbox Tab View */
body.view-mode-sandbox section:not(#playground) {
    display: none !important;
}

body.view-mode-sandbox #playground {
    padding-top: 5rem;
    min-height: calc(100vh - 80px);
}

body.view-mode-sandbox #playground .section-layout {
    display: block;
}

body.view-mode-sandbox #playground .section-sidebar {
    display: none;
}

body.view-mode-sandbox #playground .section-main {
    width: 100%;
}

body.view-mode-sandbox .sandbox-container {
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    border-color: var(--highlight-core);
}

@media (max-width: 768px) {
    .view-switcher-pill {
        margin: 0 0.25rem;
        padding: 2px;
    }
    .view-pill-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.725rem;
    }
    .pill-badge {
        display: none;
    }
}

/* ==========================================
   INTERACTIVE SANDBOX / PLAYGROUND SECTION
   ========================================== */
.sandbox-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.sandbox-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.sandbox-tab-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: var(--transition);
}

.sandbox-tab-btn i {
    font-size: 0.85rem;
    color: var(--highlight-core);
}

.sandbox-tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.sandbox-tab-btn.active {
    background: var(--bg-main);
    color: var(--text-primary);
    border-color: var(--highlight-core);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sandbox-tab-btn.active i {
    color: var(--highlight-gold);
}

.sandbox-content {
    display: none;
    animation: sandboxFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sandbox-content.active {
    display: block;
}

@keyframes sandboxFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.sandbox-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.panel-info h4 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.panel-badge {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.preset-triggers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.preset-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.preset-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.725rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover, .preset-btn.active {
    background: var(--bg-main);
    border-color: var(--highlight-core);
    color: var(--highlight-core);
}

/* AI Studio Controls & Output Grid */
.sandbox-ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 868px) {
    .sandbox-ai-grid {
        grid-template-columns: 1fr;
    }
}

.sandbox-ai-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sandbox-select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.sandbox-select:focus {
    border-color: var(--highlight-core);
}

.sandbox-slider {
    width: 100%;
    accent-color: var(--highlight-core);
    cursor: pointer;
}

.sandbox-textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.825rem;
    line-height: 1.45;
    outline: none;
    resize: vertical;
    transition: var(--transition);
    box-sizing: border-box;
}

.sandbox-textarea:focus {
    border-color: var(--highlight-core);
}

.ai-action-row {
    display: flex;
    gap: 0.5rem;
}

.sandbox-ai-output-box {
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.output-header {
    background: #121215;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.output-title {
    color: #e4e4e7;
    font-family: var(--font-mono);
    font-size: 0.775rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.output-metrics {
    display: flex;
    gap: 0.5rem;
}

.metric-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.output-content {
    padding: 0.85rem;
    color: #22c55e;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    flex-grow: 1;
    margin: 0;
    overflow-y: auto;
    max-height: 280px;
}

.output-footer {
    padding: 0.5rem 0.85rem;
    background: #121215;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.725rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mini-btn:hover {
    background: var(--bg-main);
    color: var(--text-primary);
    border-color: var(--highlight-core);
}

.mini-btn.active {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--highlight-gold);
    color: var(--highlight-gold);
    font-weight: 600;
}

.physics-toggles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.status-indicator-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.idle { background: #eab308; }
.status-dot.active { background: #22c55e; box-shadow: 0 0 8px #22c55e; }

/* Physics Particles Sandbox Layout */
.sandbox-physics-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 868px) {
    .sandbox-physics-layout {
        grid-template-columns: 1fr;
    }
}

.physics-canvas-wrapper {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #050508;
    height: 320px;
}

#sandbox-physics-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.canvas-overlay-stats {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: flex;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #a1a1aa;
    pointer-events: none;
}

.canvas-overlay-stats strong {
    color: #ffffff;
}

.canvas-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.675rem;
    color: #d4d4d8;
    pointer-events: none;
}

.physics-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-theme-grid {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.theme-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.theme-chip:hover, .theme-chip.active {
    border-color: var(--highlight-core);
    transform: scale(1.15);
}

.physics-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn.mini {
    padding: 0.4rem 0.75rem;
    font-size: 0.775rem;
}

/* Terminal Window Styles */
.terminal-window {
    background: #0c0c0e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    font-family: var(--font-mono);
}

.terminal-header-bar {
    background: #18181b;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.term-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.term-title {
    font-size: 0.725rem;
    color: #a1a1aa;
}

.term-mini-btn {
    background: transparent;
    border: none;
    color: #71717a;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.term-mini-btn:hover {
    color: #ef4444;
}

.terminal-body {
    padding: 1rem;
    min-height: 240px;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #e4e4e7;
}

.term-line {
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.term-cmd-highlight {
    color: #38bdf8;
    font-weight: 600;
}

.terminal-quick-cmds {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.term-quick-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.term-quick-btn:hover {
    background: var(--highlight-core);
    color: #000000;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #121215;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.term-prompt {
    color: #22c55e;
    font-weight: bold;
    margin-right: 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.term-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    width: 100%;
}

/* Audio Synthesizer Layout */
.synth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 868px) {
    .synth-layout {
        grid-template-columns: 1fr;
    }
}

.synth-visualizer-card {
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 240px;
}

#synth-canvas {
    width: 100%;
    height: 160px;
    display: block;
}

.synth-freq-display {
    margin-top: 0.75rem;
    text-align: center;
    font-family: var(--font-mono);
}

.freq-label {
    font-size: 0.75rem;
    color: #a1a1aa;
    display: block;
}

.synth-freq-display strong {
    font-size: 1.25rem;
    color: var(--highlight-gold);
}

.wave-label {
    display: block;
    font-size: 0.7rem;
    color: #71717a;
}

.synth-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.synth-presets-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.synth-preset-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.synth-preset-btn i {
    font-size: 1.1rem;
    color: var(--highlight-core);
}

.synth-preset-btn strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.825rem;
    color: var(--text-primary);
}

.synth-preset-btn span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.synth-preset-btn:hover, .synth-preset-btn.active {
    border-color: var(--highlight-core);
    background: var(--bg-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.synth-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.synth-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 130px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================
   FREELANCE PROJECT ESTIMATOR TAB STYLES
   ========================================== */
.estimator-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .estimator-grid {
        grid-template-columns: 1fr;
    }
}

.estimator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.est-addons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

@media (max-width: 600px) {
    .est-addons-grid {
        grid-template-columns: 1fr;
    }
}

.est-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all var(--transition);
    user-select: none;
}

.est-checkbox-item:hover {
    border-color: var(--highlight-core);
    background: var(--bg-main);
}

.est-checkbox-item input[type="checkbox"] {
    accent-color: var(--highlight-core);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.est-checkbox-item span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.est-checkbox-item span i {
    color: var(--highlight-core);
    font-size: 0.85rem;
}

.estimator-output-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 90px;
}

.est-summary-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.est-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--highlight-gold);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.est-summary-header h3 {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.25rem 0;
}

.est-subtitle {
    font-size: 0.775rem;
    color: var(--text-secondary);
}

.est-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.est-metric-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.est-metric-box i {
    color: var(--highlight-core);
    font-size: 1rem;
}

.est-metric-box strong {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.est-metric-box span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.est-breakdown-list h5 {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.est-breakdown-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.est-breakdown-list li {
    font-size: 0.775rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1rem;
}

.est-breakdown-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--highlight-core);
    font-weight: bold;
}

/* ==========================================
   INTERACTIVE AI QUOTE GENERATOR CARD
   ========================================== */
.ai-quote-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.ai-quote-card:hover {
    border-color: var(--highlight-core);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.ai-quote-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--highlight-core), var(--highlight-gold));
}

.ai-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ai-quote-badge {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-quote-refresh-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.725rem;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition);
}

.ai-quote-refresh-btn:hover {
    background: var(--bg-main);
    color: var(--highlight-core);
    border-color: var(--highlight-core);
}

.ai-quote-body {
    position: relative;
    padding: 0.25rem 0;
}

.quote-icon-left {
    color: var(--border-color);
    font-size: 1.1rem;
    margin-right: 0.4rem;
    vertical-align: top;
    opacity: 0.7;
}

#ai-quote-text {
    display: inline;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#ai-quote-text.fade-out {
    opacity: 0;
    transform: translateY(-4px);
}

.ai-quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.725rem;
}

.ai-quote-author {
    color: var(--highlight-gold);
    font-weight: 600;
}

.ai-quote-click-hint {
    color: var(--text-secondary);
    font-size: 0.675rem;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .ai-quote-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.est-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.est-card-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
}

/* ==========================================
   PROJECT DEEP CASE STUDY EXPANDABLE STYLES
   ========================================== */
.project-deep-study {
    margin-top: 1.25rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.85rem;
    border-radius: 4px;
    transition: all var(--transition);
}

.project-study-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--highlight-core);
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    user-select: none;
    transition: all var(--transition);
}

.project-study-toggle::-webkit-details-marker {
    display: none;
}

.project-study-toggle:hover {
    background: var(--bg-card);
    border-color: var(--highlight-core);
    color: var(--text-primary);
}

.project-study-toggle .toggle-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-study-toggle .toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.project-deep-study[open] .project-study-toggle {
    background: var(--bg-card);
    border-color: var(--highlight-gold);
    color: var(--highlight-gold);
    margin-bottom: 1rem;
}

.project-deep-study[open] .toggle-arrow {
    transform: rotate(180deg);
    color: var(--highlight-gold);
}

.study-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    animation: fadeInStudy 0.35s ease forwards;
}

@keyframes fadeInStudy {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.study-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.study-block-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--highlight-core);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.study-block-title i {
    font-size: 0.85rem;
}

.study-block p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.study-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.study-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    padding-left: 1.25rem;
}

.study-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--highlight-gold);
    font-size: 0.9rem;
}

.study-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.study-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.study-metric-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.study-metric-label {
    font-family: var(--font-mono);
    font-size: 0.675rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.study-metric-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--highlight-gold);
}

/* ==========================================================================
   RESUME & PORTFOLIO PDF DOWNLOAD HUB & MODAL
   ========================================================================== */

/* Navbar Resume / CV Trigger Button */
.nav-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: var(--highlight-gold);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-resume-btn:hover {
    background: var(--highlight-gold);
    color: #050505;
    border-color: var(--highlight-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

body.light-mode .nav-resume-btn {
    background: rgba(180, 83, 9, 0.08);
    border-color: rgba(180, 83, 9, 0.3);
    color: #b45309;
}

body.light-mode .nav-resume-btn:hover {
    background: #b45309;
    color: #ffffff;
    border-color: #b45309;
}

/* Executive Profile Resume Download Banner */
.resume-download-banner {
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04) 0%, rgba(20, 25, 35, 0.8) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

body.light-mode .resume-download-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(180, 83, 9, 0.25);
}

.resume-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.banner-title-group h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.35rem 0;
}

.banner-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 650px;
    line-height: 1.5;
}

.resume-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--highlight-gold);
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

/* Quick Cards Grid */
.resume-quick-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.resume-quick-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.resume-quick-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.quick-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.quick-card-content h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem 0;
}

.quick-card-content p {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 0.85rem 0;
}

.quick-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.quick-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.quick-action-btn.primary {
    background: var(--highlight-gold);
    color: #050505;
    border-color: var(--highlight-gold);
}

.quick-action-btn.primary:hover {
    background: #ffea70;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* ==========================================================================
   RESUME & PORTFOLIO PDF MODAL
   ========================================================================== */
.resume-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.resume-modal-container {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 980px;
    height: 92vh;
    max-height: 950px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.1);
    overflow: hidden;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-modal-overlay.active .resume-modal-container {
    transform: scale(1) translateY(0);
}

body.light-mode .resume-modal-container {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
}

/* Header */
.resume-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.resume-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.resume-modal-badge {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 700;
    color: var(--highlight-gold);
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.resume-title-group h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.resume-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.resume-theme-switch-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px;
    gap: 2px;
}

.resume-theme-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.15s ease;
}

.resume-theme-btn.active {
    background: var(--highlight-gold);
    color: #050505;
}

.resume-action-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.775rem;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Toolbar */
.resume-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.resume-doc-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.resume-doc-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.775rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.resume-doc-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.resume-doc-tab.active {
    color: var(--highlight-gold);
    border-color: var(--highlight-gold);
    background: rgba(255, 215, 0, 0.08);
    font-weight: 600;
}

.tab-pill {
    font-size: 0.625rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 2px;
    color: inherit;
}

.resume-toolbar-meta {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    color: var(--text-secondary);
}

/* Scrollable Viewport */
.resume-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #080c10;
    display: flex;
    justify-content: center;
}

body.light-mode .resume-modal-body {
    background: #e2e8f0;
}

/* The Paper Sheet (A4 / Letter Document Canvas) */
.pdf-paper-sheet {
    width: 100%;
    max-width: 820px;
    min-height: 1050px;
    padding: 2.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Dark Theme Sheet */
.pdf-paper-sheet.dark-theme {
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-paper-sheet.dark-theme .pdf-name {
    color: #ffffff;
}

.pdf-paper-sheet.dark-theme .pdf-title {
    color: var(--highlight-gold);
}

.pdf-paper-sheet.dark-theme .pdf-sec-title {
    color: var(--highlight-gold);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.pdf-paper-sheet.dark-theme .pdf-item-title {
    color: #ffffff;
}

.pdf-paper-sheet.dark-theme .pdf-item-date {
    color: #94a3b8;
}

.pdf-paper-sheet.dark-theme .pdf-summary-text {
    color: #e2e8f0;
}

.pdf-paper-sheet.dark-theme a,
.pdf-paper-sheet.dark-theme .pdf-contact-item a,
.pdf-paper-sheet.dark-theme .pdf-contact-grid a {
    color: #58a6ff !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    font-weight: 600;
}

.pdf-paper-sheet.dark-theme a:hover,
.pdf-paper-sheet.dark-theme .pdf-contact-item a:hover {
    color: #79c0ff !important;
}

.pdf-paper-sheet.dark-theme .pdf-matrix-row {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--highlight-gold);
}

.pdf-paper-sheet.dark-theme .pdf-metric-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pdf-paper-sheet.dark-theme .pdf-callout {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-left: 3px solid var(--highlight-gold);
}

.pdf-paper-sheet.dark-theme .pdf-callout-title {
    color: var(--highlight-gold);
}

.pdf-paper-sheet.dark-theme .pdf-callout-desc {
    color: #cbd5e1;
}

/* Light / Recruiter Paper White Sheet */
.pdf-paper-sheet.light-theme {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pdf-paper-sheet.light-theme .pdf-name {
    color: #0f172a;
}

.pdf-paper-sheet.light-theme .pdf-title {
    color: #b45309;
    font-weight: 700;
}

.pdf-paper-sheet.light-theme .pdf-contact-grid {
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-paper-sheet.light-theme a,
.pdf-paper-sheet.light-theme .pdf-contact-item a,
.pdf-paper-sheet.light-theme .pdf-contact-grid a {
    color: #0969da !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    font-weight: 600;
}

.pdf-paper-sheet.light-theme a:hover,
.pdf-paper-sheet.light-theme .pdf-contact-item a:hover {
    color: #0550ae !important;
}

.pdf-paper-sheet.light-theme .pdf-sec-title {
    color: #0f172a;
    border-bottom: 2px solid #b45309;
}

.pdf-paper-sheet.light-theme .pdf-item-title {
    color: #0f172a;
    font-weight: 700;
}

.pdf-paper-sheet.light-theme .pdf-item-date {
    color: #475569;
}

.pdf-paper-sheet.light-theme .pdf-summary-text {
    color: #1f2937;
}

.pdf-paper-sheet.light-theme .pdf-item-sub {
    color: #4b5563;
}

.pdf-paper-sheet.light-theme .pdf-item-desc {
    color: #374151;
}

.pdf-paper-sheet.light-theme .pdf-bullet-list li {
    color: #374151;
}

.pdf-paper-sheet.light-theme .pdf-matrix-row {
    background: #f8fafc;
    border-left: 3px solid #b45309;
    color: #1f2937;
}

.pdf-paper-sheet.light-theme .pdf-metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.pdf-paper-sheet.light-theme .m-val {
    color: #b45309;
}

.pdf-paper-sheet.light-theme .m-lbl {
    color: #475569;
}

.pdf-paper-sheet.light-theme .pdf-callout {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 3px solid #b45309;
}

.pdf-paper-sheet.light-theme .pdf-callout-title {
    color: #92400e;
}

.pdf-paper-sheet.light-theme .pdf-callout-desc {
    color: #374151;
}

/* Document Internal Elements */
.pdf-doc-view {
    display: none;
}

.pdf-doc-view.active {
    display: block;
}

.pdf-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.pdf-name {
    font-family: var(--font-sans);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem 0;
}

.pdf-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.pdf-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.775rem;
}

.pdf-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pdf-contact-item a {
    color: #58a6ff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.pdf-contact-item a:hover {
    color: #79c0ff;
    text-decoration: underline;
}

/* Sections */
.pdf-section {
    margin-bottom: 1.35rem;
}

.pdf-sec-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pdf-summary-text {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.pdf-item {
    margin-bottom: 0.9rem;
}

.pdf-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.2rem;
}

.pdf-item-title {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    flex: 1 1 auto;
    min-width: 0;
}

.pdf-item-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
    margin-left: auto;
}

.pdf-item-sub {
    font-family: var(--font-mono);
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin: 0 0 0.35rem 0;
}

.pdf-item-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.pdf-bullet-list {
    margin: 0.35rem 0 0 0;
    padding-left: 1.25rem;
}

.pdf-bullet-list li {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

/* Skill Matrix Grid in PDF */
.pdf-matrix-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pdf-matrix-row {
    font-size: 0.825rem;
    line-height: 1.45;
    padding: 0.4rem 0.65rem;
    border-radius: 0 4px 4px 0;
}

.pdf-edu-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pdf-edu-item {
    margin-bottom: 0.25rem;
}

/* Callout / Live Portfolio Banner */
.pdf-callout {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.15rem;
}

.pdf-callout-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pdf-callout-url {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
}

.pdf-callout-desc {
    font-size: 0.825rem;
    line-height: 1.5;
    margin: 0;
}

/* Case Studies Layout */
.pdf-case-header {
    margin-bottom: 0.5rem;
}

.pdf-case-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.pdf-case-header h2 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.pdf-case-summary {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.85rem 0;
}

.pdf-case-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.pdf-metric-box {
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pdf-metric-box .m-val {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 800;
    color: var(--highlight-gold);
}

.pdf-metric-box .m-lbl {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.pdf-case-body h4 {
    font-size: 0.875rem;
    margin: 0 0 0.35rem 0;
}

/* Footer */
.resume-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.725rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   PRINT SPECIFIC STYLESHEET
   ========================================================================== */
@media print {
    body * {
        visibility: hidden;
    }

    #resume-pdf-modal,
    #resume-pdf-modal * {
        visibility: visible;
    }

    #resume-pdf-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        opacity: 1 !important;
    }

    .resume-modal-container {
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        height: auto !important;
        background: transparent !important;
        transform: none !important;
    }

    .resume-modal-header,
    .resume-modal-toolbar,
    .resume-modal-footer {
        display: none !important;
    }

    .resume-modal-body {
        background: transparent !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .pdf-paper-sheet {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        padding: 0.5in !important;
        background: #ffffff !important;
        color: #111827 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .pdf-name {
        color: #0f172a !important;
    }

    .pdf-title {
        color: #b45309 !important;
    }

    .pdf-sec-title {
        color: #0f172a !important;
        border-bottom: 2px solid #b45309 !important;
    }

    .pdf-item-title {
        color: #0f172a !important;
    }

    .pdf-item-date {
        color: #475569 !important;
        font-weight: 600 !important;
    }

    .pdf-contact-item a,
    .pdf-paper-sheet a {
        color: #0969da !important;
        text-decoration: underline !important;
        text-underline-offset: 2px !important;
        font-weight: 600 !important;
    }

    .pdf-matrix-row {
        background: #f8fafc !important;
        border-left: 3px solid #b45309 !important;
        color: #1f2937 !important;
    }

    .pdf-metric-box {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
    }

    .pdf-metric-box .m-val {
        color: #b45309 !important;
    }

    .pdf-callout {
        background: #fffbeb !important;
        border: 1px solid #fde68a !important;
        border-left: 3px solid #b45309 !important;
    }

    .pdf-callout-title {
        color: #92400e !important;
    }

    .pdf-callout-desc {
        color: #374151 !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .resume-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .resume-modal-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pdf-paper-sheet {
        padding: 1.25rem;
    }

    .pdf-case-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .pdf-item-header {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }
    
    .pdf-item-date {
        font-size: 0.75rem;
    }
}

/* --- Ultra-Small Screens & Extra Fixes --- */
@media (max-width: 480px) {
    .nav-content {
        padding: 0 0.75rem;
    }
    .view-switcher-pill {
        margin: 0 0.15rem;
        padding: 1px;
    }
    .view-switcher-pill span {
        display: none;
    }
    .view-pill-btn {
        padding: 0.35rem 0.55rem;
    }
    .logo-img {
        width: 26px;
        height: 26px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .stat-item {
        border-bottom: 1px solid var(--border-color);
        text-align: left;
        padding: 0.5rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .stat-item:last-child {
        border-bottom: none;
    }
    .stat-value {
        font-size: 1.1rem;
    }
    .hero h1 {
        font-size: 1.75rem;
    }
    .hero h2 {
        font-size: 1.1rem;
    }
    .section-sidebar h2 {
        font-size: 1.75rem;
    }
    .lead-text {
        font-size: 1.05rem;
    }
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pdf-paper-sheet {
        padding: 1.25rem !important;
    }
}






