/* Shared styles for the EN and SK pages. */
:root {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --fg: #15171a;
  --fg-muted: #565c63;
  --fg-faint: #858b93;
  --line: #e6e4de;
  --accent: #0f5a4a;
  --accent-soft: #e3f0ea;
  --accent-fg: #0b4337;
  --pop: #d0602a;
  --grid-dot: rgba(21, 23, 26, .09);
  --note: #fff3c4;
  --note-fg: #6b4e00;
  --note-line: #f0d77a;
  --radius: 18px;
  --maxw: 1100px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.18);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.04), 0 22px 40px -22px rgba(0,0,0,.28);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113;
    --bg-elev: #16191c;
    --fg: #eceef0;
    --fg-muted: #a3a9b1;
    --fg-faint: #6f757d;
    --line: #262a2f;
    --accent: #6fcbb3;
    --accent-soft: #13302a;
    --accent-fg: #9fe0cf;
    --pop: #f2a65a;
    --grid-dot: rgba(236, 238, 240, .07);
    --note: #3a3010;
    --note-fg: #f2d784;
    --note-line: #5d4b12;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 22px 40px -22px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1113;
  --bg-elev: #16191c;
  --fg: #eceef0;
  --fg-muted: #a3a9b1;
  --fg-faint: #6f757d;
  --line: #262a2f;
  --accent: #6fcbb3;
  --accent-soft: #13302a;
  --accent-fg: #9fe0cf;
  --pop: #f2a65a;
  --grid-dot: rgba(236, 238, 240, .07);
  --note: #3a3010;
  --note-fg: #f2d784;
  --note-line: #5d4b12;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 22px 40px -22px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.serif { font-family: var(--serif); font-weight: 400; }
.mono { font-family: var(--mono); }

