/* Viliam Lisý — researcher website */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f3f1ec;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5d6068;
  --line: #e3e0d8;
  --accent: #1f5fbf;
  --accent-soft: #e6eefb;
  --accent-2: #b4492c;
  --marl: #1f5fbf;
  --llm: #7a3fb0;
  --safe: #b4492c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px rgba(20, 20, 30, .06);
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --bg-alt: #171a1f; --surface: #1b1f25; --text: #e9e9ec; --muted: #a2a6ae;
    --line: #2a2f37; --accent: #7aa7f0; --accent-soft: #1d2a40; --accent-2: #e98a6c;
    --marl: #7aa7f0; --llm: #c49af0; --safe: #e98a6c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --bg-alt: #171a1f; --surface: #1b1f25; --text: #e9e9ec; --muted: #a2a6ae;
  --line: #2a2f37; --accent: #7aa7f0; --accent-soft: #1d2a40; --accent-2: #e98a6c;
  --marl: #7aa7f0; --llm: #c49af0; --safe: #e98a6c; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 .4em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 70ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1rem; height: 60px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav-links { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; padding: .4rem .65rem; border-radius: 8px; font-size: .92rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-alt); }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 9px; width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; }
[hidden] { display: none !important; }
/* Mobile menu: a <details> element, so it works without JavaScript */
.nav-menu { display: none; }
.nav-menu > summary { list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background: var(--bg-alt); }
@media (max-width: 900px) {
  .nav > .nav-links { display: none; }
  .nav-menu { display: block; }
  .nav-menu > .nav-links { position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem clamp(16px, 4vw, 32px) 1rem; }
}

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem) 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 600; margin: 0 0 .3rem; }
.hero .role { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.4rem; }
.hero .tagline { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 34em; }
.portrait { aspect-ratio: 1; border-radius: 24px; background: linear-gradient(135deg, var(--accent-soft), var(--bg-alt)); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; max-width: 280px; justify-self: end; width: 100%; position: relative; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .initials { font-family: var(--serif); font-size: 5rem; color: var(--accent); }
.btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
:root[data-theme="dark"] .btn.primary { color: #0d1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0d1420; } }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { justify-self: start; max-width: 200px; order: -1; }
}

/* Audience paths */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 3rem; }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.path:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); text-decoration: none; }
.path strong { display: block; margin-bottom: .2rem; }
.path span { color: var(--muted); font-size: .9rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { border-top: 2px solid var(--text); padding-top: .8rem; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
section.block { padding-block: clamp(3.5rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
section.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 2.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1rem; margin: .4rem 0 1rem; }
.card li { margin-bottom: .3rem; }

/* Research pillars */
.pillar { position: relative; border-top: 4px solid var(--c, var(--accent)); display: flex; flex-direction: column; }
.pillar .num { font-family: var(--serif); color: var(--c); font-size: .95rem; font-weight: 600; }
.pillar h3 { font-size: 1.25rem; margin-top: .2rem; }
.pillar .qs { margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--line); font-size: .92rem; color: var(--muted); }
.pillar.marl { --c: var(--marl); } .pillar.llm { --c: var(--llm); } .pillar.safe { --c: var(--safe); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 1rem; }
.tag { font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); }

/* Domains */
.domain { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: start; }
.domain .ico { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.domain .ico svg { width: 28px; height: 28px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: .3rem; vertical-align: middle; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 1.3rem 1.3rem; }
.timeline > li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .when { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .what { font-weight: 600; }
.timeline > li > ul { list-style: disc; margin: .3rem 0 0; padding-left: 1.2rem; color: var(--muted); font-weight: 400; }
.timeline > li > ul > li { margin-bottom: .2rem; }

/* Highlights */
.highlight { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.highlight .yr { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); font-weight: 600; line-height: 1; }

/* Publications */
.pub-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.4rem; }
.pub-tools input { flex: 1 1 240px; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: .4rem .8rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem; }
.pub .y { color: var(--muted); font-variant-numeric: tabular-nums; }
.pub .t { font-weight: 600; }
.pub .a { color: var(--muted); font-size: .92rem; }
.pub .note { font-size: .92rem; margin: .15rem 0 .25rem; padding-left: .7rem; border-left: 2px solid var(--accent); }
.pub .v { font-style: italic; font-size: .92rem; }
.pub .links a { font-size: .85rem; margin-right: .8rem; }
.pub .star { color: var(--accent-2); font-size: .8rem; font-weight: 600; margin-left: .3rem; }
.pub-count { color: var(--muted); font-size: .9rem; margin-left: auto; }

/* CTA/contact */
.cta { background: var(--text); color: var(--bg); border-radius: 20px; padding: clamp(1.6rem, 4vw, 3rem); }
.cta h2 { color: var(--bg); }
.cta a { color: var(--bg); }
.cta .muted { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.contact-list a { word-break: break-word; }
.copy { cursor: pointer; border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); background: transparent; color: inherit; border-radius: 7px; padding: .1rem .5rem; font-size: .8rem; margin-left: .4rem; }

footer { padding-block: 2rem 3rem; color: var(--muted); font-size: .88rem; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.6rem; position: relative; margin-bottom: .45rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
@media print {
  .site-header, .pub-tools, .btns, .paths { display: none; }
  section.block { padding-block: 1.5rem; }
  .reveal { opacity: 1; transform: none; }
}

/* Detail pages */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.page-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .6rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.page-hero.marl h1, .page-hero.marl .eyebrow { color: var(--marl); }
.page-hero.llm .eyebrow { color: var(--llm); }
.page-hero.safe .eyebrow { color: var(--safe); }
.detail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); font-size: .9rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-top: 2.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose .card { margin: 1.2rem 0; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; margin: 1.4rem 0; }
.callout p:last-child { margin-bottom: 0; }
.nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; }
.nextprev a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); }
.nextprev a:hover { border-color: var(--accent); }
.nextprev small { display: block; color: var(--muted); }
.nextprev .next { text-align: right; }
.more { display: inline-block; margin-top: 1rem; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .3rem; border-left: 0; }
  .toc a { padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; }
  .nextprev { grid-template-columns: 1fr; }
}
