/* ===========================
   Main Project Detail Pages
   =========================== */
:root {
    --primary-color: #00D9FF;
    --secondary-color: #FF6B9D;
    --accent-color: #BD6BFF;
    --tertiary-color: #FFB627;
    --bg-dark: #0d0f1a;
    --bg-darker: #050610;
    --bg-card: #1a1d2e;
    --text-light: #ffffff;
    --text-gray: #c4c4c4;
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #BD6BFF 50%, #FF6B9D 100%);
    --gradient-soft: linear-gradient(155deg, rgba(26, 29, 46, 0.85), rgba(13, 15, 26, 0.95));
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-md: 0 4px 20px rgba(0, 217, 255, 0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 217, 255, 0.15), transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(255, 107, 157, 0.14), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(189, 107, 255, 0.18), transparent 45%),
        var(--bg-darker);
    color: var(--text-light);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* ===========================
   Loading Page
   =========================== */
.loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-page.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    text-align: center;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border: 3px solid rgba(0, 217, 255, 0.2);
    border-top-color: #00D9FF;
    border-right-color: #BD6BFF;
    border-bottom-color: #FF6B9D;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

.loader-text {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 2px solid transparent;
    border-image: var(--gradient-primary);
    border-image-slice: 1;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.2);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

.logo-bracket {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo-text {
    color: var(--text-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown-toggle::before {
    content: '\25BE';
    font-size: 0.7rem;
    color: var(--primary-color);
    opacity: 0.9;
    transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .nav-dropdown-toggle::before,
.nav-item-dropdown:focus-within .nav-dropdown-toggle::before {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem;
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-radius: 12px;
    background: rgba(13, 15, 26, 0.98);
    box-shadow: 0 8px 26px rgba(0, 217, 255, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 1200;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-link {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.98rem;
    font-weight: 500;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus-visible {
    color: var(--primary-color);
    background: rgba(0, 217, 255, 0.12);
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-special {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.nav-link-special:hover {
    color: var(--accent-color) !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.main-project-main {
    padding-top: 106px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 2rem 0;
    border-top: 2px solid transparent;
    border-image: var(--gradient-primary);
    border-image-slice: 1;
}

.footer-content {
    text-align: center;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-tagline {
    color: var(--text-gray);
    font-size: 1rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-email {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-email:hover {
    color: var(--secondary-color);
}

/* Persistent back button for long project pages */
.floating-back-btn {
    position: fixed;
    left: 1.1rem;
    bottom: 1.1rem;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.45);
    text-decoration: none;
    color: var(--text-light);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(189, 107, 255, 0.2), rgba(255, 107, 157, 0.2));
    backdrop-filter: blur(8px);
    box-shadow: 0 0 22px rgba(0, 217, 255, 0.28);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition-normal);
}

.floating-back-btn:hover {
    border-color: rgba(255, 107, 157, 0.7);
    box-shadow: 0 0 28px rgba(255, 107, 157, 0.4);
    transform: translateY(-2px);
}

.floating-back-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.page-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(5, 6, 16, 0.78);
    border-bottom: 1px solid rgba(0, 217, 255, 0.25);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.project-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    color: var(--text-gray);
    background: rgba(0, 217, 255, 0.08);
    font-size: 0.9rem;
}

.hero {
    padding: 1.4rem 0 0.9rem;
}

.slideshow-top {
    width: min(760px, 100%);
    margin: 0 auto 0.7rem;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(250px, 38%) 1fr;
    background: var(--gradient-soft);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.hero-content {
    padding: 1.1rem 1.2rem 1rem;
}

.hero-meta {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}

.hero-title {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    margin-bottom: 0.55rem;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, #00D9FF 30%, #BD6BFF 60%, #FF6B9D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-summary {
    color: var(--text-gray);
    font-size: 0.98rem;
    max-width: 72ch;
}

.details {
    padding: 0.4rem 0 1.4rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.75rem;
}

.detail-panel {
    grid-column: span 12;
    background: var(--gradient-soft);
    border: 1px solid rgba(189, 107, 255, 0.22);
    border-radius: 12px;
    padding: 0.9rem;
    min-height: 0;
}

.panel-title {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.02rem;
    margin-bottom: 0.6rem;
    color: var(--text-light);
}

.panel-text {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.list li {
    color: var(--text-gray);
    position: relative;
    padding-left: 0.95rem;
    font-size: 0.93rem;
}

.list li::before {
    content: '';
    position: absolute;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    left: 0;
    top: 0.6rem;
    background: var(--primary-color);
}

.links {
    display: grid;
    gap: 0.55rem;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--text-light);
    border: 1px solid rgba(0, 217, 255, 0.32);
    background: rgba(0, 217, 255, 0.09);
    border-radius: 8px;
    padding: 0.52rem 0.75rem;
    font-weight: 500;
    font-size: 0.92rem;
}

.link-btn:hover {
    border-color: rgba(255, 107, 157, 0.65);
    background: rgba(255, 107, 157, 0.16);
    box-shadow: 0 0 28px rgba(255, 107, 157, 0.35);
}

.span-8 {
    grid-column: span 8;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: 0;
}

.rewind-panel {
    display: grid;
    gap: 0.7rem;
}

.rewind-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.55rem;
}

.rewind-stat {
    background: rgba(0, 217, 255, 0.07);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    display: grid;
    gap: 0.15rem;
}

.rewind-label {
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(196, 196, 196, 0.85);
}

.rewind-value {
    font-size: 0.97rem;
    line-height: 1.2;
    color: var(--text-light);
}

.rewind-embed {
    position: relative;
    width: 100%;
    min-height: 420px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.22);
    background: rgba(5, 6, 16, 0.85);
}

.rewind-embed iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
}

.rewind-link {
    display: inline-flex;
    width: fit-content;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.88rem;
}

.rewind-link:hover {
    text-decoration: underline;
}

.binder-panel {
    display: grid;
    gap: 0.6rem;
}

.binder-preview {
    width: 100%;
    min-height: 360px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.2);
    background: rgba(5, 6, 16, 0.82);
}

.binder-preview iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
}

.binder-actions {
    display: grid;
    gap: 0.45rem;
}

.compact-links-panel {
    max-width: 760px;
}

.compact-links {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.4rem;
}

.compact-links .link-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.84rem;
    border-radius: 7px;
}

.slideshow-panel {
    display: grid;
    gap: 0.65rem;
}

.slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 260px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.22);
    background: rgba(5, 6, 16, 0.8);
}

.slideshow-minimal {
    min-height: 170px;
    border-radius: 8px;
    border-color: rgba(0, 217, 255, 0.18);
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: opacity 0.38s ease;
}

.slide-image.is-fading {
    opacity: 0.28;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 217, 255, 0.45);
    border-radius: 999px;
    background: rgba(5, 6, 16, 0.62);
    color: var(--text-light);
    font-size: 1.35rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
}

.slideshow-minimal .slide-nav {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(5, 6, 16, 0.5);
}

.slide-nav:hover {
    background: rgba(0, 217, 255, 0.22);
}

.slide-nav.prev {
    left: 0.65rem;
}

.slide-nav.next {
    right: 0.65rem;
}


.fact-table {
    display: grid;
    gap: 0.25rem;
}

.fact-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.55rem;
    padding: 0.36rem 0;
    border-bottom: 1px solid rgba(196, 196, 196, 0.12);
}

