/* ===========================================
   MENU BAR STYLES
   =========================================== */
.menu-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-home {
    color: inherit;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.menu-home:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.menu-divider {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin: 0 4px;
}

.menu-theme {
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-theme label {
    color: inherit;
    font-size: 14px;
    line-height: 1;
    margin: 0;
}

.menu-theme select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    cursor: pointer;
    min-width: 120px;
}

.menu-theme select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
    background: var(--bg-primary);
}

.menu-theme select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 4px 8px;
}

/* ===========================================
   CSS CUSTOM PROPERTIES (SOLARIZED DARK THEME)
   =========================================== */
:root {
    /* Solarized Dark Base Colors */
    --base03: #002b36;    /* background */
    --base02: #073642;    /* background highlights */
    --base01: #586e75;    /* comments / secondary content */
    --base00: #657b83;    /* body text / default code / primary content */
    --base0: #839496;     /* primary content */
    --base1: #93a1a1;     /* optional emphasized content */
    --base2: #eee8d5;     /* background */
    --base3: #fdf6e3;     /* background highlights */
    
    /* Solarized Dark Accent Colors */
    --yellow: #b58900;
    --orange: #cb4b16;
    --red: #dc322f;
    --magenta: #d33682;
    --violet: #6c71c4;
    --blue: #268bd2;
    --cyan: #2aa198;
    --green: #859900;
    
    /* Theme Application */
    --bg-primary: var(--base03);
    --bg-secondary: var(--base02);
    --accent-primary: var(--blue);
    --accent-secondary: var(--cyan);
    --accent-highlight: var(--yellow);
    --text-primary: var(--base0);
    --text-secondary: var(--base00);
    --text-muted: var(--base01);
    --text-emphasis: var(--base1);
    --border-color: var(--base02);
    --link-color: var(--cyan);
    --link-hover: var(--blue);
}

/* ===========================================
   BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', monospace;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--base03) 0%, var(--base02) 50%, var(--base03) 100%);
    min-height: 100vh;
}

/* ===========================================
   LAYOUT COMPONENTS
   =========================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.header {
    background: linear-gradient(135deg, var(--base02) 0%, var(--base03) 100%);
    color: var(--text-emphasis);
    padding: 80px 40px 40px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--accent-primary);
}

.content {
    padding: 40px;
    background: var(--bg-primary);
}

/* ===========================================
   HEADER COMPONENTS
   =========================================== */

.name {
    font-size: 3.5em;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.title {
    font-size: 1.4em;
    opacity: 0.9;
    font-weight: 300;
}

.contact-info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9em;
}

.contact-info a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: var(--link-hover);
}

/* ===========================================
   SECTION COMPONENTS
   =========================================== */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8em;
    color: var(--accent-highlight);
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.5px;
}

/* ===========================================
   CONTENT COMPONENTS
   =========================================== */
.summary {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
}

/* Job entries */
.job {
    margin-bottom: 35px;
    border-left: 3px solid var(--accent-primary);
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 0 4px 4px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}


.company {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.position {
    font-size: 1.1em;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.duration {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
}

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

.job-description li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.job-description li:before {
    content: "›";
    color: var(--accent-highlight);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.highlight {
    font-weight: 600;
    color: var(--green);
}

/* Card components */
.patents-list, .projects-list {
    list-style: none;
}

.patents-list li, .projects-list li {
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-secondary);
    border-radius: 0 4px 4px 0;
    border: 1px solid var(--border-color);
}

.project-name {
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 5px;
}

.project-link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 4px;
    border-left: 3px solid var(--violet);
    border: 1px solid var(--border-color);
}

.skill-category h4 {
    color: var(--violet);
    margin-bottom: 10px;
    font-size: 1.1em;
    font-family: 'Fira Code', monospace;
}

/* Education */
.education {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 4px;
    border-left: 3px solid var(--magenta);
    border: 1px solid var(--border-color);
}

.school {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--magenta);
}

.degree {
    color: var(--accent-primary);
    font-weight: 600;
    margin: 5px 0;
}

/* Achievements */
.achievements-list {
    list-style: none;
}

