:root {
  --bg: #f2f4f7;
  --text: #0f172a;
  --card: rgba(255, 255, 255, 0.96);
  --accent: #2563eb;
  --muted: #64748b;
}

body.dark {
  --bg: #0b1220;
  --text: #e5e7eb;
  --card: rgba(30, 41, 59, 0.96);
  --accent: #38bdf8;
  --muted: #94a3b8;
}

/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

/* PAGE SYSTEM */
.page {
  display: none;
  min-height: 100vh;
  padding: 90px 20px;
}

.page.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* HOME BACKGROUND */
.home-bg {
  background: url("assets/background.jpg") center / cover no-repeat;
}

/* CARD */
.card {
  background: var(--card);
  width: 100%;
  max-width: 900px;
  padding: 32px;
  border-radius: 22px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ALIGNMENT */
.center {
  text-align: center;
}

/* AVATAR */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}

.avatar.large {
  width: 160px;
  height: 160px;
}

/* TOP BAR & ACTIONS */
.top-bar,
.actions {
  position: fixed;
  top: 12px;
  display: flex;
  gap: 10px;
  z-index: 50;
}

.top-bar {
  left: 12px;
}

.actions {
  right: 12px;
}

.top-bar button,
.actions button {
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: var(--card);
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* TOP BAR & ACTIONS – ICON COLOR FIX */
.top-bar button,
.actions button {
  color: var(--text); /* automaticky biela v dark, čierna v light */
}

/* Hover jemne zvýrazní */
.top-bar button:hover,
.actions button:hover {
  color: var(--accent);
}

/* HOME MENU */
.menu {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.menu button {
  padding: 18px;
  border-radius: 14px;
  border: none;
  font-size: 18px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.menu button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* =======================
   CV TITLE
======================= */
.cv-title {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25);
}

.cv-title h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cv-divider {
  width: 120px;
  height: 4px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 999px;
}

/* =======================
   CV SECTIONS
======================= */
.cv-section {
  margin-bottom: 42px;
}

.cv-section h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.cv-section p,
.cv-section li {
  line-height: 1.6;
}

/* =======================
   TIMELINE (ak ju používaš)
======================= */
.timeline {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.timeline li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 18px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 3px;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.date {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 2px;
}

/* =======================
   CV ITEM (Vzdelanie / Prax)
======================= */
.cv-item {
  margin-bottom: 30px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.cv-item strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 3px;
}

.cv-item .sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 4px;
}

.cv-item .date {
  font-size: 14px;
  color: var(--muted);
}

/* =======================
   SKILLS & INTERESTS TAGS
======================= */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  background: var(--accent);
  color: white;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.skills span:hover {
  transform: translateY(-2px);
}

/* =======================
   CONTACT
======================= */
.contact-box {
  display: grid;
  gap: 16px;
  margin: 20px 0 28px;
}

.contact-item {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* MAP */
.map iframe {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 16px;
}

/* DOWNLOAD BUTTON */
.download-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 26px;
  background: var(--accent);
  color: white;
  border-radius: 14px;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 600px) {
  .card {
    padding: 22px;
  }

  .cv-title h2 {
    font-size: 28px;
  }

  .cv-section h3 {
    font-size: 20px;
  }
}

/* =======================
   CONTACT – DESIGN UPGRADE
======================= */

.contact-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 30px 0 34px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark .contact-card {
  background: rgba(30, 41, 59, 0.85);
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
}

.contact-icon {
  font-size: 28px;
}

.contact-text {
  text-align: left;
}

.contact-text span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-text a,
.contact-text p {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  text-decoration: none;
}

.contact-text a:hover {
  color: var(--accent);
}

/* =======================
   CONTACT MAP FIX
======================= */

#contact .map {
  width: 100%;
  margin-top: 34px;
}

#contact .map iframe {
  width: 100%;
  max-width: 100%;
  height: 320px;
  display: block;
}

/* MAP – full width under contact cards */
.contact-box .map {
  grid-column: 1 / -1; /* roztiahne mapu cez všetky stĺpce */
  width: 100%;
  margin-top: 24px;
}

.contact-box .map iframe {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 16px;
}

/* =======================
   ABOUT SECTION
======================= */
.about-content {
  max-width: 760px;
  margin: 0 auto;
}

.about-content p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 22px;
  text-align: left;
}

body.dark .about-content p {
  color: #e5e7eb;
}

/* jemný akcent */
.about-content p:first-child {
  font-weight: 500;
}
/* =======================
   SECTION BACKGROUNDS
   (place at END of file)
======================= */

/* CV */
#cv {
  background:
    linear-gradient(
      rgba(255,255,255,0.92),
      rgba(255,255,255,0.92)
    ),
    url("assets/bg-cv.jpg") center / cover no-repeat;
}

body.dark #cv {
  background:
    linear-gradient(
      rgba(11,18,32,0.88),
      rgba(11,18,32,0.88)
    ),
    url("assets/bg-cv-dark.jpg") center / cover no-repeat;
}

/* ABOUT */
#about {
  background:
    linear-gradient(
      rgba(255,255,255,0.92),
      rgba(255,255,255,0.92)
    ),
    url("assets/bg-about.jpg") center / cover no-repeat;
}

body.dark #about {
  background:
    linear-gradient(
      rgba(11,18,32,0.88),
      rgba(11,18,32,0.88)
    ),
    url("assets/bg-about-dark.jpg") center / cover no-repeat;
}

/* PROJECTS */
#projects {
  background:
    linear-gradient(
      rgba(255,255,255,0.92),
      rgba(255,255,255,0.92)
    ),
    url("assets/bg-projects.jpg") center / cover no-repeat;
}

body.dark #projects {
  background:
    linear-gradient(
      rgba(11,18,32,0.88),
      rgba(11,18,32,0.88)
    ),
    url("assets/bg-projects-dark.jpg") center / cover no-repeat;
}

/* CONTACT */
#contact {
  background:
    linear-gradient(
      rgba(255,255,255,0.92),
      rgba(255,255,255,0.92)
    ),
    url("assets/bg-contact.jpg") center / cover no-repeat;
}

body.dark #contact {
  background:
    linear-gradient(
      rgba(11,18,32,0.88),
      rgba(11,18,32,0.88)
    ),
    url("assets/bg-contact-dark.jpg") center / cover no-repeat;
}

/* =======================
   CARD LIFT EFFECT
======================= */

.page .card {
  backdrop-filter: blur(6px);
}
/* =======================
   PROJECT GALLERY (NO CROP)
======================= */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.project-gallery img {
  width: 100%;
  height: 180px;
  object-fit: contain;          /* 👈 celé fotky */
  background: #00000010;
  padding: 6px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}

.project-gallery img:hover {
  transform: scale(1.03);
}

/* =======================
   IMAGE MODAL
======================= */

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.image-modal.active {
  display: flex;
}

.modal-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.modal-nav {
  position: absolute;
  top: 50%;
  font-size: 50px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
}

.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }

