/* ============================================
   PREMIUM VISUAL DESIGN
   ============================================ */

/* Google Fonts - Premium Mono */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;900&display=swap');

/* Global Vars */
:root {
    --bg-color: #fafafa;
    --bg-white: #ffffff;
    --text-color: #111111;
    --text-muted: #666666;
    --border-color: #111111;
    --border-light: #e5e5e5;
    --font-stack: 'JetBrains Mono', 'Courier New', monospace;
    --header-font: 'Inter', 'Helvetica Neue', sans-serif;
    --row-height-collapsed: 100px;
    --row-height-expanded: 400px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide translatable text until language applied - prevents English flash on Russian pages */
html.translating [data-i18n] {
    visibility: hidden;
}

html.translating .nav-cats,
html.translating .nav-contact {
    visibility: hidden;
}


/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Industrial Cursor - Black Crosshair */
/* Custom Industrial JS Cursor */
@media (hover: hover) and (pointer: fine) {

    *,
    html,
    body,
    a,
    button,
    .expand-btn,
    .toggle-btn,
    .mobile-nav-item,
    .lightbox-close {
        cursor: none !important;
        /* Hide native cursor only on desktop */
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 2147483647;
    /* Max Z-Index */
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    /* Visible immediately - JS will position it on first mousemove */
}

@media (hover: none),
(pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}

/* Crosshair Lines */
.custom-cursor::before,
.custom-cursor::after {
    content: '';
    position: absolute;
    background: #fff;
    /* White difference = Inversion */
}

/* Horizontal Line */
.custom-cursor::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    /* Thin line */
    transform: translateY(-50%);
}

/* Vertical Line */
.custom-cursor::after {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

/* Hover State Removed as per user request for consistent size */

/* Cursor Flash on Click - Gray */
body.cursor-flash,
body.cursor-flash * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cline x1='8' y1='0' x2='8' y2='16' stroke='%23aaa' stroke-width='1'/%3E%3Cline x1='0' y1='8' x2='16' y2='8' stroke='%23aaa' stroke-width='1'/%3E%3C/svg%3E") 8 8, crosshair !important;
}

/* Click Animation Element */
.click-burst {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.click-burst span {
    position: absolute;
    width: 2px;
    height: 12px;
    background: #000;
    transform-origin: center bottom;
    animation: burstLine 0.4s ease-out forwards;
}

@keyframes burstLine {
    0% {
        opacity: 1;
        transform: translateY(0) scaleY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-15px) scaleY(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-25px) scaleY(0.5);
    }
}

/* Click Ripple Alternative */
.click-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    pointer-events: none;
    z-index: 9999;
    animation: rippleExpand 0.4s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3);
    }
}

/* Page Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Blur-Up Animation */
@keyframes blurUp {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: scale(1.02);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* Ripple Effect for Touch */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Slide In from Bottom */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    margin: 0;
    padding: 0;
    padding-bottom: 40px;
    /* Match footer height */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.5;
    /* Touch Improvements */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Selection Style */
::selection {
    background: #111;
    color: #fff;
}

/* Typography */
h1 {
    font-family: var(--header-font);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--text-color);
}

.sub-header {
    font-size: 0.6em;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 10px;
    color: var(--text-muted);
    font-style: normal;
}

/* Header Structure */
header {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 100;
    border-bottom: 0.5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Row 1: Title */
.header-top {
    width: 100%;
    padding: 20px 25px;
    text-align: left;
    border-bottom: 0.5px solid var(--border-light);
    box-sizing: border-box;
}

.header-selects {
    font-size: 0.5em;
    color: #aaa;
    font-weight: 400;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.05em;
}

.header-role {
    display: inline;
}

/* Hide mobile lang toggle on desktop */
.mobile-lang-toggle {
    display: none;
}

/* Row 2: Nav */
.header-bottom {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 36px;
    align-items: stretch;
}

/* Left Nav */
.nav-cats {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.nav-cats li {
    border-right: 0.5px solid var(--border-light);
    display: flex;
    align-items: stretch;
}

.nav-cats a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 0 18px;
    display: flex;
    align-items: center;
    height: 100%;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    position: relative;
}

.nav-cats a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.nav-cats a:hover::after,
.nav-cats a.active::after {
    transform: scaleX(1);
}

.nav-cats a:hover {
    color: var(--text-color);
}

.nav-cats a.active {
    font-weight: 600;
}

/* Right Nav (Contact) */
.nav-contact {
    display: flex;
    border-left: 0.5px solid var(--border-light);
    margin-left: auto;
}

.nav-contact a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 0 18px;
    display: flex;
    align-items: center;
    height: 100%;
    border-left: 0.5px solid var(--border-light);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    position: relative;
}

