/* FKN Nastavnici — javni stil (v1.2, teme).
 * Boje, fontovi i veličina teksta dolaze iz teme osobe (inline :root varijable, app/themes.php).
 * Zaglavlje s logom i podnožje koriste fiksne boje fakulteta (--brand-*) i ne mijenjaju se s temom.
 */
:root {
  /* fiksni identitet fakulteta */
  --brand: #0d2748;
  --brand-2: #002e5d;
  --brand-gold: #c8a04b;
  /* zadane vrijednosti teme (Akademska / FKKSS plava); tema ih prepisuje */
  --bg: #ffffff; --surface: #f4f6f9; --field: #ffffff; --ink: #1b2430; --muted: #5a6573; --line: #dfe4ea;
  --primary: #002e5d; --primary-2: #00244a; --on-primary: #ffffff; --on-primary-soft: rgba(255,255,255,.82);
  --accent: #c8a04b; --on-accent: #111827; --heading: #002e5d; --link: #002e5d; --accent-ink: #7a5b1c;
  --tint: #e6eaef; --tint-ink: #002e5d; --focus: #c8a04b; --accent-on-primary: #c8a04b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --base-size: 17px;
  --cover-pos: center;
  --radius: 10px;
  --wrap: 1120px;
  /* boje teksta u zaglavlju profila (hero); teme sa svijetlim zaglavljem ih prepisuju */
  --h-ink: var(--on-primary);
  --h-soft: var(--on-primary-soft);
  --h-chip-bg: color-mix(in srgb, var(--on-primary) 12%, transparent);
  --h-chip-line: color-mix(in srgb, var(--on-primary) 35%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: var(--base-size); line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); color: var(--heading); line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.45rem; margin: 0 0 .8rem; }
h3 { font-size: 1.15rem; margin: 0 0 .6rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand-gold); color: var(--brand); padding: .5rem 1rem; z-index: 99; font-weight: 600; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .92rem; font-style: italic; }

