/* ============================================
   ENHANCEMENTS - Command Palette, Terminal,
   ASCII Hero, 3D Globe, GLSL Background
   ============================================ */

/* --- COMMAND PALETTE --- */
#cmd-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 9, 8, 0.95);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

[data-theme="light"] #cmd-overlay {
    background: rgba(245, 242, 237, 0.95);
}

#cmd-overlay.open {
    opacity: 1;
    pointer-events: all;
}

[data-theme="light"] #cmd-overlay {
    background: rgba(200, 195, 188, 0.6);
}

#cmd-palette {
    width: min(620px, calc(100vw - 2rem));
    background: #1e1c19;
    border: 1px solid rgba(201, 168, 108, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 0 60px rgba(201, 168, 108, 0.06);
    transform: translateY(-12px) scale(0.97);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] #cmd-palette {
    background: #ffffff;
    border-color: rgba(122, 98, 64, 0.2);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.04);
}

#cmd-overlay.open #cmd-palette {
    transform: translateY(0) scale(1);
}

.cmd-search-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .cmd-search-row {
    border-bottom-color: rgba(0,0,0,0.07);
}

.cmd-search-icon {
    color: var(--accent-primary);
    opacity: 0.7;
    flex-shrink: 0;
}

#cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    caret-color: var(--accent-primary);
    letter-spacing: 0.01em;
}

#cmd-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.45;
}

.cmd-kbd-hint {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
}

.cmd-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 108, 0.2) transparent;
}

.cmd-group-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    opacity: 0.45;
    padding: 0.5rem 0.75rem 0.3rem;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.7rem 0.875rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
}

.cmd-item:hover,
.cmd-item.selected {
    background: rgba(201, 168, 108, 0.1);
}

[data-theme="light"] .cmd-item:hover,
[data-theme="light"] .cmd-item.selected {
    background: rgba(122, 98, 64, 0.08);
}