.nav-contact a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.nav-contact a:hover::after,
.nav-contact a.active::after {
    transform: scaleX(1);
}

.nav-contact a.active {
    font-weight: 600;
}

.nav-contact a:first-child {
    border-left: none;
}

#lang-toggle {
    font-size: 8px !important;
    width: 25px !important;
    /* Force override inline width */
    padding: 0 !important;
    justify-content: center;
    opacity: 1;
    /* High contrast */
    color: #000 !important;
    /* Pure black for max visibility */
    font-weight: 700;
    /* Bold */
    letter-spacing: 0.1em;
}

#lang-toggle:hover {
    opacity: 0.7;
    background: transparent;
    color: #000 !important;
}

.nav-contact a:hover {
    background: var(--text-color);
    color: var(--bg-white);
}

/* LIST CONTAINER (Index/Categories) */
.list-container {
    display: flex;
    flex-direction: column;
    /* animation: fadeIn 0.6s ease-out; */
}

.list-row {
    display: flex;
    border-bottom: 0.5px solid var(--border-light);
    min-height: var(--row-height-collapsed);
    transition: min-height var(--transition-smooth);
    overflow: hidden;
    position: relative;
    background: var(--bg-white);
    cursor: pointer;
    contain: content;
    /* Performance optimization */
}

/* Hover Effect disabled - was causing gray background issues */

/* Left Col: Info */
.row-info {
    width: 25%;
    border-right: 1px solid var(--border-color);
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    flex-shrink: 0;
    background: var(--bg-color);
}

.row-main {
    text-decoration: underline;
    display: block;
    margin-bottom: 2px;
}

.bio-categories {
    /* Default spacing */
    word-spacing: 0.5em;
}

.row-sub {
    display: block;
    color: #888;
}

.expand-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    font-weight: bold;
}

.row-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 20px;
}

.toggle-view {
    /* Deprecated but kept for safety */
    display: none;
}

.view-toggles {
    display: flex;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}

