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

:root {
  --bg: #f7f9fc;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --border: #e6e6e6;
}

body {
  font-family: Arial, sans-serif;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  padding: 20px;

  background: var(--bg);
  color: var(--text);
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

/* LIGHT MODE */
:root {
  --bg: linear-gradient(135deg, #f7f9fc 0%, #e9f1ff 100%);
  --card-bg: #ffffff;
  --text: #2c3e50;
  --border: #e6e6e6;
  --muted: #777;
}

/* DARK MODE */
body.dark {
  --bg: radial-gradient(circle at top, #0f172a 0%, #050814 100%);
  --card-bg: rgba(17, 28, 46, 0.75);
  --text: #e5e7eb;
  --border: rgba(255, 255, 255, 0.08);
  --muted: #9ca3af;
}

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

.logo-name {
  color: var(--text);
}

.nav-links a {
  color: var(--text);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
  margin: 0 auto;
}

.theme-toggle:hover {
  border-color: #3498db;
  transform: translateY(-2px);
}

.themes-toggle {
  display: flex;
}

/*.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);

  border-bottom: 1px solid var(--border);
}*/

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  padding: 18px 0;

  backdrop-filter: blur(14px);

  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid var(--border);

  transition:
    padding 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

body.dark .navbar {
  background: rgba(10, 15, 30, 0.72);
}

.navbar.scrolled {
  padding: 10px 0;

  background: rgba(255, 255, 255, 0.75);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.dark .navbar.scrolled {
  background: rgba(8, 12, 24, 0.88);

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

body.dark .logo-role {
  color: #60a5fa; /* světlejší modrá pro kontrast */
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

  text-decoration: none;
  /*color: #2c3e50;*/
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  /*color: #2c3e50;*/
}

.logo-name {
  transition: font-size 0.3s ease;
}

.navbar.scrolled .logo-name {
  font-size: 1rem;
}

.logo-role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3498db;
  margin-top: 2px;
}

/*.logo img {
  width: 34px;
  height: 34px;
}*/

.logo img {
  width: 34px;
  height: 34px;

  transition: all 0.3s ease;
}

.navbar.scrolled .logo img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;

  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  /*color: #2c3e50;*/
  font-weight: 500;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;

  width: 0%;
  height: 2px;
  background: #3498db;

  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #3498db;
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  text-decoration: none;
  background: #3498db;
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;

  transition: all 0.25s ease;
}

.nav-btn:hover {
  background: #2586c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.25);
}

/* MOBILE */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
  }
}

h2 {
  color: var(--text);
  border-bottom: 2px solid #3498db;
  padding-bottom: 4px;
  margin-top: 25px;
}

.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.project-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.project-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.project-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.project-title svg {
  width: 24px;
  height: 24px;
  stroke: #3498db;
  flex-shrink: 0;
}

.project-title a {
  text-decoration: none;
  color: #3498db;
  font-weight: bold;
}

.project-title a:hover {
  text-decoration: underline;
}

/* Screenshot galerie */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.screenshots img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.screenshot {
  width: 100%;
  border-radius: 6px;
  margin-top: 8px;
  transition: transform 0.3s ease;
}

/* Kývání při hoveru */
.screenshot:hover {
  animation: swing 1s ease-in-out infinite;
}

/* Definice kývání */
@keyframes swing {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(-2deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.live-project {
  margin-top: 6px;
  font-style: italic;
  /*color: #2c3e50;*/
  font-size: 14px;
}

.live-project {
  color: var(--muted);
}

.contact-info {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* společný “card” styl */
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;

  border-radius: 10px;

  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;

  transition: all 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
  border-color: #3498db;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
  flex-shrink: 0;
  color: #3498db;
}

.contact-item span {
  font-size: 15px;
}
footer {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #777;
}

/* Mobilní verze */
@media (max-width: 600px) {
  .header h1 {
    font-size: 1.6em;
  }

  .header p {
    font-size: 1em;
  }

  .project-list {
    grid-template-columns: 1fr;
  }
}
