:root {
    --bg-color: #000814;
    --primary-cyan: #00f5ff;
    --accent-purple: #7c3aed;
    --success-green: #00ff88;
    --text-main: #e0e0e0;
    --text-secondary: #a0aec0; /* Tertiary layer for metadata scannability */
    --text-dim: #718096;
    
    --glow-cyan: 0 0 10px rgba(0, 245, 255, 0.5);
    --glow-green: 0 0 10px rgba(0, 255, 136, 0.5);
    
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --layer-3-opacity: 0.07;
    --layer-4-opacity: 0.05;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body); /* Default to clean sans-serif */
    font-size: 16px; /* Increased from 14px */
    line-height: 1.6;
    overflow-x: hidden;
    hyphens: none;
    -webkit-hyphens: none;
}

/* Loader Overlay */
#loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.terminal-container {
    width: 100%;
    max-width: 800px;
    font-size: 1.1rem;
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
}

.cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
}

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

/* Background Layers */
#canvas-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#svg-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Parallax Layers */
.parallax-layer {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    pointer-events: none;
    opacity: var(--layer-3-opacity);
}

#parallax-bg-layer-1 {
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(0, 245, 255, 0.1) 1px, transparent 0);
    background-size: 40px 40px;
}

#parallax-bg-layer-2 {
    opacity: var(--layer-4-opacity);
    background-image: 
        linear-gradient(rgba(0, 245, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.05) 1px, transparent 1px);
    background-size: 150px 150px;
}

/* Page Sections */
/* Bio Photo Slot */
/* Bio Photo Slot - Expanded v12.0 */
.bio-photo-slot {
    width: 200px;
    height: 200px;
    margin-bottom: 2rem;
    border: 1px solid var(--primary-cyan);
    padding: 4px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 90% 0, 100% 10%, 100% 100%, 10% 100%, 0 90%);
}

.bio-photo-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, transparent 0%, var(--primary-cyan) 50%, transparent 100%);
    background-size: 100% 200%;
    animation: bio-scan 4s linear infinite;
    opacity: 0.2;
}

@keyframes bio-scan {
    0% { background-position: 0% 100%; }
    100% { background-position: 0% -100%; }
}

.bio-photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.8) brightness(1.1) sepia(0.2);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
    transition: filter 0.5s ease;
}

.bio-photo-slot:hover img {
    filter: grayscale(0.5) contrast(1.4) brightness(1.2);
}

/* Side Navigation HUD [Definitive Spec v9.1] */
#side-nav {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100; /* Revised v9.1 Stacking Context */
    font-family: var(--font-display);
    border-right: 1px solid rgba(0, 245, 255, 0.1);
    padding-right: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 101;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    width: 45px;
    height: 45px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

#mobile-nav-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--primary-cyan);
    transition: 0.3s;
}

#mobile-nav-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-nav-toggle.open .bar:nth-child(2) { opacity: 0; }
#mobile-nav-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

#side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-end;
}

#side-nav li {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

#side-nav li span {
    font-size: 0.6rem;
    opacity: 0.3;
    transition: inherit;
}

#side-nav li:hover {
    color: var(--primary-cyan);
    transform: translateX(-5px);
}

#side-nav li:hover span {
    opacity: 0.8;
    color: var(--primary-cyan);
}

#side-nav li.active {
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
}

#side-nav li.active span {
    opacity: 1;
    color: var(--primary-cyan);
}

#side-nav li.active::after {
    content: '';
    position: absolute;
    right: -1.6rem;
    width: 4px;
    height: 1.2rem;
    background: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
}

@media (max-width: 1024px) {
    #side-nav {
        right: 1.5rem;
        background: rgba(0, 8, 20, 0.8);
        backdrop-filter: blur(10px);
        padding: 1.5rem;
        border: 1px solid rgba(0, 245, 255, 0.1);
        border-radius: 4px;
    }
}

