/* nardev.org - minimal white theme */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0 auto;
    padding: 2.5rem 1.25rem 1.5rem;
    max-width: 42rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #1a1a1a;
    background: #fff;
}

a { color: #1558b0; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 0.75rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

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

hr { border: 0; border-top: 1px solid #e5e5e5; margin: 2rem 0; }

blockquote {
    margin: 1rem 0;
    padding: 0 1rem;
    border-left: 3px solid #ddd;
    color: #555;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    background: #f4f4f4;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

pre {
    background: #f7f7f7;
    border: 1px solid #ececec;
    border-radius: 4px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    line-height: 1.5;
}

pre code { background: none; padding: 0; font-size: 0.85rem; }

table { border-collapse: collapse; max-width: 100%; }
th, td { border: 1px solid #e0e0e0; padding: 0.35rem 0.6rem; text-align: left; }

iframe { max-width: 100%; border: 0; }

/* Header */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1.25rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.site-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.site-header nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.site-header nav a { color: #555; font-size: 0.95rem; }
.site-header nav a:hover { color: #1558b0; text-decoration: none; }
.site-header nav a.current { color: #1a1a1a; font-weight: 600; }

/* Footer */
.site-footer {
    margin-top: 3.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    color: #777;
    font-size: 0.85rem;
    display: flex;
    gap: 0.5rem;
}

.site-footer a { color: #777; }

/* Front page */
.intro { color: #555; margin: 0 0 1.5rem; }

h2.year {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999;
    margin: 1.75rem 0 0.5rem;
}

ul.post-list { list-style: none; margin: 0.5rem 0; padding: 0; }

ul.post-list li {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 0.25rem 0;
}

ul.post-list time {
    flex: none;
    width: 5.5rem;
    color: #999;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* Posts */
.post-meta { color: #999; font-size: 0.85rem; margin: 0; }
.post-meta a { color: #999; }

.post header h1 { margin-top: 0.25rem; }

img.thumb { max-width: 20rem; border-radius: 3px; }

.post-tags { margin-top: 2rem; }

.post-tags span {
    display: inline-block;
    background: #f4f4f4;
    color: #666;
    font-size: 0.8rem;
    border-radius: 3px;
    padding: 0.1rem 0.5rem;
    margin: 0 0.35rem 0.35rem 0;
}

/* Gallery */
.gallery { margin-top: 2rem; }

.gallery a { display: inline-block; margin: 0 0.4rem 0.4rem 0; }

.gallery img {
    width: 7.5rem;
    height: 7.5rem;
    object-fit: cover;
    border-radius: 3px;
}

/* Lightbox */
.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lb-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lb-overlay button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #fff;
    font-size: 2.5rem;
    padding: 1rem;
    cursor: pointer;
    opacity: 0.7;
}

.lb-overlay button:hover { opacity: 1; }
.lb-overlay .lb-prev { left: 0; }
.lb-overlay .lb-next { right: 0; }

@media (max-width: 480px) {
    ul.post-list li { flex-direction: column; gap: 0; }
    ul.post-list time { width: auto; }
}
