:root {
    /* Default: Simple Theme */
    --bg-color: #f8f9fa;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #2980b9; /* Original Blue */
    --accent-dim: rgba(41, 128, 185, 0.1);
    --border-color: #e2e8f0;
    --grid-line: transparent;
    
    --font-mono: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Not mono for simple */
    
    --scanline-color: transparent;
    
    --btn-bg: #fff;
    --btn-border: 1px solid var(--border-color);
    --btn-text: var(--text-main);
    
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Terminal Theme */
[data-theme="terminal"] {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --text-muted: #6f7782;
    --accent: #00f3ff;
    --accent-dim: rgba(0, 243, 255, 0.1);
    --border-color: #333;
    --grid-line: rgba(255, 255, 255, 0.03);
    
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --scanline-color: rgba(0, 243, 255, 0.05);
    
    --btn-bg: transparent;
    --btn-border: 1px solid var(--accent);
    --btn-text: var(--accent);
    
    --card-bg: #050505;
    --card-shadow: none;
}

/* Retro / Y2K Theme */
[data-theme="retro"] {
    --bg-color: #c0c0c0; /* Silver/Gray */
    --text-main: #000000;
    --text-muted: #444444;
    --accent: #000080; /* Navy Blue */
    --accent-dim: #dfdfdf;
    --border-color: #808080;
    --grid-line: transparent;
    
    --font-mono: 'Verdana', 'Arial', sans-serif;
    
    --btn-bg: #c0c0c0;
    --btn-border: 2px outset #fff;
    --btn-text: #000;
    
    --card-bg: #c0c0c0;
    --card-shadow: none;
}

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

[data-theme="terminal"] * {
    cursor: crosshair;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 15px; /* Slightly larger for readability in simple mode */
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Terminal Background */
[data-theme="terminal"] {
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    font-size: 14px;
}

/* Scanline Effect - Only in Terminal */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
    display: none;
}

[data-theme="terminal"] .scanline-overlay {
    display: block;
}

/* System Status Bar */
.system-status-bar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-color); /* Matches body usually */
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.system-status-bar {
    background-color: rgba(248, 249, 250, 0.8); /* Translucent in Simple */
}

