html {
  scroll-behavior: smooth;
}

:root {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  /* Accent: Červeno-oranžová */
  --accent: #ff5100;
  /* Secondary: Modrá */
  --secondary: #007bff;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

h1,
h2,
h3 {
  color: var(--text-main);
}
h1 span {
  color: var(--accent);
}

/* Header & Nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #333;
}

section#about strong {
  color: var(--accent);
}

.btn {
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}
.btn:hover {
  opacity: 0.8;
}
.btn-secondary {
  background: var(--secondary);
}
.btn-danger {
  background: #d9534f;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  height: 350px;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-bg {
  height: 100%;
  background-size: cover;
  background-position: center;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.project-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.6),
    transparent
  );
  padding: 20px;
  box-sizing: border-box;
  z-index: 2;
  transform: translateY(60px); /* Skryje tlačítka */
  transition: transform 0.3s;
}

.project-card:hover .project-content {
  transform: translateY(0);
}

.project-links {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Contact Section */
.contact-section {
  margin-top: 60px;
  padding: 40px;
  background: var(--card-bg);
  border-left: 5px solid var(--secondary);
}

/* Admin Styles */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #333;
  text-align: left;
}
.form-group {
  margin-bottom: 15px;
}
input,
textarea {
  width: 100%;
  padding: 10px;
  background: #2b2b2b;
  border: 1px solid #444;
  color: white;
}
.maintenance-overlay {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* --- TECH STACK --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.skill-card {
  background: #252525;
  border: 1px solid #333;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  transition: 0.3s;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.2);
}

.skill-title {
  display: block;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-main);
  margin-bottom: 5px;
}

.skill-desc {
  font-size: 0.85em;
  color: var(--text-muted);
}

/* --- KONTAKTY --- */
.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.contact-link {
  color: var(--text-main); /* Výchozí bílá/šedá */
  text-decoration: none;
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--accent); /* Při najetí se rozsvítí */
}

.contact-link.primary {
  color: var(--accent); /* Email svítí pořád */
  font-weight: bold;
}

/* Styl pro tlačítko, když se přepne do módu Uložit */
.btn-save-mode {
  background-color: #28a745 !important; /* Zelená */
  color: white;
}
.btn-save-mode:hover {
  background-color: #218838 !important;
}

/* Úprava input file, aby vypadal hezky */
input[type='file']::file-selector-button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 15px;
  transition: 0.3s;
}

input[type='file']::file-selector-button:hover {
  opacity: 0.8;
}

/* --- Auth Pages (Login/Register) --- */
.auth-header {
  text-decoration: none;
  text-align: center;
  margin-bottom: 30px;
}

.auth-header a {
  text-decoration: none;
  color: inherit; /* Převezme barvu nadpisu */
  transition: opacity 0.3s;
}

.auth-header a:hover {
  opacity: 0.8;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9em;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* --- GLOBÁLNÍ ANIMACE (FADE IN) --- */

/* Definice animace: Začíná neviditelná a o 20px níže, končí viditelná na svém místě */
@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Aplikace na celé tělo stránky */
body {
  /* Spustí animaci 'fadeInSlide', trvá 0.6 sekundy a má plynulý dojezd (ease-out) */
  animation: fadeInSlide 0.6s ease-out;
}

/* --- TIMELINE --- */
.timeline-container {
  position: relative;
  border-left: 2px solid var(--accent);
  margin-left: 20px;
  padding-left: 20px;
}

.timeline-item {
  margin-bottom: 30px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px; /* Posun tečky na čáru */
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.timeline-year {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 5px;
}

.timeline-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
}

.timeline-content p {
  margin: 0;
  color: var(--text-muted);
}
