/* Antonio Bikić: site styles.
   Paper, ink and one rubric red, as in a manuscript. Serif for reading,
   sans for small interface text (navigation, dates, labels). */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-serif-4-latin-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-serif-4-latin-ext-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-serif-4-latin-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-serif-4-latin-ext-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-sans-3-latin-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --ink: #1b1f27;
  --ink-2: #3a404b;
  --muted: #646a75;
  --rule: #dbd5c9;
  --rubric: #9b3b2a;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --step: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.62 var(--serif);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
a:hover { color: var(--rubric); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--rubric) 22%, transparent); }

h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); letter-spacing: -.012em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); letter-spacing: -.005em; }
h3 { font-size: 1.22rem; font-weight: 500; }
p { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; hyphens: auto; }
em, cite { font-style: italic; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* ---- header ---------------------------------------------------------- */
.site-head { padding-block: 1.6rem 1rem; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo { width: 3.4rem; fill: currentColor; }
.brand:hover .logo path:last-child { fill: var(--rubric); }
.brand-name { font: 500 .95rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding-top: .45rem; }
.nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a { font: 500 .98rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; color: var(--ink-2); padding-block: .5rem; display: inline-block; border-bottom: 1.5px solid transparent; }
.nav a:hover { color: var(--ink); border-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--rubric); }
@media (max-width: 40rem) {
  .brand-name { display: none; }
  .site-head { padding-top: 1.1rem; }
  .head-row { gap: .6rem; }
  .nav ul { gap: .1rem .95rem; }
  .nav a { font-size: .93rem; letter-spacing: 0; }
}

/* ---- buttons ----------------------------------------------------------- */
.btn { display: inline-block; font: 500 .95rem/1 var(--sans); letter-spacing: .02em; padding: .78rem 1.15rem .72rem; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--rubric); border-color: var(--rubric); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--ink); }
.more { font: 500 .9rem/1 var(--sans); letter-spacing: .03em; color: var(--muted); text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }
.more:hover { color: var(--rubric); }