@media (max-width: 768px) {
    #mobile-nav-toggle { display: flex; }
    
    #side-nav {
        position: fixed;
        inset: 0;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 8, 20, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%); /* Start off-screen */
        border: none;
        padding: 0;
        z-index: 100;
    }

    #side-nav.open {
        transform: translateX(0);
    }

    #side-nav ul {
        align-items: center;
        gap: 3rem;
    }

    #side-nav li {
        font-size: 1.5rem;
    }

    #side-nav li.active::after {
        display: none;
    }
}

.page-section {
    position: relative;
    z-index: 2;
    padding: 6rem 0; /* Defensive rhythm v12.0: natural flow without voids */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1); 
}

/* Hero Separation Exclusion - Prevents name pushdown */
#hero.page-section {
    min-height: 100vh;
    padding: 2rem 0; 
    border-bottom: none;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-cyan);
    letter-spacing: 0.3em;
    border-left: 4px solid var(--primary-cyan);
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    padding-left: 1.8rem;
    opacity: 0.8;
    margin-top: -0.2rem;
}

/* Holo Card */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.holo-card {
    background: rgba(10, 20, 30, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.1);
    padding: 2rem;
    position: relative;
    clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
    transition: transform 0.1s ease-out;
    overflow: hidden;
}

/* Nav Utils */
.nav-utils {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

#legibility-toggle {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    color: var(--primary-cyan);
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

#legibility-toggle:hover {
    background: rgba(0, 245, 255, 0.2);
    box-shadow: var(--glow-cyan);
}

#legibility-toggle .icon {
    font-size: 1rem;
}

#legibility-toggle .label {
    letter-spacing: 0.1em;
}

/* Shimmer Overlay */
.holo-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(0, 245, 255, 0.1) 48%,
        rgba(0, 245, 255, 0.4) 50%,
        rgba(0, 245, 255, 0.1) 52%,
        transparent 55%
    );
    transform: rotate(45deg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.holo-card:hover::after {
    opacity: 1;
}

.holo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.dashboard-header {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* System Metrics Section Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.metric-item {
    text-align: center;
    padding: 1.5rem;
    border-top: 2px solid rgba(0, 245, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.metric-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.15rem;
    text-transform: uppercase;
}

/* GitHub Activity Container */
.github-activity-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem 0;
}

.github-stats-img {
    height: 165px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.github-stats-img:hover {
    transform: scale(1.02);
}

/* Skill Resource Dashboard Aesthetic */
.skill-row {
    margin-bottom: 1.5rem;
    position: relative;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.2rem;
    color: var(--text-dim);
}

.progress-bg {
    height: 8px;
    background: rgba(0, 245, 255, 0.03);
    border: 1px solid rgba(0, 245, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan) 0%, var(--accent-purple) 100%);
    box-shadow: 0 0 15px var(--primary-cyan);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
}

/* Digital segmented effect */
.progress-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, transparent 0%, transparent 80%, var(--bg-color) 80%, var(--bg-color) 100%);
    background-size: 15px 100%;
    z-index: 2;
}

/* Experience Timeline Hardening (v4) */
.terminal-log {
    position: relative;
    padding-left: 0; /* Reset for precise v4 measurements */
    border-left: none;
}

/* Vertical Connector Line - Gradient Polish v4 */
.terminal-log::before {
    content: '';
    position: absolute;
    left: 16px; 
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(0, 245, 255, 0.2), rgba(0, 245, 255, 1));
    z-index: 1;
}

.log-entry {
    margin-bottom: 3rem;
    position: relative;
    padding-left: 40px; /* Precise v4 (40px) - 24px clearance from line */
}

.log-entry::before {
    content: '';
    position: absolute;
    left: 14px; /* Centered on 16px line (width 6px: 16-3=13, using 14 for visual balance) */
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-cyan);
    border-radius: 50%;
    z-index: 2;
}

/* Experience Item Details */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.log-company {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: 0.1em;
}

