/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

* {
  box-sizing: border-box;
}

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #1f2937;
  --text-color: #111827;
  --text-light: #6b7280;
  --bg-color: #f8fafc;
  --section-bg: #f1f5f9;
  --card-bg: #ffffff;
  --nav-bg: rgba(248, 250, 252, 0.8);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --container-width: 1100px;
  --radius: 12px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-light: #94a3b8;
  --section-bg: #1e293b;
  --card-bg: #1e293b;
  --nav-bg: rgba(15, 23, 42, 0.8);
  --secondary-color: #070a13;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  background-color: var(--bg-color);
  position: relative;
}

/* Globální efekt nasvícení za kurzorem */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    800px circle at var(--mouse-px-x, 50%) var(--mouse-px-y, 50%),
    rgba(99, 102, 241, 0.07),
    transparent 40%
  );
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1s ease;
}

body.mouse-moving::after {
  opacity: 1;
}

.full-height {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* --- Header & Nav --- */
header {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  position: fixed;
  width: calc(100% - 40px);
  max-width: var(--container-width);
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: var(--transition);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 900;
  background: linear-gradient(-45deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 300%;
  animation: gradientFlow 5s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  transition: var(--transition);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-gif {
  height: 1.1em;
  width: auto;
  border-radius: 8px;
  transition: var(--transition);
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.2));
}

.logo-png {
  height: 0.9em;
  width: auto;
  border-radius: 4px;
  transition: var(--transition);
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.2));
}

header .logo:hover .logo-gif,
header .logo:hover .logo-png {
  transform: scale(1.1) rotate(5deg);
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header .logo:hover {
  transform: scale(1.05) rotate(-1deg);
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

header .nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  margin-left: auto;
  margin-right: 3rem;
}

header .nav-links li {
  margin-left: 32px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 66px;
  justify-content: flex-end;
}

header .nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

header .nav-links li a:hover {
  color: var(--primary-color);
}

/* --- Sections --- */
.section {
  padding: 120px 0;
  position: relative;
}

/* Jemný oddělovač mezi sekcemi */
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  z-index: 1;
}

/* Velmi jemné střídání pozadí pro vizuální rytmus */
.section:nth-of-type(even) {
  background: rgba(99, 102, 241, 0.02);
}

body.dark-mode .section:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.015);
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(99, 102, 241, 0.2) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  z-index: 1;
}

body.dark-mode .grid-bg {
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px);
}

