/* ==========================================
   CUBE PORTFOLIO - CSS VARIABLES & THEME
   ========================================== */
:root {
    /* Colors */
    --color-primary: #fff;
    --color-background: #000;
    --color-text: #fff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-accent: #ff4444;
    --color-success: #00ff00;
    --color-overlay: rgba(0, 0, 0, 0.8);
    --color-modal-backdrop: rgba(0, 0, 0, 0.95);
    
    /* Gradients */
    --gradient-header: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0, 0, 0, 0.8) 80%, rgba(0, 0, 0, 0) 100%);
    --gradient-glow: 0 0 10px rgba(255, 255, 255, 0.8), 
                     0 0 20px rgba(255, 255, 255, 0.6), 
                     0 0 30px rgba(255, 255, 255, 0.4);
    
    /* Typography */
    --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-weight-normal: 400;
    --font-weight-bold: 700;
    --line-height-base: 1.4;
    --letter-spacing-base: 0.01em;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 20px;
    --spacing-xl: 40px;
    --spacing-2xl: 60px;
    
    /* Layout */
    --header-height: 140px;
    --header-padding: 40px;
    --border-radius: 4px;
    --border-radius-lg: 8px;
    
    /* Z-index layers */
    --z-header: 1000;
    --z-modal-backdrop: 10001;
    --z-modal-content: 10002;
    --z-modal-controls: 10003;
    --z-notification: 10004;
    
    /* Animation */
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
    
    /* Responsive breakpoints (for use in calculations) */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
    --breakpoint-desktop: 1200px;
}

/* Dark theme variables (default) */
[data-theme="dark"] {
    --color-primary: #fff;
    --color-background: #000;
    --color-text: #fff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
}

/* Light theme variables (if needed in future) */
[data-theme="light"] {
    --color-primary: #000;
    --color-background: #fff;
    --color-text: #000;
    --color-text-secondary: rgba(0, 0, 0, 0.7);
}

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

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-background);
    font-weight: var(--font-weight-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ==========================================
   CONTENT PROTECTION
   ========================================== */
img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Allow pointer events for clickable images */
.home-work-thumbnail img,
.work-thumbnail img,
.screenshot img {
    pointer-events: auto;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
    background: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0, 0, 0, 0.8) 80%, rgba(0, 0, 0, 0) 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0 40px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 140px;
    max-width: none;
    margin: 0;
}

.nav-left ul {
    display: flex;
    list-style: none;
    gap: 40px;
    margin-top: -10px;
}

.nav-left a {
    text-decoration: none;
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: opacity 0.2s;
    font-family: "Space Mono", monospace;
}

.nav-left a:hover {
    opacity: 0.6;
}

.nav-left a.external-link {
    position: relative;
}

.nav-left a.external-link:after {
    content: "↗";
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
}

.nav-left a.active {
    opacity: 1;
    pointer-events: none !important;
    cursor: default !important;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
}

/* Specific rules for Works menu when home page is active */
body .nav-left a[onclick="showPage('home')"].active {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.4) !important;
    animation: glow 2s ease-in-out infinite alternate !important;
}

/* Force disable home page links when active (excluding logo) */
.nav-left a.active[onclick*="home"] {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 1 !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.4) !important;
    animation: glow 2s ease-in-out infinite alternate !important;
}

/* Logo always stays normal - override any active states */
.logo,
.logo.active,
.logo[onclick="showPage('home')"].active,
.logo.active[onclick*="home"] {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0;
    font-family: "Space Mono", monospace;
    margin-top: -10px;
    margin-left: 14px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    display: block;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    filter: invert(1) brightness(1);
}



/* ==========================================
   TYPOGRAPHY & UTILITY CLASSES
   ========================================== */
.space-mono-regular {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

.space-mono-bold {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-style: normal;
}

.space-mono-regular-italic {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-style: italic;
}

.space-mono-bold-italic {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-style: italic;
}

/* ==========================================
   MAIN CONTENT STRUCTURE
   ========================================== */
main {
    margin-top: 140px;
    flex: 1;
    position: relative;
    min-height: calc(100vh - 140px);
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 80px 40px 160px;
    max-width: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) translateZ(0);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    will-change: opacity, transform, visibility;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    isolation: isolate;
}

.page.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0);
    pointer-events: auto;
}

.page.page-fade-out {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) translateZ(0);
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================
   HOME PAGE - WORKS GRID
   ========================================== */
