/* =========================================================
   1. COLOR VARIABLES (Light Mode Default + Dark Mode)
   ========================================================= */
:root {
    --bg-color: #09090b;
    --surface-color: #18181b;
    --text-color: #f4f4f5;
    --muted-text: #a1a1aa;
    --border-color: #e4e4e7;
    --subtle-border: #27272a;
    --shadow-color: #e4e4e7;
}

body.light-mode {
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-color: #111111;
    --muted-text: #555555;
    --border-color: #111111;
    --subtle-border: #dddddd;
    --shadow-color: #111111;
}

/* =========================================================
   2. RESET & BASE TYPOGRAPHY
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s, color 0.2s;
}

a {
    color: inherit;
    text-decoration: none;
}

.code-box pre code.hljs {
    padding: 0;
    background: transparent;
}

/* =========================================================
   3. REUSABLE LAYOUT & CONTAINER CLASSES
   (Call these anywhere in your HTML!)
   ========================================================= */
   .page-container {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

.section-block {
    margin-bottom: 64px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.0rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* =========================================================
   4. HEADER & NAVIGATION
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.75rem;
    line-height: 1;
    text-transform: uppercase;
}

.brand-role {
    font-size: 0.70rem;
    font-weight: 500;
    color: var(--muted-text);
    margin-top: 10px;
}

.main-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.15s;
}

.nav-link:hover {
    border-color: var(--border-color);
}

.nav-link.active {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--border-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-btn:hover,
.theme-btn:hover,
.small-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.theme-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    height: 36px;
    width: 36px;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

/* =========================================================
   5.  BIO SECTION (Matches Canva Portrait + Vertical Line)
   ========================================================= */
 .bio-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: center;
}

.portrait-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.portrait-box {
    width: 230px;
    height: 270px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    background: linear-gradient(180deg, #fefce8 0%, #f4f4f5 50%, #e4e4e7 100%);
    position: relative;
}

body.dark-mode .portrait-box {
    background: linear-gradient(180deg, #27272a 0%, #18181b 60%, #09090b 100%);
}

.portrait-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

/* Fallback design inside the portrait frame */
.portrait-fallback {
    position: absolute;
    inset: 0;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    z-index: 1;
}

.country-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 4px;
}

.gp-circle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: auto;
    margin-bottom: 10px;
}

.fallback-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: auto;
}

.fallback-name strong {
    font-size: 0.85rem;
}

.fallback-name span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted-text);
}

.replace-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted-text);
}

/* Roles directly underneath the photo */
.portrait-roles {
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
}

.portrait-roles span {
    color: var(--muted-text);
    margin: 0 4px;
}

/* Right Side Bio Column with Vertical Divider */
.bio-text {
    border-left: 2px solid var(--border-color);
    padding-left: 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Top Status Badges */
.bio-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-available {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    padding: 5px 12px;
    border-radius: 4px;
}

body.dark-mode .badge-available {
    background-color: rgba(6, 78, 59, 0.6);
    color: #6ee7b7;
    border-color: #059669;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.badge-relocate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--subtle-border);
    padding: 5px 12px;
    border-radius: 4px;
}

.badge-roles {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.00rem;
    font-weight: 750;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 2px solid var(--subtle-border);
    padding: 5px 12px;
    border-radius: 12px;
}

.bio-lead {
    font-size: 1.15rem;
    line-height: 1.6;
}

.bio-body {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-color);
}

/* Action Buttons */
.bio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 6px;
}

.btn-primary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    background-color: var(--text-color);
    color: var(--bg-color);
    border: 2px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 4px;
    box-shadow: 3px 3px 0px var(--shadow-color);
    transition: transform 0.15s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
    background-color: var(--surface-color);
}



/* =========================================================
   6. PROJECT CARDS (Hard Brutalist Shadows on Body)
   ========================================================= */
   .project-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease;
}

.card-title-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

.project-card:hover .card-title {
    text-decoration: underline;
}

.status-badge {
    background-color: var(--text-color);
    color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: transform 0.15s ease;
}

/* Lifts the entire card on hover while keeping the shadow solid */
.project-card:hover .card-content-wrapper {
    transform: translateY(-4px) translateX(-2px);
}

