/* ---------- FONTY (vlastní hosting: latin + latin-ext, v souladu s licencí SIL OFL) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-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;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-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;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-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;
}

:root {
  --bg: #F7F6F1;
  --bg-card: #EFE9DA;
  --ink: #1B1B1F;
  --ink-soft: #55554F;
  --pitch: #1E8F55;
  --pitch-deep: #146B3F;
  --line: #DAD4C2;
  --radius-lg: 22px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 20px 0;
}
nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sklovité "bubliny" — dvě samostatné plovoucí kapsule (jméno / odkazy) */
.nav-pill {
  position: relative;
  overflow: hidden;
  background: rgba(247, 246, 241, 0.45);
  /* Skutečná refrakce (SVG feDisplacementMap) prohýbá obsah pod sklem;
     saturate/brightness dokreslí "lomení světla". Prohlížeče bez podpory
     url() ve backdrop-filter (Safari) spadnou na -webkit řádek s blurem. */
  backdrop-filter: url(#glass-distortion) saturate(160%) brightness(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow:
    0 12px 38px rgba(27, 27, 31, 0.16),
    0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -12px 16px -12px rgba(255, 255, 255, 0.4);
}
.nav-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}
.nav-brand {
  padding: 11px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.nav-brand:hover { background-color: rgba(255, 255, 255, 0.7); }
.nav-brand:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 3px;
}
.nav-links {
  padding: 6px;
}
.nav-links ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover {
  color: var(--ink);
  background: rgba(27, 27, 31, 0.06);
}

/* Hamburger — jen na mobilu, nav-links se sbalí do tlačítka */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ---------- HERO ---------- */
header.hero {
  padding: 36px 0 128px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  border: 1px solid var(--line);
}
.hero-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--pitch-deep);
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
h1.display {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 5.2vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.name-accent {
  color: var(--pitch);
  white-space: nowrap; /* jméno se nikdy nezalomí na dva řádky */
}
.hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
}
.fact-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.fact-value.accent { color: var(--pitch-deep); }

/* ---------- JÁ ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 44px;
  align-items: center;
}
.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  border: 1px solid var(--line);
}
.about-text p {
  margin: 0 0 16px;
  font-size: 15.5px;
  color: var(--ink-soft);
  max-width: 54ch;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--ink); font-weight: 600; }

/* ---------- SECTION HEADS ---------- */
.section {
  padding: 100px 0;
  scroll-margin-top: 24px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}
.section-head::before {
  content: "";
  width: 4px;
  height: 26px;
  background: var(--pitch);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-head h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- FEATURED PROJECT ---------- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 640px;
  margin: 0 auto;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--line);
}
.card .year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--pitch-deep);
}
.card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}
.card p {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.stat-rows { border-top: 1px solid var(--line); margin-top: 4px; }
.stat-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.stat-row .k { color: var(--ink-soft); }
.stat-row .v { font-family: 'JetBrains Mono', monospace; text-align: right; }

/* ---------- TIMELINE ---------- */
.timeline {
  display: flex;
  flex-direction: column;
}
.t-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.t-row:last-child { border-bottom: 1px solid var(--line); }
.t-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--pitch-deep);
  padding-top: 2px;
}
.t-body h3 {
  margin: 0 0 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
}
.t-body p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- CONTACT ---------- */
.contact {
  padding: 72px 0 80px;
  border-top: 1px solid var(--line);
  /* Pokud se k sekci dá doscrollovat, horní linka skončí úplně nahoře,
     nad bublinami (ne za nimi). */
  scroll-margin-top: 0;
}
.contact .wrap {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.contact h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.7rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.contact p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 44ch;
  font-size: 15px;
}
/* Odkazy pod vizitkou: telefon, Instagram, e-mail */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  padding: 0 28px;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.contact-chip svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--pitch);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-chip:hover {
  border-color: var(--pitch);
  background: var(--bg-card);
}
.contact-chip:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 3px;
}
.contact-chip.copied {
  border-color: var(--pitch);
  color: var(--pitch-deep);
}

/* ---------- VIZITKA ---------- */
.vizitka-block {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}
.vizitka-wrap {
  perspective: 900px;
}
.vizitka {
  display: block;
  width: 320px;
  height: auto;
  max-width: 78vw;
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px rgba(27,27,31,0.14);
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.25s ease;
  transform: rotateX(0deg) rotateY(0deg);
  will-change: transform;
}
.vizitka:hover {
  box-shadow: 0 26px 54px rgba(27,27,31,0.2);
}

.vizitka-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,27,31,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100;
}
.vizitka-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.vizitka-large {
  width: 100%;
  height: auto;
  max-width: 720px;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
  cursor: zoom-out;
  transform: scale(0.94);
  transition: transform 0.25s ease;
}
.vizitka-overlay.open .vizitka-large {
  transform: scale(1);
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.footer-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  /* Úvod na telefonu: vše kompaktnější, aby byla celá fotka vidět hned po načtení */
  nav { padding: 12px 0; }
  header.hero { padding: 6px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero-kicker { margin-bottom: 10px; }
  h1.display { font-size: 2.15rem; margin-bottom: 0; }
  /* Fotka se přizpůsobí výšce displeje: co nejvčtší, ale pořád celá vidět hned po načtení
     (poměr 4:5, nad fotkou je cca 370 px obsahu). */
  .hero-photo {
    width: clamp(200px, calc((100vh - 370px) * 0.8), 420px);
    width: clamp(200px, calc((100dvh - 370px) * 0.8), 420px);
    max-width: 100%;
    margin: 0 auto;
  }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 260px; }
  .contact .wrap { flex-direction: column; align-items: flex-start; }
  /* Na telefonu je kontakt alespoň tak vysoký jako displej (mínus patička),
     aby se po klepnutí na "Kontakt" dal vyjet až nahoru pod bubliny. */
  .contact {
    padding: 96px 0;
    min-height: calc(100vh - 73px);
    min-height: calc(100dvh - 73px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero-facts { gap: 28px; row-gap: 14px; margin-top: 20px; padding-top: 16px; }

  /* Hamburger: tlačítko zůstává pevné, odkazy jsou plovoucí panel,
     co vyjíždí jen dolů (nezasahuje do výšky nav řádku). */
  /* Na telefonu jen lehký blur místo SVG refrakce (feTurbulence + feDisplacementMap):
     refrakce se přepočítává při každém posunu stránky a na mobilu způsobuje sekání a zpoždění. */
  .nav-pill {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
  }

  .nav-toggle { display: flex; }
  .nav-links {
    overflow: visible;
  }
  .nav-links ul {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px;
    min-width: 170px;
    background: rgba(247, 246, 241, 0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(27, 27, 31, 0.16);
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.24s ease;
  }
  .nav-links.open ul {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { text-align: center; }
  .nav-links.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-links.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-links.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
