:root {
    /* Color Palette - Cyber / Professional Hybrid */
    --bg-color: #050811;
    --primary-color: #00f0ff;
    --secondary-color: #9d00ff;
    --accent-color: #00ff8c;
    /* Switched to a cleaner mint-cyan */
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);

    /* Layout Tokens */
    --glass-bg: rgba(10, 20, 48, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(25px);
    --card-radius: 16px;
    /* Sharper, more professional corners */
    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    cursor: none !important; /* Eradicating default pointer for total immersion */
}

a, button, .slider-btn, .view-btn, .cert-link, .menu-toggle, input, textarea {
    cursor: none !important; /* Ensuring interactive elements don't reveal the ghost pointer */
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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% 4px, 3px 100%;
    z-index: 9997;
    pointer-events: none;
    opacity: 0.3;
}

/* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo {
    width: 250px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
    animation: pulsar 3s ease-in-out infinite;
}

@keyframes pulsar {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.progress-bar {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.1s linear;
}

/* Header & Glitch Effect */
.glitch {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #fff;
    position: relative;
}

/* Three.js Canvas */
#main-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI Overlay */
#ui-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Interaction enabling */
#ui-overlay *,
.scene-section * {
    pointer-events: auto;
}

#ui-overlay,
.scene-section {
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 12%;
    /* Incremental shift right for custom missions */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(25px);
    background: rgba(8, 12, 26, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth Slide Transition */
}

/* Hidden state for auto-hide logic */
nav.nav-hidden {
    transform: translateY(-100%);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    /* Highly compact, professional profile */
    width: auto;
    margin: 0;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: logo-pulsar 4s infinite ease-in-out;
}

@keyframes logo-pulsar {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.7));
        transform: scale(1.05);
    }
}

.logo img:hover {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.9));
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-weight: 500;
}

/* Sections */
#content-container {
    width: 100%;
}

.scene-section {
    min-height: auto !important;
    /* Zero fixed height to collapse voids */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 10% !important;
    /* Extremely tight clearance */
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#hero.scene-section {
    min-height: 100vh !important;
    padding: 0 !important;
}

.content {
    text-align: center;
    max-width: 1400px;
    /* Constrain to frame */
    width: 90%;
    margin: 0 auto;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
}

/* Custom Cursor */
#custom-cursor {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, transform 0.1s;
}

#cursor-blur {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}

/* Hero Modernization */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-labels {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.label-tag {
    font-size: 0.6rem;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    letter-spacing: 3px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.05);
}

.glitch-text {
    font-size: 8rem !important;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -5px;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    animation: constant-glitch 5s infinite;
}

@keyframes constant-glitch {

    0%,
    100% {
        transform: skew(0deg);
    }

    15% {
        transform: skew(5deg) scaleY(1.1);
    }

    16% {
        transform: skew(-3deg);
    }

    18% {
        transform: skew(0deg);
    }
}

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

.glitch-text::before {
    color: #00f0ff;
    left: 2px;
    text-shadow: -2px 0 #00f0ff;
    animation: noise-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    color: #ff007a;
    left: -2px;
    text-shadow: 2px 0 #ff007a;
    animation: noise-anim 2s infinite linear alternate-reverse;
}

@keyframes noise-anim {
    0% {
        clip: rect(44px, 9999px, 56px, 0);
    }

    20% {
        clip: rect(12px, 9999px, 88px, 0);
    }

    40% {
        clip: rect(66px, 9999px, 12px, 0);
    }

    60% {
        clip: rect(9px, 9999px, 54px, 0);
    }

    80% {
        clip: rect(72px, 9999px, 32px, 0);
    }

    100% {
        clip: rect(5px, 9999px, 90px, 0);
    }
}