/* Floating nav */
.nav {
  position: fixed; top: 12px; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
}
.nav-pill {
  pointer-events: auto; display: flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 6px 6px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 74%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow);
}
.brand { font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; margin-right: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-links { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; font-size: 15.5px; }
.nav-links a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--fg-muted); transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--fg); text-decoration: none; background: color-mix(in srgb, var(--fg) 6%, transparent); }
.nav-links a.active { color: var(--accent-fg); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--fg-muted);
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer;
  transition: transform .4s cubic-bezier(.3,1.6,.5,1), color .2s;
}
.icon-btn:hover { color: var(--fg); transform: rotate(180deg); }
.nav-actions .nav-cta { display: none; }
.lang {
  display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font: 600 12.5px/1 var(--mono); letter-spacing: .06em;
}
.lang a { padding: 8px 9px; border-radius: 999px; color: var(--fg-faint); transition: background .2s, color .2s; }
.lang a:hover { color: var(--fg); text-decoration: none; }
.lang a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-fg); }
@media (max-width: 860px) {
  .nav-pill { width: 100%; justify-content: space-between; }
  .nav-links { display: none; }
  .nav-actions .nav-cta { display: inline-flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 16px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg);
  cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--fg-faint); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.small { padding: 6px 14px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 150px 0 44px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 25% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 25% 30%, #000 25%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center; }
.portrait {
  width: 300px; height: 300px; border-radius: 50%; background: var(--accent-soft); overflow: hidden; justify-self: end;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-soft) 60%, var(--bg)), var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 660px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  font: 500 13px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-fg);
}
@media (max-width: 420px) {
  .eb-loc { display: none; }
  .eyebrow { font-size: 12px; letter-spacing: .06em; }
  .nav-pill { padding-left: 12px; }
  .brand { margin-right: 0; }
  .nav-actions .btn.small { padding: 6px 11px; }
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
h1 {
  font-size: clamp(46px, 7.2vw, 84px); line-height: 1; letter-spacing: -0.02em; margin: 22px 0 24px;
}
.mark { position: relative; display: inline-block; font-style: italic; color: var(--accent-fg); }
.mark svg { position: absolute; left: -2%; bottom: -0.14em; width: 104%; height: .3em; overflow: visible; }
.mark path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.js .mark path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s cubic-bezier(.6,0,.3,1) .7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { font-size: clamp(18px, 1.8vw, 20.5px); color: var(--fg-muted); max-width: 640px; margin: 0 0 30px; }
.lede strong { color: var(--fg); font-weight: 500; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.stats {
  position: relative; z-index: 1; margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 66%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.stat { padding: 18px 22px 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font-family: var(--serif); font-size: clamp(36px, 4.2vw, 48px); line-height: 1; letter-spacing: -0.01em; }
.stat .num small { font-size: .5em; color: var(--accent-fg); margin-left: 2px; }
.stat .lbl { margin-top: 8px; font-size: 15px; color: var(--fg-muted); line-height: 1.4; }

@media (max-width: 820px) {
  .hero { padding-top: 108px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { width: 140px; height: 140px; order: -1; justify-self: start; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-soft) 60%, var(--bg)); }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Ticker */
.ticker {
  overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-elev);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: tick var(--dur, 60s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { list-style: none; display: flex; margin: 0; padding: 13px 0; }
.ticker li {
  display: flex; align-items: center; gap: 18px; padding-right: 18px; white-space: nowrap;
  font: 13.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted);
}
.ticker li::after { content: "▲"; font-size: 10px; color: var(--accent); }
.ticker li:nth-child(3n)::after { content: "▼"; color: var(--pop); }
@keyframes tick { to { transform: translateX(calc(-1 * var(--shift, 50%))); } }

/* Sections */
.sec { padding: 104px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 500 13.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-fg);
}
.sec-label span { display: inline-grid; place-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--accent-soft); }
.sec-title { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 16px; max-width: 780px; }
.sec-intro { color: var(--fg-muted); font-size: 19px; max-width: 680px; margin: 0; }
@media (max-width: 820px) { .sec { padding: 76px 0; } }

/* Cards */
.card {
  position: relative; overflow: hidden; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card h3 { margin: 16px 0 8px; font-size: 20px; letter-spacing: -0.01em; line-height: 1.3; }
.card p { margin: 0; color: var(--fg-muted); font-size: 16.5px; }
.ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-fg);
  display: grid; place-items: center; transition: transform .4s cubic-bezier(.3,1.6,.5,1);
}
.card:hover .ico { transform: rotate(-8deg) scale(1.08); }
.ico svg { width: 19px; height: 19px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-muted); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 40px; }
.b-quant { grid-column: span 4; display: grid; grid-template-columns: 1fr 250px; gap: 28px; align-items: end; }
.b-soft, .b-prod { grid-column: span 2; }
.b-tools { grid-column: span 4; }
@media (max-width: 920px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-quant, .b-tools { grid-column: span 2; }
  .b-soft, .b-prod { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .b-quant, .b-tools, .b-soft, .b-prod { grid-column: auto; }
  .b-quant { grid-template-columns: 1fr; }
  .b-quant .oos { max-width: 320px; }
}
.oos { display: block; width: 100%; height: auto; }
.oos path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.oos .is { stroke: var(--accent); }
.oos .os { stroke: var(--pop); }
.oos .split { stroke: var(--fg-faint); stroke-dasharray: 3 4; }
.oos .base { stroke: var(--line); }
.oos text { font: 10px var(--mono); letter-spacing: .06em; fill: var(--fg-faint); }
.js .oos path { stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1.2s cubic-bezier(.6,0,.3,1) .3s; }
.js .oos .os { transition-delay: 1.3s; }
.js .in .oos path { stroke-dashoffset: 0; }
.toolbox { display: grid; grid-template-columns: 120px 1fr; gap: 10px 20px; margin: 16px 0 0; font-size: 16.5px; }
.toolbox dt { font: 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); padding-top: 6px; }
.toolbox dd { margin: 0; }
@media (max-width: 640px) { .toolbox { grid-template-columns: 1fr; gap: 4px; } .toolbox dd { margin-bottom: 10px; } }

