/* ================================================
   Josip — Ultra-minimalist Bludit Theme
   Inspired by shumer.dev
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg:       #0e0e0e;
    --fg:       #d4d0c8;
    --muted:    #6b6860;
    --accent:   #d4d0c8;
    --link:     #c8c4bc;
    --hr:       #2a2826;
    --max-w:    640px;
    --font-body: 'EB Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    padding: 4rem 1.5rem 6rem;
    overflow-x: hidden;
}

/* ── Layout ── */
.site-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    overflow-x: hidden;
}

/* ── Header ── */
.site-header {
    margin-bottom: 3.5rem;
}

.site-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--fg);
    text-decoration: none;
}

.site-title:hover {
    color: #fff;
}

.site-nav {
    margin-top: 0.6rem;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
}

.site-nav a:hover {
    color: var(--fg);
}

.site-nav span {
    color: var(--hr);
    margin: 0 0.4rem;
}

/* ── Typography ── */
h1 {
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 1rem;
    font-style: normal;
}

h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #e8e4dc;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--fg);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.2rem;
    color: var(--fg);
}

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--hr);
    transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
    color: #fff;
    text-decoration-color: var(--muted);
}

hr {
    border: none;
    border-top: 1px solid var(--hr);
    margin: 2.5rem 0;
}

code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: #aaa89e;
    background: #161614;
    padding: 0.1em 0.35em;
    border-radius: 2px;
}

pre {
    background: #161614;
    padding: 1.2rem;
    overflow-x: auto;
    border-radius: 3px;
    margin-bottom: 1.4rem;
}

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

blockquote {
    border-left: 2px solid var(--hr);
    padding-left: 1.2rem;
    margin: 1.4rem 0;
    color: var(--muted);
    font-style: italic;
}

/* ── Sections (home page) ── */
.home-section {
    margin-bottom: 0;
}

.home-section + .home-section {
    margin-top: 0;
}

/* ── O meni ── */
.section-about h2 {
    margin-top: 0;
}

/* ── Contact ── */
.section-contact .contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    min-width: 5.5rem;
    flex-shrink: 0;
}

.contact-value {
    color: var(--fg);
    font-size: 1rem;
}

.pgp-block {
    margin-top: 1.5rem;
}

.pgp-block .contact-label {
    display: block;
    margin-bottom: 0.5rem;
}

.pgp-key {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    background: #161614;
    padding: 1rem;
    border-radius: 3px;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.55;
    display: block;
    margin-bottom: 0.6rem;
    border: 1px solid #1e1c1a;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.pgp-key.collapsed {
    max-height: 8rem;
    position: relative;
}

.pgp-key.collapsed::after {
    content: '(klikni za proširenje)';
    position: absolute;
    bottom: 0.8rem;
    right: 1rem;
    font-size: 0.65rem;
    color: var(--muted);
    background: #161614;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.pgp-key:not(.collapsed)::after {
    content: '(klikni sužavanje)';
    display: block;
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--muted);
    text-align: right;
}
}

.pgp-fingerprint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    word-spacing: 0.4em;
}

/* ── Blog list ── */
.blog-header {
    margin-bottom: 2.5rem;
}

.blog-header h1 {
    margin-bottom: 0;
}

.post-list {
    list-style: none;
}

.post-item {
    padding: 0;
    margin-bottom: 0;
}

.post-item + .post-item {
    margin-top: 0;
}

.post-item:last-child hr {
    display: none;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.post-title a {
    color: #e8e4dc;
    text-decoration: none;
}

.post-title a:hover {
    color: #fff;
}

.post-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0.4rem;
}

.read-more {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
}

.read-more:hover {
    color: var(--fg);
    text-decoration: none;
}

/* ── Single post ── */
.post-single-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
}

.post-content {
    margin-top: 1.2rem;
}

.post-content p { color: var(--fg); }

.post-tags {
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
}

.post-tags a {
    color: var(--muted);
    margin-right: 0.6rem;
}

.post-tags a:hover {
    color: var(--fg);
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.pagination a {
    color: var(--muted);
    text-decoration: none;
}

.pagination a:hover {
    color: var(--fg);
}

.pagination .current-page {
    color: var(--muted);
}

.pagination .sep {
    color: var(--hr);
}

/* ── 404 / Error ── */
.error-page h1 {
    font-size: 1.2rem;
}

/* ── Back link ── */
.back-link {
    margin-top: 2.5rem;
}

.back-link a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
}

.back-link a:hover {
    color: var(--fg);
}

/* ── No posts ── */
.no-posts {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

/* ── Meta sep & cat ── */
.meta-sep {
    margin: 0 0.4rem;
    color: var(--hr);
}

.meta-cat {
    color: var(--muted);
    text-decoration: none;
}

.meta-cat:hover {
    color: var(--fg);
}

/* ── Footer ── */
.site-footer {
    margin-top: 5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hr);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.03em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    body { padding: 2.5rem 1.2rem 4rem; }
    h1 { font-size: 1.4rem; }
}