@keyframes noise-anim-2 {
    0% {
        clip: rect(2px, 9999px, 44px, 0);
    }

    20% {
        clip: rect(77px, 9999px, 12px, 0);
    }

    40% {
        clip: rect(54px, 9999px, 99px, 0);
    }

    60% {
        clip: rect(12px, 9999px, 6px, 0);
    }

    80% {
        clip: rect(98px, 9999px, 22px, 0);
    }

    100% {
        clip: rect(45px, 9999px, 87px, 0);
    }
}

.hero-line {
    width: 100px;
    height: 2px;
    background: var(--accent-gradient);
    margin: 40px 0;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 18px 45px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 10px 30px rgba(157, 0, 255, 0.3);
}

.btn-secondary {
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--primary-color);
    background: transparent;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.4);
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hud-frame {
    position: fixed;
    width: 60px;
    height: 60px;
    /* Refined size */
    border: 2px solid rgba(0, 240, 255, 0.3);
    /* Sleeker, thinner line */
    z-index: 9998;
    pointer-events: none;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
}

.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

body:hover .hud-frame {
    border-color: rgba(0, 240, 255, 0.5);
    width: 80px;
    height: 80px;
}

.scroll-indicator {
    position: relative; /* Switch to flex-flow to prevent button overlap */
    margin-top: 4rem; /* Safe distance from action buttons */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.5;
    z-index: 5;
}

.mouse {
    width: 20px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
}

/* Glass Cards - Global Refinement */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--card-radius);
    padding: clamp(1.5rem, 5vw, 3rem);
    /* Responsive internal padding */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), inset 0 0 1px rgba(255, 255, 255, 0.1);
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px);
}

/* --- Premium Hyperlink System --- */
a {
    text-decoration: none !important;
    color: var(--primary-color);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-btn,
.cert-link {
    display: inline-flex; /* Tactical flex centering */
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    margin-top: 1.2rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    line-height: 1; /* Force neutral baseline */
    position: relative;
    z-index: 100; /* Ensure it stays above HUD and card overlays */
    pointer-events: auto !important;
}

.view-btn:hover,
.cert-link:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

.about-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    padding: 4rem;
}