/* Timeline */
.timeline { list-style: none; margin: 44px 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--line) 35%);
}
.timeline > li { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 6px 24px; padding: 0 0 36px 38px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--fg-faint);
}
.timeline > li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline > li.now::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite;
}
.when { font: 14px/1.5 var(--mono); color: var(--fg-faint); padding-top: 2px; }
.role { font-weight: 600; font-size: 19px; }
.org { color: var(--fg-muted); }
.desc { color: var(--fg-muted); font-size: 16.5px; margin: 8px 0 0; max-width: 680px; }
.bullets { list-style: disc; margin: 10px 0 0; padding-left: 18px; color: var(--fg-muted); font-size: 16.5px; max-width: 700px; }
.bullets li { margin: 4px 0; }
.bullets li::marker { color: var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; vertical-align: 2px;
  font: 500 12px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-fg);
}
@media (max-width: 640px) { .timeline > li { grid-template-columns: 1fr; padding-left: 32px; } }

/* Publications */
.pubs { list-style: none; margin: 44px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pubs a {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px;
  padding: 20px 10px; border-bottom: 1px solid var(--line); transition: background .2s, padding .25s;
}
.pubs a:hover { text-decoration: none; background: var(--accent-soft); padding-left: 20px; }
.pubs .n { font: 14px var(--mono); color: var(--fg-faint); }
.pubs .pt { display: flex; flex-direction: column; gap: 6px; }
.pubs .t { font-family: var(--serif); font-size: clamp(23px, 2.6vw, 30px); line-height: 1.2; }
.pubs .au { font-size: 15.5px; color: var(--fg-muted); }
.pubs .au b { font-weight: 500; color: var(--fg); }
.pubs .s { font: 13px var(--mono); letter-spacing: .06em; color: var(--fg-faint); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pubs .arrow { transition: transform .25s; }
.pubs a:hover .arrow { transform: translate(3px, -3px); color: var(--accent-fg); }
@media (max-width: 640px) {
  .pubs a { grid-template-columns: 30px 1fr; gap: 6px 12px; }
  .pubs .s { grid-column: 2; }
}

/* Projects */
.grid { display: grid; gap: 16px; margin-top: 40px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) { .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.c3 { grid-template-columns: 1fr; } }
.card > .status {
  position: absolute; top: 24px; right: 20px; display: inline-flex; align-items: center; gap: 7px;
  font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted);
}
.status .pulse { background: var(--pop); width: 7px; height: 7px; }

/* Contact */
.contact {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px;
  padding: 48px; border: 1px solid var(--line); border-radius: 28px; background: var(--bg-elev); box-shadow: var(--shadow);
}
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px); background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 0% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 80% at 0% 0%, #000, transparent 70%);
}
.contact > * { position: relative; }
.contact h2 { font-size: clamp(46px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 16px; }
.contact h2 em { color: var(--accent-fg); }
.contact p { color: var(--fg-muted); margin: 0 0 24px; max-width: 420px; }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.ok { border-color: var(--accent); color: var(--accent-fg); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; align-content: start; }
.contact-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); transition: border-color .2s, transform .2s;
}
.contact-list li:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateX(3px); }
.contact-list svg { width: 18px; height: 18px; color: var(--accent-fg); flex: 0 0 auto; }
.contact-list .lbl { font: 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); display: block; }
.contact-list .val { font-weight: 500; font-size: 16.5px; word-break: break-all; }
@media (max-width: 780px) { .contact { grid-template-columns: 1fr; padding: 28px; gap: 28px; } }

.site-footer { border-top: 1px solid var(--line); color: var(--fg-faint); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 28px; padding-bottom: 76px; }
.site-footer a:hover { color: var(--fg); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .mark path, .js .oos path { stroke-dashoffset: 0; }
}