.blob-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: blur(80px);
  opacity: 0.6;
  /* Plynulá reakce na myš přes CSS proměnné z JS */
  transform: translate(calc(var(--mouse-x, 0) * 80px), calc(var(--mouse-y, 0) * 80px));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  /* Mnohem pomalejší a organičtější pohyb */
  animation: blob-float 40s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
  will-change: transform;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.35);
  top: -150px;
  right: -100px;
  animation-duration: 60s;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: rgba(168, 85, 247, 0.3);
  bottom: -100px;
  left: -100px;
  animation-delay: -10s;
  animation-duration: 50s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: rgba(236, 72, 153, 0.25);
  top: 35%;
  left: 25%;
  animation-duration: 40s;
  animation-delay: -5s;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(10vw, -10vh) scale(1.2) rotate(45deg); }
  66% { transform: translate(-5vw, 15vh) scale(0.9) rotate(-45deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

/* body.dark-mode .page-bg { opacity: 0.4; } */

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-static {
  white-space: nowrap;
}

.typewriter-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  height: 1.4em;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 0.3rem;
  text-align: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#typewriter {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

.slide-in {
  animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-out {
  animation: slideOut 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* --- Modern Buttons --- */
.btn {
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.btn-secondary {
  background: var(--secondary-color);
  color: #fff;
}

body.dark-mode .btn-secondary {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: #374151;
  color: #fff;
  transform: translateY(-2px);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-light);
  border-radius: 13px;
  position: relative;
}

.mouse::before {
  content: "";
  width: 4px;
  height: 8px;
  background: var(--text-light);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  border-radius: 2px;
  animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 15px); }
}

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 3rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-weight: 700;
}

body:not(.dark-mode) .skill-card {
  background: var(--bg-color);
  border-color: rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.skill-card i {
  font-size: 2.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
  padding: 5px;
  line-height: 1;
}

.skill-card:hover i {
  transform: scale(1.15) rotate(5deg);
}

.skill-card span {
  font-size: 1.1rem;
  color: var(--text-color);
}

footer {
  background: transparent;
  color: var(--text-light);
  padding: 5rem 0 3rem;
  position: relative;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.footer-left {
  text-align: left;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(-45deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 300%;
  animation: gradientFlow 5s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  transition: var(--transition);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.footer-logo .logo-png {
  height: 1em;
}

.footer-logo:hover {
  transform: scale(1.05) rotate(-1deg);
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.footer-left p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.7;
  font-weight: 500;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.05);
  color: var(--text-light);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(99, 102, 241, 0.1);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.social-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.social-link:hover {
  transform: translateY(-5px);
  color: #ffffff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* Individuální barvy při hoveru pro modernější feel */
.social-link[aria-label="Instagram"]::after {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  background-size: 200% 200%;
  background-position: center;
  /* Roztažení gradientu i pod border */
  padding: 1px;
  margin: -1px;
}

.social-link[aria-label="Instagram"]:hover::after {
  opacity: 1;
}

.social-link[aria-label="Instagram"]:hover {
  border-color: transparent;
  color: #ffffff;
}

.social-link[aria-label="Facebook"]:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}

.social-link[aria-label="LinkedIn"]:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #ffffff;
}

.social-link[aria-label="WhatsApp"]:hover {
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.footer-cat {
  height: 1.5rem;
  width: auto;
  vertical-align: middle;
  margin: 0 4px;
  border-radius: 4px;
  transition: var(--transition);
}

footer p:hover .footer-cat {
  transform: scale(1.2) rotate(5deg);
}

/* body.dark-mode footer je nyní obsloužen přes transparentní pozadí a ::before oddělovač */

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  .footer-left {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* --- Contact Section Specifics --- */
.contact-intro {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

body:not(.dark-mode) .contact-card {
  background: var(--bg-color);
  border-color: rgba(0, 0, 0, 0.05);
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  background: rgba(99, 102, 241, 0.05);
}

/* Specifické brandové barvy pro LinkedIn a WhatsApp karty */
.contact-card[href*="linkedin"]:hover {
  border-color: #0077b5;
  background: rgba(0, 119, 181, 0.05);
}

.contact-card[href*="linkedin"]:hover .contact-icon {
  background-color: #0077b5;
  box-shadow: 0 10px 20px rgba(0, 119, 181, 0.3);
}

.contact-card[href*="linkedin"]:hover .contact-icon::before {
  opacity: 0;
}

.contact-card[href*="wa.me"]:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.05);
}

.contact-card[href*="wa.me"]:hover .contact-icon {
  background-color: #25d366;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.contact-card[href*="wa.me"]:hover .contact-icon::before {
  opacity: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  position: relative;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.contact-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 50%;
  z-index: -1;
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-card:hover .contact-icon {
  transform: scale(1.1) rotate(10deg);
}

.contact-card:not([href*="linkedin"]):not([href*="wa.me"]):hover .contact-icon {
  background-color: var(--primary-hover);
}

.contact-card:hover .contact-icon::before {
  opacity: 0;
}

.contact-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.contact-card span {
  font-size: 0.9rem;
  opacity: 0.7;
  word-break: break-all;
}

/* --- Custom Cursor --- */
.cursor, .cursor-follower {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }

  a, button, .logo, .footer-logo, #theme-toggle, .mobile-nav-toggle, .skill-card, .social-link, input, select, textarea {
    cursor: none;
  }

  .cursor {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    margin-top: -4px;
    margin-left: -4px;
    pointer-events: none;
    z-index: 10000;
  }

  .cursor-follower {
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    margin-top: -15px;
    margin-left: -15px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, margin 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  }

  .cursor-follower.active {
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    background-color: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    opacity: 0.8;
  }
}

#about, #contact, #skills {
  text-align: center;
}

#about h2, #contact h2, #skills h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

#about h2::after, #contact h2::after, #skills h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* --- About Section Specifics --- */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
  text-align: left;
  max-width: 1000px;
  margin: 0 auto;
}

.about-image {
  flex: 0 0 320px;
  position: relative;
  z-index: 1;
}

.about-image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  display: block;
}

.about-image::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.3;
  transition: var(--transition);
}

.about-image:hover img {
  transform: translateY(-5px);
}

.about-image:hover::before {
  transform: translate(5px, 5px);
  opacity: 0.5;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--primary-color);
  font-weight: 600;
}

@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .about-image {
    flex: 0 0 auto;
    width: 250px;
  }

  .about-image::before {
    top: -10px;
    left: -10px;
  }
}

/* --- Theme Toggle --- */
#theme-toggle {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  color: var(--text-color);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#theme-toggle:hover {
  color: var(--primary-color);
}

#theme-toggle i {
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

#theme-toggle .fa-sun {
  color: #f1c40f;
}

#theme-toggle .fa-moon {
  color: #f5f3ce;
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

body.dark-mode #theme-toggle .fa-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

body.dark-mode #theme-toggle .fa-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* --- Mobile Nav Toggle --- */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  width: 20px;
  height: 14px;
  position: relative;
  z-index: 1001;
  transition: var(--transition);
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-color);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.mobile-nav-toggle span:nth-child(1) {
  top: 0px;
}

.mobile-nav-toggle span:nth-child(2) {
  top: 6px;
}

.mobile-nav-toggle span:nth-child(3) {
  top: 12px;
}

.mobile-nav-toggle.active span:nth-child(1) {
  top: 6px;
  transform: rotate(135deg);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-nav-toggle.active span:nth-child(3) {
  top: 6px;
  transform: rotate(-135deg);
}

/* --- Media Queries --- */
@media screen and (max-width: 768px) {
  header {
    width: calc(100% - 24px);
    top: 12px;
    padding: 0.5rem 0;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    margin: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top center;
  }

  header .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  header .nav-links li {
    margin: 10px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }

  header .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Postupné zobrazení položek menu */
  header .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  header .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
  header .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
  header .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }

  .hero h1 {
    font-size: clamp(1.3rem, 9.1vw, 2.8rem);
    padding: 0 20px;
    height: 9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0.5rem;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .section {
    padding: 80px 0;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