.fact-row:last-child {
    border-bottom: 0;
}

.fact-key {
    color: rgba(196, 196, 196, 0.85);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fact-value {
    color: var(--text-light);
    font-size: 0.92rem;
}

@media (max-width: 1000px) {
    .span-8,
    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-image {
        max-height: 250px;
    }
    .span-6,
    .span-4 {
        grid-column: span 12;
    }

    .hero-content {
        padding: 1.1rem;
    }

    .detail-panel {
        padding: 0.85rem;
    }

    .fact-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.4rem 0;
    }
}

@media (max-width: 768px) {
    .main-project-main {
        padding-top: 88px;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 15, 26, 0.98);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-normal);
        border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    }

    .nav-item-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border: 1px solid rgba(0, 217, 255, 0.2);
        background: rgba(0, 217, 255, 0.06);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1200px, 94%);
    }

    .hero {
        padding: 1rem 0 0.65rem;
    }

    .slideshow-top {
        margin-bottom: 0.55rem;
    }

    .hero-image {
        min-height: 190px;
        max-height: 220px;
    }

    .hero-title {
        font-size: clamp(1.2rem, 6vw, 1.55rem);
    }

    .details {
        padding-bottom: 1.1rem;
    }

    .detail-grid {
        gap: 0.65rem;
    }

    .detail-panel {
        border-radius: 10px;
        padding: 0.78rem;
    }

    .panel-title {
        margin-bottom: 0.45rem;
    }

    .list {
        gap: 0.35rem;
    }

    .rewind-highlights {
        grid-template-columns: 1fr 1fr;
    }

    .rewind-embed,
    .rewind-embed iframe {
        min-height: 360px;
    }

    .binder-preview,
    .binder-preview iframe {
        min-height: 300px;
    }

    .video-wrapper {
        min-height: 180px;
    }

    .compact-links-panel {
        max-width: none;
    }

    .compact-links {
        grid-template-columns: 1fr;
    }

    .slideshow {
        min-height: 200px;
    }

    .slide-nav {
        width: 34px;
        height: 34px;
    }

    .floating-back-btn {
        left: 0.8rem;
        bottom: 0.8rem;
        padding: 0.55rem 0.78rem;
        font-size: 0.86rem;
    }

    .slideshow-minimal .slide-nav {
        width: 28px;
        height: 28px;
    }
}
