:root {
    --bg-dark: #0F0F0F;
    --text-main: #F5F5F5;
    --text-muted: #888888;
    --leica-red: #ED1C24;
    --border-color: #2A2A2A;
}

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

html, body { overflow-x: hidden; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(1200px 700px at 50% -150px, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.top-strip { height: 4px; background-color: var(--leica-red); width: 100%; }

.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2.5rem 5%; max-width: 1400px; margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Roboto Mono', monospace; font-size: 1.2rem;
    font-weight: 500; text-decoration: none; color: var(--text-main);
    letter-spacing: 2px; text-transform: uppercase;
}

.red-dot {
    width: 14px; height: 14px; background-color: var(--leica-red);
    border-radius: 50%; display: inline-block;
}

.site-nav a {
    font-family: 'Roboto Mono', monospace; text-decoration: none;
    color: var(--text-muted); margin-left: 2.5rem; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 1px; transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--text-main); }

/* Home + listing */
.hero {
    max-width: 1400px;
    margin: 6.5rem auto 4rem;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2rem;
    align-items: end;
}

.hero-title {
    font-size: clamp(2.6rem, 4.3vw, 5.2rem);
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -1px;
    max-width: 16ch;
}

.hero-meta {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 0.75rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background-color: var(--border-color);
    max-width: 1400px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

@media (max-width: 1199px) {
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 799px) {
    .hero { grid-template-columns: 1fr; margin: 4rem auto 3rem; }
    .hero-meta { text-align: left; padding-bottom: 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .site-header { padding: 2rem 5%; }
    .site-nav a { margin-left: 1.25rem; }
}

.photo-entry { background: var(--bg-dark); display: flex; flex-direction: column; }

.img-container {
    width: 100%;
    aspect-ratio: 3/2;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.15) brightness(0.95);
    transition: filter 0.5s ease;
    cursor: pointer;
}

.img-container:hover { filter: grayscale(0%) contrast(1) brightness(1); }

.entry-details {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.entry-title { font-size: 1.05rem; font-weight: 400; margin-bottom: 0.5rem; }
.entry-title a { color: var(--text-main); text-decoration: none; transition: color 0.2s ease; }
.entry-title a:hover { color: var(--leica-red); }
.entry-excerpt { font-size: 0.9rem; color: var(--text-muted); max-width: 34ch; }

.technical-data { font-family: 'Roboto Mono', monospace; font-size: 0.75rem; color: var(--text-muted); text-align: right; min-width: 7.5rem; }
.technical-data span { display: block; }
.technical-data .tech-label { color: var(--leica-red); }
.technical-data .tech-line3 { opacity: 0.85; }

.pagination {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding: 0 5%;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.pagination a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.pagination a:hover { color: var(--text-main); border-color: rgba(255, 255, 255, 0.18); }
.pagination .page-number { display: inline-block; margin: 0 1rem; }

footer {
    text-align: center; padding: 3rem; color: var(--text-muted);
    font-family: 'Roboto Mono', monospace; font-size: 0.8rem;
    border-top: 1px solid var(--border-color); letter-spacing: 1px;
    text-transform: uppercase; margin-top: 6rem;
}

/* Koenig editor required width classes */
.kg-width-wide {
    width: 100%;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

figure.kg-width-wide img,
figure.kg-width-full img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lightbox Styles */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(15, 15, 15, 0.98); backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-content {
    width: 85vw; height: 85vh; background-size: contain;
    background-position: center; background-repeat: no-repeat;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content { transform: scale(1); }
.close-lightbox {
    position: absolute; top: 2rem; right: 3rem; color: var(--text-muted);
    font-family: 'Roboto Mono', monospace; font-size: 1rem;
    text-transform: uppercase; letter-spacing: 2px; cursor: pointer;
    background: none; border: none; transition: color 0.2s ease;
}
.close-lightbox:hover { color: var(--leica-red); }
