:root {
  --accent: #7f5af0;
  --blue: #6366f1;
  --bg: #19192e;
  --bg2: #1e213a;
  --bg3: #232446;
  --bg4: #21213a;
  --bg5: #19192e;
  --text: #f6f8fa;
  --glass: rgba(23,24,33,0.89);
  --shadow: 0 4px 36px 0 rgba(80,80,160,0.16);
}
[data-theme="light"] {
  --accent: #7f5af0;
  --blue: #6366f1;
  --bg: #f9faff;
  --bg2: #f4f5fa;
  --bg3: #edefff;
  --bg4: #f7f7fb;
  --bg5: #f9faff;
  --text: #171821;
  --glass: rgba(255,255,255,0.86);
  --shadow: 0 4px 24px 0 rgba(127,90,240,0.12);
}

html, body {
  font-family: 'Inter',sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  transition: background .4s, color .4s;
}
.brand-icon {
  width: 1.4em;
  height: 1.4em;
  margin-right: 0.4em;
  vertical-align: middle;
  border-radius: 0.3em; /* můžeš upravit podle stylu ikony */
  box-shadow: 0 0 10px #7f5af0cc;
}
body { min-height: 100vh; }

/* NAVBAR */
.glassy {
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
}
.navbar {
  position: sticky; top: 0; left: 0; right: 0;
  z-index: 100;
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: .8rem 2vw;
}
.brand {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .5px;
  display: flex; align-items: center; gap: .4em;
  color: var(--accent);
}
.dot {
  width: .7em; height: .7em; background: var(--accent);
  border-radius: 50%; display: inline-block; box-shadow:0 0 8px var(--accent);
}
.nav-menu {
  display: flex; gap: 1.7em; list-style: none;
  margin: 0; padding: 0;
  transition: right .33s cubic-bezier(.53,.19,.46,.93);
}
.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.07rem;
  border-radius: .7em;
  padding: .18em .85em;
  transition: background .16s, color .14s;
}
.nav-menu a:hover, .nav-menu a.active {
border-radius: 0em;
  border-bottom: solid 2px var(--accent);
  color: #fff;
}
.theme-btn {
  background: var(--bg2);
  border: none;
  padding: .5em .7em;
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.17em;
  cursor: pointer;
  box-shadow: 0 1px 6px 0 rgba(127,90,240,0.08);
  margin-left: 1.1em;
  transition: background .19s, color .19s;
}
.theme-btn:hover { background: var(--accent); color: #fff; }
.hamburger {
  background: none;
  border: none;
  font-size: 2em;
  color: var(--accent);
  display: none;
  margin-left: 1.1em;
  cursor: pointer;
  z-index: 200;
  transition: color .2s;
}
.hamburger.opened { color: var(--blue);}
@media (max-width: 900px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -270px;
    width: 220px;
    height: 100vh;
    background: var(--glass);
    box-shadow: -2px 0 22px 0 rgba(127,90,240,0.13);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 4.6em 2em 1.2em 2em;
    gap: 1.3em;
    z-index: 150;
  }
  .nav-menu.show-menu {
    right: 0;
  }
  .nav-container { flex-direction: row; }
  .hamburger { display: block;}
}

/* Sekční pozadí */
.section-bg-hero { background: linear-gradient(115deg, var(--bg2) 40%, transparent 100%); }
.section-bg-stack { background: var(--bg3);}
.section-bg-projects { background: var(--bg4);}
.section-bg-about { background: var(--bg5);}
.section-bg-contact { background: var(--bg2);}

/* HERO */
.hero-section {
  min-height: 38vh;
  display: flex; align-items: center;
  justify-content: center;
  padding: 3.5em 0 2em 0;
}
.hero-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 2.6em;
  flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto;
}
.hero-left { min-width: 220px; }
.hero-left h1 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: .5em;
  letter-spacing: .4px;
}
.wave { display: inline-block; animation: wave 1.5s infinite;}
@keyframes wave {
  0%, 100% { transform: rotate(0);}
  10% { transform: rotate(12deg);}
  30% { transform: rotate(-10deg);}
  50% { transform: rotate(12deg);}
  70% { transform: rotate(-4deg);}
  80% { transform: rotate(8deg);}
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--blue));
  -webkit-background-clip: text; color: transparent;
  background-clip: text;
}
.subtitle {
  color: var(--blue);
  font-size: 1.25em;
  margin-bottom: 1.2em;
  font-weight: 500;
}
.cta-row { display: flex; gap: 1.1em;}
.btn {
  padding: .72em 1.7em;
  border-radius: 2em;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 1.04em;
  transition: background .22s, color .22s, box-shadow .19s;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: inline-block;
}
.btn-main {
  background: var(--accent); color: #fff;
}
.btn-main:hover { background: var(--blue);}
.btn-outline {
  background: var(--bg2); color: var(--accent); border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff;}
