img, .gallery-image, .modal-gallery-images img {
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}
/* === MOBILE/TABLET ENHANCEMENTS === */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }
    body {
        padding: 0;
        font-size: 1rem;
    }
    .modal-wrapper {
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        border-radius: 0;
        padding: 0;
    }
    .modal-content.clean-modal-content,
    .modal-gallery-images.clean-modal-gallery-images {
        padding: 0 2vw;
        max-width: 100vw;
    }
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px 2vw 8px 2vw;
    }
    .modal-header .avatar {
        width: 36px;
        height: 36px;
    }
    .modal-close {
        top: 8px;
        right: 8px;
        font-size: 1.5rem;
        padding: 8px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .gallery-item {
        min-height: 180px;
        font-size: 1rem;
    }
    .nav-container {
        flex-direction: column;
        height: auto;
        gap: 8px;
        padding: 0 8px;
    }
    .nav-links {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: flex-start;
    }
    .btn, .btn-primary, .btn-secondary {
        padding: 16px 0;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 8px;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    .hero {
        padding: 40px 8px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-bio, .hero-subtitle {
        font-size: 1rem;
    }
}
/* === Behance-like Clean Modal Layout === */
.modal-body.clean-modal-body {
    display: flex;
    flex-direction: column;
    background: #fff;
    width: 100%;
    min-height: 500px;
    box-sizing: border-box;
    padding: 0;
}

.modal-info.clean-modal-info {
    width: 100%;
    background: #000;
    padding: 0;
    box-sizing: border-box;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.modal-content.clean-modal-content {
    width: 100%;
    max-width: 1305px;
    margin: 0 auto;
    background: #000;
    border: none;
    box-shadow: none;
    padding: 0 32px 20px;
    text-align: left;
}

.modal-gallery.clean-modal-gallery {
    width: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 48px 0;
    box-sizing: border-box;
}

.modal-gallery-images.clean-modal-gallery-images {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 0 32px;
    overflow: visible;
    background: #000;
    margin: 0 auto;
}

.modal-gallery-images.clean-modal-gallery-images img {
    width: 100%;
    height: auto;
    max-width: 900px;
    object-fit: contain;
    flex-shrink: 0;
    border: none;
    background: #000;
    box-shadow: none;
    margin: 0 auto;
    display: block;
    border-radius: 0;
    padding: 0;
}

.modal-3d-viewer {
    width: 100%;
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 32px;
}

.modal-3d-viewer.hidden {
    display: none;
}

.modal-3d-shell {
    width: 100%;
    min-height: 420px;
    background: #050505;
    border: 1px solid #1f2937;
}

.modal-3d-shell iframe,
.modal-3d-shell model-viewer {
    width: 100%;
    min-height: 420px;
    border: 0;
    display: block;
    background: #050505;
}

.modal-3d-label {
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #93c5fd;
}

.modal-social.clean-modal-social {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin: 32px 0 0 0;
    justify-content: flex-start;
}
.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f7f7f7;
    box-shadow: none;
    transition: background 0.2s;
    margin-bottom: 0;
}
.sidebar-icon:hover {
    background: #e0e0e0;
}
.sidebar-icon img {
    width: 32px;
    height: 32px;
    display: block;
}

@media (max-width: 900px) {
    .modal-info.clean-modal-info, .modal-content.clean-modal-content, .modal-gallery.clean-modal-gallery, .modal-gallery-images.clean-modal-gallery-images {
        padding-left: 0;
        padding-right: 0;
        max-width: 100vw;
    }
    .modal-content.clean-modal-content {
        padding: 0 8px;
    }
    .modal-gallery-images.clean-modal-gallery-images {
        padding: 0 8px;
    }

    .modal-3d-viewer {
        padding: 0 8px;
    }
}
/* ==================== DARK THEME VARIABLES ==================== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #e0e0e0;
    --border: #333333;
    --transition: all 0.3s ease;
    --font-display: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
    --font-body: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    position: relative;
}

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

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(80vw 80vw at 8% 18%, rgba(117, 184, 255, 0.08), transparent 62%),
        radial-gradient(60vw 60vw at 92% 35%, rgba(255, 196, 107, 0.06), transparent 62%),
        linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02));
    mix-blend-mode: screen;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 0.6px, transparent 0.6px);
    background-size: 3px 3px;
}

.navbar,
.hero,
.portfolio-section,
.tech-art-section,
.gallery-section,
.store-section,
.contact-section,
.footer {
    position: relative;
    z-index: 1;
}

/* Tailwind-style animation utilities */
.tw-animate-fade-up {
    animation: tw-fade-up 0.8s both;
}

.tw-delay-1 { animation-delay: 0.1s; }
.tw-delay-2 { animation-delay: 0.2s; }
.tw-delay-3 { animation-delay: 0.3s; }
.tw-delay-4 { animation-delay: 0.4s; }

.tw-animate-float {
    animation: tw-float 6s ease-in-out infinite;
}

.tw-animate-pulse-soft {
    animation: tw-pulse-soft 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tw-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes tw-pulse-soft {
    50% {
        opacity: 0.65;
    }
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 3720px;
    margin: 0 auto;
    padding: 0 28px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border: 1px solid var(--text-primary);
    transition: var(--transition);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 12px;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 3720px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
}

.logo-star {
    font-size: 24px;
    animation: tw-float 5.8s ease-in-out infinite;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 50px;
}

.nav-link {
    font-size: 12px;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition);
    color: var(--text-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 11px;
    }
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    padding: 100px 40px;
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hero-video-bg.hidden {
    display: none;
}

.hero-video-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    min-width: 100%;
    height: 56.25vw;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    filter: saturate(0.9) contrast(1.05) brightness(0.45);
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background:
    linear-gradient(105deg, rgba(8, 8, 8, 0.64) 0%, rgba(8, 8, 8, 0.52) 40%, rgba(8, 8, 8, 0.65) 100%),
    radial-gradient(circle at 80% 30%, rgba(224, 224, 224, 0.06), transparent 40%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(224, 224, 224, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
}

.hero-title {
    font-size: clamp(44px, 8vw, 88px);
    line-height: 1.1;
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -2px;
}

.hero-bio {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 968px) {
    .hero {
        min-height: auto;
        padding: 80px 20px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-bio {
        font-size: 16px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
}

/* ==================== PORTFOLIO SECTION ==================== */
.portfolio-section {
    padding: 120px 40px;
    background: var(--bg-primary);
}

.portfolio-intro {
    max-width: 1800px;
    margin: 0 auto;
}

.portfolio-intro p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding-top: 60px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(36px, 4vw, 52px);
    font-family: var(--font-display);
    font-weight: 900;
    margin-bottom: 12px;
    animation: tw-pulse-soft 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.stat-label {
    display: block;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ==================== SECTION TITLES ==================== */
.section-title {
    font-size: clamp(34px, 5vw, 58px);
    font-family: var(--font-display);
    font-weight: 900;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
}

/* ==================== GALLERY SECTION ==================== */
.gallery-section {
    padding: 120px 40px;
    background: var(--bg-primary);
}

.gallery-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin: -30px auto 34px;
    max-width: 680px;
}

/* ==================== TECH ART SECTION ==================== */
.tech-art-section {
    padding: 120px 40px;
    background: var(--bg-secondary);
}

.tech-art-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
}

.tech-art-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    overflow: hidden;
}

.tech-art-thumb-wrap {
    background: #121212;
    min-height: 220px;
}

.tech-art-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tech-art-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-art-title {
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: 0.4px;
}

.tech-art-description {
    color: var(--text-secondary);
}

.tech-art-url {
    color: #d4d4d4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    word-break: break-all;
    font-size: 14px;
}

.tech-art-actions {
    margin-top: 8px;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#portfolioGrid {
    max-width: 1800px;
    margin: 0 auto;
}

.search-box,
.category-filter {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    border-radius: 4px;
    transition: var(--transition);
}

.search-box::placeholder {
    color: var(--text-secondary);
}

.search-box:focus,
.category-filter:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(224, 224, 224, 0.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: 2px;
    display: block;
    width: 100%;
    margin: 0;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.24) 42%, transparent 60%);
    transform: translateX(-130%);
    transition: transform 0.45s ease;
    pointer-events: none;
    z-index: 2;
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover::before {
    transform: translateX(130%);
}

.gallery-image {
    width: 100%;
    height: 100%;
    max-height: 520px;
    min-height: 220px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--bg-tertiary);
    transition: var(--transition);
    display: block;
    padding: 0;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.04) translateY(-4px);
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-item {
        margin-bottom: 0;
    }
}

.gallery-info {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px 18px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-info,
.gallery-item:focus-within .gallery-info {
    opacity: 1;
    transform: translateY(0);
}

.gallery-title {
    font-size: 15px;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-category {
    display: inline-block;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    font-size: 11px;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .gallery-info {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
    }
}

/* ==================== STORE SECTION ==================== */
.store-section {
    padding: 120px 40px;
    background: var(--bg-secondary);
    text-align: center;
}

.store-content {
    max-width: 600px;
    margin: 0 auto;
}

.store-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
    padding: 120px 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

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

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    transition: var(--transition);
    border-radius: 4px;
}

.social-link:hover {
    background: var(--bg-secondary);
    transform: translateY(-4px);
}

.social-link svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
}

.social-link span {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: #000;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    height: 100vh;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: #000;
}


.modal-wrapper {
    position: relative;
    z-index: 201;
    width: min(95vw, 1740px);
    background: #000;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
    margin: 40px 0;
    max-height: none;
}

.modal-body {
    display: flex;
    flex-direction: row;
    background: #000;
    width: 100%;
    height: 100%;
    min-height: 500px;
    box-sizing: border-box;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    background: #000;
    border-bottom: 1px solid #1f1f1f;
}

.modal-project-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.modal-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #e9edf6;
    background: radial-gradient(circle at 32% 22%, #67b9ff 0%, #347ec8 56%, #1f3d66 100%);
    border: 1px solid #2d4b73;
}

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

.modal-author-fallback {
    display: none;
}

.modal-project-heading {
    min-width: 0;
}

.modal-header-title {
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.05;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header-byline {
    margin: 4px 0 0;
    font-size: 15px;
    color: #d6d6d6;
}

.modal-header-description {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.35;
    color: #f0f0f0;
    max-width: min(78ch, 72vw);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

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

.modal-header-behance {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.modal-header-behance[aria-disabled='true'] {
    opacity: 0.45;
    pointer-events: none;
}

.modal-close,
.modal-nav {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.modal-close {
    color: #ffffff;
}

.modal-close svg {
    stroke: currentColor;
}

.modal-close:hover,
.modal-nav:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.modal-gallery {
    flex: 2 1 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #000;
    overflow: visible;
    max-height: none;
    min-width: 0;
    padding: 40px 0 40px 40px;
}

.modal-gallery-images {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0;
    overflow: visible;
    background: #000;
}

.modal-gallery-images img {
    width: 100%;
    height: auto;
    max-width: 900px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid #eee;
    background: #000;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.modal-prev {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.modal-next {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.modal-project-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 20px;
    border-top: 1px solid #f0f0f0;
    background: #101010;
}

.thumb-scroll {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
    background: rgba(255, 255, 255, 0.92);
    color: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.thumb-scroll:hover {
    transform: scale(1.05);
}

.thumb-scroll:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.modal-project-rail {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-project-rail::-webkit-scrollbar {
    display: none;
}

.project-thumb {
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    min-width: 230px;
    max-width: 230px;
    height: 130px;
    overflow: hidden;
    background: #0b0b0b;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.project-thumb:hover {
    transform: translateY(-2px);
    border-color: #dcdcdc;
}

.project-thumb.active {
    border-color: #f2f2f2;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22) inset;
}

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

.project-thumb-label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 10px;
    font-size: 11px;
    color: #f4f4f4;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-info {
    flex: 1 1 0;
    padding: 40px 40px 40px 32px;
    background: #000;
    overflow-y: auto;
    max-height: none;
    min-width: 260px;
    box-sizing: border-box;
    border-left: 1px solid #1f1f1f;
}
/* Modal Sidebar */
.modal-sidebar {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 40px 24px 0 24px;
    background: #fff;
    border-left: 1px solid #f0f0f0;
    min-width: 80px;
    box-sizing: border-box;
}
.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f7f7f7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s;
    margin-bottom: 8px;
}
.sidebar-icon:hover {
    background: #e0e0e0;
}
.sidebar-icon img {
    width: 32px;
    height: 32px;
    display: block;
}

.modal-project-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 16px;
}

@media (max-width: 900px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-gallery {
        padding: 24px 0 0 0;
    }
    .modal-info {
        padding: 24px 16px;
        border-left: none;
        border-top: 1px solid #1f1f1f;
    }

    .modal-header {
        padding: 14px;
        gap: 10px;
    }

    .modal-author-avatar {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .modal-header-title {
        font-size: 24px;
    }

    .modal-header-byline {
        font-size: 13px;
        margin-top: 2px;
    }

    .modal-header-actions {
        gap: 8px;
    }

    .modal-header-behance {
        font-size: 11px;
        padding: 10px 12px;
    }
    .modal-sidebar {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        padding: 16px 0 0 0;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        min-width: 0;
    }

    .modal-project-footer {
        padding: 10px 12px 14px;
        gap: 10px;
    }

    .thumb-scroll {
        width: 46px;
        height: 46px;
    }

    .project-thumb {
        min-width: 172px;
        max-width: 172px;
        height: 102px;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 40px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-note {
    font-style: italic;
    opacity: 0.8;
}

/* ==================== ADMIN-EDITABLE CONTENT ==================== */
.custom-header-bar {
    background: linear-gradient(90deg, #1b1b1b, #111);
    color: #f3f3f3;
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 10px 18px;
    font-size: 13px;
    letter-spacing: 0.4px;
    position: sticky;
    top: 0;
    z-index: 120;
}

.custom-blocks {
    margin: 28px auto 0;
    max-width: 900px;
    display: grid;
    gap: 16px;
}

.custom-block {
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 18px;
    border-radius: 8px;
}

.custom-block-title {
    margin: 0 0 8px;
    font-size: 18px;
}

.custom-block-text,
.custom-block-caption {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
}

.custom-block-caption {
    font-style: italic;
}

.custom-block-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

.custom-block-video {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.custom-block-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #111;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    z-index: 180;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.back-to-top:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .portfolio-section,
    .tech-art-section,
    .gallery-section,
    .store-section,
    .contact-section {
        padding: 80px 20px;
    }

    .tech-art-card {
        grid-template-columns: 1fr;
    }

    .tech-art-thumb-wrap {
        min-height: 200px;
    }
}
