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

:root {
    /* Medieval cathedral ambiance - brighter warm tones */
    --bg-color: #4a3f35;
    --bg-gradient-start: #5c4d40;
    --bg-gradient-end: #3d3229;
    --text-color: #d4c8b8;
    --text-hover: #f0e8dc;
    --frame-border: #6b5d4d;
    --accent-warm: #b09070;
}

html, body {
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-color) 50%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-color);
    overflow: hidden;
}

/* Subtle vignette overlay for cathedral ambiance */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Grain texture overlay - enhanced plaster wall effect */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.65 0 0 0 0 0.60 0 0 0 0 0.52 0 0 0 0.3 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Main gallery layout */
.gallery {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 10vh 40px 40px;
    position: relative;
    z-index: 10;
    gap: 25px;
}

/* Archive link - centered above photo */
.archive-link-top {
    color: var(--text-color);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 10px 0;
    font-family: Arial, Helvetica, sans-serif;
    order: 1;
}

.archive-link-top:hover {
    color: var(--text-hover);
}

/* Refresh hint - below archive, lighter and smaller */
.refresh-hint {
    color: var(--text-color);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 0;
    margin-top: -16px;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0.5;
    order: 2;
}

.refresh-hint:hover {
    color: var(--text-hover);
    opacity: 0.8;
}

/* Photo frame container - gives the "framed" feeling */
.frame-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    order: 3;
    margin-top: -2px;
}

.photo-frame {
    position: relative;
    max-width: 85%;
    max-height: 65vh;
    padding: 20px;
    background: linear-gradient(145deg, #1a1614 0%, #0f0d0c 100%);
    box-shadow:
        0 0 0 1px var(--frame-border),
        0 25px 80px rgba(0, 0, 0, 0.7),
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(139, 115, 85, 0.05);
    cursor: pointer;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #3a3229;
    pointer-events: none;
}

.photo-frame img {
    display: block;
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Photo info below the frame */
.photo-info {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.5px;
    line-height: 1.8;
    font-family: Arial, Helvetica, sans-serif;
    order: 4;
    margin-top: 25px;
}

.photo-meta {
    margin-bottom: 8px;
}

.series-name a,
.photo-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.series-name a:hover,
.photo-title a:hover {
    color: var(--text-hover);
}

.photo-credit {
    font-size: 11px;
}

.copyright {
    margin-right: 4px;
}

.photographer-name {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.photographer-name:hover {
    color: var(--text-hover);
}

/* Navigation - hidden on homepage since we have archive-link-top */
.nav-links {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery {
        padding: 12vh 20px 20px;
        gap: 20px;
    }

    .archive-link-top {
        font-size: 10px;
    }

    .photo-frame {
        max-width: 95%;
        padding: 15px;
    }

    .photo-frame img {
        max-height: 45vh;
    }

    .photo-info {
        font-size: 10px;
    }
}
