*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-black: #0b0c10;
  --color-black-light: #1a1a1a;
  --color-gray-dark: #2a2a2a;
  --color-gray: #6c757d;
  --color-gray-light: #e0e0e0;
  --color-gray-bg: #f5f5f5;
  --color-blue: #2563eb;
  --color-blue-hover: #1d4ed8;
  --color-blue-dark: #1e40af;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #6c757d;
  --color-text-inverse: #ffffff;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Anton', sans-serif;
  --max-width: 1200px;
  --header-height: 75px;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.2);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--dark {
  background: var(--color-black);
}

.section--dark .section__title {
  color: var(--color-white);
}

.section--gray {
  background: var(--color-gray-bg);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  text-align: center;
  margin-bottom: 12px;
  padding-top: 6px;
  color: var(--color-black);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section__subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto 50px;
}

.section--dark .section__subtitle {
  color: rgba(255,255,255,0.6);
}

.text-blue {
  color: var(--color-blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.btn--primary {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn--outline:hover {
  background: var(--color-blue);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 22px;
  font-size: 0.85rem;
  border-radius: 40px;
}

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  transition: var(--transition);
}

.header--scrolled {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

/* podstranka C-RUN: header je vzdy tmavy, JS ho nesmi prebity */
/* plne kryci (bez backdrop-filter) - na mobilu by fixed+blur delal cerny pruh nad listou */
.page-gallery .header {
  background: #0b0c10;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-sm);
}

.header__inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-white);
  letter-spacing: 1px;
}

.logo__accent {
  color: var(--color-blue);
}

.logo__sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav__link:hover {
  color: var(--color-white);
}

.nav__link--cta {
  background: var(--color-blue);
  color: var(--color-white);
  padding: 10px 24px;
  border-radius: 50px;
}

.nav__link--cta:hover {
  background: var(--color-blue-hover);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-white);
  transition: var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-black);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.15), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.1), transparent 40%);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 60px;
}

.hero__content {
  max-width: 700px;
}

.hero__intro {
  display: block;
}

.hero__intro-text {
  min-width: 0;
}

.hero__avatar {
  display: none;
}

.hero__name-full {
  display: inline;
}

.hero__divider {
  display: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1.1;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero__accent {
  color: var(--color-blue);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin-bottom: 32px;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.hero__subtitle-br {
  display: none;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Hero tech ikony (jazyky / software) ─────────────────── */
.hero__tech {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.hero__tech-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__tech-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.hero__tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.hero__tech-icon:hover {
  transform: translateY(-3px);
}

.hero__tech-more {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-white);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: var(--transition);
}

.hero__tech-more:hover {
  transform: translateY(-3px);
  color: #60a5fa;
}

/* ── Hero foto v kolečku s rotujícím prstenem ───────────── */
.hero__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__photo-circle {
  position: relative;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-blue);
  box-shadow: 0 12px 48px rgba(37, 99, 235, 0.35);
}

.hero__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Odlesky po obvodu kolečka */
.hero__photo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    rgba(0, 224, 255, 0.15) 0deg,
    rgba(255, 255, 255, 0.9) 10deg,
    rgba(0, 224, 255, 0.15) 22deg,
    transparent 40deg,
    rgba(0, 224, 255, 0.2) 80deg,
    rgba(255, 255, 255, 0.6) 90deg,
    rgba(0, 224, 255, 0.15) 100deg,
    transparent 130deg,
    rgba(0, 224, 255, 0.25) 200deg,
    rgba(255, 255, 255, 0.8) 212deg,
    rgba(0, 224, 255, 0.15) 225deg,
    transparent 260deg,
    rgba(0, 224, 255, 0.2) 300deg,
    rgba(255, 255, 255, 0.5) 310deg,
    rgba(0, 224, 255, 0.15) 322deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
  filter: drop-shadow(0 0 6px rgba(0, 224, 255, 0.6));
}

.hero__stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--color-blue);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── ABOUT ──────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about__card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}

.about__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-blue);
}

.about__icon {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 16px;
}

.about__icon-svg {
  width: 48px;
  height: 48px;
  color: var(--color-blue);
  stroke-width: 1.5;
}

.about__card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.about__card p {
  font-size: 0.92rem;
  color: var(--color-text-light);
}

/* ── SKILLS SPHERE ──────────────────────────────────────── */
.skills {
  background-color: #0c0a14;
  background-image:
    radial-gradient(rgba(37, 99, 235, 0.14) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18), transparent 55%);
  background-size: 22px 22px, 100% 100%;
}

.section__title--gradient {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  text-align: center;
  margin-bottom: 12px;
  padding-top: 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #93c5fd, #60a5fa, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.skills__sphere-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

#skillSphere {
  width: 100%;
  height: 520px;
  display: block;
  cursor: grab;
  touch-action: none;
}