.project-card:hover .read-more{
     transform: translateX(5px);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a; 
    border: 2px solid var(--border-color);
    border-bottom: none; /* Connects seamlessly to the white box below */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    /* THIS GIVES THE EXACT SHADOW FROM YOUR SCREENSHOT */
    box-shadow: 6px 6px 0px var(--shadow-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 1px solid var(--subtle-border);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 16px;
    padding-top: 12px;
}

.read-more {
    text-decoration: underline;
    cursor: pointer;
}

/* =========================================================
   7. SKILLS SECTION (Matches Screenshot Exactly)
   ========================================================= */
.skills-wrapper {
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
}

.skill-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

/* Engine Boxes (Left Column) */
.engine-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
}

.engine-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--text-color);
    color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.engine-text h4 {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: none;
}

.engine-text p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted-text);
}

/* Languages Box (Center Column) */
.languages-box {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    background-color: var(--bg-color);
}

.lang-category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted-text);
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.lang-primary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.lang-separator {
    color: var(--muted-text);
    font-weight: 400;
    margin: 0 6px;
}

.lang-secondary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted-text);
    padding-top: 14px;
    border-top: 1px solid var(--subtle-border);
}

.spoken-flags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--subtle-border);
}

.flag-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    background-color: var(--surface-color);
    border-radius: 4px;
}

/* Tools Box (Right Column) */
.tools-box {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 20px 24px;
    background-color: var(--bg-color);
}

.skill-list {
    list-style-type: disc;
    list-style-position: inside;
    font-size: 0.9rem;
    line-height: 2.2;
    color: var(--text-color);
}

/* =========================================================
   8. FOOTER (CONTACTS & CORNER-BRACKET CV BUTTON)
   ========================================================= */
.site-footer {
    border-top: 2px solid var(--border-color);
    margin-top: 60px;
    padding: 40px 20px;
}

.footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
}

.contacts-col .section-title {
    border-bottom: none;
    margin-bottom: 12px;
    padding-bottom: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.contact-icon {
    width: 34px;
    height: 34px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.small-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 3px 8px;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

/* Corner-Bracket Box matching your Canva "DOWNLOAD CV" design */
.cv-download-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 96px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.15s;
}

/* This ::before cuts out the top and bottom middle border lines to create the corner brackets */
.cv-download-box::before {
    content: "";
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 28px;
    right: 28px;
    background-color: var(--bg-color);
    z-index: 0;
}

.cv-download-box span {
    position: relative;
    z-index: 1;
}

.cv-download-box:hover {
    transform: translateY(-10px);
}

/* =========================================================
   9. MOBILE RESPONSIVENESS
   ========================================================= */
   @media (max-width: 768px) {
    /* Fix 1: Keep Social Icons next to Name on row 1, push Tabs to row 2 */
    .brand {
        order: 1;
    }
    .header-actions {
        order: 2;
    }
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--subtle-border);
        padding-top: 10px;
    }

    /* Stack Bio, Projects, and Skills cleanly on mobile */
    .bio-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .bio-badges, .bio-actions {
        justify-content: center;
    }
    .bio-text {
        border-left: none;
        border-top: 2px solid var(--border-color);
        padding-left: 0;
        padding-top: 20px;
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .skill-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Fix 2: Center Contacts and Download CV button on mobile */
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .contacts-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .contact-item {
        justify-content: center;
    }
    .cv-col {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

/* =========================================================
   10. GAMES PAGE CAROUSEL & DETAIL VIEW
   ========================================================= */
.carousel-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Viewport clips the left/right cards in half and fades their outer edges */
.carousel-viewport {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Default state: hidden in the back (for 4th, 5th+ projects) */
.carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52%;
    max-width: 420px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    cursor: pointer;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, box-shadow 0.2s ease;
}

/* CENTER SELECTED GAME: Full size & sharp shadow */
.carousel-item.is-active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
    z-index: 5;
}

/* LEFT PEEK GAME: Smaller, shifted left so the left half disappears */
.carousel-item.is-prev {
    transform: translate(-140%, -50%) scale(0.8);
    opacity: 0.45;
    pointer-events: auto;
    z-index: 3;
}

/* RIGHT PEEK GAME: Smaller, shifted right so the right half disappears */
.carousel-item.is-next {
    transform: translate(40%, -50%) scale(0.8);
    opacity: 0.45;
    pointer-events: auto;
    z-index: 3;
}

.carousel-item.is-prev:hover,
.carousel-item.is-next:hover {
    opacity: 0.75;
}

.carousel-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.carousel-thumb-text {
    position: absolute;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: #ffffff;
    letter-spacing: 0.05em;
    z-index: 1;
}

.carousel-caption {
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--border-color);
    background-color: var(--bg-color);
}