[data-theme="terminal"] .system-status-bar {
    background-color: var(--bg-color);
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

[data-theme="retro"] .system-status-bar {
    background-color: #c0c0c0;
    border-bottom: 2px solid #808080;
    box-shadow: inset 1px 1px #fff, inset -1px -1px #404040;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.status-left, .status-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

.indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e; /* Green for simple */
    border-radius: 50%;
}

[data-theme="terminal"] .indicator {
    background-color: var(--accent);
    animation: blink 2s infinite;
}

[data-theme="retro"] .indicator {
    background-color: #00ff00;
    border: 1px solid #000;
    border-radius: 0;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Theme Select Dropdown */
.theme-select {
    background: var(--btn-bg);
    border: var(--btn-border);
    color: var(--text-main);
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
}

[data-theme="terminal"] .theme-select {
    border-radius: 0;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.7rem;
}

[data-theme="retro"] .theme-select {
    background: #fff;
    border: 2px inset #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    border-radius: 0;
    color: #000;
    font-family: 'Tahoma', sans-serif;
}

.container {
    max-width: 900px; /* Slightly tighter for text readability */
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

[data-theme="terminal"] h1, 
[data-theme="terminal"] h2, 
[data-theme="terminal"] h3 {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 500;
}

[data-theme="retro"] h1, 
[data-theme="retro"] h2, 
[data-theme="retro"] h3 {
    text-transform: none;
    letter-spacing: normal;
    font-weight: bold;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

[data-theme="terminal"] a {
    font-weight: normal;
}
[data-theme="terminal"] a:hover {
    text-decoration: none;
    background-color: var(--accent);
    color: var(--bg-color);
}

[data-theme="retro"] a {
    text-decoration: underline;
    color: blue;
}
[data-theme="retro"] a:hover {
    color: red;
}

/* Hero Section */
.hero-section {
    min-height: 40vh;
    padding: 2rem 0;
    position: relative;
    margin-bottom: 0;
}

[data-theme="terminal"] .hero-section {
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid var(--border-color);
    padding: 2rem;
}

[data-theme="retro"] .hero-section {
    background: #fff;
    border: 2px solid #808080;
    border-style: inset;
    padding: 2rem;
}

.hero-section::before, .hero-section::after {
    display: none;
}

[data-theme="terminal"] .hero-section::before {
    display: block;
    content: 'SECTION: IDENTITY';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

[data-theme="retro"] .hero-section::before {
    display: block;
    content: 'About Me';
    background: #c0c0c0;
    border: 1px solid #808080;
    top: -12px;
    position: absolute;
    left: 20px;
    padding: 0 5px;
    font-size: 0.8rem;
    color: #000;
}

[data-theme="terminal"] .hero-section::after { 
    display: block;
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
}

.intro-line {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.name {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

[data-theme="terminal"] .name {
    font-size: 3rem;
    color: var(--accent);
    letter-spacing: 0;
}

[data-theme="retro"] .name {
    color: #000;
    font-family: 'Times New Roman', serif;
    letter-spacing: 0;
}

.title {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bio-block {
    max-width: 600px;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

[data-theme="terminal"] .bio-block {
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    font-size: 1rem;
}

[data-theme="retro"] .bio-block {
    background: #e0e0e0;
    padding: 1rem;
    border: 1px solid #808080;
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.25rem;
}

.social-links a {
    color: var(--text-muted);
}
.social-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Section Styling */
section {
    margin-bottom: 6rem;
}

.section-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

[data-theme="retro"] .section-header {
    background: #000080;
    padding: 5px 10px;
    border: none;
}

.section-header h3 {
    font-size: 1.25rem;
    margin-right: 1rem;
    color: var(--text-main);
}

[data-theme="retro"] .section-header h3 {
    color: #fff;
    font-size: 1rem;
    margin: 0;
}

.section-line {
    flex-grow: 1;
    height: 1px;
    /* No visual line for simple theme usually needed for clean look, but keeps alignment */
    background: transparent;
}

[data-theme="terminal"] .section-line {
    background: repeating-linear-gradient(
        90deg,
        var(--border-color),
        var(--border-color) 4px,
        transparent 4px,
        transparent 8px
    );
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

[data-theme="terminal"] .grid {
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
}

[data-theme="retro"] .grid {
    gap: 1.5rem;
    background: transparent;
    border: none;
}


.card {
    background-color: var(--card-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="terminal"] .card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    transform: none;
}
[data-theme="terminal"] .card:hover {
    transform: none;
    box-shadow: none;
    background-color: var(--accent-dim);
}

[data-theme="retro"] .card {
    border-radius: 0;
    box-shadow: none;
    background: #c0c0c0;
    border: 2px outset #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    padding: 1rem;
}
[data-theme="retro"] .card:hover {
    transform: none;
    background-color: #c0c0c0;
}


.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--accent);
}

[data-theme="retro"] .card-header {
    color: #000;
}

.card-icon {
    font-size: 1.5rem;
}

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
}

[data-theme="terminal"] .card-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

[data-theme="retro"] .card-link {
    background: #c0c0c0;
    border: 1px outset #fff;
    padding: 2px 5px;
    text-align: center;
    color: #000;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    cursor: pointer;
}

/* Resume Layout */
/* .resume-container has no implementation for simple theme */

[data-theme="terminal"] .resume-container {
    border: 1px solid var(--border-color);
}

[data-theme="retro"] .resume-container {
    border: 2px solid #808080;
    border-style: inset;
    background: #fff;
}

.resume-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

[data-theme="terminal"] .resume-row {
    padding: 0;
}

[data-theme="retro"] .resume-row {
    padding: 0;
    border-bottom: 1px solid #808080;
}

.resume-row:last-child {
    border-bottom: none;
}

.resume-left {
    padding-right: 2rem;
    font-weight: 600;
    color: var(--text-muted);
}

[data-theme="terminal"] .resume-left {
    padding: 2rem;
    border-right: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    font-weight: normal;
}

[data-theme="retro"] .resume-left {
    background: #e0e0e0;
    border-right: 1px solid #808080;
    color: #000;
    padding: 2rem;
}

.resume-right {
    padding-left: 1rem;
}
[data-theme="terminal"] .resume-right, 
[data-theme="retro"] .resume-right {
    padding: 2rem;
}

.exp-item, .edu-item {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.exp-item:last-child, .edu-item:last-child {
    margin-bottom: 0;
}

.exp-item:hover, .edu-item:hover {
    border-left-color: var(--accent);
}

[data-theme="terminal"] .exp-item,
[data-theme="terminal"] .edu-item {
    border-left: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

[data-theme="retro"] .exp-item, 
[data-theme="retro"] .edu-item {
    border-left: 3px solid #808080;
    margin-bottom: 1.5rem;
}

.exp-item::before, .edu-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 8px;
    height: 8px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.exp-item:hover::before, .edu-item:hover::before {
    background: var(--accent);
}

[data-theme="terminal"] .exp-item::before, 
[data-theme="terminal"] .edu-item::before {
    content: '›';
    left: -4px;
    top: -2px;
    background: transparent;
    color: var(--accent);
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 0;
    width: auto; 
    height: auto;
}

[data-theme="retro"] .exp-item::before, 
[data-theme="retro"] .edu-item::before {
    background: #000080;
    border-color: #000080;
    left: -6px;
    top: 4px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-role {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

[data-theme="terminal"] .exp-role {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
}

[data-theme="retro"] .exp-role {
    color: #000080;
    font-weight: 700;
}

.exp-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
}

.exp-company {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

[data-theme="terminal"] .exp-company {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

[data-theme="retro"] .exp-company {
    font-weight: bold;
    text-transform: uppercase;
}

.exp-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

[data-theme="terminal"] .exp-description {
    font-size: 0.85rem;
}

.exp-details {
    margin-top: 0.5rem;
}

.exp-details li {
    list-style: none;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1rem;
}

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

.exp-details li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 500;
}

[data-theme="terminal"] .exp-details li {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-left: 1.2rem;
}

[data-theme="terminal"] .exp-details li::before {
    content: '>';
    color: var(--accent);
    position: absolute;
    left: 0;
}

[data-theme="retro"] .exp-details li {
    color: #333;
    padding-left: 1.2rem;
}

[data-theme="retro"] .exp-details li::before {
    content: '•';
    color: #000080;
}

.tech-tags span {
    display: inline-block;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: 6px;
    margin-top: 6px;
    color: var(--text-muted);
}

[data-theme="terminal"] .tech-tags span {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 0;
}

[data-theme="retro"] .tech-tags span {
    border: 1px solid #808080;
    background: #e0e0e0;
    color: #000;
    border-radius: 3px;
}

/* Course Accordion */
.course-accordion {
    margin-top: 0.75rem;
}

.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--accent-dim);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.accordion-toggle:hover {
    background: var(--accent);
    color: var(--bg-color);
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.accordion-toggle[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
}

.accordion-content.open {
    display: block;
}

.course-category {
    margin-bottom: 0.75rem;
}

.course-category:last-child {
    margin-bottom: 0;
}

.course-category h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.course-category p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

[data-theme="terminal"] .accordion-toggle {
    border-radius: 0;
    text-transform: uppercase;
    font-size: 0.75rem;
}

[data-theme="terminal"] .accordion-content {
    border-radius: 0;
    background: #111;
}

[data-theme="retro"] .accordion-toggle {
    border-radius: 0;
    border: 2px outset #fff;
    background: #c0c0c0;
}

[data-theme="retro"] .accordion-toggle:hover {
    background: #000080;
    color: #fff;
}

[data-theme="retro"] .accordion-content {
    border-radius: 0;
    border: 2px inset #fff;
}

/* Footer */
.terminal-footer {
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

[data-theme="retro"] .terminal-footer {
    border-top: 2px solid #808080;
    border-style: groove;
}

.footer-cmd {
    margin-bottom: 2rem;
    color: var(--text-main);
}

[data-theme="terminal"] .footer-cmd {
    background: #111;
    padding: 0.5rem 1rem;
    display: inline-block;
}

[data-theme="retro"] .footer-cmd {
    background: #fff;
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    display: inline-block;
}

[data-theme="retro"] .footer-cmd span {
    color: #000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    section {
        margin-bottom: 3rem;
    }

    .hero-section {
        margin-bottom: 2rem;
        min-height: auto;
        padding: 1.5rem;
    }
    
    .name { 
        font-size: 2.25rem; 
    }
    
    .bio-block {
        margin-bottom: 1.5rem;
    }

    .resume-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }
    
    .resume-left {
        padding: 0;
        padding-bottom: 0.5rem;
        border: none;
        background: transparent !important;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .resume-right {
        padding: 1rem 0 0 0;
    }

    .terminal-footer {
        margin-top: 3rem;
        padding: 2rem 0;
    }
    
    .status-right { 
        gap: 1rem;
    }
    .grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .status-left {
        display: none;
    }
    .system-status-bar {
        justify-content: flex-end;
    }
}
