﻿/* ====== RESET & BASE STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.desktop-icon:focus-visible,
.portfolio-item:focus-visible,
.nav-btn:focus-visible,
.window-control:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

a.portfolio-item {
    color: inherit;
    text-decoration: none;
}

/* ====== GLOBAL SCROLLBAR STYLING (thin) ====== */
:root {
    --scrollbar-thumb: rgba(32, 32, 32, 0.55);
    --scrollbar-thumb-hover: rgba(0, 0, 0, 0.75);
    --scrollbar-track: transparent;
}

/* Firefox */
* {
    scrollbar-width: thin; /* options: auto | thin | none */
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Chromium/WebKit */
*::-webkit-scrollbar {
    width: 8px;   /* vertical scrollbar width */
    height: 8px;  /* horizontal scrollbar height */
}
*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 8px;
    border: 2px solid transparent; /* creates visual inset, keeps thumb slim */
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

body {
    font-family: 'VT323', monospace;
    background: url(assets/bg/CloudVis-poster.avif) center center / cover;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

html {
    background: url(assets/bg/CloudVis-poster.avif) center center / cover fixed;
}

.bg-media {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.bg-media.ready {
    opacity: 1;
}

.bg-media.autoplay-blocked {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .bg-media { display: none; }
}

.site-footer {
    position: fixed;
    right: 10px;
    bottom: 8px;
    z-index: 2;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.72);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* ====== WINDOW SYSTEM ====== */
.window {
    position: absolute;
    background: rgba(255, 251, 251, 0.373);
    backdrop-filter: blur(5px);
    border: none;
    min-width: 300px;
    min-height: 200px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    z-index: 100;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    overflow: hidden;
    box-sizing: border-box;
}

/* Bottom-right resize handle for resizable windows */
.window-resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    background: transparent;
}

/* Subtle diagonal indicator that blends with border without changing design */
.window-resize-handle::after {
    content: '';
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, transparent 0 40%, rgba(0,0,0,0.35) 40% 50%, transparent 50% 100%);
    pointer-events: none;
}

/* Hide resize handle on mobile */
@media (max-width: 767px) {
    .window-resize-handle { display: none !important; }
}

/* ====== WINDOW NAVIGATION ====== */
.window-nav-bar {
    background: #F0F0F0;
    border-bottom: 1px solid #808080;
    padding: 1px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    min-height: 18px;
}

.nav-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* nav buttons styles consolidated below in Button styles section */

.breadcrumb {
    color: #333;
    font-size: 16px;
    margin-left: 8px;
}

.breadcrumb-separator {
    margin: 0 4px;
    color: #666;
}

/* ====== PROJECT DETAIL VIEW ====== */
.project-detail {
    display: none;
    height: 100%;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0);
}

.project-detail.active {
    display: block;
}

.project-header {
    background: #b0b0b000;
    padding: 15px;
    border-bottom: 1px solid #808080;
    max-width: 500px;
    margin: 25px auto 15px auto;
    border: 2px solid #000000;
    
}

.project-title {
    font-size: 36px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 8px;
}

.project-meta {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.project-description {
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.2;
    color: #333;
}

.project-gallery {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-auto-rows: minmax(300px, auto);
    gap: 15px;
    align-items: center;
    justify-items: center;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border: 1px solid #808080;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: rotate(0deg);
    max-width: 100%;
}

/* Subtle shadow variations for visual interest */
/* Reduce shadow variants to 2 subtle alternations for readability */
.project-gallery img:nth-child(2n+1) { box-shadow: 2px 2px 5px rgba(0,0,0,0.24); }
.project-gallery img:nth-child(2n) { box-shadow: 1px 2px 4px rgba(0,0,0,0.18); }

.project-gallery img:hover {
    border-color: #0078D4;
    transform: scale(1.03);
    z-index: 10;
    position: relative;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.4);
}

/* Side-by-side layout for render-cull project */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.project-info {
    background: #ffffff;
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding: 8px;
}

.project-image-container {
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

/* Tablet and Desktop layout - side by side for screens 鈮?68px */
@media (min-width: 768px) {
    .project-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 2%;
    }
    .project-content .project-info {
        flex: 0 0 38%;
        max-width: 38%;
        min-width: 0;
    }
    .project-image-container {
        flex: 0 0 60%;
        max-width: 60%;
        min-width: 0;
    }
    .project-content.stacked { flex-direction: column; }
    .project-content.stacked .project-info {
        flex: 1 1 auto;
        max-width: 600px;
        width: 100%;
        margin: 0 auto;
    }
}