.toggle-btn {
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.toggle-btn.active {
    color: #000;
    text-decoration: underline;
}

.separator {
    color: #999;
}

/* Right Col: Content Wrapper */
.row-right {
    width: 75%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Top align */
    height: 100%;
    overflow: hidden !important;
    /* Block scroll on collapsed rows */
    pointer-events: none;
    /* Block wheel scroll on collapsed rows */
}

/* Re-enable scroll and interaction on expanded rows */
.list-row.expanded .row-right {
    overflow: visible;
    pointer-events: auto;
}

.row-content {
    width: 100%;
    height: 100%;
    /* Fill parent */
    display: flex;
    overflow: hidden !important;
    /* No scroll on collapsed rows */
    align-items: center;
    /* Center images vertically */
    padding: 10px;
    gap: 10px;
    box-sizing: border-box;
    pointer-events: none;
    /* Disable scroll/touch interaction on collapsed rows */
}

/* Enable horizontal scroll only when row is expanded */
.list-row.expanded .row-content {
    overflow-x: auto !important;
    pointer-events: auto;
    /* Re-enable interaction */
}

/* Credits Panel - Compact Industrial Left */
/* Credits Panel - Compact Industrial Left */
.row-credits {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 14px 15px 10px 15px;
    /* Offset top to match .client-name baseline */
    font-size: 11px;
    line-height: 0.5;
    /* Extreme overlap */
    overflow-y: auto;
    font-family: var(--font-stack);
    text-transform: uppercase;
    color: #000;
    font-weight: 700;
    width: 100%;
    max-width: 100%;
    align-self: flex-start;
    background: #fff;
    /* Ensure white background */
}

.credit-line {
    border-bottom: none;
    width: auto;
    /* Compact lines, no stretch */
    padding: 0;
    margin-bottom: 0;
    /* Zero gap for tightest layout */
    display: block;
}

/* Desktop Project Scrollbars - Sharp 1px */
/* Hidden by default on collapsed rows */
.row-content::-webkit-scrollbar {
    display: none !important;
    height: 1px !important;
}

/* Show scrollbar only when row is expanded */
.list-row.expanded .row-content::-webkit-scrollbar {
    display: block !important;
    height: 1px !important;
}

.row-content::-webkit-scrollbar-track {
    background: transparent !important;
}

.row-content::-webkit-scrollbar-thumb {
    background: #000 !important;
    border-radius: 0 !important;
    /* Force sharp edges */
}

/* Ensure no competing scrollbars on the parent */
.row-right::-webkit-scrollbar {
    display: none !important;
}

.row-content {
    -ms-overflow-style: none !important;
    /* scrollbar-width: thin; <-- Removed to prevent overriding webkit-scrollbar on minimal settings */
    border-radius: 0 !important;
}

/* Mobile Technical Progress Indicator - Display Only */
.project-progress-container {
    display: none;
    position: sticky;
    bottom: 0;
    left: 20px;
    width: calc(100% - 60px);
    height: 1px !important;
    /* Force 1px line */
    background: #e5e5e5 !important;
    z-index: 100;
    border-radius: 0 !important;
    /* Force sharp edges */
    pointer-events: none;
    /* No mouse interaction - display only */
}

.project-progress-fill {
    height: 100% !important;
    /* Adapt to container height */
    position: absolute !important;
    /* Allow 'left' to work */
    background: #000 !important;
    width: 0%;
    border-radius: 0 !important;
    transition: none !important;
    /* Instant movement, no lag */
}

.row-content img,
.row-content video {
    /* animation: blurUp 0.6s ease-out; */
    height: 80px;
    /* Collapsed height */
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
    cursor: pointer;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* GPU acceleration */
    background: transparent !important;
    /* WebKit Transparency Fixes */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.scroll-hint {
    display: none;
    width: 100px;
    /* Increased space for the "hint" */
    flex-shrink: 0;
    background: transparent;
    /* Transparent space */
    border-right: 1px solid #eee;
    /* Subtle vertical line to mark end */
    margin-right: 20px;
}

/* Expanded State */
.list-row.expanded {
    min-height: var(--row-height-expanded);
}

.list-row.expanded .row-content img,
.list-row.expanded .row-content video {
    height: 380px;
    /* Expanded height */
}

/* Archive Grid (Cards) - Premium Gallery */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    margin-bottom: 0;
}

.archive-item {
    background: #fff;
    width: 100%;
    aspect-ratio: 4/5;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archive-item:hover {
    /* transform and box-shadow removed - only darkening overlay now */
    z-index: 2;
}

.archive-item img,
.archive-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
    display: block;
    /* animation: blurUp 0.6s ease-out; */
}

.archive-item:hover img,
.archive-item:hover video {
    /* transform: scale(1.05); Removed zoom */
    /* filter: brightness(1.02); Removed brightness */
}

.archive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.archive-overlay-center {
    text-align: center;
}

.archive-overlay-client {
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 4px;
}

.archive-overlay-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.archive-overlay-credits {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 8px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    text-align: left;
    line-height: 1.4;
}

.archive-item:hover .archive-overlay {
    opacity: 1;
}

.archive-item:hover img,
.archive-item:hover video {
    /* transform: scale(1.02); Removed zoom per user request */
    /* filter: brightness(0.85); Removed darkening per user request */
}

/* Pagination Controls - Hidden for infinite scroll */
.pagination-controls {
    display: none;
}

.pagination-btn {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: #000;
    color: #000;
}

.pagination-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Lightbox - Premium */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    /* Dynamic Viewport Height for mobile browsers */
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 5000 !important;
    /* Ensure above everything */
    display: none;
    /* Hidden by default */
    flex-direction: column;
    /* Stack Content Vertically */
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    /* Reduced side padding for mobile, enough top/bottom */
    box-sizing: border-box;
}

