/* Photfolio - Minimal Photography Portfolio */

/* CSS Variables - Override via inline styles from config */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #888888;
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --header-spacing: 3rem;
    --grid-gap: 0.5rem;
    --border-radius: 2px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.site-header {
    text-align: center;
    padding: var(--header-spacing) 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 80%;
}

.site-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.site-description {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.site-author {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.breadcrumb a {
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-color);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
}

.breadcrumb .current {
    color: var(--text-color);
}

/* Main Content */
main {
    flex: 1;
    padding: 0 1rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 80%;
}

/* Album Header */
.album-header {
    text-align: center;
    margin-bottom: 2rem;
}

.album-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.photo-count {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Albums Grid (for multi-album index) */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.album-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: transform 0.2s;
}

.album-card:hover {
    transform: translateY(-4px);
}

.album-link {
    display: block;
}

.album-cover {
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #111;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.album-card:hover .album-cover img {
    transform: scale(1.05);
}

.album-info {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.8);
}

.album-info h2 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.album-count {
    color: var(--accent-color);
    font-size: 0.85rem;
}

/* Photo Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--grid-gap);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: #111;
}

.photo-link {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.2s;
}

.photo-link:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Lightbox Modal (Pure CSS) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox:target {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    color: var(--text-color);
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1001;
    padding: 0.5rem;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 1001;
}

.lightbox-nav a {
    pointer-events: auto;
    background-color: rgba(255, 255, 255, 0.1);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 1.5rem;
    font-weight: 300;
    user-select: none;
}

.lightbox-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav a:active {
    transform: scale(0.95);
}

.nav-prev {
    margin-right: auto;
}

.nav-next {
    margin-left: auto;
}

/* Photo Metadata (if enabled) */
.photo-metadata {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--accent-color);
}

/* Album Navigation */
.album-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent-color);
}

.album-nav h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.album-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.album-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.album-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Footer */
.site-footer {
    padding: 2rem;
    color: var(--accent-color);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    width: 80%;
}

.footer-text {
    text-align: center;
    flex: 1;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.footer-links a {
    color: var(--accent-color);
    transition: color 0.2s, transform 0.2s;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

.footer-links a svg {
    width: 20px;
    height: 20px;
}

.built-with {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.built-with-text {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.github-link {
    color: var(--accent-color);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}

.github-link:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

.github-link svg {
    width: 24px;
    height: 24px;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    :root {
        --header-spacing: 2rem;
        --grid-gap: 0.25rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .lightbox {
        padding: 1rem;
    }

    .lightbox-close {
        font-size: 2rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-nav {
        padding: 0 0.5rem;
    }

    .lightbox-nav a {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-text {
        order: 1;
    }

    .built-with {
        order: 2;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--accent-color);
}

.breadcrumb .current {
    color: var(--text-color);
    font-weight: 500;
}

/* Sub-albums Section */
.sub-albums {
    margin-bottom: 3rem;
}

.sub-albums h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Print Styles */
@media print {
    .lightbox,
    .lightbox-nav,
    .album-nav,
    .site-footer,
    .breadcrumb {
        display: none !important;
    }
}