.about-image {
    flex: 1;
    min-width: 350px;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    filter: grayscale(100%) contrast(1.05); /* Stylish monochromatic profile */
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-split:hover .about-image img {
    transform: scale(1.02);
    filter: grayscale(0%) contrast(1); /* Smooth bloom into tactical color */
    border-color: var(--primary-color);
}

.about-text {
    flex: 1.5;
    text-align: left;
}

.about-text h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item .number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

@media (max-width: 992px) {
    .about-split {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
    }

    .about-image {
        min-width: 100%;
    }

    .about-text {
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
}

/* Skills */
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags.center {
    justify-content: center;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.tag:hover {
    border-color: var(--primary-color);
    color: #fff;
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
}

.tag.neon {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.tag.neon:hover {
    background: rgba(157, 0, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.skill-category h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.skill-category li {
    padding: 10px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Timeline - High-Contrast Vibrant Variant */
.timeline {
    position: relative;
    max-width: 900px;
    width: 100%;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.timeline-node {
    position: relative;
    padding-left: 50px;
    margin-bottom: 40px;
}

.timeline-node::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 25px;
    height: 25px;
    background: var(--bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 0 15px var(--primary-color);
}

.timeline-node::after {
    content: attr(data-year);
    position: absolute;
    left: 100px;
    top: -25px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.node-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.node-content h4 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.node-content p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-size: 0.95rem;
}

.timeline-list {
    list-style: none;
    margin-top: 10px;
}

.timeline-list li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
    line-height: 1.5;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--primary-color);
}

/* Contact Section Redesign */
.contact-nexus {
    max-width: 1000px !important;
    width: 95%;
    padding: 0 !important;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.contact-info {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-form-wrapper {
    padding: 3rem;
}

.contact-info .section-title {
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    letter-spacing: 5px;
}

.contact-info .desc {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.info-items {
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.info-item i {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
}

.info-item span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

.info-item p {
    font-size: 1rem;
    color: #fff;
}

.social-links-nexus {
    display: flex;
    gap: 15px;
    margin-top: 2.5rem;
}

.social-links-nexus a {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.4s;
    white-space: nowrap;
}

.social-links-nexus a i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.social-links-nexus a:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateY(-3px);
}

/* Form Styling */
.cinematic-form .form-group {
    margin-bottom: 25px;
}

.cinematic-form label {
    display: block;
    font-size: 0.7rem;
    color: var(--secondary-color);
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-weight: 700;
}

.cinematic-form input,
.cinematic-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.4s;
}

.cinematic-form input:focus,
.cinematic-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.submit-btn-nexus {
    width: 100%;
    padding: 18px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.submit-btn-nexus:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(157, 0, 255, 0.4);
}

.submit-btn-nexus i {
    font-size: 1.1rem;
    transition: 0.4s;
}

.submit-btn-nexus:hover i {
    transform: translate(5px, -5px);
}

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

    .contact-info {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* Scroll Animation states */
[data-scroll] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

[data-scroll].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Featured Projects Slider */
.project-slider-container {
    perspective: 1300px;
    width: 100%;
    height: 600px; /* Increased height to accommodate all mission data */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible !important; /* CRITICAL: Ensure buttons are not clipped/blocked */
    margin-top: 2rem;
}

.project-slider {
    position: absolute;
    width: 300px;
    height: 340px; /* Further vertical optimization */
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card {
    position: absolute;
    width: 300px; /* Consistent with 3D engine math */
    height: auto;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0.15;
    backface-visibility: hidden;
    padding: 1.5rem;
    box-sizing: border-box;
    pointer-events: none; /* Only active card catches interaction */
}

.project-card.active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.3);
}

/* Card-Specific HUD Frames */
.card-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card.active .card-hud {
    opacity: 1;
}

.card-corner {
    position: absolute;
    width: 20px; /* Thinner, more tactical corners */
    height: 20px;
    border: 2px solid var(--primary-color);
}

.card-corner.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.card-corner.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.card-corner.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.card-corner.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem; /* Increased breathing room for mission titles */
    position: relative;
    z-index: 1001; /* Ensure buttons stay above project cards */
    pointer-events: auto;
}

.slider-btn {
    width: 45px;
    height: 45px;
    /* More compact buttons */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: 0.4s;
    backdrop-filter: blur(10px);
}

.slider-btn:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color);
}

.p-img {
    width: 100%;
    height: 110px; /* Ultra-compact image profile */
    overflow: hidden;
    position: relative;
}

.p-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(8, 12, 26, 0.8) 0%, transparent 100%);
}

.p-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.8); /* Tactical atmospheric desaturation */
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .p-img img,
.project-card.active .p-img img {
    filter: grayscale(0%) brightness(1); /* Full mission-color on activation/hover */
    transform: scale(1.1);
}

.p-content {
    padding: 1.2rem; /* Reduced padding for high-density mission context */
}

.p-content h3 {
    font-size: 1.1rem; /* Compact branding */
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.2;
}

.p-tag {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.p-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .project-card {
        flex: 0 0 85vw;
    }

    .project-slider {
        padding: 0 !important;
    }

    /* JS handles centering */
}

/* Projects Nexus */
.projects-nexus {
    max-width: 1800px !important;
    /* Maximized for ultra-wide monitors */
    width: 98%;
    padding: 2rem !important;
    /* Internal breathing room */
}

.project-categories {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-block h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.project-grid.mini {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.project-grid a {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
    text-align: center;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-grid a:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.1);
}

/* Awards Section */
.awards-nexus {
    width: 100%;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.award-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem !important;
}

.award-icon {
    width: 70px;
    height: 70px;
    background: rgba(157, 0, 255, 0.1);
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.1);
}

.award-info h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.8rem;
}

.award-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Tactical links now harmonize with the global button system defined earlier */
.cert-link:hover {
    color: #fff;
    border-color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    background: rgba(0, 240, 255, 0.15);
    transform: translateY(-2px);
}

/* Mobile adjustments */
@media (max-width: 992px) {
    .awards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Education & Accomplishments */
.edu-accomplishments {
    max-width: 900px !important;
    padding: 4rem !important;
}

.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.edu-award-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: 0.3s;
}

.edu-award-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.edu-award-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.edu-award-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
}