.lightbox-content {
    max-height: 100%;
    /* Fill available space within padding */
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-family: var(--font-stack);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 10px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    border: none;
}

.lightbox-close:hover {
    opacity: 0.5;
}

/* Footer - Fixed Bottom */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    text-align: center;
    border-top: 0.5px solid var(--border-light);
    background: var(--bg-white);
    font-family: var(--font-stack);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    z-index: 50;
    /* Prevent animation from affecting footer */
    animation: none !important;
    transform: none !important;
}


.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    font-size: 10px;
}

.site-footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.site-footer a:hover {
    opacity: 0.6;
}

.footer-left,
.footer-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.footer-center {
    flex: 2;
    text-align: center;
}

.footer-left {
    justify-content: flex-start;
}

.footer-right {
    justify-content: flex-end;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.social-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.social-link:hover {
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {

    /* Hide desktop navigation on mobile */
    .header-bottom {
        display: none;
    }

    /* Simplified mobile header - just title */
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
    }

    .header-top h1 {
        font-size: 14px;
    }

    /* Hide Role in Header on Mobile - show only name */
    .header-role {
        display: none;
    }

    .header-selects {
        font-size: 0.6em;
        color: #aaa;
        font-weight: 400;
        margin-left: 4px;
        vertical-align: baseline;
        letter-spacing: 0.05em;
    }

    /* Mobile language toggle in header */
    .mobile-lang-toggle {
        display: flex;
        font-family: var(--header-font);
        font-size: 11px;
        font-weight: 700;
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        background: var(--bg-color);
        color: var(--text-color);
        cursor: pointer;
        text-decoration: none;
    }

    /* Mobile Footer Simplification */
    .footer-left,
    .footer-right {
        display: none !important;
    }

    .site-footer {
        flex-direction: column;
        justify-content: center;
        padding: 20px;
    }

    /* Content area adjustments for bottom nav */
    body {
        padding-bottom: 70px;
    }

    main {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* Disable Gallery Hover Effects on Mobile */
    .archive-overlay {
        display: none !important;
        /* Hide always on mobile */
    }

    .archive-item:hover img {
        transform: none !important;
        filter: none !important;
    }

    /* Accordion mobile design for portfolio rows - Industrial Style */
    .list-container {
        padding: 0;
        display: flex;
        flex-direction: column;
        background: #fff;
    }

    .list-row {
        flex-direction: column;
        border: none;
        border-bottom: 0.5px solid var(--border-light);
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        overflow: hidden;
        min-height: auto;
        /* List View Rows */
        border-top: 0.5px solid var(--border-light);
        padding: 0;
        transition: background-color 0.3s;
        scroll-margin-top: 140px;
        /* Offset for sticky header + spacing when scrolling to view */
    }

    .list-row.expanded {
        min-height: auto;
    }

    .list-row:last-child {
        border-bottom: 0.5px solid var(--border-light);
    }

    .row-info {
        width: 100%;
        border-right: none;
        border-bottom: none;
        min-height: auto;
        box-sizing: border-box;
        padding: 14px 15px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .info-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
        /* Enable truncation for flex children */
    }

    .row-main {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 0 1 auto;
        max-width: 50%;
        /* Title gets up to half */
    }

    .row-sub {
        display: inline-block;
        color: #888;
        font-size: inherit;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 35%;
        /* Brand gets up to 35% */
        vertical-align: middle;
    }

    .row-sub::before {
        content: " — ";
        color: #ccc;
    }

    .expand-btn {
        position: static;
        margin-left: auto;
        /* Push to right */
        font-size: 18px;
        padding: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #000;
        font-weight: 400;
        flex-shrink: 0;
        /* Prevent button from shrinking */
    }

    /* Compact IM/CR toggle on mobile */
    .view-toggles {
        display: flex;
        gap: 0;
        font-size: 8px;
        font-weight: 700;
        margin-right: 10px;
    }

    .toggle-btn {
        padding: 3px 5px;
        border: 1px solid #ccc;
        background: #fff;
        color: #999;
    }

    .toggle-btn.active {
        background: #000;
        color: #fff;
        border-color: #000;
        text-decoration: none;
    }

    .toggle-btn:first-child {
        border-right: none;
    }

    .separator {
        display: none;
    }

    .about-bio {
        font-size: 0.85rem;
        margin-bottom: 30px;
        text-align: left;
    }

    .bio-categories {
        font-size: 10px;
        color: #999;
        display: block;
        /* Ensure it behaves well if line breaking needed, though span is inline usually */
        line-height: 1.4;
    }

    .about-section {
        margin-bottom: 25px;
    }

    .row-meta {
        display: none;
    }

    .year {
        display: none;
    }

    /* Hide photos by default on mobile - accordion closed state */
    .row-right {
        width: 100%;
        display: none;
    }

    /* Mobile: Unified scroll on row-right */
    .list-row.expanded .row-right {
        display: flex;
        flex-direction: row;
        border-top: 1px solid #eee;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        position: relative;
        touch-action: pan-x pan-y;
        /* Allow free swiping in both directions */
    }

    /* Hide scrollbar on row-right (used for credits switching) */
    .list-row.expanded .row-right::-webkit-scrollbar {
        display: none !important;
    }

    /* Small scrollbar only on row-content (images) */
    .row-content::-webkit-scrollbar {
        height: 4px;
    }

    .row-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .row-content::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }

    /* Ensure the parent .list-row has a positioning context */
    .list-row.expanded {
        position: relative;
    }

    /* Mobile: Tighter transition to credits */
    .list-row.expanded .scroll-hint {
        width: 20px !important;
        /* Minimal gap */
        margin-right: 0 !important;
        border: none !important;
    }

    .project-progress-container {
        position: absolute !important;
        /* Absolute relative to .list-row */
        bottom: 0 !important;
        left: 20px !important;
        width: calc(100% - 60px) !important;
        height: 2px !important;
        /* Slightly thicker for better mobile visibility */
        background: #e5e5e5 !important;
        border-radius: 0 !important;
        z-index: 100;
    }

    .row-content img,
    .row-content video {
        height: 160px;
        border-radius: 0;
        flex-shrink: 0;
    }

    .list-row.expanded .row-content img,
    .list-row.expanded .row-content video {
        height: 200px !important;
        width: auto !important;
        max-width: 90vw;
        object-fit: contain;
    }

    .view-toggles {
        display: none !important;
    }

    .row-credits {
        display: flex !important;
        flex-direction: column;
        flex-shrink: 0;
        min-width: 140px;
        /* Give it some space */
        height: auto;
        padding: 40px 30px 40px 10px;
        /* Tighter left padding */
        /* Center credits vertically relative to photos */
        background: transparent;
        border-left: none;
        align-items: flex-start;
        justify-content: center;
        color: #888;
    }

    .scroll-hint {
        display: block;
        width: 120px;
        /* Significant gap as a hint */
        flex-shrink: 0;
        border-right: 1px solid #ddd;
        margin-right: 20px;
    }

    /* Make row-right flex to show both images and credits inline */
    .list-row.expanded .row-right {
        display: flex;
        flex-direction: row;
        border-top: 1px solid #eee;
        overflow-x: auto;
    }

    .list-row.expanded .row-images {
        display: flex;
        flex-shrink: 0;
    }

    .scroll-hint {
        display: block;
    }

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

    .archive-item {
        border-right: none;
    }

    .archive-overlay {
        opacity: 1;
        padding: 12px;
    }

    .archive-overlay h2 {
        font-size: 0.75rem;
    }

    .archive-overlay p {
        font-size: 0.6rem;
    }

    .pagination-controls {
        padding: 25px 15px 80px;
    }

    .lightbox {
        padding: 80px 15px 90px 15px;
        /* Top: 80px for close button, Bottom: 90px for nav+text */
    }

    .lightbox-content {
        max-height: 100%;
        /* Fill available space */
        max-width: 100%;
    }
}

/* Mobile Bottom Navigation - Instagram Style */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {

    /* Hide Lightbox Arrows on Mobile */
    .lightbox-nav {
        display: none !important;
    }

    /* Minimal padding for mobile nav clearance */
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }

    /* Gallery: no extra padding, photos edge-to-edge */
    .archive-grid {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* larger touch target */
}

.mobile-nav {
    display: none;
    /* Hidden by default on desktop */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Show mobile nav only on mobile */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }
}


