:root {
    --bg-dark: #050505;
    --terminal-bg: rgba(13, 17, 23, 0.95);
    --terminal-sidebar: #161b22;
    --terminal-accent: #58a6ff;
    --terminal-green: #3fb950;
    --terminal-yellow: #d29922;
    --terminal-border: #30363d;
    --terminal-purple: #bc8cff;
    
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --text-white: #ffffff;
    
    --win-close: #ff5f56;
    --win-min: #ffbd2e;
    --win-max: #27c93f;
    
    --font-mono: 'Fira Code', monospace;
}

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

html, body {
    height: 100%;
    width: 100%;
    font-family: var(--font-mono);
    color: var(--text-main);
    background-color: var(--bg-dark);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base Typographic Resets & Utility */
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

/* Ambient Background */
.ambient-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, #111 0%, #000 100%);
    pointer-events: none;
}

/* Main Container */
.terminal-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    height: 90vh; /* Adjusts nicely on mobile and desktop */
    margin: 0 1rem;
    background-color: var(--terminal-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--terminal-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: flicker 0.15s infinite alternate;
}

/* Desktop override to make it distinct if needed, but the max-width already handles centering */

/* CRT Overlay */
.crt-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 3px, 3px 100%;
    opacity: 0.3;
}

.scanline {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    height: 25%;
    width: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
    animation: scanline 8s linear infinite;
}

/* Animations */
@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

@keyframes flicker {
    0% { opacity: 0.98; }
    50% { opacity: 0.96; }
    100% { opacity: 1; }
}

@keyframes blink {
    0%, 100% { background-color: transparent; }
    50% { background-color: var(--terminal-accent); }
}

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

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Header */
.terminal-header {
    background-color: rgba(22, 27, 34, 0.8);
    border-bottom: 1px solid var(--terminal-border);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 40;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.control.close { background-color: var(--win-close); }
.control.minimize { background-color: var(--win-min); }
.control.maximize { background-color: var(--win-max); }

.session-info {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.header-right {
    font-size: 10px;
    font-weight: 700;
    color: var(--terminal-accent);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--terminal-accent);
    cursor: pointer;
    padding: 2px;
    line-height: 0;
}
.header-menu-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* Pull-to-refresh indicator */
.pull-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--terminal-green);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.1s, color 0.2s;
    pointer-events: none;
    z-index: 45;
    text-transform: uppercase;
}

.pull-indicator .pull-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.pull-indicator.ready {
    color: var(--terminal-accent);
}

.pull-indicator.ready .pull-arrow {
    transform: rotate(180deg);
}

.pull-indicator.reloading {
    color: var(--terminal-yellow);
    animation: blink 0.4s step-end infinite;
}

/* Main Content area */
.terminal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.terminal-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-bottom: 5rem; /* space for FAB */
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    
    overscroll-behavior-y: none;

    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.terminal-content::-webkit-scrollbar {
    display: none;
}

/* Command Blocks */
.command-block {
    display: flex;
    flex-direction: column;
}

.prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.prompt-arrow { color: var(--terminal-green); }
.prompt-dir { color: var(--terminal-accent); }
.command-text { 
    color: var(--text-white); 
    opacity: 0.9;
}

/* Specific Output Styling */
.output-bordered {
    padding-left: 1rem;
    border-left: 2px solid rgba(88, 166, 255, 0.4);
}

.gradient-text {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.role-text {
    color: var(--terminal-accent);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.description {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 350px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--terminal-border);
    padding: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(88, 166, 255, 0.1);
    border-color: var(--terminal-accent);
    transform: translateX(4px);
}

.link-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-exe { color: var(--terminal-green); }
.badge-dir { color: var(--terminal-yellow); }

.link-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    transition: color 0.2s;
}
.nav-link:hover .link-text { color: var(--terminal-accent); }

