/* ==========================================================================
   THEME VARIABLES
   ========================================================================== */
:root {
    --color-bg-main: #0a0a0a;
    --color-bg-secondary: #141414;
    --color-text-primary: #e0e0e0;
    --color-text-muted: #a0a0a0;
    --color-accent: #00e5ff;
    --color-accent-glow: rgba(0, 229, 255, 0.5);
    --font-main: 'Manrope', sans-serif;
    --navbar-height: 76px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-main) !important;
    color: var(--color-text-primary) !important;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-weight: 800;
}

.ls-1 { letter-spacing: 1px; }
.ls-2 { letter-spacing: 2px; }
.bg-darker { background-color: var(--color-bg-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }

.text-accent-glow {
    color: var(--color-accent);
    text-shadow: 0 0 15px var(--color-accent-glow);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    background-color: rgba(10, 10, 10, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--color-accent) !important;
    border-bottom: 2px solid var(--color-accent);
}

.navbar-nav .nav-link:focus {
    color: var(--color-text-primary);
    outline: none;
    box-shadow: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-bg-main);
    border: 2px solid var(--color-accent);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-outline-accent {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    transition: all 0.3s ease;
}

.btn-outline-accent:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-main);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

/* ==========================================================================
   SHARED SECTION UTILITIES
   ========================================================================== */
section {
    scroll-margin-top: var(--navbar-height);
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.bg-overlay-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,10,0.72) 0%,
        rgba(10,10,10,0.88) 55%,
        rgba(10,10,10,1) 100%
    );
    z-index: 1;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.project-banner video.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.65;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.projects-banner,
.project-banner,
#home.spa-section.active {
    isolation: isolate;
}

/* ==========================================================================
   HOME SECTION
   ========================================================================== */
#home.spa-section.active {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#home .bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
}

#home .scanline-overlay,
#home .bg-overlay-dark {
    position: absolute;
    inset: 0;
}

#home .container {
    position: relative;
    z-index: 2;
    text-align: center;
    /* Push content below the fixed navbar */
    padding-top: var(--navbar-height);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
#about-me {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

.about-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50% !important;
    border: 3px solid var(--color-bg-secondary);
    padding: 4px;
    transition: all 0.3s ease;
}

.about-photo:hover { transform: scale(1.05); }

/* ==========================================================================
   PROJECT GRID
   ========================================================================== */
.project-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px -10px var(--color-accent-glow);
}

.card-img-wrapper {
    overflow: hidden;
    height: 220px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-top { transform: scale(1.1); }

.badge-tech {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    font-weight: 600;
    padding: 0.5em 0.8em;
}

.soft-shadow { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }

.card { border-radius: 10px; }
.card h3 { letter-spacing: 0.08em; }
.card p  { line-height: 1.7; }
.card h3, .card h5 { letter-spacing: 0.06em; }

/* ==========================================================================
   PROJECTS LIST PAGE — Projects Section Banner
   ========================================================================== */
.projects-banner {
    height: 55vh;
    min-height: 280px;
    max-height: 500px;
    margin-top: -3rem;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   PROJECT DETAIL — Project Banner 
   ========================================================================== */
.project-banner {
    position: relative;
    width: 100%;
    height: 55vh;
    min-height: 260px;
    max-height: 480px;
    overflow: hidden;
    /* Pull the banner upward so it reaches the top of the viewport.
       This compensates for the fixed navbar while matching the
       surrounding container offset used in the page layout. */
    margin-top: calc(-1 * var(--navbar-height));
    margin-bottom: 3rem;
}

/* Shared media treatment for banner backgrounds */
.project-banner .bg-video,
.project-banner .bg-img,
.project-banner img.bg-video,
.project-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0.65;
}

.project-banner video.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.65;
}

.project-banner .bg-overlay-dark { z-index: 1; }
.project-banner .scanline-overlay { z-index: 2; }
.project-banner .banner-logo { z-index: 3; }

