/* Typography and Design Themes */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Space+Grotesk:wght@400;500;700&family=Share+Tech+Mono&display=swap');

:root {
    /* DEFAULT THEME: Classic Terminal (Green & Black) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --bg-tertiary: #141414;
    --text-primary: #00ff00;
    --text-secondary: #00cc00;
    --text-muted: #008800;
    --accent-cyan: #00ffff;
    --accent-yellow: #ffff00;
    --accent-red: #ff3333;
    --accent-magenta: #ff00ff;
    --border-color: #1a1a1a;
    --border-width: 1px;
    --border-style: solid;
    --border-radius: 4px;
    --box-shadow: 0 10px 40px rgba(0, 255, 0, 0.1);
    --glow-effect: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
    --font-family: 'JetBrains Mono', monospace;
    --font-display: 'JetBrains Mono', monospace;
    --scanlines-opacity: 0.15;
    --cursor-color: #00ff00;
    --selection-bg: #00ff00;
    --selection-color: #0a0a0a;
}

body[data-theme="cyberpunk"] {
    --bg-primary: #0d0115;
    --bg-secondary: #140424;
    --bg-tertiary: #1a0630;
    --text-primary: #00ffff;
    --text-secondary: #ff007f;
    --text-muted: #9d00ff;
    --accent-cyan: #00ffff;
    --accent-yellow: #ffea00;
    --accent-red: #ff2a2a;
    --accent-magenta: #ff00ff;
    --border-color: #ff007f;
    --border-width: 2px;
    --border-style: solid;
    --border-radius: 0px;
    --box-shadow: 0 0 15px rgba(255, 0, 127, 0.3);
    --glow-effect: 0 0 8px #00ffff, 0 0 15px #ff007f;
    --font-family: 'Share Tech Mono', monospace;
    --font-display: 'Share Tech Mono', monospace;
    --scanlines-opacity: 0.25;
    --cursor-color: #00ffff;
    --selection-bg: #ff007f;
    --selection-color: #ffffff;
}

body[data-theme="brutalist"] {
    --bg-primary: #f3f4f6; /* Stark gray-white */
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e7eb;
    --text-primary: #000000;
    --text-secondary: #1f2937;
    --text-muted: #6b7280;
    --accent-cyan: #ff00ff; /* Neon Fuchsia */
    --accent-yellow: #facc15; /* Neon Yellow */
    --accent-red: #ef4444;
    --accent-magenta: #06b6d4; /* Neon Cyan */
    --border-color: #000000;
    --border-width: 3px;
    --border-style: solid;
    --border-radius: 0px;
    --box-shadow: 6px 6px 0px #000000;
    --glow-effect: none;
    --font-family: 'Space Grotesk', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --scanlines-opacity: 0;
    --cursor-color: #000000;
    --selection-bg: #facc15;
    --selection-color: #000000;
}

body[data-theme="luxury"] {
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --bg-tertiary: #334155; /* Slate 700 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    --text-muted: #64748b; /* Slate 500 */
    --accent-cyan: #d97706; /* Gold Amber */
    --accent-yellow: #f59e0b; /* Gold */
    --accent-red: #fda4af; /* Soft rose */
    --accent-magenta: #475569; /* Slate 600 */
    --border-color: #334155;
    --border-width: 1px;
    --border-style: solid;
    --border-radius: 12px;
    --box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --glow-effect: none;
    --font-family: 'JetBrains Mono', monospace;
    --font-display: 'Playfair Display', serif;
    --scanlines-opacity: 0;
    --cursor-color: #f59e0b;
    --selection-bg: #d97706;
    --selection-color: #0f172a;
}

body[data-theme="editorial"] {
    --bg-primary: #fbfaf5; /* Clean book paper */
    --bg-secondary: #ffffff; /* Card sheets */
    --bg-tertiary: #f0eee6; /* Soft stone grey */
    --text-primary: #1c1917; /* Warm charcoal ink */
    --text-secondary: #44403c; /* Stone grey body */
    --text-muted: #78716c; /* Stone grey captions */
    --accent-cyan: #9a3412; /* Deep terracotta rust */
    --accent-yellow: #a21caf; /* Muted plum */
    --accent-red: #991b1b; /* Muted crimson */
    --accent-magenta: #0f766e; /* Muted teal */
    --border-color: #78716c;
    --border-width: 1px;
    --border-style: solid;
    --border-radius: 0px;
    --box-shadow: none;
    --glow-effect: none;
    --font-family: 'Playfair Display', Georgia, serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --scanlines-opacity: 0;
    --cursor-color: #1c1917;
    --selection-bg: #f5f5f4;
    --selection-color: #1c1917;
}

body[data-theme="editorial"] h1,
body[data-theme="editorial"] h2,
body[data-theme="editorial"] h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease, font-family 0.4s ease;
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, var(--scanlines-opacity)),
        rgba(0, 0, 0, var(--scanlines-opacity)) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* Login Screen */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 999;
}