/* Game Detail Container Below Carousel */
.game-detail-card {
    display: none; /* Hidden unless selected */
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    box-shadow: 6px 6px 0px var(--shadow-color);
    padding: 28px;
}

.game-detail-card.active {
    display: block;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
    gap: 16px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Aligns everything to the right edge */
    gap: 12px;
    flex-shrink: 0;
}

.header-pills {
    display: flex;
    gap: 8px; /* Controls how close C++ and UE5 are to each other */
    align-items: center;
    flex-shrink: 0;
}

.header-links {
    display: flex;
    gap: 12px;
}

.project-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-color);
    background-color: transparent;
    border: 2px solid var(--text-color);
    border-radius: 4px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.project-link-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.project-link-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    line-height: 1.1;
}

.detail-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted-text);
    margin-top: 6px;
}

.team-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.detail-intro {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 0.9rem;
}

/* C++ Code Window */
.code-box {
    border: 2px solid var(--border-color);
    background-color: #111113;
    color: #f4f4f5;
    border-radius: 4px;
    overflow: hidden;
}

.code-box-header {
    background-color: #1e1e22;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    border-bottom: 1px solid #333;
}

.code-box-header .small-btn {
    color: #f4f4f5;
    border-color: #555;
}

.code-box pre {
    padding: 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
}

.code-box code {
    background: none;
    padding: 0;
    color: inherit;
}

.media-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* The text below the image */
.media-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 7px;
    color: var(--text-color);
    font-weight: 600;
}

/* The image container */
.media-preview-box {
    width: 100%;
    aspect-ratio: 16 / 9 !important; /* Perfect 1920x1080 ratio */
    border: 2px solid var(--text-color) !important; /* Adaptive: Black in Light mode, White in Dark mode */
    background-color: var(--bg-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Forces the image to fill the box with NO white bars */
.media-preview-box img,
.media-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    background-color: transparent;
    position: relative;
    z-index: 2;
}

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

    .detail-header {
        flex-direction: column;
    }
    .header-right {
        align-items: flex-start;
        margin-top: 16px;
    }
    .header-pills, .header-links {
        justify-content: flex-start;
    }
}

/* =========================================================
   11. FEATURE BLOCK: STACKED (TEXT -> CODE -> 1 TO 4 MEDIA)
   ========================================================= */
.feature-box {
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    margin-top: 32px;
}

/* 1. TOP ROW: TEXT (With generous breathing room) */
.feature-text-top {
    padding: 28px 32px;
}

.feature-heading {
    font-family: 'Oswald', sans-serif;
    font-size: 1.45rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

/* 2. MIDDLE ROW: FULL-WIDTH SCROLLABLE CODE */
.feature-code-row {
    padding: 24px 32px;

}

.feature-code-row .code-box {
    border: 2px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    flex-wrap: wrap;
}

.code-tab-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 10px 16px;
    background: transparent;
    color: #a1a1aa;
    border: none;
    border-right: 1px solid #2e2e34;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.code-tab-btn:hover {
    color: #ffffff;
    background-color: #27272c;
}

.code-tab-btn.active {
    color: #ffffff;
    background-color: #111113;
    border-bottom: 2px solid #f59e0b; /* Amber highlight under active file tab */
    font-weight: 600;
}

.code-box-header {
    background-color: #1e1e22;
    padding: 0 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

/* ONLY <pre> scrolls (Dark scrollbar on the right) */
.feature-code-row .code-box pre {
    padding: 20px 24px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
    margin: 0;
}

/* Gives the code plenty of inner padding and a vertical/horizontal scrollbar */
.feature-code-row .code-box pre code,
.feature-code-row .code-box pre code.hljs {
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    display: block;
}

/* Custom sleek scrollbar for the code box */
.feature-code-row .code-box pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.feature-code-row .code-box pre::-webkit-scrollbar-track {
    background: #111113;
}

.feature-code-row .code-box pre::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}

