@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Preload critical fonts */
@font-face {
    font-family: 'VT323';
    font-display: swap;
    src: local('VT323'),
         url('https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2isfFJU.woff2') format('woff2');
}

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

html {
    font-size: 17px; /* Base font size for rem calculations */
}

/* CRT Effect Overlay - Strong scanlines and curve */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.02) 0px,
            transparent 1px,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.05) 2px,
            rgba(0, 0, 0, 0.05) 4px
        );
    pointer-events: none;
    z-index: 9999;
    animation: flicker 0.15s infinite;
}

/* CRT screen curve effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 9998;
}

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

body {
    font-family: 'VT323', 'Courier New', monospace;
    background:#18083b;
    color: #cccccc;
    font-size: 1.25rem; /* 20px */
    line-height: 1.4;
    letter-spacing: 0.05em;
    font-weight: 400;
    text-shadow: 
        0 0 2px rgba(255, 255, 255, 0.3),
        0 0 4px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(255, 255, 255, 0.1);
    text-rendering: optimizeLegibility;
}

a:hover{
    text-shadow: 0 0 8px rgba(255, 255, 255, 1), 0 0 16px rgba(200, 200, 255, 0.8), 0 0 24px rgba(150, 150, 255, 0.6), 0 0 32px rgba(100, 100, 255, 0.4) !important;
    transform: scale(1.02);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Bar */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #555555;
}

.header-logo .logo-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 0.25em;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.header-logo .logo-link:hover {
    color: #f0f0ff;
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 1),
        0 0 16px rgba(200, 200, 255, 0.8),
        0 0 24px rgba(150, 150, 255, 0.6),
        0 0 32px rgba(100, 100, 255, 0.4);
    transform: scale(1.02);
    text-decoration: none;
}

.header-time {
    font-size: 1.125rem; /* 18px */
    font-family: 'VT323', monospace;
    color: #aaaaaa;
}

.header-time .system-id {
    color: #dddddd;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 30px;
    margin-bottom: 40px;
}

.main-grid.single-layout {
    grid-template-columns: 240px 1fr 240px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Panels with borders */
.left-panel {
    border-right: 1px solid #444444;
    padding: 1.25rem;
    font-size: 1.125rem; /* 18px */
    color: #bbbbbb;
}

.right-panel {
    border-left: 1px solid #444444;
    padding: 1.25rem;
    font-size: 1.125rem; /* 18px */
    color: #bbbbbb;
}

.right-panel a {
    color: #cccccc;
    text-decoration: none;
}

.right-panel a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.02);
}

.section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333333;
}

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

.subsection {
    margin-bottom: 1rem;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888888;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Unified info tables for all right panel sections */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem; /* 16px */
}

.info-table tr {
    border-bottom: 1px solid #333333;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 0.5rem 0;
    vertical-align: top;
}

.info-table .info-category {
    color: #888888;
    width: 40%;
    font-size: 0.9375rem; /* 15px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-table td:last-child {
    color: #bbbbbb;
    font-size: 1rem; /* 16px */
}

/* Post entries on homepage */
.post-entry {
    margin: 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.post-entry:last-child {
    border-bottom: none;
}

.post-header {
    margin-bottom: 0.5rem;
    font-size: 1.125rem; /* 18px */
}

.post-header .post-date {
    color: #888888;
    font-size: 1rem; /* 16px */
}

.post-header a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid #666666;
    font-size: 1.125rem; /* 18px */
}

.post-header a:hover {
    border-bottom-color: #aaaaaa;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.post-meta {
    font-size: 0.875rem; /* 14px */
    color: #777777;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-summary {
    font-size: 1rem; /* 16px */
    color: #aaaaaa;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.section-title {
    font-size: 1.375rem; /* 22px */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 500;
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 1rem;
    color: #bbbbbb;
}

.data-item span:first-child {
    color: #888888;
}

/* Navigation Buttons - Old school style */
.nav-buttons {
    margin-bottom: 20px;
}

.nav-button {
    display: block;
    border: 1px solid #888888;
    padding: 0.5rem 1rem;
    margin: 0 0 0.5rem 0;
    color: #cccccc;
    text-decoration: none;
    font-size: 1.125rem; /* 18px */
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.box {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    margin: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.nav-button:hover,
.box:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #aaaaaa;
    color: #ffffff;
}

.nav-button.active,
.box.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: #cccccc;
    color: #ffffff;
}

/* Center Content */
.center-content {
    padding: 1.5rem;
    min-height: 500px;
}

