:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #fff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    overflow: hidden; /* Prevent scrolling, full screen app */
    height: 100vh;
    width: 100vw;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Background Animation */
.background {
    position: fixed;
    top: -20%; left: -20%;
    width: 140%; height: 140%;
    z-index: -2;
}

.bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.6);
    animation: drift 25s ease-in-out infinite alternate;
}

.bg-scratches {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background-image: linear-gradient(
        to right,
        transparent 0%,
        transparent 12%,
        rgba(0, 0, 0, 0.2) 12.1%,
        transparent 12.2%,
        transparent 35%,
        rgba(0, 0, 0, 0.15) 35.1%,
        transparent 35.2%,
        transparent 65%,
        rgba(255, 255, 255, 0.1) 65.1%,
        transparent 65.2%,
        transparent 88%,
        rgba(0, 0, 0, 0.2) 88.1%,
        transparent 88.2%,
        transparent 100%
    );
    background-size: 150% 100%;
    animation: scratches 0.5s steps(4) infinite alternate;
}

.bg-flicker {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background-color: rgba(0,0,0,0.1);
    animation: projectorFlicker 0.15s infinite;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 120%);
    pointer-events: none;
}

@keyframes drift {
    0% { transform: scale(1) translate(0, 0) rotate(0deg); }
    100% { transform: scale(1.15) translate(-2%, -2%) rotate(3deg); }
}

@keyframes scratches {
    0% { background-position: 0% 0; opacity: 0.7; }
    33% { background-position: 20% 0; opacity: 1; }
    66% { background-position: -15% 0; opacity: 0.6; }
    100% { background-position: 5% 0; opacity: 0.9; }
}

@keyframes projectorFlicker {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.85; }
}

/* Main Layout */
.main-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Site Title */
.site-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 10px;
    color: rgba(255, 255, 255, 0.6);
    z-index: 10;
    text-transform: uppercase;
}

/* Category Indicators (Scroll tracking) */
.category-indicators {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 50;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.5);
}

.indicator-dot.active {
    background: #fff;
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
    animation: pulseHint 3s infinite alternate;
    transition: opacity 0.5s ease;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.mouse-icon {
    width: 20px;
    height: 20px;
    animation: mouseScroll 2s infinite;
}

@keyframes mouseScroll {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

@keyframes pulseHint {
    0% { opacity: 0.4; }
    100% { opacity: 0.9; }
}

.arrow-keys-icon {
    display: flex;
    gap: 4px;
}

.key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
}

/* Category Title (Above Dock) */
.category-title {
    position: absolute;
    bottom: 110px; /* Just above the dock */
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.8);
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Canvas for Thumbnails */
.canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through empty space */
}

/* Thumbnails */
.thumbnail {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
    opacity: 0;
    scale: 0;
    translate: -50% -50%;
}

.thumbnail.visible {
    opacity: 1;
    scale: 1;
    animation: bobbing 6s ease-in-out infinite;
}

.thumbnail img {
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    width: auto;
    height: auto;
    max-width: 120px; /* Made slightly smaller like reference */
    max-height: 160px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.thumbnail:hover {
    z-index: 100 !important;
}

.thumbnail:hover img {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    border-color: rgba(255,255,255,0.5);
}

.thumbnail-title {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0.8;
    color: #fff;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.8);
    transition: opacity 0.3s ease;
}

.thumbnail:hover .thumbnail-title {
    opacity: 1;
}

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

/* Liquid Glass Dock */
.dock {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px 20px;
    box-shadow: var(--glass-shadow);
    z-index: 20;
}

.dock ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.dock-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.dock-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    color: #fff;
}

.icon svg {
    width: 18px;
    height: 18px;
}

.dock-item:hover .icon {
    transform: translateY(-8px) scale(1.1);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
}

.dock-item:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

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

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.glass-panel {
    background: rgba(20, 20, 20, 0.2);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    padding: 2rem;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .glass-panel {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
    line-height: 1;
}

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

/* Image Detail Modal */
.image-modal-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: 1000px;
}

.image-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 10px;
}

.image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.details-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.details-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.meta {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta .label {
    color: #fff;
    font-weight: 600;
}

.details-container p {
    line-height: 1.6;
    color: #ddd;
}

/* About Modal */
.about-modal-content {
    width: 800px;
}

.about-grid {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.about-photo img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #ddd;
}

/* Hello Modal */
.hello-modal-content {
    width: 500px;
    text-align: center;
}

.hello-modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: border-color 0.3s;
}

.contact-info a:hover {
    border-color: #fff;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(255,255,255,0.5);
}

.submit-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: #eee;
}

/* Responsive */
@media (max-width: 900px) {
    .image-modal-content, .about-grid {
        flex-direction: column;
    }
    .image-container img {
        max-height: 40vh;
    }
    .about-photo img {
        width: 100%;
        height: 300px;
    }
}
