/* ---------- Fonty ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokeny ---------- */
:root {
  color-scheme: dark;

  /* Modrý technický výkres */
  --paper: #123e7c;
  --paper-deep: #0c2d5e;
  --grid: rgb(220 234 255 / 0.08);
  --grid-major: rgb(220 234 255 / 0.16);
  --ink: #eaf2ff;
  --ink-soft: #a9c3ea;
  --accent: #7cc4ff;
  --line: rgb(234 242 255 / 0.55);

  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-hero: clamp(2.75rem, 1.2rem + 8vw, 7.5rem);

  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 3rem;
  --space-xl: clamp(4rem, 2.5rem + 6vw, 8rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --max-width: 68rem;
  --grid-size: 24px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    /* Svetlá verzia: modré čiary na bielom papieri */
    --paper: #f3f7fd;
    --paper-deep: #e4edf9;
    --grid: rgb(18 62 124 / 0.07);
    --grid-major: rgb(18 62 124 / 0.14);
    --ink: #0e2d5c;
    --ink-soft: #3f5f8e;
    --accent: #1f63c6;
    --line: rgb(14 45 92 / 0.5);
  }
}

/* ---------- Základ ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size:
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 10;
  padding: var(--space-xs) var(--space-s);
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Hlavička ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-m);
  padding: var(--space-s) var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--grid-major);
}

.site-header__logo {
  font-weight: 800;
  font-stretch: 125%;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
}

.site-nav__link {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav__link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- Úvod (hero) ---------- */
main {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-xl) var(--space-l);
}

.hero__drawing {
  justify-self: start;
  max-width: 100%;
}

.hero__title {
  font-size: var(--step-hero);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero__line {
  display: block;
}

/* Kótovacia čiara ako na technickom výkrese */
.dimension {
  position: relative;
  margin-top: var(--space-m);
  height: 1.5rem;
  border-inline: 1px solid var(--line);
}

.dimension::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  border-top: 1px solid var(--line);
  transform-origin: center;
  animation: draw-line 900ms 200ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.dimension__label {
  position: absolute;
  top: 50%;
  left: 50%;
  padding-inline: var(--space-xs);
  font-size: var(--step--1);
  color: var(--ink-soft);
  white-space: nowrap;
  background: var(--paper);
  transform: translate(-50%, -50%);
  animation: fade-in 400ms 900ms both;
}

@keyframes draw-line {
  from {
    transform: scaleX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.hero__intro {
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Popisové pole ako v rohu výkresu */
.title-block {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 26rem);
  border: 1.5px solid var(--line);
  background: var(--paper);
}

.title-block__row {
  padding: var(--space-xs) var(--space-s);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.title-block__row:nth-child(2n) {
  border-right: 0;
}

.title-block__row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.title-block dt {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.title-block dd {
  font-weight: 600;
}

/* ---------- Sekcie ---------- */
.section {
  padding-block: var(--space-xl) 0;
}

.section__title {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 115%;
  line-height: 1.1;
}

.section__title::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

/* Časová os */
.timeline {
  display: grid;
  gap: var(--space-l);
  max-width: 44rem;
  border-left: 1px solid var(--line);
}

.timeline__item {
  position: relative;
  display: grid;
  gap: var(--space-xs);
  padding-left: var(--space-l);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.55rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.timeline__year {
  font-size: var(--step-1);
  font-weight: 700;
  font-stretch: 115%;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.timeline__text {
  max-width: 60ch;
}

/* Diely – záľuby a projekty */
.parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-m);
}

.part {
  display: grid;
  align-content: start;
  gap: var(--space-xs);
  padding: var(--space-m);
  border: 1.5px solid var(--line);
  background: var(--paper);
}

.part__title {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.25;
}

.part__text {
  color: var(--ink-soft);
}

/* Plánovaný diel – na výkrese sa kreslí prerušovanou čiarou */
.part--planned {
  border-style: dashed;
  background: transparent;
}

.part--planned .part__title {
  font-weight: 500;
  color: var(--ink-soft);
}

/* Kontakt */
.contact {
  padding-bottom: var(--space-xl);
}

.contact__text {
  margin-bottom: var(--space-s);
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.contact__email {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 110%;
  overflow-wrap: anywhere;
}

/* ---------- Päta ---------- */
.site-footer {
  padding: var(--space-m) var(--gutter);
  font-size: var(--step--1);
  color: var(--ink-soft);
  text-align: center;
  border-top: 1px solid var(--grid-major);
}

/* ---------- Väčšie obrazovky ---------- */
@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .hero__drawing {
    grid-column: 1 / -1;
  }
}

/* ---------- Obmedzený pohyb ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dimension::before,
  .dimension__label {
    animation: none;
  }
}