/* Base override for stacked variant */
.project-content.stacked .project-info {
    flex: 1 1 auto;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.project-image-container img {
    width: 100%;
    height: auto;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: contain;
}

.project-image-container img:hover {
    border-color: #0078D4;
    transform: scale(1.02);
    box-shadow: 4px 4px 4px rgba(0,0,0,0.4);
}

/* Video container unified */
.project-video-container {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 0 5px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-video-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    max-width: 100%;
    min-height: 200px;
    height: auto;
    border: none;
    box-shadow: none;
}

.window.dragging { pointer-events: none; will-change: auto; }

.window-header {
    background: #2a7a46;
    color: white;
    padding: 2px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-size: 18px;
    font-weight: normal;
}

.window-controls { display: flex; gap: 2px; }

.window-control {
    width:20px;
    height:20px;
    background: #1d1c1c;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.window-control:hover { background: #a13434; }
.window-control:active { border: 1px inset #C0C0C0; }

.window-content {
    padding: 10px;
    height: calc(100% - 25px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.window:has(.window-nav-bar) .window-content { height: calc(100% - 50px); }

/* Enhanced padding for game and installation windows */
.window:has(.portfolio-grid) .window-content { padding: 5px 5px 10px 5px; }

/* ====== PORTFOLIO GRID ====== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    flex: 1;
    grid-auto-rows: 1fr;
    overflow: auto;
    max-height: 100%;
}

/* ====== PROJECT PHOTO WINDOW ====== */
.project-photo-window .window-content {
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    contain: layout style !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ====== SOLITAIRE-LIKE SMEAR TRAILS ====== */
.smear-trail {
    position: absolute;
    pointer-events: none;
    backface-visibility: hidden;
    visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: left, top, transform;
    transition: left 32ms linear, top 32ms linear;
}

.smear-trail.is-visible {
    visibility: visible;
}

.smear-trail.is-visible.is-converging {
    transition: transform 138ms cubic-bezier(0.22, 0.9, 0.18, 1);
}

.photo-viewer {
    background: #F0F0F0;
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'VT323', monospace;
    overflow: hidden;
    position: relative;
    min-height: 0;
    box-sizing: border-box;
    contain: layout style;
}

.photo-display {
    width: 100% !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.photo-display img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    display: block;
    max-width: none !important;
    max-height: none !important;
}

/* Photo navigation arrows for project windows */
.photo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.767);
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    font-family: 'VT323', monospace;
}

.photo-nav-btn:hover:not(:disabled) {
    background: rgba(0, 120, 212, 0.8);
    border: 1px outset #0078D4;
}

.photo-nav-btn:disabled { background: rgba(128, 128, 128, 0.4); color: #999; cursor: not-allowed; }
.photo-nav-prev { left: 10px; }
.photo-nav-next { right: 10px; }

/* ====== PROJECT PHOTO WINDOW CLEAN STYLING ====== */
.project-photo-window {
    border: 0px solid #000 !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Photo window header - keep minimal for controls */
.project-photo-window .window-header {
    border: 2px solid #000 !important;
    background: rgb(61, 173, 179) !important;
    color: rgb(247, 247, 247) !important;
}

/* ====== GAME & INSTALLATION WINDOW STYLING ====== */
#game_window .portfolio-grid {
    border: none;
    border-radius: 3px;
    border-color: #000000;
    box-shadow: none;
    background: transparent;
    position: relative;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 20px;
    overflow: visible;
}

/* Shared base behavior for portfolio items in scoped windows */
#game_window .portfolio-item,
#installation_window .portfolio-item {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}

#installation_window .portfolio-grid {
    border: none;
    border-radius: 3px;
    box-shadow: none;
    background: transparent;
    position: relative;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: visible;
}

/* Game window portfolio items with brutalist styling */
#game_window .portfolio-item {
    border: 2px solid #000;
    background: white;
    border-radius: 6px;
    position: relative;
    transform: translateZ(0);
    transition: all 0.2s ease;
    padding: 10px;
    margin: 5px;
}

/* Enhanced hover effect for game window items */
#game_window .portfolio-item:hover {
    background: #ffffff;
    border-color: #000000;
    box-shadow: 6px 6px 0px 2px #ffffff,
                6px 6px 0px 4px #000000,
                12px 12px 0px 2px #ffffff,
                12px 12px 0px 4px #000000,
                18px 18px 0px 2px #ffffff,
                18px 18px 0px 4px #000000,
                24px 24px 0px 2px #ffffff,
                24px 24px 0px 4px #000000,
                30px 30px 0px 2px #ffffff,
                30px 30px 0px 4px #000000,
                36px 36px 0px 2px #ffffff,
                36px 36px 0px 4px #000000,
                42px 42px 0px 2px #ffffff,
                42px 42px 0px 4px #000000;
    transform: translate(-40px, -40px);
    z-index: 10;
}

/* Game window images with brutalist borders */
#game_window .portfolio-item .work-thumb {
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #0000003b,
                4px 4px 0px rgba(0, 0, 0, 0.051);
}

/* Game window labels with strong contrast */
#game_window .portfolio-item .work-label {
    background: #ffffff00;
    color: rgb(0, 0, 0);
    border: 0px solid #000;
    border-radius: 10px;
    margin: 8px auto 0 auto;
    padding: 1px 6px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Installation window portfolio items with brutalist styling */
#installation_window .portfolio-item {
    border: 2px solid #000;
    background: white;
    border-radius: 6px;
    position: relative;
    transform: translateZ(0);
    transition: all 0.2s ease;
    padding: 10px;
    margin: 5px;
}

