:root {
    --bg: #0d0a12;
    --bg-elevated: #161222;
    --ink: #f4ecd8;
    --ink-muted: #b7aecb;
    --accent: #c9a24b;
    --accent-soft: rgba(201, 162, 75, 0.35);
    --border: rgba(244, 236, 216, 0.12);
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Header / Navigation */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(13, 10, 18, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    color: var(--ink);
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}

.brand:hover {
    text-decoration: none;
}

.brand__mark {
    color: var(--accent);
    font-weight: 700;
}

.brand__dot {
    color: var(--ink-muted);
    font-size: 0.85em;
}

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
}

.primary-nav__link {
    color: var(--ink-muted);
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}

.primary-nav__link:hover {
    color: var(--ink);
    text-decoration: none;
    border-bottom-color: var(--accent-soft);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    margin: 0 8px;
}

/* Main / layout */

.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.2rem 1.5rem;
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.85rem;
}

.site-footer__sep {
    margin: 0 0.9em;
    color: var(--accent);
    opacity: 0.7;
}

/* Hero */

.hero {
    text-align: center;
    max-width: 720px;
    margin: 1rem auto 3rem;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
}

.hero__subtitle {
    color: var(--ink-muted);
    font-size: 1.05rem;
}

/* Category grid (home) */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    color: var(--ink);
}

.category-card:hover {
    text-decoration: none;
    border-color: var(--accent-soft);
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card__image {
    transform: scale(1.05);
}

.category-card__overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.1rem 1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 70%);
}

.category-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
}

.category-card__description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.category-grid--landscape {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-card--landscape {
    aspect-ratio: 5 / 4;
}

/* Section divider (gold rule + rhombus, echoes the footer separator) */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 3rem;
    color: var(--accent);
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider__mark {
    opacity: 0.75;
    font-size: 1.1rem;
}

/* Latest images / Wallpaper (home) */

.latest-section {
    margin-bottom: 3rem;
}

.latest-section__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.latest-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.latest-row .image-tile {
    flex: 0 0 180px;
}

.latest-row .wallpaper-tile {
    flex: 0 0 280px;
}

/* Wallpaper tiles (5:4, Querformat) */

.wallpaper-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 4;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: zoom-in;
}

.wallpaper-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wallpaper-tile:hover img {
    transform: scale(1.06);
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Gallery page */

.gallery-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.breadcrumb__link {
    display: inline-flex;
    align-items: center;
    color: var(--ink-muted);
}

.breadcrumb__link:hover {
    color: var(--accent);
}

.breadcrumb__icon {
    display: block;
}

.breadcrumb__sep {
    margin: 0 0.6em;
    color: var(--accent);
    opacity: 0.7;
    font-size: 0.8em;
}

.breadcrumb__current {
    color: var(--ink);
}

.gallery-header__title {
    margin: 0 0 0.4rem;
    font-size: 2rem;
}

.gallery-header__description {
    color: var(--ink-muted);
    margin: 0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.image-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: zoom-in;
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.image-tile:hover img {
    transform: scale(1.06);
}

.image-tile__title {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    color: var(--ink);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 70%);
    text-align: left;
}

/* Lightbox */

.lightbox {
    border: none;
    background: transparent;
    padding: 0;
    max-width: none;
    max-height: none;
    width: 100vw;
    height: 100vh;
    margin: 0;
}

.lightbox::backdrop {
    background: rgba(5, 4, 8, 0.92);
}

.lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.lightbox__image {
    max-width: min(90vw, 1100px);
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__caption {
    color: var(--ink-muted);
    font-size: 0.95rem;
    margin: 0;
}

.lightbox__close,
.lightbox__nav {
    position: fixed;
    background: rgba(22, 18, 34, 0.8);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close {
    top: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
    line-height: 1;
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.lightbox__nav--prev {
    left: 1.25rem;
}

.lightbox__nav--next {
    right: 1.25rem;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    border-color: var(--accent-soft);
}

/* About / Error */

.about, .error-page {
    max-width: 640px;
}

/* Responsive nav */

@media (max-width: 720px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 0.75rem;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }

    .primary-nav.is-open {
        display: flex;
    }

    .lightbox__nav {
        width: 40px;
        height: 40px;
    }
}
