/* matejsoltysik.sk – one stylesheet, system fonts only (nothing is downloaded from other servers) */

:root {
  --bg: #fafbfc;
  --surface: #f0f2f5;
  --ink: #12161b;
  --muted: #59626e;
  --rule: #dde1e7;
  --accent: #0b6a74;
  --accent-ink: #ffffff;
  --num: #9a4f05;
  --comment: #646d79;
  --focus: #1f6feb;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #171b21;
    --ink: #e5e9ee;
    --muted: #9ba5b2;
    --rule: #262d36;
    --accent: #5ec4cc;
    --accent-ink: #0b1215;
    --num: #e0a463;
    --comment: #7d8794;
    --focus: #79b8ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #171b21;
  --ink: #e5e9ee;
  --muted: #9ba5b2;
  --rule: #262d36;
  --accent: #5ec4cc;
  --accent-ink: #0b1215;
  --num: #e0a463;
  --comment: #7d8794;
  --focus: #79b8ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}

.wrap { max-width: 46rem; margin: 0 auto; padding-inline: 1.25rem; }

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

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--bg); padding: 0.4rem 0.8rem; }
.skip:focus { left: 0.5rem; z-index: 10; }

.dim { color: var(--muted); }
.accent { color: var(--accent); }
.sep { color: var(--comment); }
.meta span:not(.sep) { white-space: nowrap; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top-row { display: flex; align-items: center; gap: 1.25rem; min-height: 3.5rem; }
.brand { font: 600 0.95rem/1 var(--mono); color: var(--ink); text-decoration: none; }
nav { display: flex; gap: 1.1rem; margin-left: auto; font: 0.85rem/1 var(--mono); }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }
.theme {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.theme:hover { color: var(--ink); border-color: var(--muted); }

/* hero */
.hero { padding-block: 4.5rem 3rem; }
.prompt { font: 0.95rem/1 var(--mono); color: var(--muted); margin: 0 0 1rem; }
h1 {
  font: 700 clamp(2.4rem, 7vw, 3.6rem)/1.05 var(--mono);
  letter-spacing: -0.03em; margin: 0 0 1.25rem;
}
.lead { font-size: 1.25rem; line-height: 1.55; margin: 0 0 1.25rem; max-width: 38rem; text-wrap: pretty; }
.meta { font: 0.85rem/1.6 var(--mono); color: var(--muted); margin: 0; max-width: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin: 2rem 0 0; }

.button {
  display: inline-block; padding: 0.7rem 1.15rem; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 0.9rem/1 var(--mono); text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.link { font: 0.9rem/1 var(--mono); }

/* sections */
section { padding-block: 2.5rem; border-top: 1px solid var(--rule); }
.hero { border-top: 0; }
h2 { font: 600 1.25rem/1.3 var(--mono); margin: 0 0 1.25rem; letter-spacing: -0.01em; }
h2 .hash { color: var(--accent); }
h2 .dim { font-weight: 400; font-size: 0.85em; margin-left: 0.4em; }
h3 { font: 600 1rem/1.4 var(--sans); margin: 1.75rem 0 0.6rem; }
p { margin: 0 0 1rem; max-width: 40rem; }
strong { font-weight: 650; }

/* services */
.services { display: grid; gap: 1.5rem; margin: 0; }
.services dt { font-weight: 650; margin-bottom: 0.2rem; }
.services dd { margin: 0; color: var(--muted); }

/* group labels inside a section (how I work, education) */
.group { font: 600 0.95rem/1.4 var(--mono); margin: 2.25rem 0 1rem; }
.group .hash { color: var(--accent); }
h2 + .group { margin-top: 0.5rem; }

/* code-like number blocks */
.stats {
  font: 0.9rem/1.7 var(--mono);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1rem 1.15rem; margin: 1.5rem 0; overflow-x: auto; white-space: pre;
}
.stats .num { color: var(--num); font-weight: 600; }
.stats .comment { color: var(--comment); }

/* lists */
.list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.75rem; }
.list li::marker { color: var(--accent); }
.where { display: block; font: 0.8rem/1.5 var(--mono); color: var(--muted); margin-top: 0.15rem; }

.rules { margin: 1.25rem 0 0; padding: 0; list-style: none; counter-reset: pravidlo; display: grid; gap: 0.8rem; }
.rules li { counter-increment: pravidlo; position: relative; padding-left: 2.25rem; }
.rules li::before { content: counter(pravidlo, decimal-leading-zero); position: absolute; left: 0; font: 600 0.85rem/1.9 var(--mono); color: var(--accent); }

/* experience */
.note { color: var(--muted); font-size: 0.95rem; }
.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.timeline li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.years { font: 0.85rem/1.75 var(--mono); color: var(--muted); white-space: nowrap; }
.timeline h3 { margin: 0 0 0.3rem; }
.timeline .at { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; }
.timeline p { margin: 0; }

/* tools */
.tools { display: grid; gap: 0.6rem; margin: 0; }
.tools div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.tools dt { font: 0.85rem/1.75 var(--mono); color: var(--muted); }
.tools dd { margin: 0; }

/* contact */
.email-row { margin: 1.5rem 0; }

.foot { padding-block: 2rem 3rem; border-top: 1px solid var(--rule); font: 0.8rem/1.6 var(--mono); color: var(--muted); }
.foot p { margin: 0; max-width: none; }

@media (max-width: 40rem) {
  nav { display: none; }
  .theme { margin-left: auto; }
  .hero { padding-block: 3rem 2rem; }
  .lead { font-size: 1.125rem; }
  .timeline li, .tools div { grid-template-columns: 1fr; gap: 0.15rem; }
  .stats { font-size: 0.8rem; padding-inline: 0.9rem; }
}

/* the smallest phones (320 px): number blocks still fit without scrolling */
@media (max-width: 22rem) {
  .stats { font-size: 0.7rem; padding-inline: 0.75rem; }
}

/* print and the PDF from nastroje/pdf.sh: A4, sections flow on, single items are not split */
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  .top, .actions, .theme, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { border-top: 1px solid #ccc; padding-block: 1rem; }
  .hero { padding-block: 0 1rem; }
  a { color: #000; }
  .stats { background: none; border-color: #ccc; }
  h2, h3, dt, p:has(+ .list), p:has(+ .timeline), p:has(+ .stats) { break-after: avoid; }
  .stats, .services > div, .timeline li, .list li, .tools div { break-inside: avoid; }
}