.chevron {
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-link:hover .chevron { color: var(--terminal-accent); }

/* Grid Layout for tech stack */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.grid-item {
    background-color: rgba(22, 27, 34, 0.4);
    border: 1px solid var(--terminal-border);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}
.grid-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dot-vue { background-color: #41b883; }
.dot-laravel { background-color: #ff2d20; }
.dot-php { background-color: #777bb4; }
.dot-postgres { background-color: #336791; }
.dot-linux { background-color: #fcc624; }
.dot-python { background-color: #3776ab; }
.dot-android { background-color: #3ddc84; }
.dot-js { background-color: #f7df1e; }
.dot-html { background-color: #e34f26; }
.dot-css { background-color: #1572b6; }
.dot-maria { background-color: #003545; }
.dot-bash { background-color: #4eaa25; }
.dot-scss { background-color: #cc6699; }
.dot-tailwind { background-color: #38b2ac; }

.tech-name {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Active Prompt */
.active-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
}

.cursor {
    width: 8px;
    height: 20px;
    background-color: var(--terminal-accent);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

/* FAB */
.fab-container {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
}

.fab {
    background-color: var(--terminal-accent);
    color: #000;
    padding: 0.75rem;
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:active {
    transform: scale(0.95);
}
.fab:hover {
    background-color: #79b7ff;
}

.hamburger {
    width: 1.5rem;
    height: 1.5rem;
}

/* Footer */
.terminal-footer {
    background-color: rgba(22, 27, 34, 0.6);
    border-top: 1px solid var(--terminal-border);
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    z-index: 40;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--terminal-green);
    box-shadow: 0 0 5px var(--terminal-green);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.version-tag {
    background-color: var(--terminal-accent);
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.5625rem;
}

@media (max-width: 600px) {
    .footer-left {
        width: 100%;
    }
    .location-indicator {
        background-color: var(--terminal-accent);
        color: #000;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 0.5625rem;
        margin-left: auto;
    }
    .footer-right > span:first-child { display: none; }
    #mouse-coords { display: none; }
    .header-menu-btn { display: flex; }

    .terminal-container {
        margin: 0;
        max-width: 100%;
        width: 100%;
        height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .terminal-content {
        padding: 1rem;
        padding-bottom: 5rem;
        gap: 2rem;
    }

    .terminal-footer {
        height: 32px;
    }

    .gradient-text {
        font-size: 1.5rem;
        word-break: break-word;
    }

    .role-text {
        font-size: 0.8rem;
    }

    .description {
        font-size: 0.7rem;
        max-width: 100%;
    }

    .prompt {
        font-size: 0.8rem;
    }

    .grid-item {
        padding: 0.4rem;
        gap: 0.4rem;
    }

    .tech-name {
        font-size: 0.625rem;
    }

    /* Contact page */
    .contact-details {
        align-items: flex-start;
        text-align: left;
    }

    .contact-item {
        font-size: 0.75rem;
        gap: 0.5rem;
        display: flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        text-align: left;
    }

    .contact-item .label {
        min-width: unset;
        width: auto;
        white-space: nowrap;
        font-size: 0.7rem;
    }

    .contact-item .link,
    .contact-item .value {
        overflow-wrap: anywhere;
        font-size: 0.7rem;
    }

    .ping-output {
        font-size: 0.65rem;
        overflow-x: auto;
    }

    .ping-output p {
        white-space: nowrap;
    }

    /* Footer */
    .terminal-footer {
        font-size: 0.55rem;
        padding: 0 0.5rem;
    }

    .version-tag {
        font-size: 0.5rem;
    }

    /* Session info */
    .session-info {
        font-size: 9px;
    }

    /* Subpages */
    .breadcrumbs {
        font-size: 0.75rem;
    }

    .description.italic {
        font-size: 0.65rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-desc {
        font-size: 0.7rem;
    }
}

/* Sidebar Drawer */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    background-color: var(--terminal-sidebar);
    border-right: 1px solid var(--terminal-border);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 20px 0 25px -5px rgba(0, 0, 0, 0.5);
}

.sidebar-overlay.active .sidebar {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.sidebar-header h2 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--terminal-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-style: italic;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 20px;
    height: 20px;
    transition: color 0.2s;
}
.close-btn:hover { color: var(--text-white); }

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    scrollbar-width: none;
}
.sidebar-content::-webkit-scrollbar { display: none; }

.file-tree {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tree-root {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--terminal-accent);
    gap: 0.5rem;
}
.folder-icon { width: 16px; height: 16px; }

.tree-files {
    margin-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.tree-item:hover {
    color: var(--text-white);
}

.tree-item.active {
    color: var(--text-white);
    border-left-color: rgba(88, 166, 255, 0.3);
}

.file-icon { font-weight: 700; }
.text-ts  { color: #60a5fa; }
.text-js  { color: #facc15; }
.text-md  { color: var(--terminal-accent); }
.text-php { color: #a78bde; }
.text-py  { color: #3776ab; }
.text-vue { color: #41b883; }
.text-sh  { color: #4eaa25; }
.text-sql { color: #336791; }

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
    margin-top: 2rem;
}

.sidebar-footer h3 {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 4px;
    width: 100%;
    background-color: rgba(255,255,255,0.05);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--terminal-green);
    width: 85%;
    box-shadow: 0 0 10px var(--terminal-green);
}

.sync-text {
    font-size: 0.5625rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Subpage Specific Styles (What We Do) --- */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb-separator {
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-white);
}

.expertise-header {
    margin-bottom: 2rem;
}

.description.italic {
    font-style: italic;
    font-family: var(--font-mono);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
}

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

.card-tag {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.card-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tag {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Service Color Accents */
.text-blue { color: var(--terminal-accent); }
.text-green { color: var(--terminal-green); }
.text-orange { color: #f97316; }
.text-purple { color: var(--terminal-purple); }

.border-blue:hover { border-color: var(--terminal-accent); }
.border-green:hover { border-color: var(--terminal-green); }
.border-orange:hover { border-color: #f97316; }
.border-purple:hover { border-color: var(--terminal-purple); }

.bg-blue { background: rgba(88, 166, 255, 0.15); color: var(--terminal-accent); }
.bg-green { background: rgba(63, 185, 80, 0.15); color: var(--terminal-green); }
.bg-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.bg-purple { background: rgba(188, 140, 255, 0.15); color: var(--terminal-purple); }

/* JSON Container */
.json-container {
    background: #0d1117;
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.json-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--terminal-border);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.json-controls {
    display: flex;
    gap: 6px;
}

.json-controls .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.5;
}

.dot.red { background: var(--win-close); }
.dot.yellow { background: var(--win-min); }
.dot.green { background: var(--win-max); }

.json-filename {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.json-content {
    padding: 1.25rem;
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0;
}

.json-content .purple { color: var(--terminal-purple); }
.json-content .blue { color: var(--terminal-accent); }
.json-content .green { color: var(--terminal-green); }

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

    .grid-layout {
        grid-template-columns: 1fr;
    }

    .gradient-text {
        font-size: 1.15rem;
    }

    .contact-item {
        flex-direction: row;
        gap: 0.35rem;
        align-items: baseline;
        text-align: left;
    }

    .contact-item .label {
        min-width: unset;
    }
}

/* Contact Details */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.contact-item .label {
    color: var(--terminal-accent);
    font-weight: 700;
    min-width: 80px;
}

.contact-item .link {
    color: var(--text-white);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.contact-item .link:hover {
    color: var(--terminal-accent);
}

.ping-output {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    line-height: 1.5;
}

/* Language Switcher */
.sidebar-section {
    padding-top: 2rem;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
    margin-top: 2rem;
}

.section-title {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--terminal-border);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--terminal-accent);
    color: var(--text-white);
}

.lang-btn.active {
    background: var(--terminal-accent);
    color: var(--terminal-bg);
    border-color: var(--terminal-accent);
    font-weight: 700;
}

/* ── Vue page transitions ──────────────────────────────────────────────────── */
.page-enter-active { transition: opacity 0.2s ease, transform 0.2s ease; }
.page-leave-active { transition: opacity 0.15s ease; }
.page-enter-from   { opacity: 0; transform: translateY(8px); }
.page-leave-to     { opacity: 0; }

/* ── Nav progress bar ─────────────────────────────────────────────────────── */
.nav-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--terminal-green);
    box-shadow: 0 0 6px var(--terminal-green);
    opacity: 0;
    z-index: 45;
    pointer-events: none;
}

/* ── Page content wrapper ─────────────────────────────────────────────────── */
.page-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    min-height: 100%;
}

.command-block {
    position: relative;
    z-index: 10;
}

/* ── Holographic Portrait on Home Page ─────────────────────────────────────── */
.portrait-bg {
    position: absolute;
    bottom: -150px;
    right: -80px;
    height: 290px;
    width: 320px;
    background-image: url('../img/rm.png');
    background-size: cover;
    background-position: center top;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55; 
    mix-blend-mode: screen; 
    
    /* Necháme stred (tvár) viac viditeľný */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 70%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 70%);
    
    /* Cyan matrix coloring */
    filter: grayscale(100%) sepia(100%) hue-rotate(185deg) saturate(500%) brightness(0.85) contrast(1.3);
    
    /* CRT Power-On Animation with pulse */
    animation: crt-turn-on 0.85s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

@keyframes crt-turn-on {
    0% {
        transform: scale(0.01, 0.01);
        opacity: 0;
    }
    10% {
        transform: scale(1, 0.01);
        opacity: 1; /* Bright horizontal line flash */
    }
    20% {
        transform: scale(1.1, 1.1); /* Over-expand slightly */
        opacity: 0.8;
    }
    30% {
        transform: scale(1, 1);
        opacity: 0.1; /* Flicker out */
    }
    50% {
        opacity: 0.9; /* Flicker intense */
    }
    70% {
        opacity: 0.2; /* Flicker out */
    }
    100% {
        transform: scale(1, 1);
        opacity: 0.55; /* Settled stable OPACITY */
    }
}

/* Cross-document View Transitions (Chrome 126+) */
@view-transition {
    navigation: auto;
}

.terminal-header { view-transition-name: terminal-header; }
.terminal-footer { view-transition-name: terminal-footer; }
.fab-container   { view-transition-name: terminal-fab; }

::view-transition-old(terminal-header),
::view-transition-new(terminal-header),
::view-transition-old(terminal-footer),
::view-transition-new(terminal-footer),
::view-transition-old(terminal-fab),
::view-transition-new(terminal-fab) {
    animation: none;
}