.hero-right { flex-shrink: 0; }
.profile-frame {
  width: 135px; height: 135px;
  border-radius: 50%; background: var(--accent);
  padding: 4px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px var(--bg2), var(--shadow);
}
.profile-pic {
  width: 125px; height: 125px; border-radius: 50%;
  object-fit: cover; border: 3px solid #fff;
  background: #eee;
}
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; gap: 2em;}
}

/* SECTION */
.section {
  padding: 3.5em 0 2.5em 0;
  text-align: center;
}
.section-title {
  font-size: 2em;
  margin-bottom: .25em;
  color: var(--accent);
  letter-spacing: .2px;
}
.section-subtitle {
  font-size: 1.05em;
  color: var(--blue);
  margin-bottom: 2.5em;
}

/* TECH STACK */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 120px);
  gap: 1.5em 2.1em;
  justify-content: center;
  margin: 1.5em auto 0 auto;
  max-width: 700px;
}
.tech {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg2);
  padding: 1em .9em .8em .9em;
  border-radius: 1.2em;
  min-width: 90px;
  box-shadow: 0 1px 6px 0 rgba(80,80,160,0.09);
  font-size: 1.62em;
  color: var(--accent);
  position: relative;
  transition: background .18s, color .18s, box-shadow .18s;
  cursor: pointer;
}
.tech span {
  font-size: .78em;
  color: var(--text);
  font-weight: 500;
  margin-top: .38em;
}
.tech:hover, .tech:focus {
  color: var(--blue);
  background: var(--bg);
  box-shadow: 0 3px 18px 0 var(--accent);
}
.tech:hover::after {
  content: attr(data-title);
  position: absolute;
  top: -36px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: .28em .9em;
  border-radius: .7em;
  font-size: .81em;
  white-space: nowrap;
  opacity: .94;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .stack-grid { grid-template-columns: repeat(3, 1fr); max-width: 390px;}
}
@media (max-width: 600px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); max-width: 260px;}
  .tech { min-width: 68px; font-size: 1.1em; padding: .7em .5em .7em .5em;}
}

/* PROJECTS */
.projects-flex {
  display: flex; flex-wrap: wrap; gap: 2.4em; justify-content: center;
  margin-top: 2em;
}
.project-card {
  background: var(--bg2);
  border-radius: 1.2em;
  box-shadow: var(--shadow);
  padding: 1.25em 1.15em 1.25em 1.15em;
  min-width: 245px; max-width: 330px;
  display: flex; flex-direction: column; align-items: center;
  transition: box-shadow .16s, transform .18s;
  position: relative;
}
.project-card:hover {
  box-shadow: 0 5px 24px 0 var(--accent);
  transform: translateY(-6px) scale(1.04);
  z-index: 1;
}
.project-card img {
  width: 100%; height: 150px;
  object-fit: cover;
  border-radius: .8em;
  margin-bottom: .8em;
  background: #eee;
}
.project-card h3 {
  color: var(--blue);
  font-size: 1.17em;
  margin: .14em 0 .34em 0;
}
.project-tags {
  display: flex; gap: .4em; flex-wrap: wrap;
  margin-bottom: .56em;
  justify-content: center;
}
.project-tags span {
  font-size: .82em;
  background: var(--accent);
  color: #fff;
  padding: .19em .7em;
  border-radius: .7em;
  margin-bottom: .09em;
}
.project-card p {
  font-size: 1em;
  color: var(--text);
  margin-bottom: .7em;
  min-height: 38px;
}
.project-links {
  display: flex; gap: 1em;
  margin-top: auto;
}
.project-links a {
  color: var(--blue);
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  display: flex; align-items: center; gap: .3em;
  transition: color .16s;
}
.project-links a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .project-card { min-width: 90vw; max-width: 98vw; }
  .projects-flex { gap: 1.1em;}
  .project-card img { height: 135px;}
}

