:root {
  --bg: #0a1528;
  --bg-elev: #0f2140;
  --bg-card: #0c1e3a;
  --bg-deep: #060d18;
  --header-bg: rgba(10, 21, 40, 0.93);
  --line: rgba(238, 187, 0, 0.22);
  --line-tech: rgba(120, 190, 230, 0.18);
  --text: #e6edf5;
  --muted: #8fa6c0;
  --accent: #eebb00;
  --hex-frame: rgba(132, 172, 224, 0.28);
  --hex-frame-glow: rgba(238, 187, 0, 0.08);
  --accent-dim: rgba(238, 187, 0, 0.12);
  --nature-mist: rgba(64, 190, 150, 0.14);
  --tech-glow: rgba(90, 170, 255, 0.1);
  --card-bg-from: rgba(14, 44, 82, 0.68);
  --card-bg-to: rgba(10, 25, 49, 0.92);
  --card-line: rgba(238, 187, 0, 0.22);
  --card-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  --card-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.4);
  --card-title: var(--text);
  --card-excerpt: #9ab1ca;
  --hex-gap: 0.35rem;
  /* Pravidelný „špičatý“ šestiúhelník u clip-path v % (šířka / výška ohraničujícího boxu). */
  --hex-point-ratio: 0.8660254037844386;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f2f7ff;
  --bg-elev: #ffffff;
  --bg-card: #f8fbff;
  --bg-deep: #eaf1fb;
  --header-bg: rgba(250, 252, 255, 0.92);
  --line: rgba(38, 78, 123, 0.2);
  --line-tech: rgba(61, 117, 176, 0.2);
  --text: #10243d;
  --muted: #4f6784;
  --accent: #cf9a00;
  --hex-frame: rgba(61, 117, 176, 0.28);
  --hex-frame-glow: rgba(207, 154, 0, 0.06);
  --accent-dim: rgba(207, 154, 0, 0.12);
  --nature-mist: rgba(96, 184, 146, 0.12);
  --tech-glow: rgba(89, 154, 233, 0.1);
  --card-bg-from: rgba(229, 238, 251, 0.72);
  --card-bg-to: rgba(209, 224, 244, 0.92);
  --card-line: rgba(46, 92, 140, 0.32);
  --card-shadow: 0 8px 20px rgba(28, 52, 84, 0.14);
  --card-shadow-hover: 0 12px 24px rgba(22, 45, 76, 0.2);
  --card-title: #112844;
  --card-excerpt: #314c6b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 70% at 15% -10%, rgba(40, 100, 180, 0.22), transparent 52%),
    radial-gradient(ellipse 80% 55% at 100% 40%, var(--nature-mist), transparent 50%),
    radial-gradient(ellipse 60% 45% at 0% 100%, var(--tech-glow), transparent 48%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0a1528;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(100, 170, 220, 0.06);
}

/* Záhlaví: mobile-first — menu je ve výchozím stavu skryté (ne spoléhat na max-width override) */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
  flex-shrink: 0;
  order: 3;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  order: 2;
  transition:
    color 0.18s,
    border-color 0.18s,
    background 0.18s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
  outline: none;
}

.nav-toggle__icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* Font Awesome načítá vlastní display — bez !important zůstaly obě ikony vidět */
.nav-toggle .nav-toggle__icon--open {
  display: inline-block !important;
}

.nav-toggle .nav-toggle__icon--close {
  display: none !important;
}

.site-header--nav-open .nav-toggle .nav-toggle__icon--open {
  display: none !important;
}

.site-header--nav-open .nav-toggle .nav-toggle__icon--close {
  display: inline-block !important;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1 1 auto;
  min-width: 0;
}

