/* ===============================================
   INFRASTRUCTURE COMMAND CONSOLE - STYLES
   Emperor Black/Grey Theme
   =============================================== */

/* CSS Variables */
:root {
    --bg: #050607;
    --surface: rgba(12, 13, 15, 0.72);
    --surface2: rgba(18, 20, 23, 0.62);
    --border: rgba(255, 255, 255, 0.10);
    --text: #E7E9EE;
    --muted: #A8AFBC;
    --highlight: #D7DBE3;
    --nav-height: 60px;
    --transition: 0.2s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Canvas Background */
#backgroundCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* CSS Overlay Layer - Scanline + Noise */
#backgroundCanvas::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: 
        linear-gradient(0deg, 
            transparent 0%, 
            rgba(231, 233, 238, 0.02) 50%, 
            transparent 100%
        ),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
    opacity: 0.6;
    mix-blend-mode: overlay;
}

/* Noise pattern using CSS */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.01) 1px,
            rgba(255, 255, 255, 0.01) 2px
        ),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.01) 1px,
            rgba(255, 255, 255, 0.01) 2px
        );
    opacity: 0.15;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(12, 13, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--highlight);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--highlight);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--highlight);
    background: rgba(255, 255, 255, 0.12);
}

.nav-link-timeline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    align-items: center;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sections */
.section {
    padding: 6rem 0;
    scroll-margin-top: var(--nav-height);
}

.hero-section {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--highlight);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 2.5rem;
    color: var(--highlight);
    letter-spacing: -0.02em;
}

/* Content Cards */
.content-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.content-card p {
    margin-bottom: 1rem;
    color: var(--muted);
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* Timeline Items (for Experience/Education) */
.timeline-item {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 0.25rem;
}

.timeline-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.timeline-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

.timeline-content {
    color: var(--muted);
}

.timeline-summary {
    margin-bottom: 1rem;
    color: var(--text);
}

.timeline-list {
    list-style: none;
    padding-left: 0;
}

.timeline-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.timeline-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--muted);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--highlight);
    flex: 1;
}

.project-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.project-content {
    flex: 1;
}

.project-section {
    margin-bottom: 1rem;
}

.project-section:last-child {
    margin-bottom: 0;
}

.project-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-section p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

.project-tech {
    font-size: 0.85rem !important;
    color: var(--muted) !important;
}

.project-links {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.project-link {
    color: var(--highlight);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.project-link:hover {
    color: var(--text);
}

/* Certifications Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.cert-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
}

.cert-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.cert-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.cert-status {
    font-size: 0.85rem;
    color: var(--muted);
}

.cert-in-progress {
    border-color: rgba(255, 255, 255, 0.15);
}

.cert-planned {
    opacity: 0.7;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 1rem;
}

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

.skill-list li {
    padding: 0.5rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

/* Contact */
.contact-content {
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition);
}

.contact-btn:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-btn-resume {
    background: rgba(255, 255, 255, 0.08);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--highlight);
}

.service-badge {
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.service-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--muted);
}

.service-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--highlight);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-section p {
    font-size: 0.95rem;
}

.service-section ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.service-section li {
    position: relative;
    padding-left: 1.1rem;
}

.service-section li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--muted);
}

.service-cta {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
}

.service-cta:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    scroll-margin-top: var(--nav-height);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   TIMELINE PAGE STYLES
   =============================================== */

.timeline-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.timeline-main {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Command Panel */
.command-panel {
    width: 320px;
    flex-shrink: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    z-index: 2;
}

.panel-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.panel-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

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

.panel-section {
    margin-bottom: 1.5rem;
}

.panel-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--highlight);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-input {
    width: 100%;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition);
}

.panel-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.panel-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.panel-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.panel-btn {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.panel-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.panel-btn-wide {
    width: 100%;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.panel-btn-wide:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.panel-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
}

.panel-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.system-log-section {
    margin-bottom: 0;
}

.system-log {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

.system-log::-webkit-scrollbar {
    width: 6px;
}

.system-log::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

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

.log-entry {
    margin-bottom: 0.25rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.log-timestamp {
    color: rgba(255, 255, 255, 0.4);
}

/* Timeline Content */
.timeline-content {
    flex: 1;
    min-width: 0;
    scroll-margin-top: var(--nav-height);
}

.timeline-header {
    margin-bottom: 3rem;
}

.timeline-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--highlight);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.timeline-page-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
}

.timeline-container {
    position: relative;
}

.timeline-year {
    margin-bottom: 3rem;
}

.year-header {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--highlight);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.02em;
}

.timeline-entry {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all var(--transition);
}

.timeline-entry:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.timeline-entry.hidden {
    display: none;
}

.entry-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
}

.entry-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.toggle-icon {
    flex-shrink: 0;
    transition: transform var(--transition);
}

.entry-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

.entry-date {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    min-width: 80px;
}

.entry-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--highlight);
}

.entry-content {
    padding: 0 1.5rem 1.5rem 3.75rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    display: none;
}

.entry-content.expanded {
    display: block;
}

.entry-content p {
    margin-bottom: 0.75rem;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

.entry-content strong {
    color: var(--text);
}

/* Compact View */
body.compact-view .entry-content {
    font-size: 0.85rem;
    padding: 0 1.5rem 1rem 3.75rem;
}

body.compact-view .timeline-entry {
    margin-bottom: 0.75rem;
}

/* Focus Mode */
body.focus-mode #backgroundCanvas {
    opacity: 0.2;
}

body.focus-mode .command-panel {
    background: rgba(12, 13, 15, 0.95);
}

body.focus-mode .timeline-entry {
    background: rgba(12, 13, 15, 0.95);
}

/* Scan Sweep (timeline only) */
.timeline-page .timeline-content::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    mix-blend-mode: screen;
    opacity: 0.05;
    animation: sweep 6s linear infinite;
}

@keyframes sweep {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.mobile-panel-toggle {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .timeline-page .timeline-content::after {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .timeline-main {
        flex-direction: column;
    }
    
    .command-panel {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: calc(var(--nav-height) + 8px);
        right: 1rem;
        flex-direction: column;
        background: rgba(12, 13, 15, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
        border-radius: 10px;
        padding: 0.75rem;
        gap: 0.4rem;
        min-width: 240px;
        display: none;
        pointer-events: auto;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .nav-link {
        padding: 0.7rem 0.85rem;
        font-size: 0.95rem;
        width: 100%;
        line-height: 1.6;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .hero-section {
        min-height: calc(100vh - var(--nav-height) - 4rem);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
    
    .timeline-main {
        padding: 1rem;
    }
    
    .panel-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .entry-content {
        padding: 0 1rem 1rem 2.5rem;
    }
    
    body.compact-view .entry-content {
        padding: 0 1rem 0.75rem 2.5rem;
    }

    .mobile-panel-toggle {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    /* Disable CSS overlay layer in reduced motion */
    #backgroundCanvas::after,
    body::before {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    #backgroundCanvas,
    .navbar,
    .back-to-top,
    .command-panel,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}