.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-family: var(--header-font);
    transition: color 0.2s ease, transform 0.15s ease;
    gap: 3px;
    min-height: 50px;
    /* Larger touch target */
    position: relative;
    overflow: hidden;
}

/* Active page indicator */
.mobile-nav-item.active {
    color: #000;
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 50%;
}

/* Touch feedback */
.mobile-nav-item:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.03);
}

.mobile-nav-icon {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    transition: transform 0.2s ease;
}

.mobile-nav-item:active .mobile-nav-icon {
    transform: scale(0.9);
}

/* Icon Balancing - All same size for consistency */
/* 1. Gallery ⊞ */
.mobile-nav-item:nth-child(1) .mobile-nav-icon {
    font-size: 20px;
}

/* 2. Portfolio ❖ */
.mobile-nav-item:nth-child(2) .mobile-nav-icon {
    font-size: 20px;
}

/* 3. About ⊙ */
.mobile-nav-item:nth-child(3) .mobile-nav-icon {
    font-size: 20px;
}

/* 4. Contact @ - smaller because @ is optically heavy */
.mobile-nav-item:nth-child(4) .mobile-nav-icon {
    font-size: 16px;
}

/* 5. Extra (if exists) */
.mobile-nav-item:nth-child(5) .mobile-nav-icon {
    font-size: 20px;
}