/* Year Filter */
.works-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Space Mono", monospace;
    min-width: 60px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 600;
}

.filter-btn.active:hover {
    background: #f0f0f0;
}

/* Works Grid */
.home-works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 0;
    border: none;
    margin: -12px;
}

.home-work-item {
    position: relative;
    background: #111;
    border: none;
    overflow: hidden;
    transition: all 0.6s ease-out, transform 0.2s ease-out;
    cursor: pointer;
    aspect-ratio: 16/9;
    margin: 12px;
    border-radius: 8px !important;
}

/* Hover effect - only active when item is visible */
.home-work-item.home-work-item-visible:hover {
    transform: translateY(3px) scale(1);
}

/* Animation classes for staged reveal */
.home-work-item-hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.home-work-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .page {
        transition: none !important;
        transform: none !important;
    }
    
    .page.active {
        transform: none !important;
    }
    
    .page.page-fade-out {
        transform: none !important;
    }
    
    .home-work-item {
        transition: none;
    }
    
    .home-work-item-hidden {
        opacity: 0;
        transform: none;
    }
    
    .home-work-item-visible {
        opacity: 1;
        transform: none;
    }
    
    /* Disable hover animation for reduced motion */
    .home-work-item.home-work-item-visible:hover {
        transform: none;
    }
    
    /* Disable email glow for reduced motion */
    .contact-email a {
        transition: opacity 0.8s ease-out !important;
    }
    
    .contact-email a:hover {
        animation: none !important;
        text-shadow: 0 0 4px rgba(255, 255, 255, 0.3) !important;
        opacity: 0.9;
        transition: opacity 0.4s ease-in !important;
    }
    
    /* Disable Thank You Modal animations */
    .thank-you-modal {
        transition: none !important;
    }
    
    .thank-you-content {
        transition: none !important;
        transform: translateZ(0) scale(1) !important;
        opacity: 1 !important;
    }
    
    .thank-you-modal.modal-show .thank-you-content {
        transform: translateZ(0) scale(1) !important;
        opacity: 1 !important;
    }
    
    .thank-you-modal.modal-hide .thank-you-content {
        transform: translateZ(0) scale(1) !important;
        opacity: 0 !important;
    }
    
    .thank-you-icon svg {
        animation: none !important;
    }
    
    /* Disable image modal button animations */
    .image-modal-close-btn {
        transition: none !important;
        transform: none !important;
    }
    
    .image-modal-close-btn:hover {
        transform: none !important;
    }
}

.home-work-thumbnail {
    width: 100%;
    height: 100%;
    background: #222;
    position: relative;
    overflow: hidden;
    border-radius: 8px !important;
}

.home-work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s;
    border-radius: 8px !important;
}

.home-work-item:hover .home-work-thumbnail img {
    filter: brightness(0.3);
}

.home-work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: left;
    padding: 20px;
}

.home-work-item:hover .home-work-overlay {
    opacity: 1;
}

.home-work-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.home-work-date {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

/* ==========================================
   WORKS PAGE - REEL
   ========================================== */
.works-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 0;
    border: none;
}

.reel-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 40px;
    max-width: 960px;
    aspect-ratio: 16/9;
    position: relative;
}

.reel-container iframe {
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.work-item {
    background: #111;
    border: none;
    overflow: hidden;
    transition: none;
    cursor: pointer;
    border-radius: 8px !important;
}

.work-thumbnail {
    width: 100%;
    height: 300px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    border-radius: 8px !important;
}

.work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s;
    border-radius: 8px !important;
}

.work-item:hover .work-thumbnail img {
    filter: brightness(0.3);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: transparent;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    border-top: none;
}

.work-item:hover .work-info {
    opacity: 1;
}

.work-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.work-description {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* ==========================================
   MODAL SYSTEM
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    z-index: 2000;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                visibility 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, visibility;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    pointer-events: none;
}

.modal.modal-show {
    visibility: visible;
    opacity: 1;
    background: rgba(0,0,0,0.95);
    pointer-events: auto;
}

.modal.modal-hide {
    opacity: 0;
    visibility: hidden;
    background: rgba(0,0,0,0);
    pointer-events: none;
}

