/* CSS Variables for theming */
:root {
    /* Dark theme (default) */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-quaternary: rgba(33, 38, 45, 0.3);
    --bg-job: rgba(13, 17, 23, 0.5);
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-muted: #a5a5a5;
    --accent-primary: #7c3aed;
    --accent-secondary: #58a6ff;
    --accent-tertiary: #f85149;
    --accent-success: #3fb950;
    --border-primary: #30363d;
    --scrollbar-track: #21262d;
    --scrollbar-thumb: #7c3aed;
    --scrollbar-thumb-hover: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.4);
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-quaternary: rgba(108, 117, 125, 0.08);
    --bg-job: rgba(248, 249, 250, 0.9);
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-primary: #6f42c1;
    --accent-secondary: #0d6efd;
    --accent-tertiary: #dc3545;
    --accent-success: #198754;
    --border-primary: #dee2e6;
    --scrollbar-track: #e9ecef;
    --scrollbar-thumb: #6f42c1;
    --scrollbar-thumb-hover: #5a2d91;
    --shadow: rgba(0, 0, 0, 0.15);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Terminal container */
.terminal {
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 32px var(--shadow);
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 600px;
    min-height: 400px;
    container-type: inline-size;
    container-name: terminal;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.terminal.dragging {
    position: fixed;
    z-index: 1000;
}

.terminal.resizing {
    user-select: none;
}

/* Resize handles */
.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
}

.resize-n {
    top: -3px;
    left: 8px;
    right: 8px;
    height: 6px;
    cursor: n-resize;
}

.resize-s {
    bottom: -3px;
    left: 8px;
    right: 8px;
    height: 6px;
    cursor: s-resize;
}

.resize-e {
    top: 8px;
    right: -3px;
    bottom: 8px;
    width: 6px;
    cursor: e-resize;
}

.resize-w {
    top: 8px;
    left: -3px;
    bottom: 8px;
    width: 6px;
    cursor: w-resize;
}

.resize-ne {
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    cursor: ne-resize;
}

.resize-nw {
    top: -3px;
    left: -3px;
    width: 12px;
    height: 12px;
    cursor: nw-resize;
}

.resize-se {
    bottom: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    cursor: se-resize;
}

.resize-sw {
    bottom: -3px;
    left: -3px;
    width: 12px;
    height: 12px;
    cursor: sw-resize;
}

/* Terminal header */
.terminal-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-primary);
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.terminal-header-left {
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.btn.close {
    background: #ff5f57;
}

.btn.close:hover {
    background: #ff4136;
    box-shadow: 0 2px 6px rgba(255, 95, 87, 0.4);
}

.btn.minimize {
    background: #ffbd2e;
}

.btn.minimize:hover {
    background: #ffaa00;
    box-shadow: 0 2px 6px rgba(255, 189, 46, 0.4);
}

.btn.maximize {
    background: #28ca42;
}

.btn.maximize:hover {
    background: #20a034;
    box-shadow: 0 2px 6px rgba(40, 202, 66, 0.4);
}

.terminal-title {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Header controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Terminal button */
.terminal-button {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.terminal-button:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent-secondary);
}

.terminal-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.terminal-button:active .terminal-icon {
    transform: scale(0.9);
}

/* Theme toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.theme-toggle:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent-primary);
}

.theme-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.theme-toggle:active .theme-icon {
    transform: scale(0.9);
}

/* Terminal body */
.terminal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Two column layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: 100%;
    overflow: hidden;
}

/* Single column layout for narrow windows */
@container terminal (max-width: 800px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        overflow-y: auto;
        padding-right: 10px;
    }
    
    .two-column-layout::-webkit-scrollbar {
        width: 6px;
    }
    
    .two-column-layout::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
        border-radius: 3px;
    }
    
    .two-column-layout::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 3px;
    }
    
    .two-column-layout::-webkit-scrollbar-thumb:hover {
        background: var(--scrollbar-thumb-hover);
    }
    
    .left-column,
    .right-column {
        overflow-y: visible;
        padding-right: 0;
    }
}

/* JavaScript-controlled single column layout */
.terminal.single-column .two-column-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
}

.terminal.single-column .two-column-layout::-webkit-scrollbar {
    width: 6px;
}

.terminal.single-column .two-column-layout::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 3px;
}

