:root {
    --bg-color: #fcfcfb;
    --text-main: #1a1a18;
    --font-sans: 'Raleway', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
    transition: opacity 1s ease, visibility 1s;
}

#preloader-name {
    font-family: var(--font-sans);
    font-weight: 300; font-size: 18px; letter-spacing: 12px;
    text-transform: uppercase; color: var(--text-main);
    opacity: 0;
    animation: fadeInName 2s ease forwards;
}

@keyframes fadeInName {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

#preloader.fade-out {
    opacity: 0; visibility: hidden;
}

#preloader.fade-out #preloader-name {
    animation: none;
    opacity: 0;
    transition: opacity 1s ease;
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

button {
    background: none; border: none; padding: 0; margin: 0;
    font: inherit; color: inherit; cursor: pointer;
    text-align: left; outline: none;
}

body, html {
    width: 100%; height: 100%;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden; cursor: default; 
    font-family: var(--font-sans);
}

img, #lightbox, #photo-frame, .sheet-thumb, .menu-series-img { 
    -webkit-user-select: none; user-select: none; 
    -webkit-user-drag: none; user-drag: none; 
}

body.hide-cursor { cursor: none; }

#cursor-dot {
    position: fixed; top: 0; left: 0; width: 8px; height: 8px;
    background: #000; border-radius: 50%;
    z-index: 9999; pointer-events: none;
    transform: translate(-50%, -50%); display: none; 
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                height 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                background 0.5s ease;
}

.cursor-hover {
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.05); 
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
}

.btn-close {
    position: absolute; top: 50px; right: 60px;
    width: 30px; height: 30px;
    cursor: pointer; z-index: 6000;
    background: transparent; border: none; outline: none;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close::before, .btn-close::after {
    content: ''; position: absolute;
    width: 100%; height: 1px;
    background-color: var(--text-main);
}

.btn-close::before { transform: rotate(45deg); }
.btn-close::after { transform: rotate(-45deg); }
.btn-close:hover { opacity: 0.5; transform: scale(1.1) rotate(90deg); }
.btn-close:active { transform: scale(0.9) rotate(90deg); }

#mobile-top-bar { display: none; }

#sheet-title, 
.menu-series-title,
#viewer-title {
    font-family: var(--font-serif);
    text-transform: uppercase;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

h1#site-name, 
.nav-action, 
#slide-controls, 
#mobile-toggle,
.menu-series-title {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    color: var(--text-main);
    border-radius: 30px;
}

.contact-pill,
.bio-pill {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    color: var(--text-main);
    border-radius: 30px;
}

#site-header { position: fixed; top: 50px; left: 60px; z-index: 100; }

h1#site-name {
    font-family: var(--font-sans); font-weight: 400; font-size: 14px; 
    letter-spacing: 4px; line-height: 1; margin: 0; padding: 10px 22px; text-transform: uppercase;
}

#mobile-toggle {
    font-family: var(--font-sans); display: none; position: fixed; top: 50px; right: 60px; 
    z-index: 101; letter-spacing: 3px; padding: 12px 18px; font-size: 9px; text-transform: uppercase;
}

#right-navigation {
    position: fixed; top: 50px; right: 60px; z-index: 100;
    display: flex; flex-direction: row; align-items: center; gap: 15px; 
}

.nav-action {
    font-family: var(--font-sans); text-transform: uppercase;
    font-weight: 400; font-size: 13px; letter-spacing: 3px; cursor: pointer; padding: 10px 22px;
}

.nav-action.active-nav {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 255, 255, 0.9);
}

#slide-controls {
    font-family: var(--font-sans); text-transform: uppercase;
    position: fixed; bottom: 50px; left: 60px; z-index: 95;
    display: flex; gap: 15px; align-items: center;
    font-weight: 400; font-size: 11px; letter-spacing: 2px; padding: 10px 20px;
}