.terminal-window {
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: var(--border-width) var(--border-style) var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.terminal-header .title {
    margin-left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.terminal-body {
    padding: 24px;
}

.output-line {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.prompt {
    color: var(--accent-cyan);
    font-weight: 700;
    min-width: 20px;
}

.command {
    color: var(--text-primary);
}

.info {
    color: var(--text-secondary);
}

.input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 16px;
    outline: none;
    caret-color: var(--cursor-color);
}

.terminal-input::placeholder {
    color: var(--text-muted);
}

.error-msg {
    color: var(--accent-red);
    margin-top: 12px;
    animation: blink 1s infinite;
}

.success-text {
    color: var(--accent-cyan);
    text-shadow: var(--glow-effect);
}

.hidden {
    display: none !important;
}

/* Theme Switcher Bar */
.theme-picker-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    z-index: 900;
    display: flex;
    gap: 8px;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.theme-picker-floating span {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
    margin-right: 4px;
}

.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--text-muted);
    cursor: pointer;
    transition: transform 0.2s;
    outline: none;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.classic { background: #00ff00; }
.theme-btn.cyberpunk { background: #ff007f; }
.theme-btn.brutalist { background: #000000; }
.theme-btn.luxury { background: #f59e0b; }
.theme-btn.editorial { background: #fbfaf5; border: 1px solid #78716c; }

/* Resume Content */
#resume-content {
    min-height: 100vh;
    padding: 60px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.terminal-header-main {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: var(--border-width) var(--border-style) var(--border-color);
}

.header-line {
    margin-bottom: 20px;
    font-size: 14px;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 46px);
    color: var(--text-primary);
    margin-bottom: 12px;
    text-shadow: var(--glow-effect);
    letter-spacing: 1px;
    font-weight: 700;
}

.glitch {
    position: relative;
}

body[data-theme="luxury"] .glitch::before,
body[data-theme="luxury"] .glitch::after,
body[data-theme="brutalist"] .glitch::before,
body[data-theme="brutalist"] .glitch::after {
    display: none; /* Disable glitch effect on non-cyberpunk/terminal themes */
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.3s infinite linear alternate-reverse;
    color: var(--accent-cyan);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.3s infinite linear alternate-reverse;
    color: var(--accent-magenta);
    z-index: -2;
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 2px); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

/* Navigation */
.terminal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
    padding: 16px;
    background: var(--bg-secondary);
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: bold;
}

.nav-link:hover {
    color: var(--accent-cyan);
    text-shadow: var(--glow-effect);
}

/* Sections */
.section {
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-secondary);
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: var(--border-width) var(--border-style) var(--border-color);
}

.section-header h2 {
    font-family: var(--font-display);
    color: var(--accent-yellow);
    font-size: 18px;
    font-weight: bold;
}

.section-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.section-content strong {
    color: var(--accent-cyan);
    text-shadow: var(--glow-effect);
}

/* Jobs */
.job {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px dashed var(--border-color);
}

.job:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.job-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.job-header h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: bold;
}

.job-header .company {
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 600;
}

.job-header .period {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: auto;
}

.achievements {
    list-style: none;
    padding-left: 20px;
}

.achievements li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.achievements li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.achievements strong {
    color: var(--accent-cyan);
}

/* Collapsible Jobs */
.job.collapsed {
    cursor: pointer;
}

.job-header.clickable {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expand-icon {
    color: var(--accent-yellow);
    font-size: 14px;
}

.job-details {
    margin-top: 16px;
    padding-left: 20px;
}

.job-inner {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
}

.job-inner:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.job-inner h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.job-inner .company {
    color: var(--text-muted);
    font-size: 13px;
}

.job-inner p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

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

.skill-category {
    padding: 16px;
    background: var(--bg-tertiary);
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

body[data-theme="brutalist"] .skill-category:hover {
    box-shadow: 4px 4px 0 #000;
    transform: translate(-2px, -2px);
}

.skill-title {
    font-family: var(--font-display);
    color: var(--accent-magenta);
    font-size: 13px;
    margin-bottom: 12px;
    font-weight: 700;
}

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

.skill-list li {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.skill-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Contact */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
}

.contact-link:hover {
    color: var(--accent-cyan);
    text-shadow: var(--glow-effect);
}

/* Certifications */
.cert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cert {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: var(--border-width) var(--border-style) var(--accent-yellow);
    border-radius: var(--border-radius);
    color: var(--accent-yellow);
    font-size: 13px;
    font-weight: 600;
}

/* Footer & Interactive Console */
.terminal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: var(--border-width) var(--border-style) var(--border-color);
}

.footer-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.console-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.console-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    outline: none;
    caret-color: var(--cursor-color);
}

.console-output-log {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.console-output-row {
    line-height: 1.4;
    white-space: pre-wrap;
}

.console-output-row.command-echo {
    color: var(--accent-cyan);
    font-weight: bold;
}

.console-output-row.error-line {
    color: var(--accent-red);
}

.console-output-row.success-line {
    color: var(--accent-yellow);
}

.cursor {
    animation: blink 1s infinite;
    color: var(--cursor-color);
    font-weight: bold;
}

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

/* Admin Panel UI Modals */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.admin-panel-container {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--bg-primary);
    border: var(--border-width) var(--border-style) var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.admin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-card-title {
    font-family: var(--font-display);
    color: var(--accent-yellow);
    font-size: 15px;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-form-group label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-input, .admin-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
}

.admin-input:focus, .admin-select:focus {
    border-color: var(--text-primary);
}

.admin-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.admin-btn:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.admin-btn.danger {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.admin-btn.danger:hover {
    background: var(--accent-red);
    color: white;
}

.links-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.link-item {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-cyan);
    padding: 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    font-size: 12px;
}

.link-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-item-desc {
    font-weight: bold;
    color: var(--text-primary);
}

.link-item-token {
    font-family: var(--font-family);
    color: var(--accent-yellow);
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    word-break: break-all;
    cursor: pointer;
}

.link-item-token:hover {
    opacity: 0.8;
}

.link-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    color: var(--text-secondary);
}

.link-action-btns {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.admin-link-btn {
    font-size: 11px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
}

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

.admin-link-btn.revoke:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Responsive Overrides */
@media (max-width: 600px) {
    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-header .period {
        margin-left: 0;
    }
    
    .terminal-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Selection */
::selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}