.mobile-nav-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}


/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loader-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Mobile Contact Page Styles */

    /* CONTACT PAGE CARD */
    /* CONTACT PAGE (BUSINESS CARD STYLE) */
    .contact-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 50vh;
        padding: 60px 20px;
    }

    .contact-card {
        text-align: center;
        max-width: 220px;
        /* Small business card width */
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        /* Compact gap */
    }

    /* Avatar Removed in HTML, so this class is unused but kept just in case */
    .contact-avatar {
        display: none;
    }

    /* Data Rows */
    .contact-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Ensure centered */
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .contact-row:first-of-type {
        border-top: none;
        margin-top: 0;
    }

    .contact-name {
        font-family: var(--font-stack);
        /* JetBrains Mono */
        font-size: 0.8rem;
        /* Reduced from 0.9rem */
        font-weight: 500;
        text-transform: uppercase;
        color: #000;
        letter-spacing: 0.05em;
        margin-bottom: 2px;
        text-align: center;
    }

    .contact-role {
        font-family: var(--font-stack);
        font-size: 0.55rem;
        /* Reduced from 0.65rem */
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .contact-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .contact-link {
        font-family: var(--font-stack);
        font-size: 0.75rem;
        color: #000;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: all 0.2s;
        border-bottom: 1px solid transparent;
    }

    .contact-link:hover {
        opacity: 0.6;
        border-bottom-color: #000;
    }

    .contact-data-value {
        font-family: var(--font-stack);
        font-size: 0.7rem;
        color: #555;
    }

    /* Actions Area */
    .contact-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 100%;
        border-bottom: none;
    }

    .btn-contact {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 8px 0;
        text-decoration: none;
        color: #000;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 500;
        background: transparent;
        cursor: pointer;
        font-family: var(--font-stack);
        border: none;
        /* No borders */
    }

    .btn-contact:last-child {
        border-bottom: none;
    }

    .btn-contact:hover {
        background: transparent;
        opacity: 0.5;
    }

    /* Primary "Save" button */
    .btn-contact.primary {
        background: #000;
        color: #fff;
        margin-top: 15px;
        padding: 10px 0;
        border: 1px solid #000;
        font-size: 0.65rem;
    }

    .btn-contact.primary:hover {
        background: #fff;
        color: #000;
    }
}