/* Enhanced hover effect for installation window items */
#installation_window .portfolio-item:hover {
    background: #ffffff;
    border-color: #000000;
    box-shadow: 6px 6px 0px 2px #ffffff,
                6px 6px 0px 4px #000000,
                12px 12px 0px 2px #ffffff,
                12px 12px 0px 4px #000000,
                18px 18px 0px 2px #ffffff,
                18px 18px 0px 4px #000000,
                24px 24px 0px 2px #ffffff,
                24px 24px 0px 4px #000000,
                30px 30px 0px 2px #ffffff,
                30px 30px 0px 4px #000000,
                36px 36px 0px 2px #ffffff,
                36px 36px 0px 4px #000000,
                42px 42px 0px 2px #ffffff,
                42px 42px 0px 4px #000000;
    transform: translate(-40px, -40px);
    z-index: 10;
}

/* Installation window images with brutalist borders */
#installation_window .portfolio-item .work-thumb {
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #0000003b,
                4px 4px 0px rgba(0, 0, 0, 0.051);
}

/* Installation window labels with strong contrast */
#installation_window .portfolio-item .work-label {
    background: #ffffff00;
    color: rgb(0, 0, 0);
    border: 0px solid #000;
    border-radius: 10px;
    margin: 8px auto 0 auto;
    padding: 1px 6px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Game window frame brutalist styling */
#game_window {
    border: 2px solid #000 !important;
    border-radius: 4px !important;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3),
                inset -1px -1px 0px rgba(0,0,0,0.2) !important;
    overflow: visible !important;
}

/* Game window content area with brutalist grid */
#game_window .window-content {
    border: none;
    box-shadow: none;
    background: #ffffff00;
    
    overflow: visible; 
}

/* Game window header enhancement */
#game_window .window-header { border-bottom: 2px solid #000 !important; position: relative; }

/* Game window navigation bar brutalist styling */
#game_window .window-nav-bar {
    border-bottom: 2px solid #000;
    box-shadow: 0px 0px 0px #000;
    background: #E0E0E0;
}

/* About window frame matches game window styling */
#about_window {
    border: 2px solid #000 !important;
    border-radius: 4px !important;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3),
                inset -1px -1px 0px rgba(0,0,0,0.2) !important;
    overflow: hidden !important;
}

#about_window .window-header {
    border-bottom: 2px solid #000 !important;
    position: relative;
}

#about_window .window-content {
    background: #ffffff00;
    border: none;
    box-shadow: none;
    padding: 10px 12px 12px;
}

/* Installation window frame brutalist styling */
#installation_window {
    border: 2px solid #000 !important;
    border-radius: 4px !important;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3),
                inset -1px -1px 0px rgba(0,0,0,0.2) !important;
    overflow: visible !important;
}

/* Installation window content area with brutalist grid */
#installation_window .window-content {
    border: none;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1);
    background: #ffffff00;
       overflow: visible; 
}

/* Installation window header enhancement */
#installation_window .window-header { border-bottom: 2px solid #000 !important; position: relative; }

/* Installation window navigation bar brutalist styling */
#installation_window .window-nav-bar {
    border-bottom: 2px solid #000;
    box-shadow: 0px 0px 0px #000;
    background: #E0E0E0;
}

.portfolio-item img,
.portfolio-item .work-thumb {
    width: 100%;
    object-fit: cover;
    border: 1px solid #808080;
    margin-bottom: 5px;
    display: block;
}