/* ABOUT ME - MODERN */
.about-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 460px;
}
.better-about {
  position: relative;
  margin: 0 auto;
  background: linear-gradient(120deg, var(--bg2) 85%, var(--glass) 100%);
  box-shadow: 0 12px 48px 0 rgba(127,90,240,0.13), var(--shadow);
  border-radius: 2.1em;
  padding: 3.6em 2.2em 2.7em 2.2em;
  max-width: 430px;
  width: 98%;
  text-align: center;
  overflow: visible;
}
.about-float-pic {
  width: 95px; height: 95px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 6px 32px 0 rgba(127,90,240,0.09);
  border: 3px solid var(--accent);
  position: absolute;
  left: 50%; top: -46px;
  transform: translateX(-50%);
  background: #fff;
  z-index: 2;
}
.section-title { margin-top: 1.2em; }
.about-intro {
  font-size: 1.13em;
  margin-bottom: 1.2em;
  color: var(--text);
  line-height: 1.67;
  letter-spacing: .04em;
  text-align: center;
}
.about-highlight {
  font-weight: 700;
  color: var(--blue);
  font-size: 1.09em;
  letter-spacing: .04em;
  display: block;
  margin-bottom: .3em;
}
.about-quote {
  margin: 1.4em 0 1.4em 0;
  padding: .7em 1.3em;
  background: var(--glass);
  border-left: 5px solid var(--accent);
  border-radius: 1.2em;
  color: var(--accent);
  font-size: 1.08em;
  font-style: italic;
  box-shadow: 0 2px 15px 0 rgba(127,90,240,0.09);
  display: flex; align-items: center; gap: .6em;
  justify-content: center;
}
@media (max-width: 540px) {
  .better-about { padding: 2.5em 1em 1.2em 1em; }
  .about-float-pic { width: 68px; height: 68px; top: -34px;}
  .section-title { font-size: 1.38em; }
}

/* CONTACT */
.contact-cards {
  display: flex; gap: 1.2em; justify-content: center; margin-bottom: 1.4em; flex-wrap: wrap;
}
.contact-item {
  background: var(--bg3);
  border-radius: .95em;
  padding: .6em 1.15em;
  display: flex; align-items: center; gap: .7em;
  color: var(--blue); font-size: 1.07em;
  box-shadow: 0 1px 6px 0 rgba(127,90,240,0.07);
}
.contact-form {
  max-width: 450px;
  margin: 1.1em auto 0 auto;
  background: var(--bg4);
  border-radius: 1.5em;
  box-shadow: 0 6px 28px 0 rgba(127,90,240,0.10);
  padding: 1.4em 1.2em 1.1em 1.2em;
  display: flex; flex-direction: column; gap: 1.1em;
}
.form-row {
  display: flex; gap: 1em;
}
.contact-form input, .contact-form textarea {
  background: var(--bg);
  color: var(--text);
  border: none; border-radius: .9em;
  padding: .85em .9em;
  font-size: 1.04em;
  box-shadow: 0 1px 5px 0 rgba(127,90,240,0.07);
  transition: box-shadow .16s;
  width: 95%;
  margin-bottom: 0;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--accent);
  box-shadow: 0 2px 18px 0 var(--blue);
}
.contact-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  background: #31d98533;
  color: #34d859;
  border-radius: 1em;
  margin-top: 1.2em;
  font-weight: 600;
  font-size: 1.09em;
  padding: 1em 1.5em;
  animation: fadeIn .6s;
}
.contact-success i { font-size: 1.3em; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px);}
  to   { opacity: 1; transform: none;}
}

.contact-form textarea { resize: vertical; min-height: 80px;}
@media (max-width: 600px) {
  .form-row { flex-direction: column; gap: .8em;}
  .contact-form { padding: 1em .7em 1em .7em; }
}

/* FOOTER */
footer {
  background: var(--bg2);
  color: var(--accent);
  padding: 1.2em 0 1.1em 0;
  text-align: center;
  box-shadow: 0 -1px 12px 0 rgba(127,90,240,0.04);
  font-size: 1.04em;
  margin-top: 2em;
}
.footer-inner {
  display: flex; align-items: center; justify-content: center; gap: 1.5em;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--blue); font-size: 1.19em; margin-left: .7em; transition: color .15s;
}
.footer-links a:hover { color: var(--accent);}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; gap: .5em;}
}

/* Section Entrance Animation */
.animated-section {
  opacity: 0; transform: translateY(40px);
  animation: fadeUp 0.9s cubic-bezier(.3,.7,.4,1.01) forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}
.animated-section { animation-play-state: paused; }