.feature-code-row .code-box pre::-webkit-scrollbar-thumb:hover {
    background: #71717a;
}

/* 3. BOTTOM ROW: 1 TO 4 IMAGES / GIFS / VIDEOS GRID */
.feature-media-grid {
    padding: 24px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    background-color: var(--bg-color);
}

.feature-media-grid .media-preview-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--border-color);
    background-color: #141416;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}   


.feature-media-grid .media-preview-box img,
.feature-media-grid .media-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.media-card.card-80 {
    width: 80% !important;
    margin: 0 auto; /* Centers the box in the middle of the row */
}

@media (max-width: 768px) {
    .feature-text-top,
    .feature-code-row,
    .feature-media-grid {
        padding: 20px 16px;
    }
    .feature-media-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   12. UI DESIGN: 3 STILL IMAGE SELECTOR & 2-PER-ROW GRIDS
   ========================================================= */
.ui-category-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.ui-cat-card {
    border: 2px solid var(--subtle-border);
    background-color: var(--bg-color);
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.15s ease;
}

.ui-cat-card:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* Highlighted state for whichever of the 3 still cards is selected */
.ui-cat-card.active {
    opacity: 1;
    border: 2px solid var(--border-color);
    box-shadow: 5px 5px 0px var(--shadow-color);
    transform: translateY(-3px);
}

.ui-cat-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ui-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

/* Hides non-selected UI panels so all 3 don't stack on the same page */
.ui-cat-panel {
    display: none;
}

.ui-cat-panel.active {
    display: block;
}

.ui-section-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-color);
}

.ui-header-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Strictly 2 Images Per Horizontal Row */
.ui-grid-2 {
    padding: 24px 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.ui-grid-2 .media-preview-box {
    width: 100%;
    aspect-ratio: 16 / 10;
    border: 2px solid var(--border-color);
    background-color: #141416;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ui-grid-2 .media-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows your full UI/Logo image without cutting off edges */
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

/* 5-Logo Interactive Tab Bar */
.logo-tabs-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-bottom: 2px solid var(--border-color);
    background-color: var(--surface-color);
}

.logo-tab-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 12px 10px;
    background: transparent;
    color: var(--muted-text);
    border: none;
    border-right: 1px solid var(--subtle-border);
    cursor: pointer;
    transition: all 0.15s;
}

.logo-tab-btn:last-child {
    border-right: none;
}

.logo-tab-btn:hover {
    color: var(--text-color);
    background-color: var(--muted-text);
}

.logo-tab-btn.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.logo-tab-panel {
    display: none;
}

.logo-tab-panel.active {
    display: block;
}

.logo-info-bar {
    padding: 20px 32px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    background-color: var(--bg-color);
}

.logo-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.logo-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 620px;
}

@media (max-width: 768px) {
    .ui-category-selector,
    .ui-grid-2 {
        grid-template-columns: 1fr;
    }
    .logo-tabs-bar {
        grid-template-columns: 1fr 1fr;
    }
    .ui-grid-2,
    .logo-info-bar {
        padding: 16px;
    }
}


/* =========================================================
   14. INTERACTIVE UNREAL BLUEPRINT VIEWER (BLUEPRINTUE)
   ========================================================= */
.bp-viewer-frame {
    width: 100%;
    height: 420px;
    border: none;
    display: block;
    background-color: #1a1a1a;
}

.bp-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #a1a1aa;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   15. PLAYER PROFILE / GAMING SECTION
   ========================================================= */
.gamer-intro {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--muted-text);
    margin-bottom: 28px;
    max-width: 900px;
}

.gamer-intro strong {
    color: var(--text-color);
}

.playtime-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playtime-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 2px solid var(--subtle-border);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.hours-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border: 1.5px solid var(--border-color);
    border-radius: 3px;
    background-color: var(--bg-color);
    color: var(--text-color);
    white-space: nowrap;
}

.engine-badge.game-icon {
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-color); /* Fallback background */
    border: 2px solid var(--text-color);
}

.engine-badge.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flag-badge.flag-icon {
    padding: 0;
    overflow: hidden;
    width: 32px;  /* Adjust this if you want the flag wider */
    height: 22px; /* Adjust this if you want the flag taller */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
}

.flag-badge.flag-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the flag perfectly fills the box without stretching */
    display: block;
}