.log-period {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.log-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.9;
}

/* Status Badge - Pulse Protection v4 */
.status-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    margin-left: 1rem;
    vertical-align: middle;
}

@media (prefers-reduced-motion: no-preference) {
    .pulsing {
        animation: pulse-green 2s infinite;
    }
}

@keyframes pulse-green {
    0% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { opacity: 1; box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* Commendations Section */
.commendations-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.comm-card .card-inner {
    padding: 2rem;
}

.comm-icon {
    font-size: 0.7rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
}

.comm-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.comm-org {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

/* Certifications Styling [NEW v13.0] */
.cert-card {
    border-left: 2px solid rgba(0, 245, 255, 0.3);
}

.cert-icon {
    font-size: 0.7rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
    font-family: var(--font-display);
}

.cert-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-family: var(--font-display);
}

.cert-org {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
}

.cert-id {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    opacity: 0.7;
}

.cert-glitch-line {
    width: 0;
    height: 1px;
    background: var(--primary-cyan);
    margin-top: 1.5rem;
    transition: width 0.5s ease;
}

.cert-card:hover .cert-glitch-line {
    width: 100%;
}

/* Contact Section Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-top: 3rem;
}

/* Terminal Form Styling */
.terminal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.7rem;
    color: var(--primary-cyan);
    letter-spacing: 0.1rem;
}

.form-group input, 
.form-group textarea {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    padding: 1rem;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-cyan);
    outline: none;
    background: rgba(0, 245, 255, 0.1);
}

.form-group textarea {
    min-height: 15rem;
    resize: vertical;
}

.btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid rgba(160, 174, 192, 0.4);
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

/* Project Cards */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); /* High-focus grid for large-scale diagrams */
    gap: 3rem;
}

.flip-card-3d {
    background: transparent;
    min-height: 420px; /* Recalibrated v12.0 for tighter visual cohesion */
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card-3d:hover .flip-card-inner,
.flip-card-3d.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Restored Styles */
.log-tech-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag-mini {
    font-size: 0.65rem;
    padding: 3px 10px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    border-radius: 20px; /* Pill Shape */
    letter-spacing: 0.05em;
    font-family: var(--font-display);
    transition: background 0.3s;
}

.tech-tag-mini:hover {
    background: rgba(0, 245, 255, 0.2);
}

.log-points {
    list-style: none;
    margin-top: 1rem;
}

.log-points li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary); /* Elevated contrast v12.0 */
}

.project-thumb-container {
    width: 100%;
    height: 400px; /* Expanded to 400px to allow diagrams to lead */
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Precise containment for technical diagrams */
    background: rgba(0, 0, 0, 0.2);
    filter: none; /* Restored full color for maximum technical impact */
    transition: transform 0.5s, filter 0.5s;
}

.project-meta {
    font-size: 0.65rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.project-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.project-actions {
    margin-top: auto;
}

/* Project Info Refinements v12.0 */
.project-info {
    padding: 1rem 0;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-main);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.project-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    opacity: 0.8;
}

.btn-glow.small {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
}
    justify-content: space-between;
    background: rgba(10, 20, 30, 0.6);
    border: 1px solid rgba(0, 245, 255, 0.1);
    clip-path: polygon(0 0, 90% 0, 100% 10%, 100% 100%, 10% 100%, 0 90%);
    outline: none;
}

.flip-card-3d:focus-within {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 4px;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: rgba(5, 15, 25, 0.9);
}

.project-title { font-family: var(--font-display); font-size: 1.25rem; }
.project-tag { font-size: 0.65rem; padding: 2px 8px; border: 1px solid var(--primary-cyan); color: var(--primary-cyan); margin-right: 5px; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    .holo-card:hover, .holo-card:active {
        transform: none !important;
    }
    .flip-card-inner {
        transition: none !important;
    }
}

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

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--success-green);
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    box-shadow: var(--glow-green);
}

