/* ============================================================
   Martin Tim Photography - main stylesheet
   Minimalistische photography portfolio
   ============================================================ */

:root {
    --color-text: #222;
    --color-text-muted: #888;
    --color-bg: #fff;
    --color-border: #eee;
    --color-accent: #000;
    --max-width: 1400px;
    --gap: 6px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
a:hover { opacity: 0.6; }

/* ---------- HEADER ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 30px 24px 20px;
    border-bottom: 1px solid var(--color-border);
}

.site-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.site-title .name {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.site-title .tagline {
    font-size: 11px;
    color: var(--color-text-muted);
    letter-spacing: 3px;
    text-transform: lowercase;
    margin-top: 2px;
}

.site-nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.site-nav a.active,
.site-nav a:hover {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
    opacity: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 4px 0;
    transition: all 0.2s;
}

@media (max-width: 700px) {
    .menu-toggle { display: block; }
    .site-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .site-nav.open { max-height: 400px; }
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 16px 0 8px;
    }
    .site-nav li { border-bottom: 1px solid var(--color-border); }
    .site-nav a { display: block; padding: 12px 0; }
}

/* ---------- MAIN / GRID ---------- */

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 24px 40px;
}

/* Pages met een hero: site-main wordt zelf full-width zodat de hero schoon vol-breedte is */
.site-main.has-hero {
    max-width: none;
    padding: 0;
}

/* Grid op hero-pages: krijgt z'n eigen max-width + ruimte boven (afstand tot hero) */
.site-main.has-hero .grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px 40px;
}

/* Info-pagina toont alleen de hero, geen footer-marge nodig */
.site-main.info-page-main {
    padding-bottom: 0;
}

/* ---------- HERO ---------- */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 480px;
    max-height: 900px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #111;
}

/* Card middenin de homepage-hero ("MARTIN TIM | PHOTOGRAPHY") */
.hero .hero-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    border: 1px solid #fff;
    padding: 14px 34px;
    letter-spacing: 3px;
    font-size: 14px;
    text-transform: uppercase;
    background: transparent;
    white-space: nowrap;
    pointer-events: none;
}

/* Info-hero: hero vult de pagina, info-block links onderin */
.hero-info {
    height: calc(100vh - 90px); /* houd rekening met header */
}

.hero-info .info-overlay {
    position: absolute;
    bottom: 10%;
    left: 6%;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    max-width: 80%;
}
.hero-info .info-overlay h1 {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0 0 10px;
    text-transform: uppercase;
}
.hero-info .info-overlay p {
    font-size: 12px;
    letter-spacing: 2px;
    margin: 6px 0;
}
.hero-info .info-overlay a { color: #fff; }
.hero-info .info-overlay .info-back { margin-top: 28px; }
.hero-info .info-overlay .info-back a {
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    text-shadow: none;
}
.hero-info .info-overlay .info-back a:hover {
    background: #fff;
    color: #000;
    opacity: 1;
}

@media (max-width: 700px) {
    .hero { height: 70vh; min-height: 380px; }
    .hero .hero-card { padding: 11px 22px; font-size: 12px; letter-spacing: 2px; }
    .hero-info { height: calc(80vh - 60px); }
    .hero-info .info-overlay { bottom: 8%; left: 8%; right: 8%; }
}

/* CSS columns voor masonry-achtige layout
   Eenvoudig, robuust, geen JS nodig */
.grid {
    column-count: 4;
    column-gap: var(--gap);
}
@media (max-width: 1100px) { .grid { column-count: 3; } }
@media (max-width: 750px)  { .grid { column-count: 2; } }
@media (max-width: 480px)  { .grid { column-count: 1; } }

.grid-item {
    display: block;
    width: 100%;
    margin: 0 0 var(--gap);
    break-inside: avoid;
    overflow: hidden;
    background: #f5f5f5;
    cursor: zoom-in;
}
.grid-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.2s, transform 0.4s ease;
}
.grid-item:hover img {
    opacity: 0.92;
    transform: scale(1.01);
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

/* ---------- LIGHTBOX ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
}
.lightbox.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.lb-figure {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lb-img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lb-caption {
    color: #eee;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    min-height: 14px;
}

.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: none;
    border: 0;
    color: white;
    cursor: pointer;
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 10px; right: 10px; font-size: 32px; }
.lb-prev  { left: 10px;  top: 50%; transform: translateY(-50%); font-size: 48px; }
.lb-next  { right: 10px; top: 50%; transform: translateY(-50%); font-size: 48px; }

@media (max-width: 600px) {
    .lightbox { padding: 10px; }
    .lb-prev, .lb-next { font-size: 36px; width: 40px; height: 40px; }
}

/* ---------- INFO PAGE ---------- */

.info-page {
    text-align: center;
    padding: 60px 20px 80px;
    max-width: 600px;
    margin: 0 auto;
}
.info-page h1 {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 3px;
    margin-bottom: 30px;
}
.info-page p {
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin: 12px 0;
}
.info-page .info-email a { color: var(--color-text); }
.info-page .info-back { margin-top: 50px; }
.info-page .info-back a {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

/* ---------- FOOTER ---------- */

.site-footer {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding: 20px 24px 30px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.footer-info {
    font-size: 10px;
    color: var(--color-text-muted);
    letter-spacing: 1.5px;
    margin: 0 0 12px;
}
.footer-info a { color: var(--color-text-muted); }
.footer-social {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}
.footer-social a {
    font-size: 10px;
    color: var(--color-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

@media (max-width: 500px) {
    .footer-info { font-size: 9px; }
}