.project-banner .banner-logo {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-banner .banner-logo img {
    width: clamp(140px, 28vw, 260px);
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
    /* Reset inherited full-cover image styles applied above */
    position: static;
    opacity: 1;
    object-fit: unset;
}

.project-showcase .border-top.border-secondary {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.section-subtitle {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

/* ==========================================================================
   LEGACY PROJECT DETAIL BANNERS — Bootstrap Ratio Patch
   Used by older project pages still relying on ratio + --bs-aspect-ratio
   (Patch Me, Takaindest, Kobra, Bubble, The New Dance)
   ========================================================================== */
.container-fluid.p-0.mb-5 .position-relative.ratio {
    height: 50vh !important;
    min-height: 240px;
    max-height: 460px;
    /* Override Bootstrap's padding-based aspect ratio behavior */
    padding-bottom: 0 !important;
}
/* FLOATING IMG */
.float-img-wrapper {
    float: right;
    width: 520px; 
    max-width: 100%;
    margin: 0 0 1rem 2rem;
}
.float-img-wrapper img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
}
.img-caption {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
    text-align: right;
}
/* ==========================================================================
   CONTACT SECTION  
   ========================================================================== */
#contacts {
    padding-top: 60px !important;
    padding-bottom: 80px !important;
}

/* ==========================================================================
   SPA TRANSITIONS & PAGE ANIMATIONS
   ========================================================================== */
.spa-section { display: none; }

.spa-section.active {
    display: block;
    animation: fadeIn 0.8s ease-out forwards;
    padding-top: var(--navbar-height);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.fade-in-anim {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ==========================================================================
   PROJECT DETAIL — Layout & Supporting UI
   ========================================================================== */
.project-grid-container .col-md-4:nth-child(1) { animation-delay: 0.1s; }
.project-grid-container .col-md-4:nth-child(2) { animation-delay: 0.2s; }
.project-grid-container .col-md-4:nth-child(3) { animation-delay: 0.3s; }

.project-showcase {
    background: transparent;
    border: none;
    padding: 1rem 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--color-accent);
    padding: 1.2rem;
    backdrop-filter: blur(4px);
}

.stat-box:hover { background: rgba(0, 229, 255, 0.05); }

/* ==========================================================================
   SECTION TITLE HIERARCHY
   ========================================================================== */
.section-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.6;
    margin-bottom: 0.4rem;
}

h2.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.section-block {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 4rem;
    padding-top: 3rem;
}

.section-intro {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.93rem;
    max-width: 680px;
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

/* Legacy selector used for callout headings inside border-start blocks */
.ps-3.border-start h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

/* ==========================================================================
   SCREENSHOT MEDIA
   ========================================================================== */
.bp-img-wrapper {
    background: var(--color-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px;
    transition: border-color 0.3s ease;
}

.bp-img-wrapper:hover { border-color: var(--color-accent); }

.bp-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.bp-img-wrapper .bp-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ==========================================================================
   SHARED UTILITIES
   ========================================================================== */
.video-grid-smart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;
}

.video-item { max-width: 500px; width: 100%; margin: 0 auto; }

.video-container-style {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    transition: all 0.3s ease;
}

.video-container-style:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
    transform: translateY(-5px);
}

.transition-hover { transition: transform 0.2s ease, border-color 0.2s ease; }
.transition-hover:hover { border-color: var(--color-accent) !important; }

.tracking-wide { letter-spacing: 0.15em; }

.border-accent-left {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-accent);
}

.bg-main { background-color: var(--color-bg-main) !important; }

/* Vertical timeline-style container for devlog / process sections */
.devlog-section {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.devlog-section::before {
    content: "";
    position: absolute;
    left: -1px; top: 0;
    height: 30px; width: 3px;
    background: var(--color-accent);
}

/* Horizontal callout block used for gameplay / mechanics summaries */
.mechanics-callout {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent !important;
    padding: 2rem 0;
}

.callout-label {
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .project-banner {
        height: 42vh;
        min-height: 200px;
    }

    .projects-banner {
        height: 38vh;
        min-height: 180px;
    }

    .container-fluid.p-0.mb-5 .position-relative.ratio {
        height: 42vh !important;
        min-height: 200px;
    }
    .float-img-right {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
}

@media (max-width: 576px) {
    .project-banner {
        height: 36vh;
        min-height: 170px;
    }

    .container-fluid.p-0.mb-5 .position-relative.ratio {
        height: 36vh !important;
        min-height: 170px;
    }

    .stat-box { padding: 0.9rem 0.6rem; }
    .stat-box small { font-size: 0.6rem; }
    .stat-box span  { font-size: 0.85rem; }
    h2.section-title { font-size: 1.2rem; }
}