.logo-hex {
  width: 30px;
  height: auto;
  aspect-ratio: var(--hex-point-ratio) / 1;
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 236, 170, 0.9) 0%, rgba(255, 236, 170, 0) 42%),
    linear-gradient(160deg, #ffd44d 0%, var(--accent) 45%, #b67a00 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow:
    0 0 20px rgba(238, 187, 0, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(20, 20, 20, 0.3);
  transform: translateZ(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.logo-hex::after {
  content: "";
  position: absolute;
  inset: 3px;
  clip-path: inherit;
  border: 1px solid rgba(100, 180, 255, 0.18);
  opacity: 0.75;
}

.logo:hover .logo-hex,
.logo:focus-visible .logo-hex {
  transform: translateY(-1px) scale(1.04);
  filter: saturate(1.07);
  box-shadow:
    0 0 28px rgba(238, 187, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(20, 20, 20, 0.3);
}

#main-nav.nav {
  display: none !important;
  flex: 1 1 100%;
  order: 4;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0 0.75rem;
  margin: 0;
  gap: 0;
  border-top: 1px solid var(--line);
}

.site-header--nav-open #main-nav.nav {
  display: flex !important;
}

#main-nav.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.65rem 0.15rem;
  border-bottom: 1px solid var(--line-tech);
  border-left: 3px solid transparent;
}

#main-nav.nav a:last-child {
  border-bottom: none;
}

#main-nav.nav a:hover,
#main-nav.nav a:focus-visible {
  color: var(--accent);
  border-left-color: var(--accent);
  border-bottom-color: var(--line-tech);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .logo {
    flex: 0 1 auto;
  }

  .nav-toggle {
    display: none !important;
  }

  .header-end {
    order: 0;
    margin-left: auto;
  }

  #main-nav.nav {
    display: flex !important;
    flex: 1 1 auto;
    order: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0;
    border-top: none;
    gap: 0.35rem 1rem;
  }

  #main-nav.nav a {
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    border-left: none;
  }

  #main-nav.nav a:last-child {
    border-bottom: 2px solid transparent;
  }

  #main-nav.nav a:hover,
  #main-nav.nav a:focus-visible {
    border-color: var(--accent);
  }

  body.nav-open {
    overflow: visible;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    color 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
  transform: translateY(-1px);
  outline: none;
}
.theme-toggle__icon {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 880px) {
  .theme-toggle__label {
    display: none;
  }
}

.hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 90% 10%, var(--tech-glow), transparent 55%),
    radial-gradient(ellipse 55% 45% at 5% 85%, var(--nature-mist), transparent 52%),
    radial-gradient(ellipse 75% 45% at 50% -25%, rgba(238, 187, 0, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: -15% -8%;
  opacity: 1;
  background-image:
    linear-gradient(rgba(120, 180, 220, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 220, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 55% 48%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 75% at 55% 48%, #000 15%, transparent 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero h1 span {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual-inner {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 1;
}

.hero-viz-deco {
  position: absolute;
  inset: 4%;
  color: rgba(238, 187, 0, 0.55);
  pointer-events: none;
  z-index: 0;
}

.hero-deco-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(90, 170, 255, 0.12));
}

.hero-quicknav {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-qhex {
  position: absolute;
  width: 42%;
  aspect-ratio: 1 / 0.866;
  background: linear-gradient(165deg, rgba(15, 40, 72, 0.95), rgba(8, 24, 48, 0.98));
  border: 1px solid var(--line);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: grid;
  place-items: center;
  font-size: clamp(0.68rem, 2.1vw, 0.78rem);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
  padding: 0 0.35rem;
  box-shadow:
    0 0 0 1px rgba(100, 170, 220, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  animation: hero-qhex-float 7s ease-in-out infinite;
}

.hero-qhex:hover,
.hero-qhex:focus-visible {
  border-color: rgba(238, 187, 0, 0.55);
  color: #fff3a8;
  box-shadow:
    0 0 28px rgba(238, 187, 0, 0.22),
    0 0 0 1px rgba(120, 190, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
}

.hero-qhex:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hero-qhex:nth-child(1) {
  top: 8%;
  left: 29%;
  animation-delay: 0s;
}
.hero-qhex:nth-child(2) {
  top: 38%;
  left: 5%;
  animation-delay: 1.2s;
}
.hero-qhex:nth-child(3) {
  top: 38%;
  right: 5%;
  animation-delay: 2.4s;
}
.hero-qhex:nth-child(4) {
  bottom: 6%;
  left: 29%;
  animation-delay: 3.6s;
}

@keyframes hero-qhex-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-qhex {
    animation: none;
  }
}

.hero-photo-frame {
  position: relative;
  margin: 0;
  padding: 0;
  width: min(320px, 78vw);
}

.hero-photo-ring {
  position: absolute;
  inset: -6px;
  background: linear-gradient(135deg, rgba(238, 187, 0, 0.45), rgba(238, 187, 0, 0.08) 50%, rgba(238, 187, 0, 0.25));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 0;
  opacity: 0.9;
}

.hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(238, 187, 0, 0.12);
}

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 0.5rem;
  background: linear-gradient(90deg, rgba(120, 190, 230, 0.5), var(--accent));
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.section[id] {
  scroll-margin-top: 5.5rem;
}

.about-projects-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-projects__about,
.about-projects__projects {
  scroll-margin-top: 5.5rem;
  min-width: 0;
}

.about-projects__prose {
  max-width: none;
}

@media (min-width: 960px) {
  .about-projects-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.85fr);
    gap: 2rem 3rem;
  }

  .about-projects__projects .section-head {
    margin-bottom: 1.25rem;
  }

  .hex-grid--sidebar {
    grid-template-columns: 1fr;
  }
}

