:root {
    --bg-color: #050014;
    --text-primary: #ffffff;
    --text-secondary: #0ff;
    --accent-color: #f0f;
    --glass-bg: rgba(15, 0, 30, 0.6);
    --glass-border: rgba(0, 255, 255, 0.15);
    --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--bg-color);
}

/* Removed .hero header block since inline SVG acts as header & background */

/* Gallery Sidebar */
.gallery-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    overflow-y: auto;
    background: rgba(10, 0, 20, 0.4);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    z-index: 10;
}

/* Left Info Sidebar */
.info-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    overflow-y: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 255, 0.05);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.info-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.info-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s var(--transition);
}

.info-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

.info-bio {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.other-projects {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--glass-border);
}

.projects-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.projects-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom Info Sidebar Scrollbar */
.info-sidebar::-webkit-scrollbar {
    width: 8px;
}

.info-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.info-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.2);
    border-radius: 4px;
}

.info-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.4);
}

/* Custom Sidebar Scrollbar */
.gallery-container::-webkit-scrollbar {
    width: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-container::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.2);
    border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.4);
}

.masonry-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-item {
    width: 100%;
    /* Fill sidebar width */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    opacity: 0;
    transform: translateX(-40px);
    transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}

.gallery-item.loaded {
    animation: fadeRightItem 0.8s var(--transition) forwards;
}

@keyframes fadeRightItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 255, 0.15), 0 0 15px rgba(255, 0, 255, 0.1);
}

.gallery-canvas {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.7s var(--transition);
}

.gallery-item:hover .gallery-canvas {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    transition: opacity 0.4s var(--transition);
}

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

.item-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transform: translateY(20px);
    transition: transform 0.4s var(--transition);
}

.gallery-item:hover .item-title {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--transition);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.4s var(--transition);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    display: flex;
}

#lightboxCanvas {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}



.lightbox-caption {
    margin-top: 20px;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.close-btn,
.nav-btn {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-btn:hover,
.nav-btn:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.close-btn {
    top: 30px;
    right: 40px;
    font-size: 3rem;
    line-height: 1;
}

.nav-btn {
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.prev-btn {
    left: 40px;
}

.next-btn {
    right: 40px;
}

@media (max-width: 768px) {
    .close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

/* === PROTECTION STYLES === */
img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.gallery-img,
#lightboxImg {
    pointer-events: none;
}

.screenshot-protector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--transition);
}

.screenshot-protector.active {
    opacity: 1;
    pointer-events: all;
    background: radial-gradient(circle at 50% 50%, rgba(20, 20, 30, 1) 0%, #000 100%);
}

.protector-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--transition), transform 0.5s var(--transition);
}

.screenshot-protector.active .protector-title {
    opacity: 1;
    transform: translateY(0);
}

.screenshot-protector p {
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.5s var(--transition) 0.2s;
}

.screenshot-protector.active p {
    opacity: 1;
}

.brought-by {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    margin-top: 15px;
    opacity: 0.8;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 1024px) {
    .gallery-container {
        width: 35vw;
    }

    .info-sidebar {
        width: 30vw;
        right: 20px;
    }
}

@media (max-width: 768px) {
    body {
        /* Let it scroll naturally on mobile */
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Keep the SVG background fixed, but let content scroll */
    .background-animation {
        position: fixed;
    }

    /* Convert Sidebars from Fixed to Natural Flow */
    .gallery-container {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        padding: 50vh 20px 20px;
        background: transparent;
        backdrop-filter: none;
        overflow-y: auto;
    }

    .masonry-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .info-sidebar {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        background: rgba(10, 0, 20, 0.8);
        overflow-y: auto;
    }
}