/* ---- home -------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) 2rem; }
.eyebrow { font: 600 .8rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rubric); margin-bottom: 1.4rem; }
.hero-name { font-size: clamp(3rem, 8.5vw, 5.8rem); font-weight: 350; letter-spacing: -.022em; line-height: 1; margin-bottom: 2rem; }
.hero-text { max-width: 44rem; }
.lead, .lead p { font-size: clamp(1.18rem, 1.9vw, 1.36rem); line-height: 1.55; color: var(--ink-2); }
.hero-text p:first-child { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.illus { margin: 0 auto; max-width: 112rem; }
.illus img { width: 100%; object-fit: cover; }
.illus-hero img { aspect-ratio: 16 / 7; max-height: 70vh; }
.illus-strip img { aspect-ratio: 16 / 4.2; }
.illus-thin img { aspect-ratio: 16 / 2.6; }
@media (max-width: 40rem) { .illus-hero img { aspect-ratio: 4 / 3; } .illus-strip img { aspect-ratio: 16 / 7; } }

.block { padding-block: var(--step) 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--ink); padding-top: .9rem; margin-bottom: 1.6rem; }
.block-head h2 { margin: 0; }
.block-head.sub { margin-top: 2.8rem; }
.split { display: grid; grid-template-columns: 1fr; gap: 0 clamp(2rem, 6vw, 5rem); }
@media (min-width: 56rem) { .split { grid-template-columns: 1.15fr 1fr; } }
.split > * { min-width: 0; }

.strand-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.strand-card a { display: block; text-decoration: none; color: inherit; }
.strand-card img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; background: var(--paper-2); margin-bottom: 1rem; transition: opacity .2s; }
.strand-card a:hover img { opacity: .82; }
.strand-card h3 { margin: .3rem 0 .4rem; }
.strand-card a:hover h3 { color: var(--rubric); }
.strand-card p { font-size: 1rem; line-height: 1.5; color: var(--ink-2); margin: 0; }
.strand-no { font: 600 .8rem/1 var(--sans); letter-spacing: .1em; color: var(--rubric); font-variant-numeric: lining-nums; }

/* ---- lists of dated entries ---------------------------------------------- */
.when { font: 500 .88rem/1.6 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
.dated { list-style: none; margin: 0; padding: 0; }
.dated li { padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.dated .when { display: inline-block; min-width: 3.4rem; }
.entries { margin: 0; }
.entry { display: grid; grid-template-columns: 1fr; gap: .1rem 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.entry:first-child { border-top: 1px solid var(--rule); }
.entry dt { margin: 0; }
.entry dd { margin: 0; }
.entry dd p { margin: .35rem 0 0; color: var(--ink-2); font-size: 1rem; }
@media (min-width: 44rem) { .entry { grid-template-columns: 8.5rem 1fr; } }

/* ---- publications -------------------------------------------------------- */
.pub-list { margin: 0; padding: 0; list-style: none; }
.pub-list li { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.pub-list li:first-child { border-top: 1px solid var(--rule); }
.pub-list.compact li { font-size: 1rem; line-height: 1.5; }
.pub-list .me { font-weight: 600; }
.pub-links { display: inline; font: 400 .88rem/1.5 var(--sans); color: var(--muted); }
.pub-links a { color: var(--muted); }
.pub-links a:hover { color: var(--rubric); }
.pub-list.compact .pub-links { display: block; margin-top: .25rem; }
.pubs { padding-top: var(--step); }
.pub-group { margin-bottom: var(--step); }
.pub-group h2 { border-top: 1px solid var(--ink); padding-top: .9rem; margin-bottom: 1.2rem; }
.pub-list.full li { padding: 1.4rem 0; }
.pub-list.full .cite { font-size: 1.1rem; margin-bottom: .4rem; }
.pub-list.full .abstract { max-width: var(--measure); color: var(--ink-2); font-size: 1rem; line-height: 1.6; margin: .6rem 0; }
.pub-list.full p:last-child { margin: 0; }
.trans { font-size: 1rem; margin: 0 0 .4rem; }

/* ---- inner pages ----------------------------------------------------------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.page-head .lead { max-width: 46rem; }
.page-head .lead p:last-child { margin-bottom: 0; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 2px solid var(--rubric); color: var(--ink-2); }

.toc { padding-top: 2.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); counter-reset: s; }
.toc li { counter-increment: s; font: 500 .98rem/1.35 var(--sans); }
.toc li::before { content: counter(s); color: var(--rubric); font-weight: 600; margin-right: .6rem; font-size: .85rem; }
.toc a { text-decoration: none; }

.strand { display: grid; grid-template-columns: 1fr; gap: 1.5rem clamp(2rem, 5vw, 4.5rem); padding-top: var(--step); }
.strand-aside { position: relative; }
.strand-aside img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.strand-aside .strand-no { display: block; margin-bottom: .7rem; font-size: .9rem; }
.strand-body .pub-list { margin-top: 1.8rem; }
@media (min-width: 56rem) {
  .strand { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
  .strand-aside { padding-top: .3rem; }
  .strand-aside img { position: sticky; top: 2rem; }
  .strand:nth-of-type(even) .strand-aside { order: 2; }
}

table.courses { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.courses th { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 .9rem .7rem 0; border-bottom: 1px solid var(--ink); }
.courses td { padding: .8rem .9rem .8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.courses td:last-child, .courses th:last-child { padding-right: 0; }
.courses .when { width: 4.5rem; }
.courses td:nth-child(3), .courses td:nth-child(4) { font: 400 .9rem/1.45 var(--sans); color: var(--ink-2); }
.course-title { font-weight: 500; }
@media (max-width: 40rem) {
  .courses thead { display: none; }
  .courses tr { display: grid; grid-template-columns: 3.5rem 1fr; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  .courses td { border: 0; padding: 0; }
  .courses td:nth-child(3), .courses td:nth-child(4) { grid-column: 2; }
}

.about { display: grid; grid-template-columns: 1fr; gap: 2.5rem clamp(2rem, 6vw, 5rem); padding-bottom: var(--step); }
@media (min-width: 56rem) { .about { grid-template-columns: 20rem minmax(0, 1fr); } .about-aside { position: sticky; top: 1.5rem; align-self: start; } }
.portrait { margin: 0 0 2rem; max-width: 20rem; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(.15) contrast(1.02); }
.contact-box { font-size: 1rem; }
.contact-box h2 { font-size: 1.2rem; border-top: 1px solid var(--ink); padding-top: .8rem; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font: 400 .92rem/1.5 var(--sans); }
.about-text h2 { scroll-margin-top: 1.5rem; }

.cv-head .cv-contact { font: 400 1rem/1.5 var(--sans); color: var(--ink-2); }
.cv { padding-top: 2.5rem; padding-bottom: var(--step); }
.cv-sec { margin-bottom: 3rem; }
.cv-sec h2 { font-size: 1.3rem; margin-bottom: .9rem; }
.legal { padding-bottom: var(--step); font-size: 1rem; }
.legal h2 { font-size: 1.5rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.8em; }

/* ---- footer ------------------------------------------------------------- */
.site-foot { margin-top: var(--step); border-top: 1px solid var(--rule); background: var(--paper-2); padding-block: 2.5rem 3rem; font: 400 .93rem/1.55 var(--sans); color: var(--ink-2); }
.foot-grid { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.foot-grid p { margin: 0 0 .4rem; }
.foot-name { font: 500 1.05rem/1.3 var(--serif); color: var(--ink); }
.foot-meta { color: var(--muted); }
@media (min-width: 56rem) { .foot-meta { text-align: right; } }

/* ---- login -------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-box { width: min(22rem, 100%); display: grid; gap: 1rem; }
.login-logo .logo { width: 4.2rem; fill: var(--ink); margin-bottom: .5rem; }
.login-box h1 { font-size: 2rem; margin: 0; }
.login-box p { margin: 0; font-size: 1rem; }
.login-box label { display: grid; gap: .35rem; font: 500 .85rem/1 var(--sans); letter-spacing: .04em; color: var(--ink-2); }
.login-box input { font: 400 1.05rem/1.3 var(--sans); padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink); }
.login-box input:focus { border-color: var(--ink); outline: none; }
.login-box .btn { margin-top: .5rem; justify-self: start; }
.error { color: var(--rubric); font: 500 .95rem/1.4 var(--sans); }

.rev-banner { background: var(--ink); color: var(--paper); font: 400 .92rem/1.4 var(--sans); padding: .7rem 0; }
.rev-banner a { color: inherit; margin-left: .8rem; }

/* ---- review overview and diffs (only reviewers see these pages) ---------- */
.rv-list { list-style: none; margin: 0 0 1.5rem; padding: 0; font: 400 .95rem/1.45 var(--sans); }
.rv-list a { display: grid; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.rv-who { font-weight: 600; }
.rv-date { color: var(--muted); font-size: .85rem; }
.rv-snip { color: var(--muted); font-style: italic; font-family: var(--serif); }
.review-page h3 { font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rubric); margin: 1.8rem 0 .4rem; }
.rv-revs { list-style: none; padding: 0; margin: 1.5rem 0 0; font: 400 .95rem/1.45 var(--sans); }
.rv-revs li { display: grid; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.rv-actions a { color: var(--ink-2); }
.rv-save { display: flex; gap: .5rem; }
.rv-save input { flex: 1; font: 400 .95rem/1.3 var(--sans); padding: .6rem .7rem; border: 1px solid var(--rule); background: #fff; }
.rv-note { background: var(--paper-2); padding: .7rem .9rem; font: 400 .95rem/1.4 var(--sans); }
.rv-done summary { cursor: pointer; font: 500 .95rem/1.4 var(--sans); color: var(--muted); margin-top: 1rem; }
.diff pre { font: 400 .82rem/1.5 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--rule); padding: 1rem; }
.diff .add { background: #e3efdc; display: block; }
.diff .del { background: #f4dfda; display: block; text-decoration: line-through; text-decoration-color: rgba(155, 59, 42, .4); }
.diff .ctx { color: var(--muted); display: block; }
.diff .gap { color: var(--muted); display: block; text-align: center; }
.diff h2 { font: 600 .95rem/1.3 ui-monospace, Menlo, monospace; margin-top: 2rem; }

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

/* ---- print: the CV page becomes a clean document --------------------------- */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; font-size: 10pt; line-height: 1.45; }
  .site-head .nav, .site-foot, .no-print, .illus, .skip, #rv, .rv-pin, .rv-bar, .rv-pop, .rev-banner { display: none !important; }
  .site-head { padding: 0 0 4mm; }
  .wrap { padding: 0; max-width: none; }
  .page-head { padding: 0 0 4mm; }
  h1 { font-size: 22pt; }
  .lead { font-size: 11pt !important; }
  .cv { padding: 0; }
  .cv-sec { margin-bottom: 6mm; break-inside: auto; }
  .cv-sec h2 { font-size: 12pt; border-bottom: .5pt solid #000; padding-bottom: 1mm; break-after: avoid; }
  .entry { grid-template-columns: 26mm 1fr; padding: 1.2mm 0; border: 0 !important; break-inside: avoid; }
  .when { font-size: 9pt; }
  a { text-decoration: none; }
}