.accomplishment-panel {
    background: rgba(255, 255, 255, 0.02);
    padding: 25px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffcc00, transparent);
    animation: scan-line 3s linear infinite;
}

.acc-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.acc-content i {
    font-size: 2.5rem;
    color: #ffcc00;
}

.acc-content h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 5px;
}

.acc-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}




.project-slider {
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    padding: 20px 0;
    transition: none;
    /* Transform is handled dynamically by main.js */
}

@keyframes scan-line {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 10, 20, 0.95);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 30px !important;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span,
    .menu-toggle::before,
    .menu-toggle::after {
        content: "";
        width: 100%;
        height: 3px;
        /* Slightly thicker */
        background-color: var(--primary-color);
        transition: 0.3s;
        border-radius: 2px;
        box-shadow: 0 0 10px var(--primary-color);
        /* Strong glow */
    }

    .menu-toggle.active {
        padding: 5px 0;
    }

    .menu-toggle.active span {
        display: none;
    }

    .menu-toggle.active::before {
        transform: translateY(9px) rotate(45deg);
        background-color: #fff;
    }

    .menu-toggle.active::after {
        transform: translateY(-9px) rotate(-45deg);
        background-color: #fff;
    }

    .nav-links.active {
        right: 0;
    }
}

/* UX Elements */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 2000;
    box-shadow: 0 0 10px var(--primary-color);
}

#side-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
}

.dot-nav {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
}

.dot-nav.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transform: scale(1.5);
}

.dot-nav:hover {
    background: #fff;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid rgba(0, 240, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

#back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-color);
}

@media (max-width: 768px) {
    #side-nav {
        display: none;
    }

    /* Project Nexus Stacking Fix */
    .category-group-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .projects-nexus {
        width: 100% !important;
        padding: 1.5rem !important;
        margin: 0 !important;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    }

    /* Global Mobile Fixes */
    .section-title {
        font-size: 1.15rem !important;
        letter-spacing: 1px !important;
        padding: 15px 30px !important;
        /* Forces vertical clearance */
        text-align: center !important;
        white-space: normal !important;
        display: block !important;
        max-width: 320px !important;
        /* Force wrap on words if needed */
        margin: 0 auto !important;
        line-height: 1.6 !important;
        color: #fff !important;
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.3) !important;
    }

    .glitch-text {
        font-size: 3rem !important;
        letter-spacing: -2px !important;
    }

    .about-split,
    .skills-grid,
    .awards-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 2rem 1rem !important;
    }

    .projects-nexus {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .project-slider-container {
        width: 100vw !important;
        margin: 0 !important;
        left: 50%;
        transform: translateX(-50%);
        overflow: visible !important;
    }

    .project-card {
        flex: 0 0 65vw !important; /* Optimized for compact mobile viewing */
        width: 65vw !important;
        opacity: 0.4 !important;
        transform: scale(0.9) !important;
        transition: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    }

    .project-card.active {
        opacity: 1 !important;
        transform: scale(1) !important;
        box-shadow: 0 20px 50px rgba(0, 240, 255, 0.3) !important;
    }

    .hud-frame {
        display: none !important;
    }

    .glitch-text::before,
    .glitch-text::after {
        display: none !important;
    }

    .scene-section {
        padding-top: 100px !important;
        padding-bottom: 4rem !important;
        overflow: visible !important;
    }

    #hero {
        padding-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.6rem !important;
        letter-spacing: 3px !important;
    }

    .glitch-text {
        font-size: 2.5rem !important;
    }
}