.content-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 4px double #666;
    font-size: 1.75rem;
    font-weight: 500;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.content-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333333;
    font-size: 0.875rem; /* 14px */
    color: #bbbbbb;
}

.content-label {
    text-align: right;
    color: #aaa;
    text-transform: uppercase;
    font-size: 0.75rem; /* 12px */
    letter-spacing: 0.05em;
}

/* Memory Display */
.memory-display {
    font-size: 1rem; /* Base text 16px */
    line-height: 1.8;
    margin: 1.5rem 0;
    font-family: 'VT323', monospace;
    color: #aaaaaa;
    word-break: break-word;
}

/* Homepage needs pre-wrap for formatted text */
.memory-display.homepage-content {
    white-space: pre-wrap;
}


/* Directory listings need normal whitespace */
.directory-listing {
    white-space: normal;
}

/* ========== HEADING HIERARCHY ========== */
h1, .memory-display h1, .content-header {
    font-size: 1.75rem;
    margin: 2rem 0 1rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

h2, .memory-display h2 {
    font-size: 1.5rem;
    margin: 1.75rem 0 1rem 0;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
}

h3, .memory-display h3 {
    font-size: 1.375rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f0f0f0;
    line-height: 1.3;
}

h4, .memory-display h4 {
    font-size: 1.375rem;
    margin: 1.25rem 0 0.75rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e8e8e8;
    line-height: 1.3;
}

h5, .memory-display h5 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e0e0e0;
    line-height: 1.4;
}

h6, .memory-display h6 {
    font-size: 1.125rem;
    margin: 1rem 0 0.5rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d8d8d8;
    line-height: 1.4;
}

.memory-display p {
    margin: 1rem 0;
    line-height: 1.8;
    font-size: 1.1rem; /* 16px - regular text */
    color: #aaa;
}

.memory-display a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid #888888;
    transition: all 0.2s;
    font-weight: 500;
}

.memory-display a:hover {
    color: #ffffff;
    border-bottom-color: #aaaaaa;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.memory-display pre {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 13px;
}

.memory-display code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    font-size: 13px;
}

.memory-display pre code {
    background: none;
    padding: 0;
}

.memory-display blockquote {
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    padding-left: 20px;
    margin: 20px 0;
    opacity: 0.8;
    font-style: italic;
}

/* Image filters for CRT effect */
img {
    max-width: 100%;
    height: auto;
    filter: grayscale(1) blur(1px);
    transition: filter 0.3s ease;
    margin-top:30px;
    margin-bottom:30px;
}

img:hover {
    filter: grayscale(0.8) blur(0.5px);
}

.memory-display ul,
.memory-display ol {
    margin: 15px 0;
    padding-left: 25px;
}

.memory-display li {
    margin: 8px 0;
}

/* Status Grid */
.status-grid {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #aaaaaa;
}

.status-grid > div {
    color: #bbbbbb;
}

.highlight {
    color: #ffffff;
    font-weight: 500;
}

/* Bottom Navigation - Playful buttons */
.bottom-nav {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    flex-wrap: wrap;
}

.nav-box {
    border: 1px solid #888888;
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    font-size: 1rem; /* 16px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #cccccc;
}

.nav-box:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #aaaaaa;
    color: #ffffff;
}

.nav-box.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: #cccccc;
    color: #ffffff;
}

.nav-box.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
    color: #555555;
}

/* Terminal Block */
/* Console at top with limited height */
.console-container {
    border: 1px solid #444444;
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
}

#console-output {
    max-height: 8rem;
    height: 8rem;
    overflow-y: auto;
    font-size: 0.875rem; /* 14px */
    color: #999999;
    padding: 0 1.25rem;
}

#console-output::-webkit-scrollbar {
    width: 4px;
}

#console-output::-webkit-scrollbar-track {
    background: #111;
}

#console-output::-webkit-scrollbar-thumb {
    background: #444;
}

.console-line {
    padding: 0.25rem 0.5rem;
    border-top: 1px solid #333333;
    background: rgba(0, 0, 0, 0.3);
}

.terminal-block {
    border: 1px solid #444444;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: #aaaaaa;
}

.terminal-line {
    padding: 3px 0;
    font-size: 14px;
    opacity: 0.9;
}

.terminal-line a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.terminal-line a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Command Input */
.cmd-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.875rem; /* 14px */
    outline: none;
    width: calc(100% - 50px);
}

/* Console output */
.console-output {
    opacity: 0.8;
    white-space: pre-wrap;
    font-family: 'VT323', monospace;
    line-height: 1.2;
    padding: 0.125rem 0;
}