.modal-content {
    max-width: 1200px;
    margin: 50px auto;
    background: #111;
    border-radius: 12px;
    border: 1px solid #333;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: fit-content;
    transform: scale(0.8) translateY(60px) translateZ(0);
    transform-origin: center center;
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    contain: layout style paint;
    isolation: isolate;
}

.modal.modal-show .modal-content {
    transform: scale(1) translateY(0) translateZ(0);
    opacity: 1;
}

/* Image modal specific styles - Complete rewrite for centering */
.image-modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 40px) !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    will-change: transform, opacity !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* Image modal close button */
.image-modal-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10002;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

.image-modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.1);
}

.image-modal-close-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.95);
}

.image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    pointer-events: none;
}

.image-container img {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    pointer-events: auto;
    cursor: default;
}

.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10002;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.95);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

.image-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10002;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.modal-title-container h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.modal-date {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
}

.modal-body {
    padding: 30px 40px 20px 40px;
    color: #fff;
    overflow-y: auto;
    flex: 0 1 auto;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.video-embed {
    width: 100%;
    margin: 40px 0 50px 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #111;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
}

.video-embed > * {
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    min-height: 400px;
    max-width: 100%;
    max-height: 100%;
}

.video-embed img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* For 16:9 video content */
.video-embed.video-16-9 {
    aspect-ratio: 16/9;
}

.video-embed.video-16-9 iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.credits {
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
}

.credit-label {
    flex: 1;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    width: 120px !important;
    flex-shrink: 0 !important;
    margin-right: 0px !important;
    text-align: center !important;
    font-weight: bold !important;
}

#modalCredits {
    color: #fff;
    line-height: 1.6;
    flex: 1;
    align-items: center !important;
    text-align: center !important;
}

#modalCredits p {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    line-height: 1.6;
}

#modalCredits p:last-child {
    margin-bottom: 0;
}

#modalCredits strong {
    color: #fff;
    font-weight: 700;
    margin-right: 8px;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    margin-top: 50px;
    max-height: none;
}

.screenshots:empty {
    display: none;
    margin: 0;
}

.screenshot {
    aspect-ratio: 16/9;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.screenshot:hover {
    opacity: 0.5;
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dummy screenshot styling */
.dummy-screenshot {
    aspect-ratio: 16/9;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: default;
    opacity: 0.3;
}

.dummy-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dummy-screenshot:hover {
    opacity: 0.3;
    cursor: default;
}



/* ==========================================
   ABOUT PAGE
   ========================================== */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: flex-start;
}

.about-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
}

.about-left .page-title {
    text-align: left;
    margin-bottom: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: auto;
    flex-shrink: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 0;
    text-align: left;
    transform: rotate(90deg);
    transform-origin: center;
    white-space: nowrap;
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    width: 2px;
    height: 40px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Tab Content */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* About Works List */
.works-list {
    width: 100%;
}

.loading-message {
    color: #666;
    font-size: 16px;
    text-align: center;
    padding: 40px 0;
}

.about-works-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-work-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: default;
}