#skillSphere:active {
  cursor: grabbing;
}

.skills__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(147, 197, 253, 0.7);
  font-size: 0.85rem;
  margin-top: 8px;
}

.skills__hint-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: rgba(147, 197, 253, 0.8);
  fill: none;
}

.skills__tooltip {
  position: absolute;
  background: var(--color-blue);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  pointer-events: none;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

/* ── PROJECTS ───────────────────────────────────────────── */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.project__img {
  aspect-ratio: 16 / 10;
  background: var(--color-black-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project:hover .project__img img {
  transform: scale(1.05);
}

.project__placeholder {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.project__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project__name {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.project__desc {
  font-size: 0.92rem;
  color: var(--color-text-light);
  flex: 1;
  margin-bottom: 20px;
}

.project__links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project__tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--color-gray-bg);
  color: var(--color-blue);
  padding: 6px 14px;
  border-radius: 50px;
}

/* ── GALLERY (C-RUN) ────────────────────────────────────── */
.gallery-hero {
  padding: 140px 0 100px;
  position: relative;
  transition: background 0.5s ease;
}

/* svetlejsi "smatana bily" podklad se skvrnami (light fotky) */
.page-gallery[data-mode="light"] .gallery-hero {
  background-color: #e9e6e0;
  background-image:
    radial-gradient(circle, rgba(60, 60, 60, 0.07) 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(60, 60, 60, 0.04) 1px, transparent 2px),
    radial-gradient(circle at 30% 20%, rgba(180, 174, 160, 0.25), transparent 45%);
  background-size: 26px 26px, 34px 34px, 100% 100%;
}

/* svetlejsi sede pozadi se skvrnami (dark fotky) */
.page-gallery[data-mode="dark"] .gallery-hero {
  background-color: #2a2d34;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 2px),
    radial-gradient(circle at 30% 20%, rgba(148, 163, 184, 0.12), transparent 45%);
  background-size: 26px 26px, 34px 34px, 100% 100%;
}

.gallery-hero__back {
  display: inline-block;
  color: var(--color-blue);
  font-weight: 600;
  margin-bottom: 24px;
  transition: var(--transition);
}

.page-gallery[data-mode="dark"] .gallery-hero__back { color: #93c5fd; }
.page-gallery[data-mode="dark"] .gallery-hero__back:hover { color: #bfdbfe; }
.page-gallery[data-mode="light"] .gallery-hero__back { color: #2563eb; }
.page-gallery[data-mode="light"] .gallery-hero__back:hover { color: #1d4ed8; }

.page-gallery[data-mode="dark"] .section__title { color: #f5f5f5; }
.page-gallery[data-mode="light"] .section__title { color: #1a1a1a; }

.page-gallery[data-mode="dark"] .section__subtitle { color: rgba(226, 232, 240, 0.7); }
.page-gallery[data-mode="light"] .section__subtitle { color: rgba(60, 60, 60, 0.75); }

.page-gallery[data-mode="dark"] .gallery__mode-label { color: rgba(226, 232, 240, 0.6); }
.page-gallery[data-mode="light"] .gallery__mode-label { color: rgba(60, 60, 60, 0.7); }

.gallery__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto 8px;
  max-width: 720px;
}

.gallery__mode-label {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ── Lampicka s snurkou ─────────────────────────────────── */
.lamp {
  position: relative;
  width: 150px;
  height: 230px;
  margin: 0 auto 36px;
  cursor: pointer;
}

.lamp__cord-top {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 60px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(148,163,184,0.7));
}

.lamp__shade {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  width: 130px;
  height: 78px;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8 60%, #1e3a8a);
  border-radius: 18px 18px 6px 6px;
  box-shadow:
    inset 0 -14px 24px rgba(0,0,0,0.35),
    0 10px 24px rgba(29, 78, 216, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: box-shadow 0.5s ease, filter 0.5s ease;
}

.lamp__shade::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  width: 92px;
  height: 8px;
  background: #93c5fd;
  border-radius: 0 0 8px 8px;
}

.lamp__bulb {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff7cc, #fde68a 60%, #f59e0b);
  box-shadow: 0 0 0 rgba(253, 230, 138, 0);
  opacity: 0.55;
  transition: opacity 0.5s ease, box-shadow 0.5s ease;
}

/* sviti = svetly mod */
.lamp.is-light .lamp__bulb {
  opacity: 1;
  box-shadow:
    0 0 24px 6px rgba(253, 230, 138, 0.85),
    0 0 60px 18px rgba(253, 230, 138, 0.35);
}

.lamp.is-light .lamp__shade {
  box-shadow:
    inset 0 -14px 24px rgba(0,0,0,0.25),
    0 10px 32px rgba(29, 78, 216, 0.5);
}

.lamp__pull-cord {
  position: absolute;
  left: 50%;
  top: 126px;
  transform: translateX(-50%);
  width: 2px;
  height: 70px;
  background: #94a3b8;
  transform-origin: top center;
}

.lamp__pull-bead {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #60a5fa, #2563eb 70%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* animace zatazeni */
.lamp.is-pulling .lamp__pull-cord {
  animation: lamp-pull 0.55s ease;
}

.lamp.is-pulling .lamp__shade {
  animation: lamp-wiggle 0.55s ease;
}

@keyframes lamp-pull {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  25%     { transform: translateX(-50%) translateY(34px); }
  45%     { transform: translateX(-50%) translateY(28px); }
  65%     { transform: translateX(-50%) translateY(34px); }
  85%     { transform: translateX(-50%) translateY(0); }
}

@keyframes lamp-wiggle {
  0%, 100% { transform: translateX(-50%) rotate(0); }
  20%      { transform: translateX(-50%) rotate(-3deg); }
  40%      { transform: translateX(-50%) rotate(3deg); }
  60%      { transform: translateX(-50%) rotate(-2deg); }
  80%      { transform: translateX(-50%) rotate(1deg); }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.gallery__item {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: var(--transition);
  display: none;
}

.page-gallery[data-mode="light"] .gallery__item {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.gallery__item[data-mode="dark"].is-visible,
.gallery__item[data-mode="light"].is-visible {
  display: block;
  animation: gallery-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery.is-switching .gallery__item.is-visible {
  animation: gallery-out 0.22s ease both;
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gallery-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── LIGHTBOX ───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 13, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox__nav:hover {
  background: var(--color-blue);
}

.lightbox__nav--prev {
  left: 24px;
}

.lightbox__nav--next {
  right: 24px;
}

/* ── CONTACT ────────────────────────────────────────────── */.contact__details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.contact__detail-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
}

.contact__detail-card:hover {
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
}

.contact__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.contact__icon-svg {
  width: 36px;
  height: 36px;
  color: var(--color-blue);
  stroke-width: 1.5;
}

.contact__detail-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact__link {
  color: var(--color-blue);
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-word;
}

.contact__detail-card p {
  font-size: 0.92rem;
  color: var(--color-text-light);
}

/* ── CHAT (Tony) ────────────────────────────────────────── */
.chat {
  background-color: #0c0a14;
  background-image:
    radial-gradient(rgba(37, 99, 235, 0.14) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18), transparent 55%);
  background-size: 22px 22px, 100% 100%;
}

.chat .section__title {
  color: var(--color-white);
}

.chat .section__subtitle {
  color: rgba(255, 255, 255, 0.6);
}

.chat .text-blue {
  color: #93c5fd;
}

.chat__box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-black);
  border-bottom: 3px solid var(--color-blue);
}

.chat__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.chat__avatar img {
  width: 150%;
  height: 150%;
  object-fit: contain;
  object-position: center;
}

.chat__name {
  color: var(--color-white);
  font-size: 1.05rem;
  display: block;
}

.chat__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.chat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.chat__messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 380px;
  overflow-y: auto;
  background:
    radial-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}

.chat__msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat__msg--user {
  align-self: flex-end;
  background: var(--color-blue);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
}

.chat__msg--bot {
  align-self: flex-start;
  background: var(--color-gray-bg);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat__msg--error {
  align-self: flex-start;
  background: #fee2e2;
  color: #b91c1c;
  border-bottom-left-radius: 4px;
}

/* Skákající tečky "Tonny píše..." */
.chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}

.chat__typing i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-blue);
  animation: chatTyping 1.2s ease-in-out infinite;
}

.chat__typing i:nth-child(2) { animation-delay: 0.15s; }
.chat__typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px 0;
  margin-bottom: 12px;
}

.chat__suggestion {
  background: var(--color-gray-bg);
  border: 1px solid var(--color-gray-light);
  color: var(--color-text-light);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.chat__suggestion:hover {
  background: var(--color-gray-light);
  border-color: #c0c0c0;
  color: var(--color-text);
}

.chat__form {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-gray-light);
}

.chat__input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--color-gray-light);
  border-radius: 50px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.chat__input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.chat__send {
  padding: 12px 22px;
  flex-shrink: 0;
}

.chat__provider {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-light);
  padding: 0 0 10px;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--color-black);
  color: rgba(255,255,255,0.75);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 60px 24px;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-white);
  letter-spacing: 1px;
}

.footer__text {
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer__heading {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  display: inline-block;
  font-size: 0.9rem;
  transition: var(--transition);
  margin-top: 6px;
}

.footer__link:hover {
  color: var(--color-blue);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer__credit {
  margin-top: 6px;
}

.footer__credit a {
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  transition: var(--transition);
}

.footer__credit a:hover {
  color: var(--color-blue);
}

/* ── REVEAL ON SCROLL ───────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* stredovani zpozdeni pro gridy */
[data-reveal][data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-reveal-delay="5"] { transition-delay: 0.5s; }
[data-reveal][data-reveal-delay="6"] { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .about__grid,
  .projects__grid,
  .contact__details {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero__content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    text-align: left;
  }

  .hero__photo {
    order: 2;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }

  .header {
    background: rgba(13, 13, 13, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .hero {
    overflow-x: hidden;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
    gap: 40px;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    text-align: left;
    align-self: start;
    padding-top: calc(var(--header-height) + 30px);
  }

  .hero__title {
    font-size: clamp(3rem, 9vw, 5rem);
    line-height: 1.05;
    margin-bottom: 56px;
    overflow-wrap: break-word;
    max-width: 100%;
    width: 100%;
  }

  .hero__badge {
    margin-bottom: 18px;
  }

  .hero__subtitle {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  .hero__subtitle-br {
    display: inline;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__photo-circle {
    width: 500px;
    height: 500px;
    max-width: 100%;
  }

  .hero__photo {
    order: 2;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 20px 30px;
    gap: 12px;
    transform: translateY(-200%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }

  .nav__menu.active {
    transform: translateY(0);
  }

  .nav__menu li {
    list-style: none;
  }

  .nav__menu .nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 1rem;
    transition: var(--transition);
  }

  .nav__menu .nav__link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(37, 99, 235, 0.5);
  }

  .nav__menu .nav__link--cta {
    background: var(--color-blue);
    color: var(--color-white);
    border: none;
  }

  .nav__menu .nav__link--cta:hover {
    background: var(--color-blue-hover);
  }

  .hero__stats {
    gap: 32px;
  }

  #skillSphere {
    height: 420px;
  }

  .chat__msg {
    max-width: 90%;
  }

  .chat__form {
    flex-direction: column;
  }

  .chat__send {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .about__grid,
  .projects__grid,
  .contact__details,
  .footer__inner {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery__actions {
    justify-content: center;
  }

  .hero__stats {
    flex-direction: column;
    gap: 20px;
  }

  #skillSphere {
    height: 380px;
  }
}

/* ── MOBILNÍ HERO (≤480px) ─────────────────────────────── */
@media (max-width: 480px) {
  .hero {
    min-height: auto;
    align-items: flex-start;
    background: #0b0c10;
    padding: calc(var(--header-height) + 10px) 0 20px;
  }

  .hero__grid {
    gap: 0;
    text-align: left;
  }

  .hero__content {
    padding-top: 0;
  }

  /* velké foto přes celou šířku na mobilu skryjeme */
  .hero__photo {
    display: none;
  }

  /* řádek: avatar + (badge + nadpis) */
  .hero__intro {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
  }

  .hero__avatar {
    display: block;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #4d7fff;
    background: #16181d;
  }

  .hero__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hero__intro-text {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .hero__badge {
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #b8bac0;
    background: rgba(77, 127, 255, 0.12);
    border: 1px solid rgba(77, 127, 255, 0.35);
    padding: 5px 11px;
    border-radius: 50px;
    margin-bottom: 7px;
    max-width: 100%;
    white-space: normal;
  }

  .hero__title {
    font-size: clamp(1rem, 5.2vw, 1.5rem);
    line-height: 1.1;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    width: auto;
    max-width: none;
    white-space: nowrap;
  }

  .hero__name-full {
    display: none;
  }

  /* bio */
  .hero__subtitle {
    font-size: 13.5px;
    color: #8a8d93;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  /* dvě tlačítka stejně široká */
  .hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: stretch;
  }

  .hero__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .hero__actions .btn--primary {
    background: #4d7fff;
    border-color: #4d7fff;
  }

  .hero__actions .btn--outline {
    border-color: #4d7fff;
    color: #4d7fff;
  }

  /* tenký oddělovač */
  .hero__divider {
    display: block;
    border-top: 0.5px solid rgba(255, 255, 255, 0.12);
    margin: 20px 0 14px;
  }

  /* tech ikony v jedné řadě */
  .hero__tech {
    margin-top: 0;
    gap: 10px;
    justify-content: flex-start;
  }

  .hero__tech-icons {
    flex-wrap: nowrap;
    gap: 12px;
    overflow: hidden;
  }

  .hero__tech-icon {
    width: 18px;
    height: 18px;
  }

  .hero__tech-more {
    width: auto;
    height: auto;
    font-size: 1.25rem;
    line-height: 1;
    margin-left: auto;
    color: #8a8d93;
  }
}

/* extra úzké displeje */
@media (max-width: 360px) {
  .hero__actions .btn {
    font-size: 0.85rem;
    padding: 12px 6px;
    white-space: nowrap;
  }

  .hero__intro {
    gap: 12px;
  }

  .hero__avatar {
    width: 68px;
    height: 68px;
  }
}