/* Animations */
.blink {
    animation: blink 1s step-start infinite;
}

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

/* Loading animation */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Removed boot sequence animation */


/* No animations - content appears immediately */

/* No terminal boot animations */

/* Homepage post styling */
.homepage-post-item {
    margin: 0.75rem 0;
    padding-bottom: 2rem;
    padding-top: 2rem;
    border-bottom: 1px solid #888;
}

.homepage-post-item:first-child {
    padding-top: 0;
}

.homepage-post-item:last-child {
    border-bottom: none;
}

.post-header-line {
    margin-bottom: 0.25rem;
}

.post-date-heading,
.post-arrow {
    font-size: 1.125rem;
    color: #e0e0e0;
    font-weight: 400;
}

.post-title-heading {
    font-size: 1.125rem;
    color: #f5f5f5;
    text-decoration: none;
    border-bottom: 1px solid #666666;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.post-title-heading:hover {
    color: #ffffff;
    border-bottom-color: #aaaaaa;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.post-tags {
    font-size: 0.875rem;
    color: #888888;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-full-content {
    margin-top: 0.5rem;
    color: #aaaaaa;
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 25px;
    font-size: 0.75rem; /* 12px */
    opacity: 0.6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.footer:hover {
    opacity: 1.0;
}

.footer-links {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.footer-separator {
    margin: 0 1rem;
    color: #666666;
}

.footer-copyright {
    color: #aaaaaa;
}

.footer-tagline {
    margin-bottom: 2rem;
    color: #888888;
    font-size: 0.7rem;
}

/* Social SVG icons in footer */
.footer-links .soc {
    text-decoration: none;
    border-bottom: none;
}

.footer-links .soc svg {
    height: 20px;
    width: auto;
    fill: #cccccc;
    transition: all 0.2s;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.footer-links .soc:hover {
    text-decoration: none;
    border-bottom: none;
}

.footer-links .soc:hover svg {
    fill: #ffffff;
}

/* Directory Listing */
.directory-listing {
    margin-top: 1rem;
}

.list-entry {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.list-entry:last-child {
    border-bottom: none;
}

.list-line {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.list-date {
    color: #aaa;
    font-size: 1rem; /* 16px */
    min-width: 100px;
}

.list-arrow {
    color: #888888;
}

.list-line a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid #888888;
    font-size: 1.125rem; /* 18px */
}

.list-line a:hover {
    border-bottom-color: #aaaaaa;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.list-summary {
    color: #999999;
    font-size: 1rem; /* 16px */
    line-height: 1.4;
    margin-left: 120px;
}

/* Navigation Links */
.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.nav-link:hover {
    color: #ffffff;
}

/* ========== MOBILE MENU ========== */
.mobile-menu-toggle {
    display: none;
    border: 1px solid #888888;
    padding: 0.5rem 1rem;
    background: transparent;
    font-family: 'VT323', 'Courier New', monospace;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    //background: rgba(0, 0, 0, 0.95);
    background:#18083b;
    z-index: 10000;
    padding: 2rem;
    color: #cccccc;
    font-size: 1.25rem; /* 20px */
    line-height: 1.4;
    letter-spacing: 0.05em;
    font-weight: 400;
    text-shadow:
            0 0 2px rgba(255, 255, 255, 0.3),
            0 0 4px rgba(255, 255, 255, 0.2),
            0 0 8px rgba(255, 255, 255, 0.1);
    text-rendering: optimizeLegibility;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #ffffff;
    cursor: pointer;
}

.mobile-menu-content {
    margin-top: 3rem;
}

.mobile-menu-content .nav-button {
    font-size: 1.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    border-color: #ffffff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 200px 1fr 200px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop elements */
    .left-panel,
    .right-panel,
    .console-container {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Adjust grid for mobile */
    .main-grid,
    .main-grid.single-layout {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0;
    }
    
    /* Adjust header */
    .header-bar {
        padding: 1rem;
    }
    
    .header-logo .logo-link {
        font-size: 1.5rem;
    }
    
    /* Make content grid responsive */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }
    
    .content-label {
        text-align: left;
        margin-bottom: 0.25rem;
    }
    
    /* Remove left margin on mobile */
    .list-summary {
        margin-left: 0;
    }
    
    .header-time {
        display: none;
    }
    
    /* Adjust content */
    .center-content {
        padding: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Adjust bottom nav */
    .bottom-nav {
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .nav-box {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Adjust fonts for mobile */
    body {
        font-size: 1.125rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
}