.cmd-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(201, 168, 108, 0.1);
    border: 1px solid rgba(201, 168, 108, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.85rem;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.cmd-item-text {
    flex: 1;
    min-width: 0;
}

.cmd-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.cmd-item-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-family: var(--font-mono);
    display: block;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-arrow {
    color: var(--text-secondary);
    opacity: 0;
    font-size: 0.75rem;
    transition: opacity 0.12s, transform 0.12s;
    flex-shrink: 0;
}

.cmd-item:hover .cmd-item-arrow,
.cmd-item.selected .cmd-item-arrow {
    opacity: 0.5;
    transform: translateX(2px);
}

.cmd-footer {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.4;
}

[data-theme="light"] .cmd-footer {
    border-top-color: rgba(0,0,0,0.06);
}

.cmd-footer-key {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.cmd-no-results {
    padding: 2rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.4;
}

/* Palette trigger hint in nav */
.cmd-trigger-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cmd-trigger-hint:hover {
    opacity: 1;
    border-color: var(--accent-primary);
    background: rgba(201, 168, 108, 0.08);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 168, 108, 0.15);
}

[data-theme="light"] .cmd-trigger-hint {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
    opacity: 0.8;
}

[data-theme="light"] .cmd-trigger-hint:hover {
    background: rgba(122, 98, 64, 0.05);
}

.cmd-trigger-hint kbd {
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

/* --- INTERACTIVE TERMINAL & OVERLAY --- */
#terminal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998; /* just below cmd palette */
    background: rgba(10, 9, 8, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

[data-theme="light"] #terminal-overlay {
    background: rgba(245, 242, 237, 0.85);
}

#terminal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.interactive-terminal,
.interactive-terminal *,
.interactive-terminal *::before,
.interactive-terminal *::after {
    box-sizing: border-box;
}

.interactive-terminal {
    background: #0d0c0b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 
        0 32px 80px -16px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    width: 90vw;
    max-width: 900px;
    height: 75vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    margin: 0;
    position: relative;
    z-index: 10;
    font-family: var(--font-mono);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateY(20px) scale(0.98);
    opacity: 0;
}

#terminal-overlay.open .interactive-terminal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* CRT Scanline effect (REMOVED) */

.interactive-terminal.glitch {
    animation: iterm-glitch 0.25s cubic-bezier(.25, .46, .45, .94) both;
}

@keyframes iterm-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

[data-theme="light"] .interactive-terminal {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* --- MINI TERMINAL TRIGGER --- */
.mini-terminal-trigger {
    background: #0d0c0b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-base);
    max-width: 820px;
    margin: 2rem auto 4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}

.mini-terminal-trigger:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 108, 0.2);
    transform: translateY(-2px);
}

[data-theme="light"] .mini-terminal-trigger {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
}

.mini-term-header {
    display: flex;
    align-items: center;
    background: #1a1816;
    height: 38px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mini-term-header {
    background: #f5f2ed;
    border-bottom-color: rgba(0,0,0,0.06);
}

.mini-term-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 1rem;
}

.mini-term-body {
    padding: 1.5rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mini-term-body .iterm-prompt-sym {
    color: #4ade80;
}

.cursor-blink {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--text-secondary);
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Terminal Header */
.iterm-header {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: #1a1816;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    height: 42px;
}

.term-dots {
    display: flex;
    gap: 7px;
    padding: 0 1rem;
    height: 100%;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.04);
    min-width: 90px;
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.term-red { background: #ff5f56; box-shadow: 0 0 8px rgba(255,95,86,0.4); }
#term-close-btn { cursor: pointer; transition: filter 0.2s; }
#term-close-btn:hover { filter: brightness(1.3); }
.term-yellow { background: #ffbd2e; box-shadow: 0 0 8px rgba(255,189,46,0.4); }
.term-green { background: #27c93f; box-shadow: 0 0 8px rgba(39,201,63,0.4); }

.iterm-tabs {
    display: flex;
    gap: 0;
    height: 100%;
    flex: 1;
}

.iterm-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 1rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
}

.iterm-tab svg {
    opacity: 0.6;
}

.iterm-tab.active {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.7);
    border-bottom: 2px solid var(--accent-primary);
}

.iterm-tab:hover:not(.active) {
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.55);
}

.iterm-controls {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 100%;
    margin-left: auto;
}

/* Terminal Toolbar */
.iterm-toolbar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.65rem;
}

.toolbar-item {
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-icon {
    opacity: 0.5;
}

[data-theme="light"] .iterm-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.015) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .term-dots {
    border-right-color: rgba(0,0,0,0.04);
}

[data-theme="light"] .iterm-tab {
    border-right-color: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.4);
}

[data-theme="light"] .iterm-tab.active {
    color: rgba(0,0,0,0.7);
    border-bottom-color: var(--accent-primary);
}

[data-theme="light"] .iterm-toolbar {
    background: rgba(0,0,0,0.03);
    border-bottom-color: rgba(0,0,0,0.03);
}

[data-theme="light"] .toolbar-item {
    color: rgba(0,0,0,0.5);
}

