/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --navy-900: #0b1626;
    --navy-800: #11203a;
    --navy-700: #1a2e4d;
    --accent:     #2f6bff;
    --accent-dark: #1e4fd6;
    --teal:       #19c3b1;

    --bg:       #ffffff;
    --bg-soft:  #f5f7fb;
    --text:     #16233a;
    --text-mut: #5a6b85;
    --border:   #e3e8f1;

    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 32, 58, 0.06), 0 1px 3px rgba(16, 32, 58, 0.08);
    --shadow:    0 12px 34px rgba(16, 32, 58, 0.10);
    --shadow-lg: 0 24px 60px rgba(16, 32, 58, 0.16);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, monospace;

    --maxw: 1160px;
    --header-h: 68px;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

section { padding: 92px 0; }

/* ============================================================
   Typography helpers
   ============================================================ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(47, 107, 255, 0.08);
    border: 1px solid rgba(47, 107, 255, 0.18);
    padding: 6px 14px;
    border-radius: 999px;
}
.eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(25, 195, 177, 0.18);
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.22rem; }

.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-mut);
    max-width: 60ch;
}
.section-head { max-width: 62ch; margin-bottom: 52px; }
.section-head h2 { margin: 18px 0 16px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin: 0 auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 600;
    font-size: 0.98rem;
    padding: 13px 24px;
    border-radius: 11px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(47, 107, 255, 0.32);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 14px 30px rgba(47, 107, 255, 0.4); }

.btn-ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #c7d2e4; background: #fafbfd; }

.btn-light {
    background: #fff;
    color: var(--navy-900);
}
.btn-light:hover { background: #eef3ff; }

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.7); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
}
.brand .mark {
    width: 34px; height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--navy-700));
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 19px; height: 19px; }
.brand small { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-mut); letter-spacing: 0; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-mut);
    padding: 9px 14px;
    border-radius: 9px;
    transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 10px 18px; font-size: 0.92rem; }

.menu-toggle {
    display: none;
    width: 42px; height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    place-items: center;
    color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    padding: 116px 0 96px;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 82% -8%, rgba(47, 107, 255, 0.12), transparent 60%),
        radial-gradient(820px 460px at -6% 8%, rgba(25, 195, 177, 0.10), transparent 55%),
        var(--bg);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(16, 32, 58, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 32, 58, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(760px 520px at 78% 6%, #000 30%, transparent 78%);
    mask-image: radial-gradient(760px 520px at 78% 6%, #000 30%, transparent 78%);
    pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}
.hero-copy { max-width: 600px; }
.hero h1 { margin: 22px 0 20px; }
.hero h1 .grad {
    background: linear-gradient(90deg, var(--accent), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead { margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-mut);
}
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note svg { width: 17px; height: 17px; color: var(--teal); }

/* Console / panel mock in the hero */
.hero-panel {
    position: relative;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 22px;
}
.hero-panel .bar {
    display: flex; gap: 7px; margin-bottom: 18px;
}
.hero-panel .bar i {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--border);
}
.hero-panel .bar i:nth-child(1){ background:#ff5f57; }
.hero-panel .bar i:nth-child(2){ background:#febc2e; }
.hero-panel .bar i:nth-child(3){ background:#28c840; }
.row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding: 13px 4px;
    border-bottom: 1px solid var(--bg-soft);
}
.row:last-child { border-bottom: 0; }
.row .lft { display: flex; align-items: center; gap: 12px; }
.row .ico {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--bg-soft); color: var(--accent);
}
.row .ico svg { width: 19px; height: 19px; }
.row .t { font-weight: 600; font-size: 0.95rem; }
.row .s { font-size: 0.8rem; color: var(--text-mut); }
.pill {
    font-size: 0.75rem; font-weight: 600;
    padding: 5px 11px; border-radius: 999px;
    white-space: nowrap;
}
.pill.ok { color: #0a7d5c; background: rgba(25, 195, 177, 0.14); }
.pill.warn { color: #9a6a00; background: rgba(254, 188, 46, 0.18); }
.pill.idle { color: var(--text-mut); background: var(--bg-soft); }

/* ============================================================
   Stats strip
   ============================================================ */
.stats {
    background: var(--navy-900);
    color: #fff;
    padding: 46px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat { text-align: center; }
.stat .num {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #9db8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat .lbl { color: #93a4c2; font-size: 0.92rem; margin-top: 6px; }

/* ============================================================
   Features
   ============================================================ */
.features { background: var(--bg-soft); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: #cdd8ec;
}
.card .ic {
    width: 52px; height: 52px;
    border-radius: 13px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(47,107,255,0.12), rgba(25,195,177,0.12));
    color: var(--accent);
    margin-bottom: 20px;
}
.card .ic svg { width: 25px; height: 25px; }
.card .eyebrow { margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-mut); font-size: 0.98rem; }

/* ============================================================
   About / split
   ============================================================ */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.split .check { margin-top: 26px; display: grid; gap: 15px; }
.split .check li { display: flex; gap: 13px; align-items: flex-start; }
.split .check .tick {
    flex: none;
    width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center;
    background: rgba(25, 195, 177, 0.14);
    color: #0a7d5c;
}
.split .check .tick svg { width: 16px; height: 16px; }
.split .check b { font-weight: 600; }
.split .check span { color: var(--text-mut); font-size: 0.96rem; }

.visual {
    position: relative;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
    padding: 34px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
.visual .code {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.9;
    color: #c6d4ef;
}
.visual .code .c { color: #5f7098; }
.visual .code .k { color: #6ee7db; }
.visual .code .s { color: #9db8ff; }
.visual .code .f { color: #ffd479; }

/* ============================================================
   CTA band
   ============================================================ */
.cta {
    background:
        radial-gradient(700px 320px at 15% 0%, rgba(47,107,255,0.35), transparent 60%),
        radial-gradient(700px 320px at 90% 120%, rgba(25,195,177,0.28), transparent 60%),
        var(--navy-900);
    color: #fff;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta .lead { color: #b7c6e2; margin: 0 auto 32px; }
.cta .hero-actions { justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: #0a1421;
    color: #93a4c2;
    padding: 64px 0 30px;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.foot-brand .brand { color: #fff; margin-bottom: 16px; }
.foot-brand p { font-size: 0.92rem; max-width: 40ch; }
.foot-brand .foot-note { margin-top: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.55); max-width: 40ch; }
.foot-col h4 {
    color: #fff;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.foot-col a { display: block; padding: 6px 0; font-size: 0.94rem; transition: color .15s ease; }
.foot-col a:hover { color: #fff; }
.foot-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 26px;
    font-size: 0.86rem;
}
.foot-bottom .links { display: flex; gap: 20px; }
.foot-bottom a:hover { color: #fff; }

/* ============================================================
   Main content slot (page-driven, markdown rendered)
   ============================================================ */
.page-content { padding: 64px 0; }
.page-content > * + * { margin-top: 1.1em; }
.page-content h1, .page-content h2, .page-content h3 { margin-top: 1.6em; letter-spacing: -0.02em; }
.page-content h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-content h2 { font-size: 1.5rem; }
.page-content p, .page-content li { color: var(--text-mut); }
.page-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.page-content ul { list-style: disc; padding-left: 1.3em; }
.page-content ul li { margin: 0.35em 0; }
.page-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.page-content pre {
    background: var(--navy-900);
    color: #dbe6ff;
    padding: 20px 22px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.7;
}
.page-content pre code { background: none; border: 0; padding: 0; color: inherit; }
.page-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 20px;
    color: var(--text);
    font-style: italic;
}
.page-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.page-content th, .page-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.page-content th { background: var(--bg-soft); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    section { padding: 70px 0; }
    .hero { padding: 84px 0 70px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-panel { order: -1; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .visual { order: -1; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 12px 20px 18px;
        display: none;
    }
    .nav.open .nav-links { display: flex; }
    .nav-links a { padding: 12px 14px; }
    .nav-cta .btn { display: none; }
    .menu-toggle { display: grid; }
}
@media (max-width: 560px) {
    .features-grid { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 auto; }
    .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Publications (bibtex cards)
   ============================================================ */
.pub-list {
    display: grid;
    gap: 22px;
    max-width: 880px;
}
.pub-card .ic {
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
}
.pub-card .ic svg {
    width: 22px;
    height: 22px;
}
.pub-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.pub-year {
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.01em;
}
.pub-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 8px;
}
.pub-title a {
    color: var(--navy-900);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.pub-title a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.pub-authors,
.pub-venue {
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.pub-doi {
    font-size: 0.85rem;
    margin-top: 10px;
}
.pub-doi a {
    color: var(--text-mut);
    text-decoration: none;
    border-bottom: 1px dashed var(--border);
    transition: color 0.15s ease;
}
.pub-doi a:hover {
    color: var(--accent);
}
.pub-abstract {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-card .contact-link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    color: var(--accent);
    border-bottom: 1px dashed rgba(47, 107, 255, 0.5);
    transition: color .16s ease, border-bottom-color .16s ease;
    word-break: break-word;
}
.contact-card .contact-link:hover {
    color: var(--accent-dark);
    border-bottom: 1px solid var(--accent-dark);
}

/* ============================================================
   Legal pages (imprint, data privacy)
   ============================================================ */
.legal {
    max-width: 70ch;
    padding: 64px 0;
}
.legal h3 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    margin: 36px 0 10px;
}
.legal h3:first-of-type { margin-top: 28px; }
.legal p, .legal li { color: var(--text-mut); line-height: 1.65; font-size: 0.97rem; }
.legal ul { list-style: disc; padding-left: 1.3em; margin: 8px 0; }
.legal li { margin: 0.3em 0; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
