/* suchanek.cloud — "Blueprint": IBM Plex, cobalt ink on cool paper, hard edges and offset shadows. */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --ink: #0e1630;
    --muted: #4a5368;
    --faint: #5d6579;
    --accent: #1a3fc2;
    --accent-ink: #12298a;
    --accent-soft: #e3e9fb;
    --rule: #d5d9e2;
    --rule-strong: #0e1630;
    --grid: rgba(26, 63, 194, 0.06);
    --award: #8a4b00;
    --award-soft: #fdf0dc;
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: var(--sans);
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --measure: 46rem;
    --wide: 64rem;
    --gutter: 1rem;
    --shadow: 4px 4px 0 var(--accent);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1020;
        --surface: #121a30;
        --ink: #e8ecf6;
        --muted: #a6afc4;
        --faint: #929bb1;
        --accent: #8ea6ff;
        --accent-ink: #b5c4ff;
        --accent-soft: #1c2850;
        --rule: #262f48;
        --rule-strong: #c9d1e6;
        --grid: rgba(142, 166, 255, 0.07);
        --award: #f0bd6a;
        --award-soft: #3a2c14;
        color-scheme: dark;
    }
    :root:not([data-theme="light"]) .invert-dark { filter: invert(1); }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    border-top: 6px solid var(--accent);
}

::selection { background: var(--accent); color: var(--bg); }

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--sans); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem); font-weight: 700; margin: 0 0 0.6rem; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; margin: 3rem 0 1rem; }
h2::before {
    content: ""; display: block; width: 2.25rem; height: 4px; margin-bottom: 0.75rem; background: var(--accent);
}
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.4rem; letter-spacing: -0.01em; }
p, ul, ol, dl { margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
cite { font-style: italic; }
code, pre { font-family: var(--mono); font-size: 0.85rem; }

.skip-link {
    position: absolute; left: 0.5rem; top: -3rem; z-index: 10;
    background: var(--accent); color: var(--bg); padding: 0.4rem 0.8rem; font-family: var(--mono); font-size: 0.85rem;
}
.skip-link:focus { top: 0.75rem; }

.muted { color: var(--muted); }
.sep { color: var(--faint); }
.eyebrow {
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 0.6rem; font-weight: 500;
}
.eyebrow::before { content: "// "; color: var(--faint); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule-strong); background: var(--bg); }
.site-header-inner {
    max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0.9rem var(--gutter);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem;
}
.brand {
    font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
    color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand::before {
    content: "MS"; content: "MS" / ""; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem;
    background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0;
}
.brand:hover { color: var(--accent); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav a {
    display: inline-block; color: var(--ink); text-decoration: none;
    font-family: var(--mono); font-size: 0.85rem; padding: 0.3rem 0.6rem;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.site-nav a[aria-current] { background: var(--accent); color: var(--bg); }
.lang-switch { margin-left: 0.5rem; }
.lang-switch a { border: 1px solid var(--rule-strong); padding: calc(0.3rem - 1px) 0.5rem; }

/* ---------- main ---------- */
.main { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 3rem var(--gutter) 5rem; flex: 1; }
.main-intro, .main-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }

.page-header { margin-bottom: 2.5rem; }
.page-header .summary { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }

.section-nav ul {
    list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0;
    border-bottom: 1px solid var(--rule-strong);
}
.section-nav a {
    display: inline-block; padding: 0.45rem 0.85rem; margin-bottom: -1px; font-family: var(--mono); font-size: 0.82rem;
    color: var(--muted); text-decoration: none; border: 1px solid transparent; border-bottom: 0;
}
.section-nav a:hover { color: var(--accent); }
.section-nav a[aria-current] {
    color: var(--ink); background: var(--bg); border-color: var(--rule-strong); border-top: 3px solid var(--accent);
    padding-top: calc(0.45rem - 2px);
}

.page-body > p:first-child { font-size: 1.12rem; }

/* ---------- home ---------- */
.hero {
    display: flex; gap: 2rem; align-items: center; margin: -3rem calc(-1 * var(--gutter)) 3rem; padding: 3.5rem var(--gutter) 3rem;
    border-bottom: 1px solid var(--rule);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 24px 24px;
}
.hero-photo {
    width: 132px; height: 132px; object-fit: cover; flex: none;
    border: 1px solid var(--rule-strong); box-shadow: 8px 8px 0 var(--accent);
}
.hero h1 { margin-bottom: 0.25rem; }
.hero-role { font-family: var(--mono); font-size: 0.92rem; color: var(--muted); margin: 0 0 1rem; }

.profile-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.88rem; }
.profile-links a {
    display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink); text-decoration: none;
    background: var(--surface); border: 1px solid var(--rule); padding: 0.25rem 0.6rem;
}
.profile-links a:hover { border-color: var(--accent); color: var(--accent); }
.profile-links img { width: 16px; height: 16px; }

.intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.intro-lead { font-size: 1.45rem; line-height: 1.4; font-weight: 500; letter-spacing: -0.015em; }
.intro-panel { background: var(--surface); border: 1px solid var(--rule-strong); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.intro-panel h2 { font-size: 0.8rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.85rem; }
.intro-panel h2::before { display: none; }
.intro-panel ul { list-style: none; padding: 0; margin: 0; }
.intro-panel li { padding: 0.4rem 0 0.4rem 1.4rem; border-top: 1px solid var(--rule); position: relative; font-size: 0.97rem; }
.intro-panel li:first-child { border-top: 0; }
.intro-panel li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.intro-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }

.button {
    display: inline-block; padding: 0.6rem 1.2rem; text-decoration: none; font-weight: 500; font-family: var(--mono); font-size: 0.9rem;
    background: var(--accent); color: var(--bg); border: 1px solid var(--accent);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { color: var(--bg); text-decoration: none; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.button-quiet:hover { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }

.stats {
    list-style: none; padding: 0; margin: 3rem 0 0;
    border: 1px solid var(--rule-strong); background: var(--surface);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
}
.stats li + li { border-left: 1px solid var(--rule); }
.stats a { display: block; padding: 1.1rem 1.25rem; text-decoration: none; color: var(--muted); height: 100%; }
.stats a:hover { background: var(--accent-soft); }
.stats a:hover .stat-label { color: var(--ink); }
.stat-number { display: block; font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1.05; letter-spacing: -0.03em; }
.stat-label { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

.recent .more { margin-top: 0.75rem; font-family: var(--mono); font-size: 0.9rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.ido-part {
    display: flex; gap: 1rem; height: 100%; padding: 1.25rem 1.3rem; background: var(--surface); border: 1px solid var(--rule-strong);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ido-part:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.ido-icon { width: 36px; height: 36px; flex: none; margin-top: 0.2rem; }
.ido-part h3 { margin: 0 0 0.4rem; }
.ido-list { padding-left: 1.1rem; margin-bottom: 0.5rem; }
.ido-codes { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.ido-codes span, .tag {
    display: inline-block; font-size: 0.72rem; line-height: 1.45; padding: 0.05rem 0.4rem;
    border: 1px solid var(--rule); color: var(--muted); font-family: var(--mono); font-weight: 500;
    vertical-align: 0.12em;
}
.tag-accent { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tag-award { color: var(--award); border-color: var(--award); background: var(--award-soft); }

/* ---------- publications ---------- */
.lead-count { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; }
.year-group {
    display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0 1.25rem;
    border-top: 1px solid var(--rule-strong); padding-top: 1.1rem; margin-top: 1.25rem;
}
.year {
    margin: 0; font-family: var(--mono); font-size: 1.15rem; font-weight: 600; color: var(--accent); letter-spacing: 0;
    position: sticky; top: 1rem; align-self: start;
}
.year::before { display: none; }
.pub-list, .entry-list { list-style: none; margin: 0; padding: 0; }
.pub { margin: 0 0 0.6rem; padding: 0.55rem 0 0.55rem 1rem; border-left: 3px solid transparent; transition: border-color 0.12s ease; }
.pub:hover { border-left-color: var(--accent); }
.pub-title { font-size: 1.08rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.pub-title::before { display: none; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-meta { font-size: 0.93rem; color: var(--muted); margin: 0 0 0.3rem; }
.pub-meta .me { color: var(--ink); font-weight: 600; box-shadow: inset 0 -0.35em 0 var(--accent-soft); }
.pub-meta a { color: inherit; }
.pub-links { font-size: 0.82rem; font-family: var(--mono); margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; }
.pub-type {
    color: var(--ink); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.68rem; font-weight: 500;
    border: 1px solid var(--rule-strong); padding: 0 0.35rem;
}
.pub-topics { color: var(--faint); font-family: var(--sans); }
.pub-list-compact .pub { margin-bottom: 0.4rem; }

/* publication page */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; font-family: var(--mono); font-size: 0.82rem; }
.breadcrumb li + li::before { content: "/"; color: var(--faint); margin-right: 0.5rem; }
.publication-detail h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); letter-spacing: -0.02em; }
.pub-meta-lg { font-size: 1rem; }
.venue-line { color: var(--muted); margin: 0; }
.facts {
    display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 2rem 0 0;
    border: 1px solid var(--rule-strong); background: var(--surface);
}
.facts dt, .facts dd { padding: 0.55rem 1rem; border-top: 1px solid var(--rule); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dt { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 0.7rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.bibtex-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.bibtex h2 { margin: 2.5rem 0 0.75rem; font-size: 1.15rem; }
.bibtex pre {
    margin: 0; padding: 1.1rem 1.2rem; background: var(--ink); color: var(--bg); border: 1px solid var(--rule-strong);
    overflow-x: auto; line-height: 1.55; white-space: pre;
}
.copy-btn {
    font-family: var(--mono); font-size: 0.8rem; cursor: pointer; color: var(--ink); background: var(--surface);
    border: 1px solid var(--rule-strong); padding: 0.25rem 0.75rem; margin-bottom: 0.75rem;
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.back { margin-top: 2.5rem; font-family: var(--mono); font-size: 0.9rem; }

/* ---------- generic entries (projects, teaching, theses, events) ---------- */
.entry, .thesis, .event { padding: 0 0 1.25rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--rule); }
.entry:last-child, .thesis:last-child, .event:last-child { border-bottom: 0; }
.entry-title { font-size: 1.15rem; margin: 0 0 0.25rem; }
.entry-title::before { display: none; }
.entry-title a { color: var(--ink); text-decoration: none; }
.entry-title a:hover { color: var(--accent); text-decoration: underline; }
.entry-sub { color: var(--muted); margin: 0 0 0.5rem; }
.entry-meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.25rem; }
.entry-meta p { margin: 0; }
.entry-topics { color: var(--faint); font-size: 0.84rem; margin: 0; }
.entry-text p:last-child { margin-bottom: 0.5rem; }
.entry-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-family: var(--mono); font-size: 0.85rem; margin: 0; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.entry-grid .entry:nth-last-child(-n+2) { border-bottom: 0; }
.code { font-family: var(--mono); font-size: 0.9em; font-weight: 600; color: var(--accent); }
.year-group .event-list { padding-top: 0.1rem; }

.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; border: 1px solid var(--rule-strong); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table td { padding: 0.5rem 0.75rem; border-top: 1px solid var(--rule); }
.data-table tr:first-child td { border-top: 0; }

/* research page: topics, memberships, profiles */
.topics-intro { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; }
.topics-stack { display: grid; gap: 1.25rem; }
.topic-story-card { padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--rule-strong); border-left: 4px solid var(--accent); }
.topic-story-title h3 { margin: 0 0 0.4rem; }
.topic-point-list { padding-left: 1.1rem; margin-bottom: 0.6rem; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.topic-tags span { font-family: var(--mono); font-size: 0.72rem; padding: 0.05rem 0.4rem; border: 1px solid var(--rule); color: var(--muted); }

.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }
.group-block, .profile-block {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; height: 100%;
    padding: 1.1rem 0.75rem; background: var(--surface); border: 1px solid var(--rule-strong);
    text-decoration: none; color: var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.group-block:hover, .profile-block:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.group-block img, .profile-block img { height: 36px; width: auto; max-width: 100%; object-fit: contain; }
.group-block .title, .profile-block .title { font-weight: 500; font-size: 0.92rem; }
.profile-block .value { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule-strong); color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
.site-footer-inner {
    max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 1.4rem var(--gutter);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-top: 3rem; }
.not-found h1 { font-family: var(--mono); font-size: 5rem; color: var(--accent); }
.not-found h1::before { display: none; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
    .button:hover, .ido-part:hover, .group-block:hover, .profile-block:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
    body { font-size: 1rem; }
    .intro { grid-template-columns: 1fr; gap: 2rem; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats li:nth-child(3) { border-left: 0; }
    .stats li:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .card-grid, .entry-grid { grid-template-columns: 1fr; }
    .entry-grid .entry:nth-last-child(2) { border-bottom: 1px solid var(--rule); }
    .year-group { grid-template-columns: 1fr; }
    .year { position: static; margin-bottom: 0.5rem; }
    .pub { padding-left: 0.75rem; }
    .hero { align-items: flex-start; gap: 1.25rem; margin-top: -1.75rem; padding-top: 2rem; padding-bottom: 2rem; }
    .hero-photo { width: 84px; height: 84px; box-shadow: 5px 5px 0 var(--accent); }
    .main { padding-top: 1.75rem; }
    .site-nav a { padding: 0.25rem 0.45rem; }
}

@media print {
    body { border-top: 0; background: #fff; color: #000; }
    .site-header, .site-footer, .section-nav, .copy-btn, .skip-link { display: none; }
    .hero { background: none; }
    .bibtex pre { background: #fff; color: #000; }
    a { color: #000; }
}
