:root {
  --bg: #fefefe;
  --surface: #ffffff;
  --border: #e8e8e6;
  --text: #1a1a1a;
  --text-dim: #6b6b6b;
  --text-faint: #9a9a9a;
  --accent: #3b6ef6;
  --accent-dot: #f5c518;
  --maxw: 1040px;
  --maxw-narrow: 720px;
  --font: "Inter", "Inter Variable Font", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #161616;
    --border: #2a2a2a;
    --text: #f2f2f0;
    --text-dim: #a3a3a0;
    --text-faint: #737370;
    --accent: #7c9bfb;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--maxw-narrow); }
.center { text-align: center; }

h1, h2, h3 {
  font-family: var(--font);
  line-height: 1.2;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
}
.skip-link:focus {
  left: 16px;
}

.nav-links a[aria-current="page"] { color: var(--text); }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-dot);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* HERO */
.hero {
  padding-top: 110px;
  padding-bottom: 110px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 780px;
}

.hero-role {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 24px;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-dim);
  font-size: 1.02rem;
  margin-bottom: 32px;
}

.hero-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-links.center { justify-content: center; }
.hero-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero-links a:hover { color: var(--accent); border-color: var(--accent); }

.page-hero {
  padding-top: 72px;
  padding-bottom: 8px;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 780px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* SECTIONS */
.section {
  padding: 96px 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 76px;
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.narrow .section-title,
.center .section-title { text-align: center; }

.section-lead {
  color: var(--text-dim);
  margin-bottom: 48px;
  font-size: 1rem;
  max-width: 520px;
}
.section-lead.center { max-width: 480px; margin-left: auto; margin-right: auto; text-align: center; }

.section.page-body {
  border-top: none;
  padding-top: 32px;
}

.section-cta {
  margin-top: 40px;
}
.section-cta.center { justify-content: center; }
.home-tease .hero-links { margin-top: 28px; }
.contact-page {
  border-top: none;
  padding-top: 96px;
}
.contact-page .breadcrumb { justify-content: center; }

.home-tease .row-stack h3 a:hover { color: var(--accent); }

/* ABOUT */
.about-text {
  max-width: var(--maxw-narrow);
  margin-bottom: 56px;
}
.about-text p {
  color: var(--text-dim);
  margin: 0 0 20px;
  font-size: 1.02rem;
  text-align: center;
}
.about-text p:last-child { margin-bottom: 0; }

.stats-row {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  color: var(--text-faint);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ROW LIST (Znanja) */
.row-list {
  display: flex;
  flex-direction: column;
}
.row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.row-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.row-value {
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* ROW STACK (Izkušnje / Projekti) */
.row-stack {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.row-stack:last-child { border-bottom: none; }
.row-year {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.row-stack h2,
.row-stack h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.row-stack p {
  color: var(--text-dim);
  margin: 0;
  max-width: 640px;
  font-size: 0.98rem;
}
.row-tags {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.task-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  max-width: 640px;
}
.task-list li {
  position: relative;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 6px 0 6px 18px;
}
.task-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 7px;
  height: 1px;
  background: var(--text-faint);
}

/* CONTACT */
.contact-email {
  display: inline-block;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 28px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.footer-nav a {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] { color: var(--accent); }

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .brand-name { display: none; }
  .status-badge { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 520px; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 16px 24px;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .section { padding: 64px 20px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .stats-row { gap: 36px; }
}