.about-work-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.about-work-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.about-work-year {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* About Works Filter */
.about-works-filter {
    margin-bottom: 30px;
    width: 100%;
}

.about-filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.about-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.about-filter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.about-filter-btn.active:hover {
    background: rgba(255, 255, 255, 0.15);
}

.about-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.about-logo {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 40px 0;
}

.about-logo img {
    width: 80px;
    height: 80px;
    filter: invert(1) brightness(1);
}

.about-logo {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 40px 0;
}

.about-logo img {
    width: 80px;
    height: 80px;
    filter: invert(1) brightness(1);
}

.bio {
    font-size: 18px;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 400;
    text-align: left;
}

.profile-details {
    margin-bottom: 40px;
    width: 200%;
    max-width: 800px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.profile-item:last-child {
    border-bottom: 1px solid #333;
    margin-bottom: 0;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.profile-label {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
    flex-shrink: 0;
}

.profile-value {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    text-align: right;
    flex: 1;
    margin-left: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    transition: all 0.3s ease;
}

.social-link:hover svg {
    fill: #fff;
    transform: scale(1.1);
}

/* Twitter Link Special Effects */
.twitter-link {
    position: relative;
    cursor: pointer;
}

.twitter-link .x-icon,
.twitter-link .twitter-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.twitter-link .x-icon {
    opacity: 1;
}

.twitter-link .twitter-icon {
    opacity: 0;
    fill: #fff !important;
}

.twitter-link .twitter-icon path {
    fill: #fff !important;
}

.twitter-link.show-twitter .x-icon {
    opacity: 0;
}

.twitter-link.show-twitter .twitter-icon {
    opacity: 1;
}

/* Override the general hover effect for Twitter link to maintain center position */
.twitter-link:hover .x-icon,
.twitter-link:hover .twitter-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.twitter-link.show-twitter:hover .x-icon,
.twitter-link.show-twitter:hover .twitter-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Platform-specific hover colors */
.social-link[aria-label*="Twitter"]:hover,
.social-link[aria-label*="X"]:hover {
    background: rgba(29, 155, 240, 0.2);
    border-color: rgba(29, 155, 240, 0.4);
}

.social-link[aria-label*="YouTube"]:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
}

.social-link[aria-label*="Vimeo"]:hover {
    background: rgba(26, 183, 234, 0.2);
    border-color: rgba(26, 183, 234, 0.4);
}

/* ==========================================
   ABOUT PAGE TABS
   ========================================== */

/* ==========================================
   CONTACT PAGE
   ========================================== */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: flex-start;
}

.contact-left {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.contact-left .page-title {
    text-align: left;
    margin-bottom: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: auto;
}

.contact-right {
    display: flex;
    flex-direction: column;
}

.contact-info {
    text-align: left;
    margin-bottom: 40px;
}

.contact-email {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 400;
    text-align: left;
}

.contact-email a {
    color: #fff;
    text-decoration: none;
    transition: all 1.2s ease-out, text-shadow 1.2s ease-out, opacity 1.2s ease-out;
    text-shadow: 0 0 0px rgba(255, 255, 255, 0);
    opacity: 1;
}

.contact-email a:hover {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 
                 0 0 16px rgba(255, 255, 255, 0.4), 
                 0 0 24px rgba(255, 255, 255, 0.2);
    animation: email-glow-soft 3s ease infinite alternate;
    transition: all 0.8s ease-in, text-shadow 0.8s ease-in;
}

.contact-description {
    font-size: 16px;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.8;
}

.contact-form {
    background: #111;
    padding: 30px;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #333;
    text-align: left;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 0;
    font-size: 14px;
    transition: opacity 0.2s;
    font-family: inherit;
    background: #222;
    color: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    opacity: 0.8;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background: #fff;
    color: #000;
    padding: 12px 24px;
    border: 1px solid #fff;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 120px;
    font-weight: 600;
    font-family: inherit;
    margin: 0;
    text-align: center;
}

.submit-btn:hover {
    opacity: 0.8;
    background: #fff;
}

.submit-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-btn:disabled:hover {
    background: #555;
    opacity: 0.6;
}

.page-title {
    font-size: 48px;
    margin-bottom: 60px;
    color: #fff;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ==========================================
   404 ERROR PAGE
   ========================================== */
.error-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    padding: 40px 20px;
}

.error-icon {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.error-cube {
    width: 80px;
    height: 80px;
    position: relative;
    animation: error-float 3s ease-in-out infinite;
}

.error-cube img {
    width: 100%;
    height: 100%;
    filter: invert(1) brightness(0.7);
    transition: filter 0.3s ease;
}

.error-title {
    font-size: 120px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    letter-spacing: -0.05em;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.error-subtitle {
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 30px 0;
    letter-spacing: -0.02em;
}

.error-description {
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 40px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.error-home-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.error-home-btn svg {
    flex-shrink: 0;
}

@keyframes error-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================
   THANK YOU MODAL
   ========================================== */
.thank-you-modal {
    z-index: 10002; /* 通常のモーダルより上に表示 */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    justify-content: center;
    will-change: opacity;
    backface-visibility: hidden;
}

.thank-you-content {
    max-width: 600px !important;
    min-width: 500px !important;
    text-align: center;
    border-radius: 12px;
    background: #111;
    border: 1px solid #333;
    transform: translateZ(0) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-origin: center center;
}

.thank-you-header {
    background: #111;
    border-bottom: 1px solid #333;
    padding: 30px 40px 20px;
    position: relative;
}

.thank-you-header h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
    text-align: center;
    padding-right: 40px; /* ×ボタンのスペースを確保 */
}

.thank-you-header .close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.thank-you-header .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.thank-you-body {
    padding: 40px 40px;
    background: #111;
}

.thank-you-icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.thank-you-icon svg {
    width: 80px;
    height: 80px;
    animation: checkmark-appear 0.5s ease-out;
}

/* Thank You Modal Animation States */
.thank-you-modal.modal-show {
    opacity: 1 !important;
}

.thank-you-modal.modal-show .thank-you-content {
    transform: translateZ(0) scale(1) !important;
    opacity: 1 !important;
}

.thank-you-modal.modal-hide {
    opacity: 0 !important;
}

.thank-you-modal.modal-hide .thank-you-content {
    transform: translateZ(0) scale(0.95) !important;
    opacity: 0 !important;
}

#thankYouMessage {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   ANIMATIONS & KEYFRAMES
   ========================================== */
@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes konami-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.logo-konami-spin {
    animation: konami-spin 1s ease-in-out;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                     0 0 20px rgba(255, 255, 255, 0.6), 
                     0 0 30px rgba(255, 255, 255, 0.4);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 1), 
                     0 0 25px rgba(255, 255, 255, 0.8), 
                     0 0 35px rgba(255, 255, 255, 0.6);
    }
}

@keyframes email-glow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                     0 0 20px rgba(255, 255, 255, 0.6), 
                     0 0 30px rgba(255, 255, 255, 0.4);
    }
    to {
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 
                     0 0 22px rgba(255, 255, 255, 0.7), 
                     0 0 32px rgba(255, 255, 255, 0.5);
    }
}