.terminal.single-column .two-column-layout::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.terminal.single-column .two-column-layout::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.terminal.single-column .left-column,
.terminal.single-column .right-column {
    overflow-y: visible;
    padding-right: 0;
}

.left-column,
.right-column {
    overflow-y: auto;
    padding-right: 10px;
}

.left-column::-webkit-scrollbar,
.right-column::-webkit-scrollbar {
    width: 6px;
}

.left-column::-webkit-scrollbar-track,
.right-column::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 3px;
}

.left-column::-webkit-scrollbar-thumb,
.right-column::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.left-column::-webkit-scrollbar-thumb:hover,
.right-column::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.final-prompt {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-primary);
    text-align: center;
    transition: border-color 0.3s ease;
}

/* Prompt line */
.prompt-line {
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: var(--accent-primary);
    font-weight: bold;
    transition: color 0.3s ease;
}

.command {
    color: var(--accent-secondary);
    transition: color 0.3s ease;
}

.cursor {
    color: var(--text-primary);
    font-weight: bold;
    animation: blink 1s infinite;
    transition: color 0.3s ease;
}

.cursor.blinking {
    animation: blink 1s infinite;
}

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

/* Content sections */
.content-section {
    margin: 10px 0 20px 0;
    padding: 15px;
    background: var(--bg-quaternary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 4px 4px 0;
    animation: fadeInUp 0.6s ease-out;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.file-header {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Typography */
.name {
    color: var(--accent-secondary);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.title {
    color: var(--accent-tertiary);
    font-size: 16px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.location {
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.contact {
    margin-bottom: 20px;
}

.contact a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact a:hover {
    color: var(--accent-secondary);
    opacity: 0.8;
    text-decoration: underline;
}

/* Sections */
.section {
    margin: 20px 0;
}

.section h3 {
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.section p {
    color: var(--text-primary);
    text-align: justify;
    transition: color 0.3s ease;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.skill-category h4 {
    color: var(--accent-tertiary);
    margin-bottom: 10px;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.skill-category li {
    color: var(--text-primary);
    padding: 2px 0;
    position: relative;
    padding-left: 15px;
    transition: color 0.3s ease;
}

.skill-category li::before {
    content: "▸";
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    transition: color 0.3s ease;
}

/* Job experience */
.job {
    margin: 15px 0;
    padding: 12px;
    background: var(--bg-job);
    border-radius: 4px;
    border-left: 2px solid var(--accent-tertiary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.job-header h4 {
    color: var(--accent-secondary);
    font-size: 16px;
    transition: color 0.3s ease;
}

.date {
    color: var(--text-muted);
    font-size: 12px;
    transition: color 0.3s ease;
}

.job-title {
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.job ul {
    list-style: none;
    margin-left: 15px;
}

.job li {
    color: var(--text-primary);
    margin: 5px 0;
    position: relative;
    padding-left: 15px;
    transition: color 0.3s ease;
}

.job li::before {
    content: "•";
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    transition: color 0.3s ease;
}

/* Contact section */
.contact-info h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.contact-methods {
    margin-top: 15px;
}

.contact-item {
    display: flex;
    margin: 10px 0;
    align-items: center;
    gap: 10px;
}

.contact-label {
    color: var(--accent-tertiary);
    min-width: 120px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.contact-item a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-secondary);
    opacity: 0.8;
    text-decoration: underline;
}

.status-available {
    color: var(--accent-success);
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Responsive design */
@media (max-width: 1024px) {
    .terminal {
        max-width: 95vw;
        height: 85vh;
    }
    
    .terminal-body {
        padding: 18px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
        height: 100vh;
        overflow: hidden;
    }
    
    .terminal {
        height: 95vh;
        border-radius: 6px;
        min-width: 320px;
    }
    
    .terminal-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .terminal-header-left {
        flex: 1;
        min-width: 0;
    }
    
    .terminal-title {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .header-controls {
        gap: 6px;
    }
    
    .terminal-button,
    .theme-toggle {
        padding: 6px 10px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .terminal-icon,
    .theme-icon {
        font-size: 16px;
    }
    
    .terminal-body {
        padding: 15px;
        font-size: 13px;
    }
    
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        overflow-y: auto;
    }
    
    .left-column,
    .right-column {
        overflow-y: visible;
        padding-right: 0;
    }
    
    .name {
        font-size: 20px;
    }
    
    .title {
        font-size: 14px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .contact-label {
        min-width: auto;
    }
    
    .prompt-line {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .final-prompt {
        position: sticky;
        bottom: 0;
        background: var(--bg-secondary);
        margin: 10px -15px -15px -15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 4px;
    }
    
    .terminal {
        height: 98vh;
        border-radius: 4px;
        min-width: 300px;
    }
    
    .terminal-header {
        padding: 8px 10px;
    }
    
    .terminal-title {
        font-size: 11px;
    }
    
    .terminal-buttons {
        margin-right: 8px;
    }
    
    .btn {
        width: 10px;
        height: 10px;
    }
    
    .terminal-body {
        padding: 10px;
        font-size: 12px;
    }
    
    .name {
        font-size: 18px;
    }
    
    .title {
        font-size: 13px;
    }
    
    .content-section {
        padding: 10px;
        margin: 8px 0 15px 0;
    }
    
    .job {
        padding: 10px;
        margin: 12px 0;
    }
    
    .prompt-line {
        margin: 15px 0 8px 0;
    }
    
    .section {
        margin: 15px 0;
    }
    
    .section h3 {
        font-size: 14px;
    }
    
    .skill-category h4 {
        font-size: 13px;
    }
    
    .skill-category li {
        font-size: 11px;
        padding: 1px 0;
    }
    
    .job-header h4 {
        font-size: 14px;
    }
    
    .date {
        font-size: 11px;
    }
    
    .job-title {
        font-size: 12px;
    }
    
    .job li {
        font-size: 11px;
        margin: 3px 0;
    }
    
    .contact-info h3 {
        font-size: 14px;
    }
    
    .contact-item {
        margin: 8px 0;
    }
    
    .contact-label {
        font-size: 12px;
    }
    
    .contact-item a,
    .contact-item span {
        font-size: 12px;
    }
}

/* Hover effects and animations */
.content-section:hover {
    background: var(--bg-tertiary);
    transition: background 0.3s ease, transform 0.3s ease;
    transform: translateY(-2px);
}

.job:hover {
    background: var(--bg-tertiary);
    transition: background 0.3s ease, transform 0.3s ease;
    transform: translateX(5px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Separate Terminal Window */
.terminal-window {
    position: fixed;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 800px);
    height: min(80vh, 600px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 1001;
    display: none;
    flex-direction: column;
    min-width: 300px;
    min-height: 400px;
    transition: all 0.3s ease;
}

.terminal-window.show {
    display: flex;
    animation: terminalWindowFadeIn 0.3s ease-out;
}

.terminal-window.dragging {
    user-select: none;
    pointer-events: auto;
    transition: none;
    cursor: move;
}

.terminal-window.dragging * {
    pointer-events: none;
}

@keyframes terminalWindowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.terminal-window-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-primary);
    cursor: move;
    user-select: none;
    border-radius: 8px 8px 0 0;
}

.terminal-window-header-left {
    display: flex;
    align-items: center;
}

.terminal-window-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

@media (max-width: 768px) {
    .terminal-window {
        top: 2%;
        width: 95vw;
        height: 90vh;
        border-radius: 6px;
    }
    
    .terminal-window-body {
        padding: 15px;
    }
    
    .terminal-output {
        font-size: 13px;
    }
    
    .command-input {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .terminal-window {
        top: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .terminal-window-header {
        border-radius: 0;
    }
    
    .terminal-window-body {
        padding: 10px;
    }
    
    .terminal-output {
        font-size: 12px;
    }
    
    .command-input {
        font-size: 12px;
    }
    
    .command-input-section {
        margin-top: 8px;
        padding-top: 10px;
    }
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-output > div {
    margin-bottom: 15px;
    padding: 5px 0;
}

.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 3px;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.welcome-message {
    color: var(--accent-success);
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid var(--accent-success);
    background: var(--bg-quaternary);
    border-radius: 0 4px 4px 0;
}

/* Command input section */
.command-input-section {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.command-input {
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    flex: 1;
    margin-left: 8px;
    margin-right: 8px;
}

.command-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.command-output {
    margin-top: 10px;
    padding: 10px 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.terminal-output .success {
    color: var(--accent-success);
}

.terminal-output .error {
    color: var(--accent-tertiary);
}

.terminal-output .info {
    color: var(--accent-secondary);
}

.terminal-output .prompt {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Help panel */
.help-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 10px 30px var(--shadow);
    display: none;
    animation: helpFadeIn 0.3s ease-out;
}

.help-panel.show {
    display: block !important;
    z-index: 10000 !important;
}

@keyframes helpFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.help-header {
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 10px;
}

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

.help-section h4 {
    color: var(--accent-tertiary);
    margin-bottom: 8px;
    font-size: 14px;
}

.help-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-section li {
    margin: 4px 0;
    color: var(--text-primary);
    font-size: 12px;
}

.help-section code {
    background: var(--bg-quaternary);
    color: var(--accent-primary);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 11px;
}

/* ASCII Art styles */
.ascii-art {
    font-family: 'Courier New', monospace;
    white-space: pre;
    color: var(--accent-success);
    font-size: 12px;
    line-height: 1;
    margin: 10px 0;
}

/* Loading animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--accent-success);
    font-family: 'Courier New', monospace;
}

.loading-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.loading-bar {
    width: 300px;
    height: 20px;
    border: 1px solid var(--accent-success);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    background: var(--accent-success);
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive help panel */
@media (max-width: 768px) {
    .help-panel {
        max-width: 90vw;
        padding: 15px;
    }
    
    .help-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-success);
    border-radius: 8px;
    padding: 20px;
    max-width: min(400px, 90vw);
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 1003;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: none;
    animation: cookieBannerSlideIn 0.5s ease-out;
}

.cookie-banner.show {
    display: block;
}

@keyframes cookieBannerSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    color: var(--text-primary);
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
}

.cookie-icon {
    font-size: 18px;
}

.cookie-title {
    color: var(--accent-success);
    font-weight: bold;
    font-size: 16px;
}

.cookie-message {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-message p {
    margin-bottom: 10px;
}

.cookie-message strong {
    color: var(--accent-success);
}

.cookie-detailed-info {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-top: 1px solid var(--border-primary);
    margin-top: 0;
}

.cookie-detailed-info.expanded {
    max-height: 400px;
    margin-top: 15px;
    padding-top: 15px;
}

.detailed-info-content {
    padding: 5px 0;
}

.detailed-info-content h4 {
    color: var(--accent-primary);
    font-size: 14px;
    margin: 15px 0 8px 0;
    font-weight: bold;
}

.detailed-info-content h4:first-child {
    margin-top: 5px;
}

.detailed-info-content p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: var(--accent-success);
    color: var(--bg-primary);
    border-color: var(--accent-success);
}

.cookie-btn.accept:hover {
    background: var(--accent-success);
    opacity: 0.8;
    transform: translateY(-1px);
}

.cookie-btn.info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cookie-btn.info:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent-primary);
}

.info-arrow {
    transition: transform 0.3s ease;
    font-size: 10px;
}

.cookie-btn.info.expanded .info-arrow {
    transform: rotate(180deg);
}

/* Responsive cookie banner */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 15px;
    }
    
    .cookie-header {
        margin-bottom: 12px;
    }
    
    .cookie-title {
        font-size: 14px;
    }
    
    .cookie-message {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .cookie-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        bottom: 5px;
        right: 5px;
        left: 5px;
        padding: 12px;
    }
    
    .cookie-icon {
        font-size: 16px;
    }
    
    .cookie-title {
        font-size: 13px;
    }
    
    .cookie-message {
        font-size: 12px;
    }
    
    .detailed-info-content h4 {
        font-size: 13px;
    }
    
    .detailed-info-content p {
        font-size: 11px;
    }
}

/* Touch-friendly interactions */
.terminal-button,
.theme-toggle,
.cookie-btn,
.btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.terminal-button:active,
.theme-toggle:active,
.cookie-btn:active {
    transform: scale(0.95);
}

@media (hover: none) and (pointer: coarse) {
    .terminal-button:hover,
    .theme-toggle:hover,
    .cookie-btn:hover {
        transform: none;
    }
    
    .terminal-button:active,
    .theme-toggle:active,
    .cookie-btn:active {
        transform: scale(0.95);
    }
    
    .content-section:hover,
    .job:hover {
        transform: none;
        background: var(--bg-quaternary);
    }
}

/* Improved focus states for accessibility */
.terminal-button:focus,
.theme-toggle:focus,
.cookie-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 1px;
}

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

::-moz-selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}
