/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;700&family=Roboto:wght@400;700&display=swap');

main {
    color: #f9fafb;
}
header .navTitle span {
    color: rgb(38, 136, 255);
}
/* Font Application */
h1, h2, h3, h4, h5, h6 {
    font-family: "Bebas Neue", sans-serif;
    font-weight: 400;
    font-style: normal;
    padding-bottom: 10px;
    padding-top: 20px;
    color: #fff;
}

span, p, li, strong, i {
    font-family: 'Roboto', sans-serif;
    color: rgb(156 163 175);
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.token, .parameter, .variable, code {
    font-size: 1rem;
    line-height: 1rem;
    font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
}

.mermaid p {
    font-family: 'Roboto', sans-serif;
    font-family: "Bebas Neue", sans-serif;
    color: #fff;
}

.mermaid  .md-black p {
    color: black;
}

.mmPad .label div {
    min-height: 30px;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmPadH .label div {
    min-height: 100px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

code {
    line-height: 1.35rem;
}

#hero-background-gradient {
   background: radial-gradient(circle at top right, #010032 50%, #007ec2 )
}

#hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 300px;
  margin-top: 80px;
  margin-bottom: 370px;
  height: 380px;
  background-color: #063668;
  background-image: url('/images/bg.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}


@media (min-width: 1500px) {
  #hero-section {
    padding-top: 70px;
    height: 700px;
    margin-bottom: 150px;
  }
}


  /* INTERACTIVE ELEMENTS */
#blueprint-info-display {
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.5);
    word-wrap: break-word;
    white-space: pre-wrap;
    font-family: "Bebas Neue", sans-serif;
}

.blueprint-node { transition: all 0.3s ease-in-out; cursor: pointer; }
.blueprint-node:hover { box-shadow: 0 0 25px rgba(59, 130, 246, 0.6); }
.blueprint-line { stroke-width: 3px; stroke: rgba(59, 130, 246, 0.3); }
.network-line { stroke-width: 3px; stroke: rgba(59, 130, 246, 0.3); transition: stroke 0.5s ease-in-out, stroke-width 0.5s ease-in-out; }
.network-node { transition: fill 0.5s ease-in-out, transform 0.3s ease-in-out; }
.network-node.animate-pulse-once { animation: pulse-once 1s ease-out; }

@keyframes pulse-once {
    0% { transform: scale(1); fill: inherit; }
    50% { transform: scale(1.2); fill: #ff5555; }
    100% { transform: scale(1); fill: inherit; }
}

.cloud-node-interactive { transition: transform 0.2s ease-in-out; cursor: pointer; }
.cloud-node-interactive:hover { transform: scale(1.05); }

.network-line.active-line {
    stroke: #50fa7b; /* Green for active connection */
    stroke-width: 4px;
}

.network-node.active-node {
    fill: #50fa7b; /* Green for active node */
    transform: scale(1.2);
}

/* ENHANCED TABLE STYLING */
.custom-table { border-collapse: separate; border-spacing: 0; border: 1px solid #374151; border-radius: 0.5rem; overflow: hidden; }
.custom-table thead { background-color: #111827; }
.custom-table thead th { border-bottom: 2px solid #3b82f6; color: #f9fafb; font-family: 'Poppins', sans-serif; font-weight: bold; }
.custom-table tbody tr { border-bottom: 1px solid #374151; }
.custom-table tbody tr:nth-child(even) { background-color: #1f2937; }
.custom-table tbody tr:hover { background-color: #3b82f630; }
.custom-table td, .custom-table th { padding: 1rem 1.5rem; text-align: left; }

/* CODE BLOCK STYLING FROM REFERENCE */
.code-block-container .code-block-header { display: flex; align-items: center; background-color: #282a36; padding: 0.75rem 1rem; border: 1px solid #44475a; border-bottom: none; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.code-block-container .traffic-lights { display: flex; gap: 0.5rem; }
.code-block-container .traffic-lights span { width: 0.75rem; height: 0.75rem; border-radius: 9999px; }
.code-block-container .traffic-lights .bg-red-500 { background-color: #ff5555; }
.code-block-container .traffic-lights .bg-yellow-500 { background-color: #f1fa8c; }
.code-block-container .traffic-lights .bg-green-500 { background-color: #50fa7b; }
.code-block-container pre[class*="language-"] { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; border: 1px solid #44475a; }
.clearfix::after { content: ""; display: table; clear: both; }

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}


/* Carousel-specific styles for the Mission Debriefs page */
.project-details {
    position: absolute;
    top: 3rem; /* Adjusted for better spacing */
    width: 90%;
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    transition: opacity var(--transition-duration) ease;
}
.main-swiper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    transition: opacity var(--transition-duration) ease;
}
.project-details h2 {
    font-size: 2.25rem; /* 3xl */
    line-height: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}
.project-details p {
    font-size: 1rem; /* lg */
    line-height: 1.25rem;
    color: #a0aec0; /* text-gray-400 */
    margin: 0 auto;
    width: 650px;
    height: 70px;
    word-wrap: break-word;
    overflow: hidden;
}
.tags-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 30px;
}

.main-swiper .swiper-slide {
    width: 600px; height: 400px;
    cursor: pointer;
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    display: flex; justify-content: center; align-items: center;
    background-color: #2d3748; /* bg-gray-800 */
}
.main-swiper .swiper-slide img {
    display: block; width: 100%; height: 100%; object-fit: contain;
}
.main-swiper .swiper-pagination-bullet-active {
    background: #fff;
}

.vertical-carousel-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.close-button {
    position: absolute; top: 20px; right: 30px; z-index: 30;
    font-size: 3rem; color: #fff; background: none; border: none; cursor: pointer;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.vertical-swiper {
    width: 100%; height: 100%;
}
.vertical-swiper .swiper-slide {
    display: flex; justify-content: center; align-items: center; background-color: transparent;
}
.vertical-swiper .swiper-slide img {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
/* Scoping all styles to the parent section to prevent bleed. */
.carousel-section {
    position: relative; /* Containing block for the back button */
}

/* YOUR BASELINE LAYOUT - NO REGRESSION */
.carousel-section .project-details {
    width: 90%;
    max-width: 800px;
    margin: 0;
    margin-bottom: 50px;
    text-align: center;
    z-index: 20;
    transition: opacity 0.5s ease;
}
.carousel-section .main-swiper {
    width: 100%;
    height: 50vh;
    max-height: 450px;
    margin: 0 auto;
    z-index: 10;
}
.carousel-section .main-swiper .swiper-slide {
    width: 600px;
    height: 100%;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #2d3748;
    position: relative; /* THE KEY FIX: for absolute children */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.5s ease;
}
.carousel-section .main-swiper .swiper-slide > img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* --- THE NEW, CORRECT TRANSFORMATION ANIMATION --- */
/* Master switch for animations */
.carousel-section.vertical-mode-active .project-details,
.carousel-section.vertical-mode-active .main-swiper .swiper-pagination {
    opacity: 0;
    pointer-events: none;
}
.carousel-section.vertical-mode-active .main-swiper .swiper-slide-prev {
    transform: translateX(-150%) rotateY(-30deg) scale(0.9);
    opacity: 0;
}
.carousel-section.vertical-mode-active .main-swiper .swiper-slide-next {
    transform: translateX(150%) rotateY(30deg) scale(0.9);
    opacity: 0;
}
.carousel-section.vertical-mode-active .main-swiper .swiper-slide-active > img {
    opacity: 0; /* Fade out the original image to reveal the vertical swiper underneath */
}

/* The vertical swiper that gets injected INSIDE the active slide */
.vertical-swiper-in-place {
    position: absolute; /* Relative to the .swiper-slide parent */
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    z-index: 5; /* Sits on top of the original img tag */
    transition: opacity 0.5s ease 0.2s;
    background: rgba(0,0,0,0.3); /* Slight dark tint for readability */
}
.carousel-section.vertical-mode-active .vertical-swiper-in-place {
    opacity: 1;
}
.vertical-swiper-in-place .swiper-slide {
    background: transparent;
}
.vertical-swiper-in-place .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* The Back button */
#back-to-projects-btn {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
}
.carousel-section.vertical-mode-active #back-to-projects-btn {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.2s, 0s;
}

/* ===============================================
   START: CAROUSEL STYLES (Paste this entire block)
   =============================================== */

/* Global settings for the animation */
:root {
    --transition-duration: 0.6s;
    --transition-timing: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Base layout for the section */
.carousel-section {
    position: relative; /* Necessary for z-index and absolute positioning to work correctly */
    padding: 3rem 0; /* Give it some space */
    background-color: #111; /* Or your preferred background */
    overflow: hidden; /* Prevent horizontal scrollbars during animations */
}

/* Details shown above the main carousel */
.project-details {
    position: relative; /* Keep it in the flow but allow z-index */
    width: 90%;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    text-align: center;
    z-index: 100;
    transition: opacity var(--transition-duration) ease;
}

/* Main Horizontal Carousel */
.main-swiper {
    width: 100%;
    height: 45vh; /* Use viewport height for responsiveness */
    max-height: 400px;
    z-index: 10;
    transition: opacity var(--transition-duration) ease;
}

.main-swiper .swiper-slide {
    width: 60%;
    max-width: 600px;
    height: 100%;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
}

.main-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use contain to see the whole image */
}

/* --- THE POPUP ANIMATION LOGIC --- */

/* 1. This class on the body is the master switch for the animation */
body.is-vertical-mode .project-details,
body.is-vertical-mode .main-swiper .swiper-pagination {
    opacity: 0;
    pointer-events: none; /* Make them unclickable during animation */
}
body.is-vertical-mode .main-swiper {
    opacity: 0; /* Keep the background carousel slightly visible */
    pointer-events: none;
}

/* 2. The separate overlay container that becomes the popup */
.vertical-carousel-overlay {
    position: absolute; /* Lifts the element out of the normal flow - THIS IS KEY */
    z-index: 200;       /* Ensures it appears ON TOP of everything else - THIS IS KEY */
    opacity: 0;
    visibility: hidden; /* Hide it completely when not active */
    transform-origin: center center;
    /* Animate all the properties that the JavaScript will change */
    transition: transform var(--transition-duration) var(--transition-timing),
                opacity var(--transition-duration) var(--transition-timing),
                width var(--transition-duration) var(--transition-timing),
                height var(--transition-duration) var(--transition-timing),
                top var(--transition-duration) var(--transition-timing),
                left var(--transition-duration) var(--transition-timing),
                visibility 0s var(--transition-duration); /* Hide instantly after transition out */
}

/* 3. The 'active' class triggers the transition TO the popup state */
.vertical-carousel-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s; /* Make it visible immediately when transitioning in */
}

/* 4. Styling for the contents of the popup */
.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 30; /* Above the vertical swiper inside */
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.swiper.vertical-swiper {
    width: 100%;
    height: 100%;
    display: none;
}
.vertical-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.vertical-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* ===============================================
   END: CAROUSEL STYLES
   =============================================== */

.cloud-canvas-bg {
    background-image: url('images/World_Map.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.mermaid { width: 100%; } .mermaid .cluster rect { fill: transparent !important; }

.blinking-cursor {
    display: inline-block;
    width: 15px;
    height: 1.75rem;
    background-color: #f8f8f2;
    vertical-align: middle;
    margin-left: 5px;
    margin-top: -5px;
}

@media (max-width: 500px) {
    .blinking-cursor {
        display: inline-block;
        width: 8px;
        height: 1.125rem;
        background-color: #f8f8f2;
        vertical-align: middle;
        margin-left: 1px;
        margin-top: -2px;
    }
}

.blinking-cursor.is-blinking {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { background-color: transparent; }
    50% { background-color: #f8f8f2; }
}

.terminal-output {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #44475a;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #282a36;
    font-family: 'Inconsolata', 'Monaco', 'Consolas', 'Courier New', Courier, monospace;
    color: #f8f8f2;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #282a36;
}

.terminal-output::-webkit-scrollbar-thumb {
    background-color: #44475a;
    border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background-color: #6272a4;
}

.scan-animation-bar {
    animation: scan 3s linear forwards;
}

@keyframes scan {
    from { width: 0%; }
    to { width: 100%; }
}

/* --- MOBILE MENU ANIMATION --- */
#mobile-menu {
    /* Start hidden */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#mobile-menu.menu-open {
    /* Become visible */
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#mobile-menu-content {
    /* Start off-screen to the left */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

#mobile-menu.menu-open #mobile-menu-content {
    /* Slide in to view */
    transform: translateX(0);
}

@media (max-width: 480px) {
    #project-title {
        font-size: 25px;
        margin-top: 0;
        padding-top: 0;
        line-height: 1;
    }
    #project-summary {
        max-width: 100%;
        height: 100%;
    }
    .carousel-section .project-details {
        height: 243px;
        padding-bottom: 0;
        display: flex;
        flex-flow: column;
        align-items: center;
        justify-content: center;
    }
    .swiper-initialized.swiper-horizontal {
        max-width: 95vw;
        height: 380px;
    }

    .carousel-section .main-swiper .swiper-slide {
        width: 100%;
        height: 85%;
    }

    section.carousel-section {
        height: 100vh;
        max-height: 95vh;
    }

    .swiper.vertical-swiper {
        top: 0 !important;
        margin-top: -50% !important;
    }

}