@keyframes email-glow-soft {
    0% {
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.4), 
                     0 0 12px rgba(255, 255, 255, 0.2), 
                     0 0 18px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 
                     0 0 20px rgba(255, 255, 255, 0.5), 
                     0 0 30px rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.4), 
                     0 0 12px rgba(255, 255, 255, 0.2), 
                     0 0 18px rgba(255, 255, 255, 0.1);
    }
}

/* ==========================================
   FOOTER & SCROLL TO TOP
   ========================================== */
footer {
    background: linear-gradient(to top, #000 0%, #000 60%, rgba(0, 0, 0, 0.8) 80%, rgba(0, 0, 0, 0) 100%);
    padding: 40px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.copyright {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-family: "Space Mono", monospace;
    font-weight: 400;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.3s;
    color: #000;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

/* CMS Panel removed - no longer needed */

/* ==========================================
   RESPONSIVE DESIGN - MOBILE
   ========================================== */
@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }

    nav {
        height: 80px;
    }

    .logo {
        font-size: 24px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .nav-left ul {
        gap: 16px;
    }

    .nav-left a {
        font-size: 12px;
    }
    
    /* Mobile glow effect adjustment */
    .nav-left a.active {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 
                     0 0 15px rgba(255, 255, 255, 0.6), 
                     0 0 20px rgba(255, 255, 255, 0.4) !important;
    }

    main {
        margin-top: 80px;
        min-height: calc(100vh - 80px);
    }

    .page {
        padding: 40px 20px 120px;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }

    .works-grid,
    .home-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }

    .page-title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .about-left {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .about-left .page-title {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        text-align: center;
        margin-bottom: 20px;
        font-size: 36px;
    }
    
    .tab-navigation {
        flex-direction: row;
        gap: 20px;
        margin-top: 0;
        justify-content: center;
        width: 100%;
    }

    .tab-btn {
        transform: none;
        width: auto;
        height: auto;
        padding: 12px 20px;
        font-size: 16px;
        min-width: 80px;
    }

    .tab-btn.active::after {
        bottom: -2px;
        left: 0;
        transform: none;
        width: 100%;
        height: 2px;
    }
    
    .about-right {
        align-items: center;
        text-align: center;
    }
    
    .about-logo {
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .bio {
        font-size: 16px;
        margin-bottom: 30px;
        text-align: center;
    }

    .profile-details {
        width: 100%;
        max-width: none;
    }

    .profile-item {
        padding: 14px 16px;
        margin-bottom: 6px;
    }

    .profile-item:hover {
        transform: translateX(2px);
    }

    .profile-label {
        min-width: 80px;
        font-size: 13px;
    }

    .profile-value {
        font-size: 13px;
        margin-left: 16px;
    }

    .social-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-link svg {
        width: 18px;
        height: 18px;
    }

    .social-link:hover {
        transform: translateY(-1px);
    }

    .about-work-item {
        padding: 16px;
    }

    .about-work-title {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .about-work-year {
        font-size: 13px;
    }

    .about-filter-buttons {
        gap: 8px;
        justify-content: center;
    }

    .about-filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 100%;
    }
    
    .contact-left .page-title {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        text-align: center;
        margin-bottom: 40px;
    }
    
    .contact-info {
        text-align: center;
    }

    .contact-email {
        font-size: 18px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    /* Mobile email glow effect */
    .contact-email a {
        transition: all 1s ease-out, text-shadow 1s ease-out !important;
    }
    
    .contact-email a:hover {
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.6), 
                     0 0 12px rgba(255, 255, 255, 0.4), 
                     0 0 18px rgba(255, 255, 255, 0.2) !important;
        animation: email-glow-soft 3s ease infinite alternate !important;
        transition: all 0.6s ease-in, text-shadow 0.6s ease-in !important;
    }
    
    .contact-description {
        font-size: 14px;
        text-align: center;
        margin-bottom: 30px;
    }

    .contact-form {
        padding: 20px;
    }
    
    .submit-btn {
        width: 120px;
    }
    
    .reel-container {
        max-width: 100%;
        margin: 20px 0;
        padding: 0 20px;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        height: fit-content;
    }
    
    .image-modal-content {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 20px) !important;
    }
    
    .image-container img {
        max-width: calc(100vw - 60px);
        max-height: calc(100vh - 60px);
    }
    
    /* Image Modal Close Button - Mobile */
    .image-modal-close-btn {
        top: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 20px;
        z-index: 10003;
    }
    
    /* Navigation buttons - Mobile */
    .prev-btn {
        left: 15px;
    }
    
    .next-btn {
        right: 15px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .image-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .modal-body {
        padding: 20px 20px 15px 20px;
        flex: 0 1 auto;
    }
    
    .modal-title-container h2 {
        font-size: 20px;
    }
    
    .modal-date {
        font-size: 11px;
    }
    
    .credits {
        margin: 30px 20px;
        flex-direction: column;
        max-width: 100%;
    }
    
    .credit-label {
        font-size: 16px;
        margin-bottom: 15px;
        margin-right: 0;
        width: auto;
    }
    
    #modalCredits p {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    #modalCredits strong {
        font-size: 14px;
        font-weight: 700;
        margin-right: 6px;
    }
    
    .works-filter {
        margin-bottom: 30px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 50px;
    }

    .home-works-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: -6px;
    }
    
    .home-work-item {
        margin: 6px;
        transition: all 0.5s ease-out, transform 0.2s ease-out;
    }
    
    /* Mobile hover effect */
    .home-work-item.home-work-item-visible:hover {
        transform: translateY(2px) scale(1);
    }
    
    /* Mobile animation adjustments */
    .home-work-item-hidden {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    
    .home-work-item-visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    
    footer {
        padding: 30px 0;
        margin-top: auto;
    }
    
    .footer-content {
        padding: 0 20px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Thank You Modal - Mobile */
    .thank-you-content {
        max-width: 90% !important;
        min-width: auto !important;
        margin: 20px;
        transform: translateZ(0) scale(0.95);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Mobile animation states */
    .thank-you-modal.modal-show .thank-you-content {
        transform: translateZ(0) scale(1) !important;
        opacity: 1 !important;
    }
    
    .thank-you-modal.modal-hide .thank-you-content {
        transform: translateZ(0) scale(0.9) !important;
        opacity: 0 !important;
    }
    
    .thank-you-header {
        padding: 25px 20px 15px;
    }
    
    .thank-you-header h2 {
        font-size: 18px;
        padding-right: 35px;
    }
    
    .thank-you-header .close-btn {
        top: 20px;
        right: 20px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .thank-you-body {
        padding: 30px 20px;
    }
    
    .thank-you-icon svg {
        width: 60px;
        height: 60px;
    }
    
    #thankYouMessage {
        font-size: 14px;
    }

    /* 404 Error Page - Mobile */
    .error-container {
        min-height: 50vh;
        padding: 20px;
    }

    .error-content {
        padding: 20px;
    }

    .error-icon {
        margin-bottom: 30px;
    }

    .error-cube {
        width: 60px;
        height: 60px;
    }

    .error-title {
        font-size: 80px;
        margin-bottom: 15px;
    }

    .error-subtitle {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .error-description {
        font-size: 14px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .error-home-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

} 