/* Prompt Elements */
.iterm-prompt-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.iterm-prompt-user { color: #4ade80; }
.iterm-prompt-at { color: #e8e4df; opacity: 0.5; }
.iterm-prompt-host { color: #facc15; }
.iterm-prompt-colon { color: #e8e4df; opacity: 0.5; }
.iterm-prompt-path { color: #38bdf8; }
.iterm-prompt-sym { color: #f472b6; font-weight: 700; }

[data-theme="light"] .iterm-prompt-user { color: #059669; }
[data-theme="light"] .iterm-prompt-host { color: #ca8a04; }
[data-theme="light"] .iterm-prompt-path { color: #0284c7; }
[data-theme="light"] .iterm-prompt-at, 
[data-theme="light"] .iterm-prompt-colon,
[data-theme="light"] .iterm-prompt-sym { color: #2d2a28; opacity: 0.6; }

.iterm-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

[data-theme="light"] .iterm-title {
    color: rgba(0, 0, 0, 0.5);
}

/* Terminal Body */
.iterm-body {
    padding: 1.5rem 2.5rem 2.5rem 1.5rem;
    height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 108, 0.2) transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

/* Welcome Message */
.iterm-welcome {
    margin-bottom: 1rem;
    animation: fadeSlideIn 0.5s ease;
}

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

.welcome-ascii {
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(201, 168, 108, 0.7);
    white-space: pre;
}

.welcome-ascii .highlight {
    color: #4ade80;
    font-weight: 600;
}

.iterm-history {
    flex: 1;
    overflow-y: visible;
    overflow-x: visible;
    font-size: 0.82rem;
    line-height: 1.7;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
    padding-right: 1.5rem;
}

.iterm-line {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.iterm-cmd-text {
    color: #e8e4df;
    font-weight: 500;
    margin-left: 0.2rem;
    padding-right: 1.5rem;
}

[data-theme="light"] .iterm-cmd-text {
    color: #2d2a28;
}

.iterm-output-line {
    color: #a8a4a0;
    padding-left: 0;
    padding-right: 0.5rem;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 0.35rem;
    line-height: 1.6;
}

.iterm-output-line.accent { color: var(--accent-primary); font-weight: 500; }
.iterm-output-line.green { color: #4ade80; }
.iterm-output-line.cool { color: #8ab4c7; }
.iterm-output-line.err { color: #f87171; }
.iterm-output-line.cyan { color: #22d3ee; }
.iterm-output-line.purple { color: #c084fc; }

[data-theme="light"] .iterm-output-line { color: #5a5248; }
[data-theme="light"] .iterm-output-line.accent { color: var(--accent-primary); font-weight: 600; }
[data-theme="light"] .iterm-output-line.green { color: #059669; }
[data-theme="light"] .iterm-output-line.cool { color: #0284c7; }
[data-theme="light"] .iterm-output-line.err { color: #dc2626; }
[data-theme="light"] .iterm-output-line.cyan { color: #0891b2; }
[data-theme="light"] .iterm-output-line.purple { color: #9333ea; }

/* Neofetch Styling */
.iterm-nf-wrap {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
    font-family: var(--font-mono);
}

.iterm-nf-ascii {
    color: var(--accent-primary);
    white-space: pre;
    line-height: 1.1;
    font-size: 0.72rem;
}

.iterm-nf-data {
    display: flex;
    flex-direction: column;
}

.iterm-nf-data b {
    color: var(--accent-primary);
}

/* Matrix Effect Styling */
.iterm-matrix-col {
    position: absolute;
    top: -100px;
    width: 14px;
    color: #4ade80;
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: center;
    line-height: 1;
    text-shadow: 0 0 5px #4ade80;
    pointer-events: none;
    z-index: 5;
    word-break: break-all;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); opacity: 1; }
    100% { transform: translateY(500px); opacity: 0; }
}

/* Terminal Input Row */
.iterm-input-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
    padding: 0.5rem 0;
    border-top: 1px dashed rgba(255,255,255,0.06);
    flex-wrap: wrap;
}

.iterm-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    color: #e8e4df;
    caret-color: var(--accent-primary);
    min-width: 0;
    padding: 0.2rem 1.5rem 0.2rem 0;
    line-height: 1.6;
    height: auto;
    min-height: 1.6em;
    vertical-align: baseline;
}

[data-theme="light"] .iterm-input {
    color: #2d2a28;
}

/* Terminal Footer */
.iterm-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.62rem;
}

.footer-hint {
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.03em;
}

[data-theme="light"] .iterm-footer {
    background: rgba(0,0,0,0.015);
    border-top-color: rgba(0,0,0,0.04);
}

[data-theme="light"] .footer-hint {
    color: rgba(0,0,0,0.45);
}

/* --- TERMINAL-VISUAL DIVIDER --- */
.terminal-visual-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.terminal-visual-divider .divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.terminal-visual-divider .divider-glyphs {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
    font-size: 1rem;
    color: rgba(201, 168, 108, 0.6);
}

.terminal-visual-divider .divider-glyphs span {
    animation: glyphPulse 3s ease-in-out infinite;
}

.terminal-visual-divider .divider-glyphs span:nth-child(1) { animation-delay: 0s; }
.terminal-visual-divider .divider-glyphs span:nth-child(2) { animation-delay: 0.5s; }
.terminal-visual-divider .divider-glyphs span:nth-child(3) { animation-delay: 1s; }

@keyframes glyphPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

[data-theme="light"] .terminal-visual-divider .divider-line {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 90, 43, 0.2) 20%, 
        rgba(139, 90, 43, 0.4) 50%, 
        rgba(139, 90, 43, 0.2) 80%, 
        transparent 100%);
}

[data-theme="light"] .terminal-visual-divider .divider-glyphs {
    color: rgba(139, 90, 43, 0.4);
}

/* --- ASCII HERO --- */
.ascii-hero-wrap {
    margin: 0 auto 2rem;
    line-height: 1;
    cursor: default;
    user-select: none;
    position: relative;
    display: inline-block;
}

.ascii-hero-wrap canvas {
    display: block;
    image-rendering: pixelated;
}

#ascii-canvas {
    font-family: var(--font-mono);
    font-size: clamp(5px, 1.1vw, 9px);
    line-height: 1.15;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    opacity: 0.55;
    white-space: pre;
    display: block;
    transition: opacity 0.4s ease;
    overflow: hidden;
    max-width: 100%;
    /* clamp width so it doesn't overflow on small screens */
    width: min(640px, 92vw);
    margin: 0 auto 0.5rem;
}

#ascii-canvas:hover {
    opacity: 0.85;
}

/* --- 3D GLOBE --- */
#globe-section {
    padding: 0 2rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#globe-container {
    position: relative;
    width: min(500px, 92vw);
    height: min(500px, 92vw);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    -webkit-clip-path: circle(50%);
    clip-path: circle(50%);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] #globe-container {
    background: radial-gradient(circle, rgba(122, 98, 64, 0.08) 0%, transparent 70%);
    box-shadow: 0 0 60px rgba(122, 98, 64, 0.05);
}

#globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.globe-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.4;
    text-align: center;
    margin-top: 1rem;
}

/* --- GLSL BACKGROUND --- */
#glsl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -4;
    opacity: 0.6;
}

[data-theme="light"] #glsl-canvas {
    opacity: 0.2;
}

/* hide neural canvas now that glsl replaces it */
#neural-canvas {
    display: none;
}

/* --- SECTION DIVIDER (fallback) --- */
.section-divider {
    display: none;
}

/* --- TOAST NOTIFICATION --- */
#toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 108, 0.25);
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .cmd-trigger-hint { display: none; }
    #ascii-canvas { font-size: 4.5px; }
    .interactive-terminal { max-width: 95vw; margin: 1.5rem auto 4rem; border-radius: 10px; }
    .iterm-body { height: 280px; padding: 1rem 1rem 1rem 1rem; overflow-x: hidden; }
    .iterm-header { height: 36px; }
    .term-dots { min-width: 70px; padding: 0 0.75rem; gap: 5px; }
    .term-dot { width: 10px; height: 10px; }
    .iterm-tab { padding: 0 0.75rem; font-size: 0.65rem; }
    .iterm-tab span { display: none; }
    .iterm-controls { display: none; }
    .iterm-toolbar { padding: 0.4rem 0.75rem; gap: 0.8rem; font-size: 0.6rem; }
    .iterm-footer { padding: 0.5rem 0.75rem; gap: 1rem; font-size: 0.55rem; }
    .welcome-ascii { font-size: 0.55rem; }
    .iterm-welcome { margin-bottom: 0.75rem; }
    .terminal-visual-divider { padding: 1.5rem 1rem; }
    .terminal-visual-divider .divider-glyphs { padding: 0 0.8rem; font-size: 0.75rem; }
    #globe-container { width: min(360px, 88vw); height: min(360px, 88vw); }
}

@media (max-width: 480px) {
    .interactive-terminal { border-radius: 8px; }
    .iterm-body { height: 250px; }
    .iterm-tabs { display: none; }
    .iterm-title { font-size: 0.6rem; }
}