.achievements-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.achievements-list li:before {
    content: "★";
    color: var(--yellow);
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    .header {
        padding: 70px 20px 30px;
    }
    
    .menu-bar {
        position: static;
        margin-bottom: 15px;
        background: rgba(0, 0, 0, 0.3);
        justify-self: center;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .menu-divider {
        display: none;
    }
    
    .menu-home, .menu-theme {
        margin: 4px 0;
    }
    
    .name {
        font-size: 2.5em;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    :root {
        /* Solarized Light for print */
        --bg-primary: var(--base3);
        --bg-secondary: var(--base2);
        --accent-primary: var(--blue);
        --accent-secondary: var(--cyan);
        --accent-highlight: var(--yellow);
        --text-primary: var(--base00);
        --text-secondary: var(--base01);
        --text-muted: var(--base1);
        --text-emphasis: var(--base01);
        --border-color: var(--base1);
        --link-color: var(--cyan);
        --link-hover: var(--blue);
        --yellow: var(--orange);
        --green: var(--green);
        --orange: var(--orange);
        --violet: var(--violet);
        --magenta: var(--magenta);
    }
    
    body {
        background: white;
        color: var(--text-primary);
    }
    
    .container {
        box-shadow: none;
        max-width: none;
        background: white;
    }
    
    .content {
        background: white;
    }
    
    .header {
        background: #2c3e50;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .home-link {
        display: none;
    }
    
    .section-title {
        text-shadow: none;
    }
    
    .achievements-list li:before {
        text-shadow: none;
    }
}

/* ===========================================
   GLITCH TRANSITION EFFECTS
   =========================================== */
.glitch-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    display: none;
}

.glitch-transition.active {
    display: block;
    animation: glitchOut 0.8s forwards;
}

@keyframes glitchOut {
    0% {
        filter: contrast(1) brightness(1);
        transform: scale(1);
    }
    10% {
        filter: contrast(2) brightness(1.5) hue-rotate(180deg);
        transform: scale(1.02) translateX(-2px);
    }
    20% {
        filter: contrast(0.5) brightness(2) hue-rotate(90deg);
        transform: scale(0.98) translateY(2px);
    }
    30% {
        filter: contrast(3) brightness(0.5) hue-rotate(270deg);
        transform: scale(1.01) translateX(2px);
    }
    40% {
        filter: contrast(1) brightness(1) hue-rotate(0deg);
        transform: scale(1) skewX(10deg);
    }
    50% {
        filter: contrast(2) brightness(0.8) saturate(0);
        transform: scale(1.05) skewX(-10deg);
    }
    60% {
        filter: contrast(0.5) brightness(1.2) saturate(3);
        transform: scale(0.95);
    }
    70% {
        filter: contrast(1) brightness(0.4);
        transform: scale(1);
    }
    80% {
        filter: contrast(1) brightness(0.2);
        transform: scale(1);
    }
    90% {
        filter: contrast(1) brightness(0.1);
        transform: scale(1);
    }
    100% {
        filter: contrast(1) brightness(0);
        transform: scale(1);
    }
}

.glitch-bars {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 0, 255, 0.3) 2px,
        rgba(255, 0, 255, 0.3) 4px
    );
    animation: glitchBars 0.5s linear infinite;
}