.slide-btn { cursor: pointer; transition: opacity 0.3s ease; }
.slide-sep { color: #ccc; font-weight: 300; }

@media (hover: hover) {
    h1#site-name:hover, .nav-action:hover, #slide-controls:hover,
    .menu-series-card:hover .menu-series-title,
    .contact-pill a:hover {
        background: rgba(255, 255, 255, 0.9); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
        transform: translateY(-3px); opacity: 1;
    }
    
    .nav-action:hover { opacity: 1; }
    #slide-prev:hover, #slide-next:hover { opacity: 0.5; }
    .sheet-thumb:hover { opacity: 0.5; }
    .menu-series-card:hover { opacity: 0.9; }
    .menu-series-card:hover .menu-series-images img { transform: scale(1.05); }
    .slide-multi-img:hover { transform: scale(1.02); }
}

#bg-slider { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }

.slide-track {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: row; gap: 40px; justify-content: center; align-items: center;
    padding: 120px 80px; opacity: 1; transform: translateX(0);
}

.slide-multi-img {
    max-height: 75vh; max-width: 100%; object-fit: contain; cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
}

.slide-track[data-count="1"] .slide-multi-img { max-height: 55vh; max-width: 60%; }
.slide-track[data-count="2"] .slide-multi-img { max-width: 45%; }
.slide-track[data-count="3"] .slide-multi-img { max-width: 30%; }

#menu-panel, 
#contact-sheet, 
#lightbox {
    z-index: 9000 !important;
}

#menu-panel {
    position: fixed; 
    top: 110px; 
    bottom: 20px; right: 20px; 
    width: 450px; 
    border-radius: 40px; 
    padding: 50px 0; 
    overflow-y: auto; overflow-x: hidden;
    transform: translateX(calc(100% + 40px)); 
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    -ms-overflow-style: none; scrollbar-width: none;
}
#menu-panel::-webkit-scrollbar { display: none; }

#menu-panel.active { transform: translateX(0); }

#menu-project-list { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 40px 40px 40px; }

.menu-series-card {
    display: flex; flex-direction: column; width: 100%; margin-bottom: 70px;
    align-items: center; text-align: center; cursor: pointer; transition: opacity 0.5s ease;
}

.menu-series-images { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; margin-bottom: 15px; justify-content: center; width: 100%; }
.menu-series-images img { transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease; }
.menu-series-images img { height: 50px; width: auto; max-width: calc(20% - 5px); object-fit: contain; pointer-events: none; }

.menu-series-title { 
    font-size: 14px; font-weight: 400; letter-spacing: 3px; 
    margin: 10px 0 5px 0; padding: 10px 22px; display: inline-block;
}
.menu-series-desc { font-size: 11px; color: #555; font-weight: 300; line-height: 1.5; margin: 0; padding: 0 20px; }

#contact-sheet {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); display: flex; flex-direction: column; 
    padding: 120px 60px 80px 60px; opacity: 0; visibility: hidden; 
    transition: opacity 0.5s ease, visibility 0.5s; overflow-y: auto; -webkit-overflow-scrolling: touch; 
}
#contact-sheet.active { opacity: 1; visibility: visible; pointer-events: auto; }

#sheet-header { text-align: center; max-width: 800px; margin: 0 auto 60px auto; }
#sheet-title { font-size: 24px; font-weight: 300; margin-bottom: 20px; letter-spacing: 4px; color: var(--text-main); }
#sheet-desc { font-size: 14px; line-height: 1.8; color: #555; font-weight: 300; }

#sheet-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; width: 100%; max-width: 1000px; margin: 0 auto; padding-bottom: 120px; gap: 20px; }
.sheet-thumb { height: 140px; width: auto; display: block; background: #fafafa; cursor: pointer; transition: opacity 0.4s ease; }

#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s;
}
#lightbox.active { opacity: 1; visibility: visible; pointer-events: auto; }

#lightbox-content { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 40px; gap: 30px; }
#photo-frame { display: flex; justify-content: center; align-items: center; width: 100%; height: 80vh; cursor: pointer; position: relative; }

#viewer-img {
    display: block; max-width: 90vw; max-height: 100%; width: auto; height: auto;
    object-fit: contain; min-width: 50px; min-height: 50px; pointer-events: none; opacity: 0; transform: scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
#viewer-img.loaded { opacity: 1; transform: scale(1); }

#viewer-info { width: 100%; max-width: 600px; text-align: center; font-size: 12px; line-height: 1.8; color: #666; font-weight: 300; opacity: 1; transition: opacity 0.6s ease; }
#viewer-title { font-weight: 400; margin-bottom: 12px; letter-spacing: 2px; color: #111;}

.ui-faded { opacity: 0; pointer-events: none; }

#info-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 5000;
    background: rgba(252, 252, 251, 0.95); 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s;
}
#info-modal.active { opacity: 1; visibility: visible; pointer-events: auto; }

