/* BASE THEME & VARIABLES */
:root {
    --bg-dark: #070707;
    --bg-surface: #111111;
    --bg-surface-light: #1a1a1a;
    --text-main: #f0ebd8;
    --text-muted: #a39e93;
    --accent-gold: #c5a059;
    --accent-gold-hover: #e8c57a;
    --accent-gold-dark: #8c703b;
    --nav-bg: rgba(7, 7, 7, 0.4);
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* RESET & CORE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

/* TYPOGRAPHY */
h1, h2, h3, .logo, .cinzel-heading {
    font-family: var(--font-heading);
    font-weight: 400;
}

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

h2.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 1.5rem 0;
}

.text-center.section-title::after {
    margin: 1.5rem auto;
}

p.section-subtitle {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* NAVBAR (GLASSMORPHISM) */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    background: transparent;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 1.2rem 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

/* HERO SECTION */
.hero {
    height: 75vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('teniers_hero.png');
    background-size: cover;
    background-position: center;
    /* subtle scale animation applied via JS or keyframes later */
    transform: scale(1.05);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(7, 7, 7, 0.3) 0%,
        rgba(7, 7, 7, 0.7) 60%,
        rgba(7, 7, 7, 1) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 2rem;
    margin-top: 15vh;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero h1 .highlight {
    color: var(--accent-gold);
    font-style: italic;
    font-size: 0.85em;
    display: block;
}

.hero .subtitle {
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-gold);
    z-index: -1;
    transition: var(--transition-smooth);
}

.btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
}

.btn:hover::before {
    width: 100%;
}

.btn.gold-btn {
    background: var(--accent-gold);
    color: var(--bg-dark);
}

.btn.gold-btn::before {
    background: var(--text-main);
}
.btn.gold-btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 0 30px rgba(240, 235, 216, 0.3);
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--accent-gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 1px solid var(--accent-gold);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: scroll 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

@keyframes scroll {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 15px); }
}

/* SECTIONS STRUCTURE */
.section {
    padding: 4rem 5%;
    position: relative;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

/* BIOGRAPHY SECTION */
.bio-section {
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 100% 0%, rgba(197, 160, 89, 0.05) 0%, transparent 50%);
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.bio-text .lead {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 300;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.bio-text p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.bio-text h3 {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    margin-top: 3rem;
    font-family: var(--font-heading);
}

.bio-text h3:first-child {
    margin-top: 0;
}

.bio-content-extended > .lead {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 5rem;
}

.bio-grid.reversed {
    direction: rtl;
}

.bio-grid.reversed > * {
    direction: ltr;
}

.stats-row {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.bio-visual {
    position: relative;
}

.aesthetic-frame {
    position: relative;
    padding: 2rem;
    border: 1px solid rgba(197, 160, 89, 0.2);
    width: 100%;
    aspect-ratio: 4/5;
    background: var(--bg-surface);
}

.frame-inner {
    width: 100%;
    height: 100%;
    background: var(--bg-surface-light);
    position: relative;
    overflow: hidden;
    /* Subtle Canvas Texture */
    background-image: 
        linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 4px);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.8);
}

.gold-accent-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-gold);
}

.gold-accent-corner.top-left {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.gold-accent-corner.bottom-right {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

/* GALLERY SECTION */
.gallery-section {
    background-color: var(--bg-surface);
    border-top: 1px solid rgba(255,255,255,0.02);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.canvas {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Using aesthetic classical gradients as art placeholders until connected */
.canvas-1 { background: radial-gradient(circle at center, #2a2218, #0e0b08); }
.canvas-2 { background: radial-gradient(circle at center, #1c2321, #0a0c0b); }
.canvas-3 { background: radial-gradient(circle at center, #2e1f1a, #110d0b); }
.canvas-4 { background: radial-gradient(circle at center, #22201e, #0a0908); }

.item-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.gallery-item:hover .item-details {
    transform: translateY(0);
    opacity: 1;
}

.item-details h3 {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.item-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.view-btn {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    position: relative;
    padding-bottom: 4px;
}

.view-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--text-main);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.gallery-item:hover .view-btn::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* LEGACY SECTION (Parallax CTA) */
.legacy-section {
    position: relative;
    background-image: url('teniers_hero.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    padding: 10rem 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legacy-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 7, 0.85);
    backdrop-filter: blur(5px);
}

.legacy-section .container {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.legacy-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 2rem 0 3rem;
}

/* FOOTER */
footer {
    background: #040404;
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(197, 160, 89, 0.15);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
    font-family: var(--font-heading);
    color: var(--accent-gold-dark);
    font-size: 1.5rem;
    letter-spacing: 4px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
}

/* ANIMATIONS & EFFECTS */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: textReveal 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .stats-row {
        gap: 2rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 3.5rem; }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(7, 7, 7, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 2rem 0;
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
        border-bottom: 1px solid rgba(197, 160, 89, 0.2);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .nav-links a {
        display: inline-block;
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1000;
    }
    
    .hamburger span {
        width: 30px;
        height: 2px;
        background: var(--text-main);
        transition: transform 0.4s ease, opacity 0.4s ease;
        transform-origin: left;
    }
    
    /* Hamburger animation to X */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* TAB CONTENT SYSTEM */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab-content.active {
    display: block;
    animation: fadeInTab 0.8s forwards;
}

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

.tab-link {
    cursor: pointer;
}

/* LIGHTBOX MODAL */
.modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(3, 3, 3, 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 80vh;
    border: 2px solid var(--accent-gold-dark);
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    object-fit: contain;
}

.modal-caption {
    text-align: center;
    color: var(--text-main);
    padding-top: 25px;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: var(--accent-gold);
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2001;
}

.modal-close:hover {
    color: #fff;
    transform: scale(1.15) rotate(90deg);
}

.gallery-item {
    cursor: pointer;
}

/* MUSEUM CARDS */
.museum-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-gold) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.7);
    background: rgba(15, 15, 15, 0.85) !important;
}