.portfolio-item picture { display: contents; }

.portfolio-item img { aspect-ratio: 1 / 1; flex: none; }

.portfolio-item .work-thumb { flex: 9 1 0%; min-height: 120px; }

.portfolio-item .work-thumb {
    background: #1a1a1a;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.portfolio-item .work-thumb.loaded { opacity: 1; }

.portfolio-item .work-label,
.portfolio-item .photo-label {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    min-height: 20px;
}

.portfolio-item .photo-label { margin-top: 5px; flex: none; }

/* Button styles (consolidated) */
.nav-btn {
    background: linear-gradient(to bottom, #F0F0F0, #D0D0D0);
    border: 1px outset #C0C0C0;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, transform 0.1s;
    font-family: 'VT323', monospace;
}

.nav-btn:hover:not(:disabled) { background: linear-gradient(to bottom, #F5F5F5, #E0E0E0); transform: scale(1.03); }
.nav-btn:active { border: 1px inset #C0C0C0; transform: scale(0.98); }
.nav-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #000;
    font-weight: 900;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    width: 24px; height: 20px; border-radius: 2px; font-size: 20px;
}
.nav-btn:disabled { background: #E0E0E0; color: #999; cursor: not-allowed; transform: none; }

/* ====== ABOUT CONTENT ====== */
.about-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
    font-size: 20px;
    line-height: 1.18;
    color: #333;
}

.about-content p { margin-bottom: 10px; }

.about-content p:last-child { margin-bottom: 0; }

.about-content hr {
    border: 0;
    border-top: 1px solid #808080;
    margin: 10px 0 12px;
}

.about-content strong { color: #000000; }

/* ====== DESKTOP ICONS ====== */
.desktop {
    position: fixed;
    top: 20px;
    left: 40px;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 50px;
    z-index: 50;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border: 0px solid transparent;
    border-radius: 0px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(2px);
    width: 90px;
    height: 90px;
    justify-content: center;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0);
    border: 0px solid #ffffff00;
    box-shadow: 2px 2px 3px rgba(25, 25, 25, 0.805);
    transform: translateY(-2px);
}

.desktop-icon:active {
    transform: translateY(0);
    box-shadow: 1px 1px 2px rgba(45, 45, 45, 0.3);
    background: rgba(255, 255, 255, 0);
}

/* Reset browser defaults for button/a used as desktop icons */
button.desktop-icon {
    font: inherit;
    color: inherit;
}
a.desktop-icon {
    text-decoration: none;
    color: inherit;
}

.desktop-icon-img { width: 50px; height: 50px; object-fit: contain; }
.icon-label { font-family: 'VT323', monospace; font-size: 18px; color: #000; text-align: center; font-weight: normal; line-height: 1; }

/* ====== HOMEBOY PROJECT LAYOUT ====== */
.homeboy-main-container {
    display: block;
    padding: 20px;
    margin-bottom: 10px;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 35px;
}

/* Homeboy detail stacked layout: info on top, then GIF pair, then video */
.homeboy-main-container .project-info { max-width: 780px; margin: 0 auto; }
.homeboy-video { width: 100%; max-width: 1000px; margin: 10px auto 0; padding: 10px 15px 15px; }
/* Ensure Homeboy video has consistent styling and no drop shadow */
.homeboy-video iframe { width: 100%; aspect-ratio: 16/9; border: none; box-shadow: none; }

.homeboy-gallery { display: flex; gap: 50px; justify-content: center; padding: 10px 15px 15px; }
.homeboy-gallery img { width: 38%; height: auto; border: none; box-shadow: none; cursor: pointer; transition: all 0.3s ease; }

/* Project Screenshots hover effect */
.project-screenshots img { transition: transform 0.2s ease, box-shadow 0.2s ease; will-change: transform; }
.project-screenshots img:hover { transform: scale(1.02); box-shadow: 4px 8px 14px rgba(0, 0, 0, 0.3) !important; }

/* ====== RESPONSIVE DESIGN ====== */
@media (min-width: 768px) and (max-width: 1024px) {
    .window { max-width: 80vw; max-height:95vh; min-width: 280px; min-height: 180px; }
    .desktop { gap: 95px; }
    .desktop-icon { width: 90px; height: 90px; padding: 8px; }
    .desktop-icon-img { width: 50px; height: 50px; }
    .icon-label { font-size: 18px; }
    /* Game window */
    #game_window .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
    #game_window .portfolio-item { padding: 8px; margin: 3px; }
    #game_window .portfolio-item .work-label { width: 120px; font-size: 16px; }
    /* Installation window */
    #installation_window .portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; }
    #installation_window .portfolio-item { padding: 8px; margin: 3px; }
    #installation_window .portfolio-item .work-label { width: 100px; font-size: 14px; }
}

/* Mobile styles base (max-width: 767px) */
@media (max-width: 767px) {
    .window {
        width: 90vw !important;
        height: 95vh !important;
        min-width: 250px;
        min-height: 150px;
        max-width: 90vw !important;
        max-height: calc(100vh - 40px) !important;
        overflow: hidden !important
    }
    /* Keep game/installation clipped */
    #game_window { overflow: hidden !important; }
    #installation_window { overflow: hidden !important; }
    .window-header { padding: 2px 6px; font-size: 20px; cursor: default; }
    .window-control { width: 20px; height: 18px; font-size: 12px; }
    .window-content { padding: 15px; font-size: 14px; overflow-y: auto; height: calc(100% - 25px); }
    .window:has(.window-nav-bar) .window-content { height: calc(100% - 50px) !important; }
    #game_window .window-content, #installation_window .window-content { height: calc(100% - 50px) !important; overflow-y: auto !important; }
    .portfolio-grid { grid-template-columns: 1fr; gap: 10px; overflow-y: auto; max-height: 100%; grid-auto-rows: auto; height: 100%; }
    #game_window .portfolio-item, #installation_window .portfolio-item { display: flex; flex-direction: column; width: 100%; justify-content: flex-start; align-items: center; }
    .portfolio-item .work-thumb { height: 200px; max-height: 250px; flex: none; width: 80%; max-width: 600px; object-fit: cover; margin-top: auto; margin-bottom: auto; }
    .portfolio-item .work-label, .portfolio-item .photo-label { font-size: 30px; min-height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 20px; font-weight: bold; }
    #game_window .portfolio-grid { grid-template-columns: 1fr; gap: 15px; padding: 0; border: none; }
    #game_window .portfolio-item { border: 2px solid #000; border-radius: 0; margin: 0; padding: 15px; min-height: 300px; height: auto; background: white; }
    #game_window .portfolio-item:hover { transform: none; box-shadow: none; background: #4747424f; }
    #game_window .portfolio-item .work-thumb { height: 200px; max-height: 250px; width: 90%; max-width: 500px; border: 2px solid #000; }
    #game_window .portfolio-item .work-label { width: 200px; font-size: 36px; margin-top: 15px; }
    #installation_window .portfolio-grid { grid-template-columns: 1fr; gap: 10px; padding: 0; border: none; }
    #installation_window .portfolio-item { border: 2px solid #000; border-radius: 0; margin: 0; padding: 15px; min-height: 300px; height: auto; background: white; }
    #installation_window .portfolio-item:hover { transform: none; box-shadow: none; background: #4747424f; }
    #installation_window .portfolio-item .work-thumb { height: 200px; max-height: 250px; width: 90%; max-width: 500px; border: 2px solid #000; }
    #installation_window .portfolio-item .work-label { width: 300px; font-size: 36px; margin-top: 15px; text-align: center; }
    .about-content {
        font-size: 18px;
        line-height: 1.18;
    }
    #about_window .window-content { padding: 12px; }
    .about-content p { margin-bottom: 8px; }
    #game_window .nav-controls,
    #installation_window .nav-controls { gap: 6px; }
    #game_window .nav-btn,
    #installation_window .nav-btn {
        width: 36px;
        height: 30px;
        font-size: 18px;
        line-height: 1;
    }
    .desktop { top: 25px; left: 35px; gap: 40px; grid-template-columns: repeat(1, 1fr); }
    .desktop-icon { width: 100px; height: 100px; padding: 6px; }
    .desktop-icon-img { width: 56px; height: 56px; }
    .icon-label { font-size: 20px; }
    .menu-label { font-size: 24px; }
    .homeboy-main-container { padding-right: 20px !important; }
    .project-info, .homeboy-video { width: 100% !important; margin-top: 0 !important; }
    .homeboy-gallery { flex-direction: column; gap: 10px; }
    .homeboy-gallery img { width: 100%; }
    #game_window .project-image-container { display: flex; align-items: center; justify-content: center; max-height: calc(100vh - 260px); }
    #game_window .project-image-container img { width: 100%; height: 100%; object-fit: contain; }
    #game_window .project-gallery { grid-template-columns: 1fr; grid-auto-rows: auto; }
    #game_window .project-gallery img { width: 100%; height: auto; object-fit: contain; max-height: calc(100vh - 280px); }
}
