/* denis.in — stil za stranicu Denisa Periše
   Tamna tema, bez vanjskih fontova i bez kolačića.
   Jedina skripta: assets/js/lightbox.js (uvećanje slika u galeriji). */

:root {
  --bg: #10131a;
  --panel: #171c26;
  --rub: #2c3543;
  --text: #e7ecf3;
  --muted: #a5b0bf;
  --acc: #ffb648;
  --acc2: #6fd3c7;
  --err: #ff7b72;
  --wrap: 60rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--acc2); text-decoration: none; }
a:hover, a:focus { color: var(--acc); text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* zaglavlje */
.masthead {
  border-bottom: 1px solid var(--rub);
  background: linear-gradient(180deg, #141922 0%, var(--bg) 100%);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.1rem; }
.masthead .wrap { padding-top: 1.2rem; padding-bottom: 1rem; }
.imidom {
  font: 700 1.05rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  color: var(--acc);
}
.imidom span { color: var(--muted); font-weight: 400; }
nav.main { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
nav.main a { color: var(--text); font-size: .95rem; }
nav.main a.now { color: var(--acc); }

/* hero */
.hero { padding: 2.6rem 0 1.6rem; }
.hero h1 { margin: 0 0 .35rem; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; }
.hero .lead { color: var(--acc2); font-size: 1.06rem; margin: 0 0 .8rem; }
.hero .meta { color: var(--muted); font-size: .95rem; }
.hero .meta b { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.tags li {
  border: 1px solid var(--rub); background: var(--panel);
  border-radius: 999px; padding: .28rem .75rem; font-size: .85rem; color: var(--muted);
}

/* odjeljci */
section { padding: 2.2rem 0; border-top: 1px solid var(--rub); }
section h2 { margin: 0 0 1.1rem; font-size: 1.5rem; }
section h2 .num { color: var(--rub); font-family: ui-monospace, monospace; margin-right: .5rem; }
section p { margin: 0 0 1rem; }

/* kartice */
.cards { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--rub); border-radius: .6rem; padding: 1rem 1.1rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.02rem; color: var(--acc); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card a { font-size: .88rem; }

/* kronologija */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--rub); }
.timeline .year { font-family: ui-monospace, monospace; color: var(--acc); font-size: .95rem; }
.timeline h3 { margin: 0 0 .25rem; font-size: 1.02rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .94rem; }

/* galerija */
.wall { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
figure { margin: 0; background: var(--panel); border: 1px solid var(--rub); border-radius: .6rem; overflow: hidden; }
figure img { display: block; width: 100%; height: 11rem; object-fit: cover; background: #0b0e13; }
figcaption { padding: .6rem .75rem .75rem; font-size: .84rem; color: var(--muted); }
figcaption b { display: block; color: var(--text); font-size: .9rem; margin-bottom: .2rem; }
figcaption .byline { display: block; margin-top: .45rem; color: var(--acc2); font-size: .8rem; }
figcaption .license { display: block; color: var(--muted); font-size: .76rem; }

/* članci */
.years { display: grid; gap: 1.4rem; }
.yh { font-family: ui-monospace, monospace; color: var(--acc); font-size: 1.05rem; margin: 0 0 .5rem; }
ul.posts { list-style: none; margin: 0; padding: 0; }
ul.posts li { padding: .55rem 0; border-bottom: 1px solid var(--rub); }
ul.posts .t { display: block; }
ul.posts .src { color: var(--muted); font-size: .85rem; }
ul.posts .d { font-family: ui-monospace, monospace; color: var(--muted); font-size: .82rem; margin-right: .5rem; }
.kind { display: inline-block; border: 1px solid var(--rub); border-radius: .3rem; padding: 0 .35rem; font-size: .74rem; color: var(--muted); }
.fresh { border-left: 3px solid var(--acc); padding-left: .8rem; }

/* kontakt */
.form { background: var(--panel); border: 1px solid var(--rub); border-radius: .6rem; padding: 1.2rem; max-width: 38rem; }
.form p { margin: 0 0 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%; background: #0e1218; color: var(--text);
  border: 1px solid var(--rub); border-radius: .4rem; padding: .6rem .7rem; font: inherit;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--acc2); border-color: var(--acc2); }
.field textarea { min-height: 8rem; resize: vertical; }
.errors { border: 1px solid var(--err); border-radius: .4rem; padding: .7rem .9rem; margin-bottom: 1rem; color: var(--err); }
.errors ul { margin: .3rem 0 0 1.1rem; }
.ok { border: 1px solid var(--acc2); border-radius: .4rem; padding: .8rem .9rem; margin-bottom: 1rem; color: var(--acc2); }
.btn { background: var(--acc); color: #17120a; border: 0; border-radius: .4rem; padding: .7rem 1.2rem; font-weight: 600; font-size: .95rem; cursor: pointer; }
.btn:hover { background: #ffc76b; }
.btn-link { display:inline-block; padding:.65rem 1.15rem; border:1px solid var(--acc); border-radius:.4rem; color:var(--acc); }
.btn-link:hover { color:#17120a; background:var(--acc); text-decoration:none; }
.razmak { margin-top: 1rem; }
.razmak-mali { margin-top: .6rem; }
.req { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-polje { margin: 1.1rem 0 .4rem; min-height: 68px; }
.turnstile-polje :is(div, iframe) { max-width: 100%; }

/* podnožje */
footer { border-top: 1px solid var(--rub); padding: 1.6rem 0 2.6rem; color: var(--muted); font-size: .86rem; }
footer a { color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

@media (max-width: 34rem) {
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9; --panel: #ffffff; --rub: #d5dae1;
    --text: #17202b; --muted: #57626f; --acc: #b06400; --acc2: #17675c;
  }
  .btn { color: #fff; }
}
/* galerija: poveznicu na uvećanu sliku prati znak uvećanja */
.wall figure > a { display: block; position: relative; }
.wall figure > a img { cursor: zoom-in; }
.wall figure > a::after {
  content: "\2922"; /* ⤢ */
  position: absolute; right: .45rem; top: .45rem;
  width: 1.55rem; height: 1.55rem; line-height: 1.5rem; text-align: center;
  border-radius: .4rem; background: rgba(11,14,19,.72); color: var(--acc);
  font: 700 .95rem/1.5rem ui-monospace, monospace;
  opacity: 0; transition: opacity .15s ease;
}
.wall figure > a:hover::after, .wall figure > a:focus::after { opacity: 1; }

/* ---------------------- lightbox (assets/js/lightbox.js) -------------- */
html.lb-otvoreno { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5,7,11,.94);
  display: flex; align-items: center; justify-content: center;
  padding: 3.2rem 1rem 1rem;
}
.lightbox[hidden] { display: none; }
.lb-okvir {
  display: flex; flex-direction: column; align-items: center;
  gap: .6rem; max-width: 100%; max-height: 100%; position: relative;
}
.lb-figura { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.lb-figura img {
  display: block; background: #0b0e13;
  max-width: min(94vw, 1400px); max-height: 70vh; width: auto; height: auto;
  border: 1px solid var(--rub); border-radius: .5rem;
  cursor: zoom-in; transition: transform .18s ease;
}
.lb-figura img.lb-uvecano { cursor: grab; }
.lb-potpis {
  max-width: 62rem; text-align: center; color: var(--muted); font-size: .88rem;
}
.lb-potpis b { display: block; color: var(--text); font-size: .98rem; }
.lb-potpis .lb-god {
  display: inline-block; margin-bottom: .3rem; padding: .1rem .45rem;
  border: 1px solid var(--rub); border-radius: .35rem;
  font: .76rem/1.4 ui-monospace, monospace; color: var(--acc);
}
.lb-potpis .lb-aut { display: block; margin-top: .35rem; color: var(--acc2); font-size: .84rem; }
.lb-potpis .lb-lic { display: block; color: var(--muted); font-size: .78rem; }
.lb-bar {
  display: flex; gap: 1rem; align-items: center; justify-content: center;
  font: .78rem/1 ui-monospace, monospace; color: var(--muted);
}
.lb-zatvori, .lb-pres {
  position: fixed; z-index: 95;
  background: rgba(23,28,38,.85); color: var(--text);
  border: 1px solid var(--rub); border-radius: .5rem;
  font: 700 1.35rem/1 ui-monospace, monospace; cursor: pointer;
  padding: .45rem .7rem;
}
.lb-zatvori:hover, .lb-pres:hover { color: var(--acc); border-color: var(--acc); }
.lb-zatvori { top: .9rem; right: 1rem; }
.lb-pres.prethodna { left: .8rem; top: 50%; transform: translateY(-50%); }
.lb-pres.sljedeca { right: .8rem; top: 50%; transform: translateY(-50%); }
.lb-zatvori:focus-visible, .lb-pres:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 2px;
}
@media (max-width: 640px) {
  .lightbox { padding-top: 3.6rem; }
  .lb-figura img { max-height: 62vh; }
  .lb-pres.prethodna { left: .3rem; }
  .lb-pres.sljedeca { right: .3rem; }
  .lb-napomena { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-figura img { transition: none; }
}

/* arhiva: grupa po godini s naslovom i brojem stavki */
.arhiva-grupa { margin-bottom: 1.8rem; }
.arhiva-grupa h3 { margin-bottom: .7rem; }
.arhiva-grupa h3 .br { color: var(--muted); font-size: .8rem; font-weight: 400; }
.sazetak {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  font: .8rem/1.6 ui-monospace, monospace; color: var(--muted);
  border: 1px solid var(--rub); border-radius: .6rem; padding: .6rem .8rem;
  background: var(--panel); margin-bottom: 1.4rem;
}
.sazetak b { color: var(--acc); }
.sazetak a { margin-left: .4rem; }