#info-content { text-align: center; }

.contact-pill {
    display: inline-flex; flex-direction: row; gap: 15px; align-items: center; justify-content: center;
    padding: 15px 25px; border-radius: 50px; 
}
.contact-pill a { 
    font-family: var(--font-sans); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; 
    text-decoration: none; padding: 12px 25px; display: inline-block; color: var(--text-main);
    border-radius: 30px; transition: all 0.3s ease;
}

.bio-pill {
    display: flex; flex-direction: column; align-items: center; text-align: left;
    padding: 40px; border-radius: 40px; max-width: 800px; width: 90vw;
}
.about-text { width: 100%; text-align: center; }
.about-text p { font-size: 15px; line-height: 2.2; color: #222; font-weight: 300; margin: 0;}

#error-banner {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 10001;
    background: #e74c3c; color: white; text-align: center; padding: 15px;
    font-family: var(--font-sans); font-size: 13px; letter-spacing: 1px;
    display: flex; justify-content: center; align-items: center; gap: 20px;
    transform: translateY(0); transition: transform 0.3s ease;
}
#error-banner.hidden { transform: translateY(-100%); }
#error-retry { background: white; color: #e74c3c; padding: 5px 15px; border-radius: 20px; font-weight: bold; text-transform: uppercase; font-size: 10px;}

#copyright {
    position: fixed;
    bottom: 30px;
    right: 40px;
    font-size: 11px;
    letter-spacing: 2px;
    color: #999999;
    z-index: 90;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .hide-cursor { cursor: auto; }
    #cursor-dot { display: none; }
    .btn-close { display: none; }
    
    #mobile-top-bar { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 70px; background: var(--bg-color); z-index: 98; }
    
    #site-header { top: 20px; left: 20px; z-index: 100; }
    h1#site-name { font-size: 12px; padding: 10px 18px; } 
    
    #mobile-toggle { display: block; top: 20px; right: 20px; z-index: 100; padding: 10px 18px; background: #ffffff; border-color: #ffffff; }
    
    #right-navigation { 
        top: 0; left: 0; width: 100%; height: 100vh; 
        background: rgba(252, 252, 251, 1);
        flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; 
        padding-top: 100px; gap: 15px;
        opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s; z-index: 97;
    }
    #right-navigation.menu-open { opacity: 1; visibility: visible; pointer-events: auto; }
    
    .nav-action { font-size: 11px; letter-spacing: 2px; } 
    
    .slide-track { padding: 100px 30px; flex-direction: column; gap: 15px; }
    .slide-track[data-count="1"] .slide-multi-img { max-width: 100%; max-height: 45vh; }
    .slide-track[data-count="2"] .slide-multi-img { max-width: 100%; max-height: 35vh; }
    .slide-track[data-count="3"] .slide-multi-img { max-width: 100%; max-height: 25vh; }
    
    #slide-controls { display: none; }
    
    #menu-panel { 
        top: 90px; bottom: 20px; right: 15px; left: 15px; width: auto; padding: 30px 0; border-radius: 30px;
    }
    
    #menu-project-list { padding: 0 15px 40px 15px; }
    
    .menu-series-card { margin-bottom: 40px; }
    .menu-series-images { gap: 4px; }
    .menu-series-images img { height: 50px; max-width: calc(20% - 4px); }
    .menu-series-title { font-size: 12px; padding: 8px 16px; margin-top: 5px; }
    
    #contact-sheet { padding: 90px 15px 60px 15px; }
    #sheet-header { margin-bottom: 30px; }
    
    #sheet-grid { gap: 10px; padding-bottom: 80px; }
    .sheet-thumb { width: auto; max-width: calc(50% - 5px); height: auto; max-height: 160px; object-fit: contain; }
    
    #lightbox-content { padding: 40px 20px; }
    #photo-frame { height: 65vh; width: 100%; }

    .contact-pill { flex-direction: column; gap: 5px; padding: 20px; border-radius: 30px; }
    .contact-pill a { padding: 12px 20px; width: 100%; }

    .bio-pill { 
        flex-direction: column; 
        gap: 20px; 
        align-items: center; 
        text-align: center; 
        padding: 30px 20px; 
        border-radius: 30px;
        max-height: 85vh;
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .bio-pill::-webkit-scrollbar { display: none; }
    
    #copyright {
        right: 0;
        left: 0;
        text-align: center;
        bottom: 15px;
    }
}