@keyframes glitchBars {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* ===========================================
   THEME DEFINITIONS
   =========================================== */

/* Solarized Light */
[data-theme="solarized-light"] {
    --base03: #fdf6e3;   /* background */
    --base02: #eee8d5;   /* background highlights */
    --base01: #93a1a1;   /* comments / secondary content */
    --base00: #839496;   /* body text / default code / primary content */
    --base0: #657b83;    /* primary content */
    --base1: #586e75;    /* optional emphasized content */
    --yellow: #b58900;
    --orange: #cb4b16;
    --red: #dc322f;
    --magenta: #d33682;
    --violet: #6c71c4;
    --blue: #268bd2;
    --cyan: #2aa198;
    --green: #859900;
    
    --bg-primary: var(--base03);
    --bg-secondary: var(--base02);
    --accent-primary: var(--blue);
    --accent-secondary: var(--cyan);
    --accent-highlight: var(--orange);
    --text-primary: var(--base0);
    --text-secondary: var(--base00);
    --text-muted: var(--base01);
    --text-emphasis: var(--base1);
    --border-color: var(--base02);
    --link-color: var(--cyan);
    --link-hover: var(--blue);
}

[data-theme="solarized-light"] body {
    background: linear-gradient(135deg, var(--base03) 0%, var(--base02) 50%, var(--base03) 100%);
}

[data-theme="solarized-light"] .header {
    background: linear-gradient(135deg, var(--base02) 0%, var(--base03) 100%);
    color: var(--text-emphasis);
    border-bottom: 2px solid var(--accent-primary);
}

/* Monokai */
[data-theme="monokai"] {
    --bg-primary: #272822;
    --bg-secondary: #3e3d32;
    --accent-primary: #f92672;
    --accent-secondary: #66d9ef;
    --accent-highlight: #fd971f;
    --text-primary: #f8f8f2;
    --text-secondary: #f8f8f2;
    --text-muted: #75715e;
    --text-emphasis: #f8f8f2;
    --border-color: #3e3d32;
    --link-color: #66d9ef;
    --link-hover: #a6e22e;
    --yellow: #e6db74;
    --green: #a6e22e;
    --orange: #fd971f;
    --violet: #ae81ff;
    --magenta: #f92672;
}

[data-theme="monokai"] body {
    background: linear-gradient(135deg, #272822 0%, #3e3d32 50%, #272822 100%);
}

/* Dracula */
[data-theme="dracula"] {
    --bg-primary: #282a36;
    --bg-secondary: #44475a;
    --accent-primary: #bd93f9;
    --accent-secondary: #8be9fd;
    --accent-highlight: #ffb86c;
    --text-primary: #f8f8f2;
    --text-secondary: #f8f8f2;
    --text-muted: #6272a4;
    --text-emphasis: #f8f8f2;
    --border-color: #44475a;
    --link-color: #8be9fd;
    --link-hover: #bd93f9;
    --yellow: #f1fa8c;
    --green: #50fa7b;
    --orange: #ffb86c;
    --violet: #bd93f9;
    --magenta: #ff79c6;
}

[data-theme="dracula"] body {
    background: linear-gradient(135deg, #282a36 0%, #44475a 50%, #282a36 100%);
}

/* Nord */
[data-theme="nord"] {
    --bg-primary: #2e3440;
    --bg-secondary: #3b4252;
    --accent-primary: #81a1c1;
    --accent-secondary: #88c0d0;
    --accent-highlight: #d08770;
    --text-primary: #e5e9f0;
    --text-secondary: #d8dee9;
    --text-muted: #4c566a;
    --text-emphasis: #eceff4;
    --border-color: #3b4252;
    --link-color: #88c0d0;
    --link-hover: #81a1c1;
    --yellow: #ebcb8b;
    --green: #a3be8c;
    --orange: #d08770;
    --violet: #b48ead;
    --magenta: #b48ead;
}

[data-theme="nord"] body {
    background: linear-gradient(135deg, #2e3440 0%, #3b4252 50%, #2e3440 100%);
}

/* One Dark */
[data-theme="one-dark"] {
    --bg-primary: #282c34;
    --bg-secondary: #21252b;
    --accent-primary: #61afef;
    --accent-secondary: #56b6c2;
    --accent-highlight: #e06c75;
    --text-primary: #abb2bf;
    --text-secondary: #abb2bf;
    --text-muted: #5c6370;
    --text-emphasis: #abb2bf;
    --border-color: #21252b;
    --link-color: #56b6c2;
    --link-hover: #61afef;
    --yellow: #e5c07b;
    --green: #98c379;
    --orange: #d19a66;
    --violet: #c678dd;
    --magenta: #c678dd;
}

[data-theme="one-dark"] body {
    background: linear-gradient(135deg, #282c34 0%, #21252b 50%, #282c34 100%);
}

/* GitHub Light */
[data-theme="github-light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --accent-primary: #0969da;
    --accent-secondary: #1f883d;
    --accent-highlight: #d1242f;
    --text-primary: #24292f;
    --text-secondary: #656d76;
    --text-muted: #656d76;
    --text-emphasis: #24292f;
    --border-color: #d0d7de;
    --link-color: #0969da;
    --link-hover: #0550ae;
    --yellow: #bf8700;
    --green: #1f883d;
    --orange: #bc4c00;
    --violet: #8250df;
    --magenta: #cf222e;
}

[data-theme="github-light"] body {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fa 50%, #ffffff 100%);
}

[data-theme="github-light"] .header {
    background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* Atom One Light */
[data-theme="atom-one-light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f0;
    --accent-primary: #4078f2;
    --accent-secondary: #0184bc;
    --accent-highlight: #ca1243;
    --text-primary: #383a42;
    --text-secondary: #383a42;
    --text-muted: #a0a1a7;
    --text-emphasis: #383a42;
    --border-color: #e5e5e6;
    --link-color: #0184bc;
    --link-hover: #4078f2;
    --yellow: #c18401;
    --green: #50a14f;
    --orange: #986801;
    --violet: #a626a4;
    --magenta: #e45649;
}

[data-theme="atom-one-light"] body {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #fafafa 100%);
}

[data-theme="atom-one-light"] .header {
    background: linear-gradient(135deg, #f0f0f0 0%, #fafafa 100%);
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* Gruvbox Dark */
[data-theme="gruvbox-dark"] {
    --bg-primary: #282828;
    --bg-secondary: #3c3836;
    --accent-primary: #83a598;
    --accent-secondary: #8ec07c;
    --accent-highlight: #fe8019;
    --text-primary: #ebdbb2;
    --text-secondary: #d5c4a1;
    --text-muted: #928374;
    --text-emphasis: #fbf1c7;
    --border-color: #3c3836;
    --link-color: #8ec07c;
    --link-hover: #83a598;
    --yellow: #fabd2f;
    --green: #b8bb26;
    --orange: #fe8019;
    --violet: #d3869b;
    --magenta: #fb4934;
}

[data-theme="gruvbox-dark"] body {
    background: linear-gradient(135deg, #282828 0%, #3c3836 50%, #282828 100%);
}

/* Material Dark */
[data-theme="material-dark"] {
    --bg-primary: #212121;
    --bg-secondary: #2f2f2f;
    --accent-primary: #82b1ff;
    --accent-secondary: #64ffda;
    --accent-highlight: #ff5722;
    --text-primary: #eeffff;
    --text-secondary: #b2ccd6;
    --text-muted: #546e7a;
    --text-emphasis: #ffffff;
    --border-color: #2f2f2f;
    --link-color: #64ffda;
    --link-hover: #82b1ff;
    --yellow: #ffcb6b;
    --green: #c3e88d;
    --orange: #f78c6c;
    --violet: #c792ea;
    --magenta: #ff5370;
}

[data-theme="material-dark"] body {
    background: linear-gradient(135deg, #212121 0%, #2f2f2f 50%, #212121 100%);
}