/* Desktop Contact Popover */
.contact-popover {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Fixed to viewport or absolute to header */
    top: 60px;
    /* Adjust based on header height */
    right: 20px;
    /* Align with right nav */
    width: 280px;
    background: #fff;
    border: 1px solid #000;
    padding: 30px;
    z-index: 1000;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Very subtle shadow */
}

.contact-popover.active {
    display: flex;
    /* animation: fadeIn 0.2s ease-out; */
}

.popover-name {
    font-family: var(--header-font);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}

.popover-role {
    font-family: var(--font-stack);
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.popover-info {
    font-family: var(--font-stack);
    font-size: 0.8rem;
    color: #000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.popover-info a {
    text-decoration: none;
    color: #000;
    transition: opacity 0.2s;
}

.popover-info a:hover {
    opacity: 0.6;
}

.popover-cta:hover {
    background: #222 !important;
    border-color: #555 !important;
}

@media (max-width: 768px) {
    .contact-popover {
        display: none !important;
        /* Never show on mobile */
    }
}

/* End Responsive Adjustments */

/* Mobile Portfolio Menu Overlay */
.portfolio-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.portfolio-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.portfolio-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter spacing */
    text-align: center;
}

.portfolio-menu-link {
    font-family: var(--font-stack);
    font-size: 12px;
    /* Smaller, premium size */
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    /* Premium spacing */
    transition: all 0.2s;
    position: relative;
    padding: 6px 0;
    /* Refined padding */
}

/* Underline effect */
.portfolio-menu-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    /* Small underline */
    height: 1px;
    background: var(--text-color);
    transition: transform 0.2s;
}

.portfolio-menu-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.portfolio-menu-link:hover {
    color: var(--text-color);
    opacity: 0.7;
}

.portfolio-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-family: var(--font-stack);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 10px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #000;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 1001;
    transition: opacity 0.2s;
}

.lightbox-nav:hover {
    opacity: 0.6;
}

.lightbox-nav.prev {
    left: 10px;
    /* Closer to edge */
}

.lightbox-nav.next {
    right: 10px;
}

/* Dots Indicator */


/* Ensure Gallery Grid has no gap */
.archive-grid {
    gap: 0 !important;
    border-bottom: none !important;
    /* Remove separator if exists */
}

/* Lightbox Info Section */
.lightbox-info {
    position: relative;
    /* Changed from absolute */
    bottom: auto;
    left: auto;
    right: auto;
    margin-top: 20px;
    /* Space between image and info */
    text-align: center;
    color: #000;
    z-index: 1002;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    /* animation: fadeIn 0.5s ease 0.2s backwards; */
}

