:root {
    --bg: #1a1a1a;
    --fg: #e0e0e0;
    --accent: #4a9eff;
    --card-bg: #252525;
    --muted: #888;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }

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

.header-desc { color: var(--muted); margin-bottom: 1.5rem; max-width: 600px; }
.breadcrumb { margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.stats { color: var(--muted); margin-bottom: 2rem; font-size: 0.9rem; }

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

.album-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}
.album-card:hover { transform: translateY(-4px); text-decoration: none; }

.album-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.album-card .info { padding: 1rem; }
.album-card .title { font-weight: 600; margin-bottom: 0.25rem; }
.album-card .desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.album-card .count { font-size: 0.8rem; color: var(--muted); }

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

.photo-card {
    display: block;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}
.photo-card:hover { transform: translateY(-4px); text-decoration: none; }

.photo-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.photo-card .info { padding: 0.75rem; }
.photo-card .title { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.25rem; }
.photo-card .desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.photo-card .meta { font-size: 0.8rem; color: var(--muted); }
.photo-card .tags { font-size: 0.75rem; color: var(--accent); margin-top: 0.5rem; }

.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 95vw; max-height: 85vh; object-fit: contain; }
.lightbox-caption { color: #fff; padding: 1rem; text-align: center; max-width: 800px; }
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; color: white; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 3rem; color: white; cursor: pointer; padding: 1rem; user-select: none; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.license {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}
.license img { vertical-align: middle; margin-right: 0.5rem; }
.license a { color: var(--muted); }
.license a:hover { color: var(--accent); }

/* Individual photo pages */
.photo-page { max-width: 1200px; margin: 0 auto; }

.photo-figure {
    margin: 0 0 2rem 0;
    text-align: center;
}
.photo-figure img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.photo-info { margin-bottom: 2rem; }
.photo-info h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.photo-description {
    color: var(--fg);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.photo-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    font-size: 0.9rem;
}
.photo-meta dt { color: var(--muted); }
.photo-meta dd { margin: 0; }

.photo-nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}
.photo-nav a { color: var(--accent); }
.photo-nav span { visibility: hidden; }