/* ---------- zaglavlje fakulteta (fiksno) ---------- */
.topbar { background: var(--brand); color: #fff; border-bottom: 3px solid var(--brand-gold); font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 17px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; min-width: 0; }
.brand-logo { flex: none; width: 50px; height: 50px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-uni { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.brand-fac { font: 600 .95rem/1.25 Georgia, "Times New Roman", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: flex; gap: .25rem; flex: none; }
.lang a { color: #fff; text-decoration: none; font-weight: 600; font-size: .85rem; padding: .35rem .6rem; border-radius: 6px; border: 1px solid transparent; }
.lang a[aria-current] { border-color: var(--brand-gold); color: var(--brand-gold); }
.lang a:hover { background: rgba(255,255,255,.1); color: #fff; }

.demo-bar { background: #fbf6ea; color: #6b5217; border-bottom: 1px solid #e8d9b2; font-size: .9rem; font-weight: 600; padding: .55rem 0; text-align: center; }
.preview-bar { background: #111827; color: #fff; font-size: .85rem; padding: .4rem 0; text-align: center; }

/* ---------- cover ---------- */
.hero { position: relative; overflow: hidden; background: var(--primary); color: var(--h-ink); }
.cover { position: absolute; inset: 0; background: var(--primary); }
.cover-img, .cover-svg { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center var(--cover-pos); }
.cv-bg { fill: var(--primary); }
.cv-glow { fill: transparent; }
.cover-gradijent .cover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 38%, transparent) 0, transparent 45%),
              linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
}
.cover-gradijent .cv-bg { fill: transparent; }
.cv-line { fill: none; stroke: var(--on-primary); stroke-opacity: .16; stroke-width: 2; }
.cv-dot { fill: var(--on-primary); fill-opacity: .2; }
.cv-fill1 { fill: var(--primary-2); }
.cv-fill2 { fill: var(--accent); fill-opacity: .32; }
.cv-fill3 { fill: var(--on-primary); fill-opacity: .07; }
.cv-ring { fill: none; stroke: var(--accent); stroke-opacity: .38; stroke-width: 2; }
/* vlastita slika: tekst preko slike je uvijek bijel, uz tamni sloj radi čitljivosti */
.cover-image .hero { --on-primary: #ffffff; --on-primary-soft: rgba(255,255,255,.88); }
.cover-image .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.38) 60%, rgba(0,0,0,.25) 100%); }

/* ---------- zaglavlje profila (hero) ---------- */
.hero-in { position: relative; z-index: 1; display: flex; gap: 1.75rem; align-items: center; padding-top: 2.25rem; padding-bottom: 2.25rem; }
.avatar { flex: none; width: 140px; height: 175px; border-radius: var(--radius); overflow: hidden; border: 3px solid color-mix(in srgb, var(--h-ink) 85%, transparent); background: color-mix(in srgb, var(--h-ink) 12%, transparent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.avatar-ph { display: grid; place-items: center; height: 100%; font: 700 2.6rem var(--serif); color: var(--accent-on-primary); background: var(--primary); }
.hero-name { margin: 0 0 .25rem; font-size: clamp(1.6rem, 3.5vw, 2.3rem); color: var(--h-ink); }
.hero-name a { color: inherit; text-decoration: none; }
.hero-rank { margin: 0; font-size: 1.08rem; color: var(--h-ink); }
.hero-sub { margin: .15rem 0 0; color: var(--h-soft); font-size: .95rem; }
.hero-func { margin: .45rem 0 0; display: inline-block; padding: .15rem .65rem; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .85rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.ids { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.id { display: inline-block; padding: .3rem .65rem; border-radius: 6px; background: var(--h-chip-bg); border: 1px solid var(--h-chip-line); color: var(--h-ink); text-decoration: none; font-size: .82rem; font-weight: 600; }
.id:hover { background: var(--h-ink); color: var(--primary); }
.id-orcid::before { content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: #a6ce39; margin-right: .4em; vertical-align: .05em; }

.btn { display: inline-block; padding: .55rem 1.1rem; border-radius: 8px; background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600; font-size: .92rem; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--primary-2); color: var(--on-primary); }
.btn-gold { background: var(--accent); color: var(--on-accent); }
.btn-gold:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--link); border: 1px solid var(--line); }

/* ---------- meni profila ---------- */
.pnav { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.pnav a { display: block; padding: .9rem .85rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; border-bottom: 3px solid transparent; }
.pnav a:hover { color: var(--link); }
.pnav a[aria-current="page"] { color: var(--heading); border-bottom-color: var(--accent); }
.pnav-toggle { display: none; }

/* ---------- sadržaj ---------- */
.main { padding-top: 2rem; padding-bottom: 3rem; min-height: 40vh; }
.section { margin-bottom: 2.25rem; }
.grid-home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.card-h { font-size: 1.05rem; margin: 0 0 .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent); display: inline-block; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
.page-title { margin: 0; font-size: 1.75rem; }
.prose { max-width: 72ch; }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
.callout { background: var(--tint); color: var(--ink); border-left: 4px solid var(--accent); padding: .75rem 1rem; border-radius: 0 8px 8px 0; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .35rem .8rem; border-radius: 99px; background: var(--tint); color: var(--tint-ink); font-size: .9rem; font-weight: 500; }

.plain { list-style: none; padding: 0; margin: 0 0 .75rem; }
.plain li { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.news { list-style: none; padding: 0; margin: 0 0 .75rem; }
.news li { padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .93rem; line-height: 1.45; }
.news time, .news .muted { display: block; font-size: .8rem; color: var(--muted); }

.contact { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; font-size: .95rem; }
.contact dt { font-weight: 600; color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- publikacije ---------- */
.pubs { list-style: none; padding: 0; margin: 0 0 1rem; }
.pub { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.pub-cite { line-height: 1.55; }
.pub-meta { color: var(--muted); font-size: .88rem; }
.pub-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.tag { font-size: .76rem; padding: .12rem .5rem; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tag-idx { color: var(--accent-ink); }
.pill { font: 600 .76rem/1.4 var(--sans); padding: .14rem .55rem; border-radius: 4px; border: 1px solid var(--link); color: var(--link); background: var(--field); text-decoration: none; cursor: pointer; }
.pill:hover { background: var(--link); color: var(--bg); }
.pub-abs summary { cursor: pointer; font-size: .85rem; color: var(--link); margin-top: .35rem; }
.counts { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.counts li { color: var(--muted); font-size: .92rem; }
.counts span { font: 700 1.25rem var(--serif); color: var(--heading); }
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1.5rem; }
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.filters select, .f-search input { font: inherit; font-size: .95rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--ink); min-width: 140px; }
.f-search { flex: 1 1 220px; }
.f-search input { width: 100%; }
.year-h { font-size: 1.3rem; color: var(--heading); border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: .1rem; margin-top: .5rem; }

.dlg { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; width: min(640px, 92vw); background: var(--bg); color: var(--ink); }
.dlg::backdrop { background: rgba(13,39,72,.45); }
.dlg textarea { width: 100%; font: .88rem/1.45 ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 6px; padding: .6rem; background: var(--field); color: var(--ink); }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .75rem; }

/* ---------- CV ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.tl-date { color: var(--accent-ink); font-weight: 600; font-size: .92rem; }
.tl-inst { display: block; color: var(--muted); font-size: .93rem; }
.tl-body p { margin: .3rem 0 0; font-size: .95rem; }

/* ---------- tabele ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--surface); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl tbody th { font-weight: 600; color: var(--heading); }
.tbl .links { white-space: nowrap; }

/* ---------- projekti / mediji ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.proj h3 { margin-bottom: .75rem; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; font-size: .92rem; margin: 0 0 .75rem; }
.meta dt { color: var(--muted); font-weight: 600; }
.meta dd { margin: 0; }
.media-list { list-style: none; padding: 0; margin: 0; }
.media-item { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.media-thumb { flex: none; width: 160px; border-radius: 6px; overflow: hidden; }
.media-meta { margin: 0 0 .2rem; color: var(--muted); font-size: .85rem; }
.media-title { margin: 0; font-weight: 600; }

/* ---------- lista nastavnika ---------- */
.dir-head { align-items: end; }
.dir-search { flex: 0 1 300px; }
.staff { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.staff a { display: flex; gap: 1rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--bg); height: 100%; transition: border-color .15s, box-shadow .15s; }
.staff a:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(13,39,72,.08); }
.staff-av { flex: none; width: 64px; height: 80px; border-radius: 6px; overflow: hidden; background: var(--primary); display: grid; place-items: center; color: var(--accent-on-primary); font: 700 1.3rem var(--serif); }
.staff-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.staff-txt { display: flex; flex-direction: column; font-size: .92rem; line-height: 1.35; }
.staff-txt strong { font-family: var(--serif); color: var(--heading); font-size: 1.02rem; margin-bottom: .15rem; }
.notfound { text-align: center; padding: 3rem 0; }
.notfound h1 { font-size: 4rem; margin: 0; }

/* ---------- podnožje fakulteta (fiksno) ---------- */
.footer { background: var(--brand); color: #c9d5e5; font: .9rem/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; padding: 2rem 0; margin-top: 2rem; }
.footer strong { color: #fff; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; }
.footer-links { display: flex; flex-direction: column; gap: .3rem; }
.footer a { color: #fff; }
.footer-upd { align-self: end; font-size: .82rem; opacity: .8; }

/* =====================================================================
   TEME — raspored zaglavlja profila i karakter stranice
   ===================================================================== */

/* Teme sa svijetlim zaglavljem profila: tekst u boji teme, cover kao traka. */
.t-naslovna .hero, .t-minimalisticka .hero, .t-klasicna .hero, .t-kartice .hero, .t-bocni .hero {
  background: transparent;
  --h-ink: var(--heading);
  --h-soft: var(--muted);
  --h-chip-bg: var(--surface);
  --h-chip-line: var(--line);
}
.t-naslovna .id:hover, .t-minimalisticka .id:hover, .t-klasicna .id:hover, .t-kartice .id:hover, .t-bocni .id:hover { background: var(--link); color: var(--bg); }
.t-naslovna .hero-rank, .t-minimalisticka .hero-rank, .t-klasicna .hero-rank, .t-kartice .hero-rank, .t-bocni .hero-rank { color: var(--ink); }
.t-naslovna .avatar, .t-minimalisticka .avatar, .t-klasicna .avatar, .t-kartice .avatar, .t-bocni .avatar { border-color: var(--bg); background: var(--surface); }

/* 2. Naslovna slika: velika traka, okrugla fotografija i centriran tekst ispod */
.t-naslovna .cover { position: relative; height: clamp(190px, 26vw, 340px); }
.t-naslovna .hero-in { flex-direction: column; text-align: center; gap: .9rem; padding-top: 0; margin-top: -88px; }
.t-naslovna .avatar { width: 176px; height: 176px; border-radius: 50%; border-width: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.t-naslovna .hero-name { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.t-naslovna .hero-actions { justify-content: center; }
.t-naslovna .pnav ul { justify-content: center; }

/* 3. Minimalistička: tanka traka, puno bjeline, bez boja u zaglavlju */
.t-minimalisticka .cover { position: relative; height: 120px; }
.t-minimalisticka .hero-in { align-items: flex-end; padding-top: 0; padding-bottom: 1.75rem; }
.t-minimalisticka .avatar { width: 128px; height: 128px; border-radius: 50%; border-width: 5px; margin-top: -64px; }
.t-minimalisticka .hero-name { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -.02em; }
.t-minimalisticka .id { background: transparent; border-color: transparent; padding-left: 0; padding-right: .5rem; text-decoration: underline; text-underline-offset: 3px; color: var(--link); }
.t-minimalisticka .pnav { border-top: 1px solid var(--line); }
.t-minimalisticka .pnav a[aria-current="page"] { border-bottom-color: var(--ink); }
.t-minimalisticka .card { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding: 1rem 0 0; }
.t-minimalisticka .card-h { border: 0; padding: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.t-minimalisticka h1, .t-minimalisticka h2, .t-minimalisticka h3 { letter-spacing: -.01em; }

/* 4. Moderna: tekst na boji lijevo, cover desno */
.t-moderna .hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.t-moderna .cover { position: relative; grid-column: 2; grid-row: 1; min-height: 300px; clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
.t-moderna .hero-in { grid-column: 1; grid-row: 1; max-width: none; margin: 0; padding: 2.5rem 1.5rem 2.5rem max(16px, calc((100vw - var(--wrap)) / 2 + 16px)); flex-direction: column; align-items: flex-start; gap: 1rem; }
.t-moderna .avatar { width: 104px; height: 104px; border-radius: 50%; }
.t-moderna .hero-name { font-size: clamp(1.9rem, 4vw, 2.7rem); }

/* 5. Tamna: visoko zaglavlje preko covera */
.t-tamna .hero-in { padding-top: 3.25rem; padding-bottom: 3.25rem; }
.t-tamna .avatar { width: 150px; height: 150px; border-radius: 50%; }
.t-tamna .pnav { background: var(--surface); }
.t-tamna .staff a, .t-tamna .card { background: var(--surface); }
.t-tamna .id-orcid::before { background: #a6ce39; }

/* 6. Klasična: knjiški izgled, centrirano, traka sa zaobljenim uglovima */
.t-klasicna { --wrap: 960px; }
.t-klasicna .cover { position: relative; height: 210px; max-width: calc(var(--wrap) - 32px); margin: 1.5rem auto 0; border-radius: 14px; overflow: hidden; }
.t-klasicna .hero-in { flex-direction: column; text-align: center; margin-top: -80px; padding-top: 0; gap: .75rem; }
.t-klasicna .avatar { width: 160px; height: 160px; border-radius: 50%; border-width: 6px; }
.t-klasicna .hero-name { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 600; }
.t-klasicna .hero-rank { font-style: italic; }
.t-klasicna .hero-actions { justify-content: center; }
.t-klasicna .pnav { background: transparent; border-top: 1px solid var(--line); }
.t-klasicna .pnav ul { justify-content: center; }
.t-klasicna h2, .t-klasicna .page-title { font-weight: 600; }
.t-klasicna .card { background: transparent; }
.t-klasicna .prose { font-size: 1.05em; }

/* 7. Kartice: sve u bijelim karticama na mekoj pozadini */
.t-kartice .cover { position: relative; height: 230px; }
.t-kartice .hero-in { background: var(--surface); border-radius: 16px; box-shadow: 0 10px 30px rgba(16,24,40,.10); margin-top: -96px; padding: 1.75rem; max-width: calc(var(--wrap) - 32px); }
.t-kartice .avatar { width: 136px; height: 136px; border-radius: 14px; }
.t-kartice .pnav { background: transparent; border: 0; position: static; }
.t-kartice .pnav ul { background: var(--surface); border-radius: 12px; padding: 0 .5rem; margin-top: 1rem; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.t-kartice .main .section, .t-kartice .main > .page-head, .t-kartice .card, .t-kartice .filters { background: var(--surface); border: 0; border-radius: 14px; padding: 1.5rem; box-shadow: 0 2px 10px rgba(16,24,40,.06); }
.t-kartice .grid-home .col-side .card { margin-bottom: 1.25rem; }

/* 8. Bočni profil: zaglavlje postaje bočna kolona koja prati skrol */
.t-bocni .pshell { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "side nav" "side main"; grid-template-rows: auto 1fr; gap: 0 2rem; max-width: var(--wrap); margin: 1.5rem auto 0; padding: 0 16px; align-items: start; }
.t-bocni .hero { grid-area: side; position: sticky; top: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.t-bocni .cover { position: relative; height: 112px; }
.t-bocni .hero-in { flex-direction: column; text-align: center; padding: 0 1.25rem 1.5rem; margin-top: -62px; gap: .75rem; }
.t-bocni .avatar { width: 124px; height: 124px; border-radius: 50%; border-width: 5px; }
.t-bocni .hero-name { font-size: 1.45rem; }
.t-bocni .hero-actions { justify-content: center; }
.t-bocni .pnav { grid-area: nav; background: transparent; position: static; }
.t-bocni .main { grid-area: main; max-width: none; padding-left: 0; padding-right: 0; }
.t-bocni .grid-home { grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; }

/* 9. Visoki kontrast: crno-bijelo, podvučeni linkovi, jak fokus */
.t-kontrast .main a, .t-kontrast .pnav a, .t-kontrast .hero-txt a:not(.hero-name a) { text-decoration: underline; text-underline-offset: 3px; }
.t-kontrast :focus-visible { outline: 4px solid #000; outline-offset: 3px; box-shadow: 0 0 0 7px #ffdd00; }
.t-kontrast .card, .t-kontrast .filters { border: 2px solid #000; }
.t-kontrast .pnav { border-bottom: 2px solid #000; }
.t-kontrast .pnav a[aria-current="page"] { border-bottom-color: #000; text-decoration: none; background: #000; color: #fff; }
.t-kontrast .chips li { border: 2px solid #000; background: #fff; color: #000; }
.t-kontrast .hero .id { text-decoration: none; }

/* ---------- mobitel ---------- */
@media (max-width: 900px) {
  .grid-home, .t-bocni .grid-home { grid-template-columns: 1fr; }
  .t-bocni .pshell { grid-template-columns: 1fr; grid-template-areas: "side" "nav" "main"; margin-top: 1rem; }
  .t-bocni .hero { position: static; }
  .t-moderna .hero { grid-template-columns: 1fr; }
  .t-moderna .cover { grid-column: 1; grid-row: 1; min-height: 150px; clip-path: none; }
  .t-moderna .hero-in { grid-row: 2; padding: 1.5rem 16px; }
}
@media (max-width: 720px) {
  body { font-size: calc(var(--base-size) - 1px); }
  .brand-fac { white-space: normal; font-size: .85rem; }
  .brand-uni { display: none; }
  .brand-logo { width: 42px; height: 42px; }
  .hero-in { flex-direction: column; align-items: flex-start; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .t-naslovna .hero-in, .t-klasicna .hero-in, .t-bocni .hero-in { align-items: center; }
  .t-minimalisticka .hero-in { align-items: flex-start; }
  .t-minimalisticka .avatar { margin-top: -56px; }
  .avatar { width: 112px; height: 140px; }
  .t-naslovna .avatar, .t-klasicna .avatar { width: 130px; height: 130px; }
  .t-naslovna .hero-in { margin-top: -66px; }
  .t-klasicna .cover { height: 150px; margin-top: 1rem; }
  .t-kartice .hero-in { margin-top: -70px; padding: 1.25rem; }
  .t-kartice .main .section, .t-kartice .card { padding: 1.1rem; }
  .pnav-toggle { display: block; width: 100%; text-align: left; padding: .85rem 0; background: none; border: 0; font: 600 1rem var(--sans); color: var(--heading); cursor: pointer; }
  .pnav-toggle::after { content: " ▾"; }
  .pnav ul { display: none; flex-direction: column; padding-bottom: .5rem; }
  .pnav.open ul { display: flex; }
  .pnav a { padding: .6rem 0; border-bottom: 0; border-left: 3px solid transparent; padding-left: .6rem; }
  .pnav a[aria-current="page"] { border-left-color: var(--accent); }
  .t-kartice .pnav ul { padding: .25rem .75rem; }
  .t-naslovna .pnav ul, .t-klasicna .pnav ul { justify-content: flex-start; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
  .media-thumb { width: 110px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .75rem; padding: .4rem .2rem; }
  .tbl th, .tbl td { border: 0; padding: .25rem .6rem; }
  .tbl td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; font-weight: 600; }
  .tbl td:empty { display: none; }
}

/* ---------- štampa (CV) ---------- */
@media print {
  .topbar, .pnav, .footer, .filters, .hero-actions .btn, .skip, .pill, .dlg, .lang, .cover, .demo-bar, .preview-bar { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { background: none !important; color: #000; border-bottom: 2px solid #000; position: static; box-shadow: none; }
  .hero-in { margin: 0 !important; padding: 0 0 1rem !important; background: none !important; box-shadow: none !important; }
  .hero-name, .hero-rank, .hero-sub, h1, h2, h3 { color: #000 !important; }
  .ids .id { color: #000; border-color: #999; background: none; }
  .t-bocni .pshell { display: block; }
  a { color: #000; text-decoration: none; }
  .grid-home { display: block; }
  .card, .section { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
  .section { break-inside: avoid-page; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- formatirani tekst (TinyMCE) ---------- */
.prose h2, .rt h2 { font-size: 1.3rem; margin: 1.5rem 0 .6rem; }
.prose h3, .rt h3 { font-size: 1.12rem; margin: 1.25rem 0 .5rem; }
.prose h4, .rt h4 { font-size: 1rem; margin: 1rem 0 .4rem; }
.prose ul, .prose ol, .rt ul, .rt ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li, .rt li { margin: .2rem 0; }
.prose blockquote, .rt blockquote { margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid var(--accent); background: var(--tint); color: var(--ink); border-radius: 0 8px 8px 0; }
.prose hr, .rt hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.prose table, .rt table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: .95em; display: block; overflow-x: auto; }
.prose th, .prose td, .rt th, .rt td { border: 1px solid var(--line); padding: .45rem .65rem; text-align: left; vertical-align: top; }
.prose th, .rt th { background: var(--surface); }
.prose pre, .rt pre { white-space: pre-wrap; background: var(--surface); padding: .75rem; border-radius: 6px; }
.rt > :last-child, .prose > :last-child { margin-bottom: 0; }
.tl-det { margin-top: .3rem; font-size: .95rem; }
.tl-det p { margin: 0 0 .4rem; }
/* tema visokog kontrasta ignoriše ručno izabrane boje teksta radi čitljivosti */
.t-kontrast .prose [style*="color"], .t-kontrast .rt [style*="color"] { color: inherit !important; background-color: transparent !important; }
.mode-dark .prose [style*="color"], .mode-dark .rt [style*="color"] { color: inherit !important; background-color: transparent !important; }
