:root {
    --black: #111;
    --white: #fff;
    --grey-light: #d0d0d0;
    --grey-medium: #999;
}

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

body {
    font-family: 'Jost', 'Century Gothic', 'Futura', Arial, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.4;
}

.site-header {
    padding: 40px 40px 20px 40px;
    border-bottom: 3px solid var(--black);
}

.site-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
}
.site-title a { text-decoration: none; color: var(--black); }

.year-nav {
    display: flex;
    gap: 24px;
    padding: 16px 40px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    align-items: center;
}

.year-nav a {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--grey-medium);
    text-decoration: none;
    transition: color 0.15s;
}
.year-nav a:hover { color: var(--black); }
.year-nav a.active {
    color: var(--black);
    border-bottom: 3px solid var(--black);
    padding-bottom: 2px;
}

.content {
    padding: 0 40px 60px 40px;
    max-width: 1400px;
}

.year-header {
    font-size: 5rem;
    font-weight: 900;
    color: var(--grey-light);
    margin: 40px 0 10px 0;
    letter-spacing: -2px;
}

.month-header {
    font-size: 2rem;
    font-weight: 700;
    color: var(--grey-light);
    margin: 30px 0 15px 0;
}

/* ── Post rows on main page ── */
.post-row {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.post-info {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    padding-right: 16px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}
.post-title a { color: var(--black); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }

.post-date {
    font-size: 0.85rem;
    color: var(--grey-medium);
    margin-top: 2px;
}
.post-date a { color: var(--grey-medium); text-decoration: none; }
.post-date a:hover { color: var(--black); }

.post-thumbs-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    flex-shrink: 1;
}

.post-thumbs {
    display: flex;
    gap: 0;
    overflow: hidden;
    flex-shrink: 1;
}
.post-thumbs a { display: block; line-height: 0; flex-shrink: 0; }
.post-thumbs img {
    height: 80px;
    width: auto;
    display: block;
    object-fit: cover;
}

.post-more {
    flex-shrink: 0;
    padding-left: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--grey-medium);
    white-space: nowrap;
}

.private-tag {
    display: inline-block;
    background: #ff4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 1px;
}

/* ── Gallery page ── */
.gallery-header { padding: 20px 40px 10px; }

.gallery-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.gallery-date {
    font-size: 1rem;
    color: var(--grey-medium);
    margin-top: 4px;
}

.gallery-categories {
    padding: 0 40px 30px;
}

.gallery-categories a,
.gallery-categories a:visited,
.gallery-categories a:active {
    text-decoration: none;
    border-bottom: none;
    color: inherit;
}
.gallery-categories a:hover span { color: var(--black); }
.gallery-categories span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--grey-medium);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-right: 16px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 20px 40px 20px;
    max-width: 1800px;
}

.gallery-grid a { display: block; line-height: 0; overflow: hidden; }

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.15s;
}
.gallery-grid img:hover { opacity: 0.85; }

.gallery-grid img.pixelated {
    filter: blur(20px);
    -webkit-filter: blur(20px);
}

/* ── Lightbox ── */
.lightbox-overlay {
    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;
    cursor: pointer;
}
.lightbox-overlay.active { display: flex; }

.lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: fixed;
    top: 20px; right: 30px;
    color: white; font-size: 2.5rem;
    cursor: pointer; z-index: 1001;
    font-weight: 300; opacity: 0.7;
    transition: opacity 0.15s; line-height: 1;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    color: white; font-size: 3rem;
    cursor: pointer; z-index: 1001;
    padding: 20px; opacity: 0.5;
    transition: opacity 0.15s;
    user-select: none; font-weight: 300;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-counter {
    position: fixed;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem; z-index: 1001;
}

.lightbox-copy, .lightbox-share-native {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-left: 8px;
    transition: opacity 0.15s;
}
.lightbox-copy:hover, .lightbox-share-native:hover { opacity: 1; }

.back-link {
    display: inline-block;
    padding: 20px 40px 0;
    color: var(--grey-medium);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}
.back-link:hover { color: var(--black); }

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 20px 40px 30px;
    font-size: 0.7rem;
    color: var(--grey-light);
    letter-spacing: 0.5px;
}

/* ── Gallery prev/next nav ── */
.gallery-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 40px 40px;
    max-width: 1800px;
}
.gallery-nav a {
    color: var(--black);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    max-width: 42%;
    line-height: 1.3;
}
.gallery-nav a:hover { text-decoration: underline; }
.gallery-nav .nav-prev { text-align: left; }
.gallery-nav .nav-next { text-align: right; margin-left: auto; }

/* ── Search page ── */
.search-container {
    padding: 30px 40px 60px;
    max-width: 1400px;
}
.search-input {
    width: 100%;
    max-width: 600px;
    padding: 12px 16px;
    font-family: 'Jost', 'Century Gothic', 'Futura', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    border: 3px solid var(--black);
    outline: none;
    margin-bottom: 20px;
    color: var(--black);
}
.search-input:focus { border-color: var(--grey-medium); }
.search-input::placeholder { color: var(--grey-light); font-weight: 400; }
.search-results { list-style: none; }
.search-results li { margin-bottom: 16px; }
.search-results li a {
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}
.search-results li a:hover { text-decoration: underline; }
.search-results .search-meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--grey-medium);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--grey-medium);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 900px) {
    .site-header { padding: 20px; }
    .site-title { font-size: 2rem; }
    .year-nav { padding: 12px 20px; gap: 16px; }
    .content { padding: 0 20px 40px; }
    .year-header { font-size: 3rem; }
    .post-row { flex-direction: column; gap: 8px; }
    .post-info { min-width: auto; width: auto; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 20px 40px; }
    .gallery-header { padding: 10px 20px; }
    .gallery-categories { padding: 0 20px 20px; }
    .back-link { padding: 10px 20px 0; }
    .gallery-nav { padding: 10px 20px 30px; }
    .search-container { padding: 20px 20px 40px; }
    .post-thumbs img { height: 60px; }
}

@media (max-width: 500px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .post-thumbs img { height: 50px; }
}
