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

:root {
  --bg: #f5f1eb;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #1d4ed8;
  --accent-light: #2563eb;
  --label: #3b6e8a;
  --border: #d8d2c8;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  overscroll-behavior: none;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5rem;
  height: var(--nav-h);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 0 2px 20px rgba(37,99,235,0.35);
}

nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  position: relative;
  z-index: 2;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links a {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0 1.4rem;
  height: var(--nav-h);
  line-height: var(--nav-h);
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1.4rem; right: 1.4rem;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 2;
  background: none;
  border: none;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: linear-gradient(180deg, #1e40af, #1d4ed8);
  z-index: 199;
  flex-direction: column;
  padding: 1rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s;
}

.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover { background: rgba(255,255,255,0.1); color: #fff; }

.full-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

#hero {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 680px;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 65%;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  z-index: 0;
  filter: contrast(1.04) saturate(1.08);
  will-change: opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.bg-slide.active { opacity: 1; }

#hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(37,99,235,0.18) 0%, transparent 30%);
  z-index: 1;
}

#hero > :not(.bg-slide):not(#hero-overlay):not(.slider-dots) {
  position: relative;
  z-index: 2;
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #dbeafe;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent), 0 8px 28px rgba(0,0,0,0.18);
  z-index: 2;
}

.hero-avatar::before {
  content: '';
  position: absolute;
  width: 58px; height: 58px;
  background: var(--accent);
  opacity: 0.9;
  border-radius: 50%;
  top: 22px; left: 50%; transform: translateX(-50%);
}

.hero-avatar::after {
  content: '';
  position: absolute;
  width: 100px; height: 70px;
  background: var(--accent);
  opacity: 0.7;
  border-radius: 50px 50px 0 0;
  bottom: 0; left: 50%; transform: translateX(-50%);
}

.slider-dots {
  position: absolute;
  bottom: 1.8rem;
  left: 0;
  right: 0;
  display: flex;
  gap: 7px;
  justify-content: center;
  z-index: 2;
}

.slider-dots .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.5);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.slider-dots .dot.active {
  background: #fff;
  transform: scale(1.35);
  border-color: transparent;
}

.hero-text-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.20);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 14px;
  padding: 0.7rem 4rem 0.75rem;
  text-align: center;
  width: min(468px, 90vw);
}

.hero-tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.35rem;
}

.hero-name { margin-bottom: 0.3rem; line-height: 1.1; }

.hero-name .first {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #fff;
}

.hero-name .last {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #fff;
}

.hero-bio {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-top: 0.45rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 2rem;
}

#omnie {
  padding: 4.5rem 6rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
.about-text p:last-child { margin-bottom: 0; }

#praca {
  padding: 4.5rem 6rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0 4rem;
  align-items: start;
}

.exp-list { list-style: none; }

.exp-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}

.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.exp-company { font-size: 0.9rem; color: var(--accent); }

.exp-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 2rem;
  flex-shrink: 0;
}

#kontakt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 93vh;
  overflow: hidden;
}

#kontakt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  filter: saturate(0.9) brightness(0.97);
}

.contact-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 2.8rem 3.2rem 3rem;
  margin: 3rem 0 3rem 5rem;
  width: min(460px, 90vw);
  box-shadow: 0 16px 60px rgba(0,0,0,0.18);
  border-top: 4px solid var(--accent);
}

.contact-card-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.contact-card-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.contact-card-header p {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.contact-card-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.8rem auto 0;
}

.contact-group {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-group:last-child { border-bottom: none; }

.contact-group-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(37,99,235,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.contact-group-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 0.25rem;
}

.contact-group-value {
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.55;
  font-weight: 400;
}

.contact-group-value a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.contact-group-value a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  nav { padding: 0 2.5rem; }

  #omnie, #praca {
    padding: 4rem 3rem;
    grid-template-columns: 140px 1fr;
    gap: 0 2.5rem;
  }

  .contact-card { margin-left: 3rem; }
}

@media (max-width: 768px) {
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  #hero { min-height: 560px; padding: 2.5rem 1.5rem; }

  .hero-avatar { width: 110px; height: 110px; }
  .hero-avatar::before { width: 45px; height: 45px; top: 17px; }
  .hero-avatar::after { width: 78px; height: 55px; }

  .hero-text-card { padding: 0.85rem 1.4rem 0.8rem; }

  #omnie, #praca {
    padding: 3rem 1.5rem;
    display: block;
  }

  #omnie .section-label,
  #praca .section-label { margin-bottom: 1.5rem; }

  .exp-item { flex-direction: column; gap: 0.2rem; padding: 1.1rem 0; }
  .exp-date { margin-left: 0; }

  #kontakt {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
  }

  #kontakt iframe {
    position: relative;
    height: 260px;
    width: 100%;
  }

  .contact-card {
    position: relative;
    margin: 0;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 420px) {
  .hero-name .first,
  .hero-name .last { font-size: 1.3rem; }

  .hero-bio { font-size: 0.78rem; }
  .contact-card h2 { font-size: 1.35rem; }
}