.muted {
  color: var(--muted);
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
}

.social-links__title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.social-links__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.5);
  transform: translateY(-1px);
  outline: none;
}

:root[data-theme="light"] .card-hex .btn {
  border-color: rgba(194, 144, 0, 0.5);
  color: #8b6200;
  background: linear-gradient(165deg, rgba(255, 216, 112, 0.25), rgba(255, 216, 112, 0.1));
}

:root[data-theme="light"] .card-hex .btn:hover,
:root[data-theme="light"] .card-hex .btn:focus-visible {
  color: #122744;
  background: linear-gradient(165deg, #ffd667, #e9b300);
  border-color: #d8a100;
}

:root[data-theme="light"] .social-link {
  color: #355a84;
  border-color: rgba(48, 92, 140, 0.3);
  background: rgba(255, 255, 255, 0.86);
}

.social-links--hero {
  margin-top: 1rem;
}

.social-links--section {
  margin-top: -0.3rem;
  margin-bottom: 1rem;
}

.social-links--project {
  margin: 0;
}

.prose {
  max-width: 70ch;
}
.prose p {
  margin: 0 0 1rem;
}
.prose a {
  color: var(--accent);
}

.hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-hex {
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}
.card-hex::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 104px;
  background: var(--accent-dim);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.9;
}

.card-hex h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  position: relative;
}

.card-hex h3 a {
  color: inherit;
  text-decoration: none;
}

.card-hex h3 a:hover,
.card-hex h3 a:focus-visible {
  color: var(--accent);
}
.card-hex p {
  margin: 0 0 1rem;
  color: var(--card-excerpt);
  font-size: 0.95rem;
  position: relative;
}