.pulsing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.glitch-text {
    position: relative;
    color: var(--text-main);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: var(--primary-cyan);
    z-index: -1;
    clip-path: var(--glitch-clip-1, polygon(0 0, 0 0, 0 0, 0 0));
}

.glitch-text::after {
    color: var(--accent-purple);
    z-index: -2;
    clip-path: var(--glitch-clip-2, polygon(0 0, 0 0, 0 0, 0 0));
}

.subtitle {
    font-family: var(--font-mono);
    color: var(--primary-cyan);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    letter-spacing: 0.3em;
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* Buttons */
.btn-glow {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--primary-cyan);
    text-decoration: none;
    border: 1px solid var(--primary-cyan);
    background: transparent;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 0 rgba(0, 245, 255, 0.1);
}

.btn-glow:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: var(--glow-cyan), inset 0 0 10px rgba(0, 245, 255, 0.2);
    transform: translateY(-2px);
}

/* Communication HUD Styles */
#comm-trigger {
    position: fixed;
    bottom: 6rem; /* Shifted v12.0 to avoid overlap with System Navigator */
    right: 2rem;
    z-index: 500;
    background: rgba(10, 20, 30, 0.8);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: all 0.3s ease;
    box-shadow: var(--glow-cyan);
}

#comm-trigger:hover {
    background: var(--primary-cyan);
    color: var(--bg-color);
}

#comm-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(5, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 245, 255, 0.2);
    z-index: 200;
    padding: 3rem 2rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#comm-drawer.active {
    transform: translateX(-400px);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    padding-bottom: 1rem;
}

.drawer-header h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--primary-cyan);
    letter-spacing: 0.2em;
}

.drawer-subtitle {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

#close-drawer {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

#close-drawer:hover {
    color: var(--primary-cyan);
}

.comm-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--success-green);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.comm-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comm-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.3s;
}

.comm-link:hover {
    transform: translateX(10px);
}

.link-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.link-value {
    font-size: 0.9rem;
    color: var(--primary-cyan);
    word-break: break-all;
}

.drawer-footer {
    margin-top: auto;
    padding-top: 2rem;
}

@media (max-width: 768px) {
    #comm-drawer {
        width: 100%;
        right: -100%;
    }
    #comm-drawer.active {
        transform: translateX(-100%);
    }
}
/* Note: Adaptive Theme (Light Mode) has been removed to prioritize the Premium Cyberpunk Brand Identity. */

/* System Navigator AI [Definitive Spec v11.0] */
#system-navigator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    background: rgba(0, 8, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 600;
    font-family: var(--font-mono);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#system-navigator.minimized {
    height: 40px;
    overflow: hidden;
    width: 200px;
    opacity: 0.8;
}

.navigator-header {
    background: rgba(0, 245, 255, 0.1);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.nav-title {
    font-size: 0.7rem;
    color: var(--primary-cyan);
    letter-spacing: 0.1em;
    flex-grow: 1;
}

#toggle-navigator {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--font-mono);
    line-height: 1;
}

.navigator-body {
    height: 250px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

#navigator-history {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

#navigator-history::-webkit-scrollbar { width: 4px; }
#navigator-history::-webkit-scrollbar-thumb { background: rgba(0, 245, 255, 0.2); }

.msg { margin-bottom: 0.75rem; line-height: 1.4; }
.msg.bot { color: var(--primary-cyan); opacity: 0.9; }
.msg.user { color: var(--text-main); text-align: left; }
.msg.user::before { content: '> '; opacity: 0.5; }

.navigator-input-line {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    padding-top: 0.75rem;
    align-items: center;
}

.navigator-input-line .prompt { color: var(--primary-cyan); font-weight: bold; }

#navigator-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    width: 100%;
    outline: none;
}

@media (max-width: 768px) {
    #system-navigator {
        bottom: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        max-width: 320px;
    }
}