.lb-meta {
    font-family: var(--font-stack);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lb-meta:hover {
    opacity: 0.6;
}

.lb-sep {
    margin: 0 8px;
    color: #999;
}

.lb-title {
    color: #666;
}

.lb-client {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lb-credits {
    font-family: var(--font-stack);
    font-size: 10px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.6;
    max-width: 80%;
}

/* ============================================
   PAGE TRANSITIONS REMOVED - Clean instant load
   ============================================ */

/* Scroll Reveal - Items visible by default */
.list-row {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Reveal - Revealed State (kept for compatibility) */
.list-row.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation - Fast Sequential Cascade */
.list-row:nth-child(1) {
    transition-delay: 0.00s;
}

.list-row:nth-child(2) {
    transition-delay: 0.02s;
}

.list-row:nth-child(3) {
    transition-delay: 0.04s;
}

.list-row:nth-child(4) {
    transition-delay: 0.06s;
}

.list-row:nth-child(5) {
    transition-delay: 0.08s;
}

.list-row:nth-child(6) {
    transition-delay: 0.10s;
}

.list-row:nth-child(7) {
    transition-delay: 0.12s;
}

.list-row:nth-child(8) {
    transition-delay: 0.14s;
}

.list-row:nth-child(9) {
    transition-delay: 0.16s;
}

.list-row:nth-child(10) {
    transition-delay: 0.18s;
}

/* Archive Grid Items - Visible by default (animations removed) */
.archive-item {
    opacity: 1;
    transform: translateY(0);
}

.archive-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ABOUT PAGE STYLES (from backup)
   ============================================ */
.about-layout {
    display: flex;
    gap: 60px;
    max-width: 900px;
    margin: 80px auto;
    padding: 0 40px;
    align-items: flex-start;
    /* animation: fadeIn 0.6s ease-out; */
}

.about-photo {
    flex-shrink: 0;
    width: 180px;
}

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

.photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
    text-transform: uppercase;
    text-align: center;
}

.about-content {
    flex: 1;
}

.about-name {
    font-family: 'Arial', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.about-role {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.about-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: #222;
    margin-bottom: 60px;
}

.bio-message-container {
    border: 1px solid #ddd;
    background: #fafafa;
    margin-bottom: 50px;
    max-width: 500px;
    font-family: 'JetBrains Mono', monospace;
}

.bio-message-header {
    background: #f0f0f0;
    color: #333;
    padding: 6px 12px;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
}

.blink-dot {
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

.bio-message-body {
    padding: 15px 20px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

.bio-message-footer {
    padding: 5px 12px;
    font-size: 0.55rem;
    color: #aaa;
    border-top: 1px solid #eee;
    text-align: right;
    letter-spacing: 0.05em;
    font-weight: 500;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.about-section {
    margin-bottom: 50px;
}

.about-section h3 {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: #000;
    letter-spacing: 0.05em;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    column-gap: 40px;
}

.about-list li {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

@media (max-width: 768px) {
    .about-layout {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
        margin: 40px auto;
        padding-bottom: 100px;
    }

    .about-photo {
        width: 140px;
        margin: 0 auto;
    }

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

    .about-name {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .about-role {
        font-size: 0.75rem;
        margin-bottom: 25px;
    }

    .about-bio {
        font-size: 0.95rem;
        line-height: 1.65;
        margin-bottom: 40px;
        text-align: left;
    }

    .about-section {
        margin-bottom: 35px;
    }

    .about-section h3 {
        font-size: 0.8rem;
        margin-bottom: 20px;
        text-align: center;
    }

    .about-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 16px;
        text-align: left;
    }

    .about-list li {
        font-size: 0.65rem;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        color: #444;
    }

    .bio-message-container {
        margin: 0 auto 40px auto;
    }

    .bio-message-body {
        text-align: left;
    }
}

/* ============================================
   CONTACT PAGE STYLES (from backup)
   ============================================ */
.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.contact-card {
    text-align: center;
    max-width: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.contact-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-name {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 0;
    color: #000;
    font-family: 'Inter', sans-serif;
}

.contact-role {
    font-size: 0.9rem;
    color: #666;
    margin-top: -10px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.contact-info a,
.contact-link {
    color: #000;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
}

.contact-info .email {
    font-size: 0.85rem;
    color: #444;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid #000;
    border-radius: 8px;
    text-decoration: none;
    color: #000;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
    cursor: pointer;
}

.btn-contact:hover {
    background: #f5f5f5;
}

.btn-contact.primary {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #1a1a1a;
}

.btn-contact.primary:hover {
    background: #333;
}

.contact-row {
    margin-bottom: 10px;
}

/* Lightbox Dots - NOW COUNTER */
/* Lightbox Dots - NOW COUNTER */
#lightbox-dots {
    /* Flow Layout - Attached to image */
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    margin-top: 20px !important;
    margin-bottom: 0 !important;

    width: auto !important;
    text-align: center !important;

    display: block !important;

    font-size: 14px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    color: #000;
    letter-spacing: 0.05em;

    /* Ensure visibility */
    z-index: 6000 !important;
    pointer-events: none;
    background: transparent !important;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;

    transform: none !important;
}

/* Ensure Image Shrinks to fit Dots */
.lightbox-content {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    width: auto !important;

    /* Limit height so image + counter fit in viewport */
    max-height: 80vh !important;

    max-width: 100% !important;
    object-fit: contain !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}



/* Remove old dot styles if unused */
.lb-dot {
    display: none;
}