.card-hex__summary {
  margin: 0 0 1rem;
  color: var(--card-excerpt);
  font-size: 0.95rem;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rich-text p {
  margin: 0 0 0.4em;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.rich-text a {
  color: var(--accent);
  text-decoration: underline;
}

.rich-text a:hover,
.rich-text a:focus-visible {
  color: var(--accent-hover, var(--accent));
}

.card-hex .thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
  background: var(--bg-elev);
}
.card-hex .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-hex__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.card-hex--cooperation {
  align-self: start;
}

.card-hex--cooperation::before {
  display: none;
}

.card-hex--cooperation p {
  color: var(--card-excerpt);
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: #0a1528;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.yt-thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
}
.yt-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-thumb-link::after {
  content: "▶ Přehrát na YouTube";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.yt-thumb-link:hover::after,
.yt-thumb-link:focus-visible::after {
  opacity: 1;
}

.article-card__media .article-card__video-wrap {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: unset;
}

.article-card__media .article-card__yt-link {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.article-card__media--video {
  height: clamp(170px, 19vw, 220px);
  aspect-ratio: auto;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.95rem;
}

.photo-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.photo-item:hover {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow:
    var(--card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
}

/* Mřížka karet: Science Reveal (RSS) i sekce Články — stejná šířka sloupce (~280px) */
.rss-cards,
.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}

.rss-cards {
  list-style: none;
}

.rss-card,
.article-card {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.rss-card {
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.article-card {
  color: inherit;
  height: 100%;
}

.rss-card:hover,
.rss-card:focus-visible,
.article-card:hover {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow:
    var(--card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.rss-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.rss-card__media,
.article-card__media {
  position: relative;
  height: clamp(170px, 19vw, 220px);
  aspect-ratio: auto;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.rss-card__thumb,
.article-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rss-card__placeholder,
.article-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a1528, #0f2140);
}

.rss-card__placeholder--hidden,
.article-card__placeholder--hidden {
  display: none;
}

.rss-card__media--fallback .rss-card__placeholder,
.article-card__media--fallback .article-card__placeholder {
  display: grid;
}

.rss-card__body,
.article-card__body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.rss-card__date,
.article-card__date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rss-card__title,
.article-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--card-title);
}

.rss-card:hover .rss-card__title,
.rss-card:focus-visible .rss-card__title,
.article-card:hover .article-card__title {
  color: var(--accent);
}

.rss-card__excerpt,
.article-card__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--card-excerpt);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__body .btn {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
  text-align: center;
  border-color: rgba(238, 187, 0, 0.52);
  color: #f7c81a;
  background:
    linear-gradient(160deg, rgba(238, 187, 0, 0.16), rgba(238, 187, 0, 0.05)),
    rgba(10, 27, 51, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 194, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.22);
  padding: 0.5rem 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.article-card__body .btn:hover,
.article-card__body .btn:focus-visible {
  color: #0a1528;
  background: linear-gradient(160deg, #ffd14b, #e5ac00);
  border-color: #ffd14b;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 225, 122, 0.25);
}

.article-card--clickable {
  cursor: pointer;
}

.article-card__detail-btn {
  position: relative;
  z-index: 2;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
.form textarea {
  min-height: 140px;
  resize: vertical;
}
.form .row {
  margin-bottom: 1rem;
}
.form button {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0a1528;
  font-weight: 700;
  cursor: pointer;
}
.form button:hover,
.form button:focus-visible {
  filter: brightness(1.05);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.alert.ok {
  border-color: rgba(80, 200, 120, 0.5);
  background: rgba(80, 200, 120, 0.08);
}
.alert.err {
  border-color: rgba(255, 100, 100, 0.45);
  background: rgba(255, 100, 100, 0.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-deep));
  box-shadow: inset 0 1px 0 rgba(120, 190, 255, 0.05);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.footer-hex {
  height: 56px;
  width: auto;
  aspect-ratio: var(--hex-point-ratio) / 1;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(238, 187, 0, 0.35), transparent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.section--page {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.section-head__more {
  display: inline-block;
  margin-left: 0.35rem;
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.section-head__more:hover,
.section-head__more:focus-visible {
  border-color: var(--accent);
}

.section--page .section-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}
.breadcrumb__sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}
.archive-filters__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.archive-filters__chip:hover,
.archive-filters__chip:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
}
.archive-filters__chip.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.5);
}

.archive-search {
  display: flex;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
}
.archive-search input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
.archive-search button {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.archive-pagination {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
}
.archive-pagination a {
  color: var(--accent);
  text-decoration: none;
}
.archive-pagination .is-disabled {
  opacity: 0.45;
}

.archive-live-region {
  transition: opacity 0.16s ease;
}

.archive-live-region.is-loading {
  opacity: 0.65;
}

.article-detail {
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 1rem;
}

.article-detail__head h1 {
  margin: 0.25rem 0 0.65rem;
  line-height: 1.2;
}

.article-detail__date {
  font-size: 0.82rem;
  color: var(--muted);
}

.article-detail__excerpt {
  margin: 0;
  color: var(--muted);
}

.article-detail__media {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-deep);
}

.article-detail__media .article-card__thumb {
  max-height: 520px;
}

.article-detail__body {
  max-width: 100%;
}

.article-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: center;
}

.article-detail__actions .btn {
  padding: 0.68rem 1.3rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-width: 2px;
  letter-spacing: 0.01em;
}

.article-detail__actions .btn:last-child {
  background: linear-gradient(160deg, #ffd24f, #e6ad00);
  color: #0a1528;
  border-color: #ffd24f;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 226, 128, 0.2);
}

.article-detail__actions .btn:last-child:hover,
.article-detail__actions .btn:last-child:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.article-detail__source-btn {
  margin-left: auto;
}

.article-card__category {
  margin: 0;
}
.article-card__category a {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.article-card__category a:hover,
.article-card__category a:focus-visible {
  text-decoration: underline;
}

.gallery-subtitle {
  margin: 1.75rem 0 0.85rem;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}
.gallery-subtitle:first-of-type {
  margin-top: 0.5rem;
}

.gallery-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.gallery-folder-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.gallery-folder-card:hover,
.gallery-folder-card:focus-visible {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
  outline: none;
}

.gallery-folder-card__icon {
  width: 2.25rem;
  height: 1.65rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(238, 187, 0, 0.28), rgba(15, 42, 78, 0.5));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gallery-folder-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.photo-mosaic--gallery {
  margin-top: 0.25rem;
}

.photo-item__meta {
  padding: 0.62rem 0.8rem 0.82rem;
  min-height: 5.15rem;
}

.photo-item__title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--card-title);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-item__excerpt {
  margin: 0.34rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--card-excerpt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-lightbox-hint {
  margin: -0.25rem 0 1rem;
  font-size: 0.9rem;
}

.photo-item--lightbox {
  overflow: hidden;
}

.photo-item--lightbox > a {
  display: block;
  width: 100%;
  height: 210px;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  outline: none;
}

.photo-item--lightbox > a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .photo-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .photo-item__meta {
    padding: 0.52rem 0.65rem 0.68rem;
    min-height: 4.7rem;
  }

  .photo-item__title {
    font-size: 0.86rem;
  }

  .photo-item--lightbox > a {
    height: 176px;
  }
}

/* Skrytý HTML pro GLightbox (popisek pod fotkou) */
.pd-glb-html {
  display: none;
}

.pd-glb-html__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.pd-glb-html__caption {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.95;
}

/* GLightbox — panel popisu (knihovna často nastaví světlé pozadí; držíme kontrast) */
.glightbox-clean .gslide-description {
  background: #1c2130 !important;
  color: #eceef3 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.glightbox-clean .gslide-description .pd-glb-html__title {
  color: #fff !important;
  font-weight: 700;
}

.glightbox-clean .gslide-description .pd-glb-html__caption {
  color: #d2d6e0 !important;
  opacity: 1 !important;
}

.glightbox-clean .gslide-description a {
  color: #eebb00;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.glightbox-clean .gclose path,
.glightbox-clean .gnext path,
.glightbox-clean .gprev path {
  fill: #fff;
}

:root[data-theme="light"] .glightbox-clean .gclose,
:root[data-theme="light"] .glightbox-clean .gnext,
:root[data-theme="light"] .glightbox-clean .gprev {
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

:root[data-theme="light"] .glightbox-clean .gclose path,
:root[data-theme="light"] .glightbox-clean .gnext path,
:root[data-theme="light"] .glightbox-clean .gprev path {
  fill: #111;
}

