/* ------------------------------------------------------------------------
   Design tokens
   Design read: developer/security portfolio-CV for recruiters, clean
   technical-professional language, restrained motion, single accent.
   Font stacks are system-native (no external font fetch, no build step —
   this is a plain static site per CLAUDE.md checkpoint 5).
------------------------------------------------------------------------- */
:root {
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f6f7f9;
  --bg-alt: #eef1f5;
  --surface: #ffffff;
  --border: #dde1e7;
  --text: #14181f;
  --text-muted: #57606f;
  --accent: #1d5fe0;
  --accent-contrast: #ffffff;

  --radius-card: 12px;
  --radius-pill: 999px;
  --nav-height: 64px;
  --max-width: 960px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 24, 31, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-alt: #14181e;
    --surface: #191d24;
    --border: #2a2f38;
    --text: #eef1f5;
    --text-muted: #9aa3b2;
    --accent: #5b8dff;
    --accent-contrast: #0f1216;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Language toggle: both spans authored inline, CSS shows one set per
   body[data-lang]. Mirrors cv.tex's \sken{sk}{en} inline-pair pattern. */
body[data-lang="sk"] .en { display: none; }
body[data-lang="en"] .sk { display: none; }

a { color: var(--accent); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; margin: 0; }

.section {
  padding: 64px 24px;
}
.section--alt { background: var(--bg-alt); }
.section__title {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
}

/* --------------------------------------------------------------- Top nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar__links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar__links::-webkit-scrollbar { display: none; }
.topbar__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.topbar__links a:hover,
.topbar__links a.is-active { color: var(--accent); }

.lang-toggle {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.lang-toggle__option { padding: 2px 4px; border-radius: var(--radius-pill); }
.lang-toggle__sep { opacity: 0.4; }
body[data-lang="sk"] .lang-toggle__option[data-set-lang="sk"],
body[data-lang="en"] .lang-toggle__option[data-set-lang="en"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ------------------------------------------------------------------ Hero */
.hero { padding: 72px 24px 56px; }
.hero__inner { max-width: var(--max-width); margin: 0 auto; }

.hero__name {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  margin-bottom: 8px;
}
.hero__tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 20px;
}
.hero__summary {
  max-width: 65ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.contact-list a { color: var(--text-muted); text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

/* -------------------------------------------------------------- Timeline */
.timeline {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.timeline__item {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.timeline__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.timeline__title { font-size: 1.1rem; margin-bottom: 4px; }
.timeline__org { color: var(--text-muted); margin: 0 0 4px; }
.timeline__detail { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ----------------------------------------------------------------- Tags */
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  color: var(--text);
}
.tag-list--sm .tag { font-size: 0.75rem; padding: 4px 10px; }

/* --------------------------------------------------------------- Skills */
.skills-grid, .skills-secondary {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.skills-secondary { margin-top: 40px; }
.skills-group__title {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lang-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lang-list__level { color: var(--text-muted); }

/* ---------------------------------------------------------------- Badges */
.badge-list {
  max-width: var(--max-width);
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
}
.badge-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 128px;
  text-decoration: none;
  color: var(--text-muted);
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.badge-card img { width: 72px; height: 72px; object-fit: contain; }
.badge-card__label { font-size: 0.78rem; line-height: 1.3; }

/* -------------------------------------------------------------- Projects */
.project-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-card--wide { grid-column: 1 / -1; }
.project-card__title { font-size: 1rem; }
.project-card__body { margin: 0; color: var(--text-muted); font-size: 0.9rem; flex: 1; }

.projects-note {
  max-width: var(--max-width);
  margin: 28px auto 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.92rem;
}

/* ----------------------------------------------------------------Footer */
.footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer a { color: var(--text-muted); }

/* -------------------------------------------------------------Responsive */
@media (max-width: 720px) {
  .topbar__links { gap: 14px; }
  .skills-grid, .skills-secondary, .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card--wide { grid-column: auto; }
  .section { padding: 48px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-card a { transition: none; }
}
