html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
/* === OGÓLNE === */
:root {
  --bg: #0c0f16;
  --card: #151a24;
  --accent: #2d9cff;
  --text: #f3f5fa;
  --muted: #8b95a5;
  --glow: 0 0 15px rgba(45, 156, 255, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* === NAGŁÓWEK (HERO HEADER) === */
.hero-header {
  background: radial-gradient(circle at top center, rgba(45,156,255,0.25) 0%, transparent 80%),
              linear-gradient(to bottom, rgba(13,17,27,0.9), transparent 100%);
  text-align: center;
  padding: 80px 20px 60px;
  box-shadow: 0 0 60px rgba(45,156,255,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeIn 1.2s ease forwards;
}

.hero-header .hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.logo {
  background: linear-gradient(135deg, #007bff, #00d9ff);
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  padding: 12px 22px;
  border-radius: 14px;
  display: inline-block;
  box-shadow: 0 0 18px rgba(0, 132, 255, 0.35);
  margin-bottom: 25px;
}
}
.hero-header .hero-title {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00b4ff, #00ffd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.hero-header .hero-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: #f0f4ff;
  margin-bottom: 10px;
}

.hero-header .hero-subtitle {
  color: #aab1c4;
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.hero-header .hero-quote {
  font-style: italic;
  color: #00c8ff;
  font-size: 1.1rem;
  margin: 25px 0 45px;
}

.hero-header .hero-nav {
  margin-top: 15px;
}

.hero-header .hero-nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #d8d8d8;
  font-weight: 500;
  transition: all 0.3s ease;
}

.hero-header .hero-nav a:hover,
.hero-header .hero-nav a.active {
  color: #00c8ff;
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.4);
}

/* === GŁÓWNA SEKCJA HERO === */
.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: center;
  margin-top: 35px;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero figure {
    order: -1;
  }
}

/* === KARTY === */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.card.bio h2 {
  display: flex;          /* zmieniamy h2 na kontener flex */
  justify-content: center; /* wyśrodkowanie poziome */
  text-align: center;      /* dodatkowe zabezpieczenie */
  margin-bottom: 15px;     /* odstęp od następnego elementu */
}


.photo {
  width: 100%;
  height: 340px;
  border-radius: 10px;
  object-fit: cover;
  background: #222;
}

/* === CTA === */
.cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--glow);
}

.btn-primary:hover {
  background: #47adff;
}

.btn-ghost {
  border: 1px solid #2b3242;
  color: var(--text);
}

.btn-ghost:hover {
  background: #1c2333;
}

.center-text {
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: var(--glow);
}

/* === FOOTER === */
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #1b2030;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* === ANIMACJE === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === EFEKT PISANIA – WERSJA STABILNA (bez rozszerzania widoku) === */
.typing {
  position: relative;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  border-right: 3px solid var(--accent);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: typing 3s steps(50, end) forwards, blink 0.7s infinite;
  margin: 12px 0 20px 0;
  box-sizing: border-box;
}

/* RESPONSYWNA POPRAWKA — mobilne ekrany */
@media (max-width: 768px) {
  .typing {
    white-space: normal !important;
    word-wrap: break-word;
    overflow: visible !important;
    border-right: none;
    animation: fadeInText 1.2s ease forwards;
    text-align: center;
    padding: 0 8px;
  }
}

/* Animacje */
@keyframes typing {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes blink {
  50% { border-color: transparent; }
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}



/* --- NAPRAWA WYGLĄDU PROGRAMU --- */
#program {
  text-align: left;
  margin-top: 40px;
}

#program h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--accent);
  text-align: center;
}

#program p {
  margin-bottom: 16px;
}

.program {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.prog-item {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prog-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px rgba(45, 156, 255, 0.35);
}

.prog-item h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.prog-item p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- sekcja „Dlaczego warto?” --- */
.why-me {
  margin-top: 50px;
}

.why-me h2 {
  color: var(--accent);
  text-align: center;
  font-size: 1.8rem;
}

.why-me ul {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.why-me li {
  background: #181d28;
  border: 1px solid #232a3a;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  line-height: 1.6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
/* --- KONTAKT --- */
#kontakt h2 {
  text-align: center;
  color: var(--accent);
  margin-bottom: 25px;
  font-size: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 20px;
}

@media (max-width: 880px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Lewa kolumna – informacje kontaktowe */
#kontakt .card:first-child {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid #202938;
  padding: 24px;
  border-radius: 16px;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text);
}

#kontakt .card:first-child p {
  margin-bottom: 12px;
}

#kontakt .card:first-child a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

#kontakt .card:first-child a:hover {
  text-decoration: underline;
}

/* Notka o poufności */
#kontakt .card:first-child .notice {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2b3548;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Prawa kolumna – formularz */
#kontakt .card h3 {
  color: var(--accent);
  margin-bottom: 12px;
}

#kontakt label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 500;
}

#kontakt input,
#kontakt textarea {
  width: 100%;
  background: #0f141d;
  border: 1px solid #232a3a;
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

#kontakt textarea {
  height: 120px;
  resize: none;
}

#kontakt input:focus,
#kontakt textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* --- CTA BUTTONS (główna) --- */
.hero .cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 25px;
}

/* --- SEKCJA: MACIEJ W SKRÓCIE --- */
.quick-facts {
  background: rgba(21, 26, 36, 0.8);
  border: 1px solid #232a3a;
  border-radius: 16px;
  padding: 25px 30px;
  margin: 40px 0 20px;
  text-align: center;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
  animation: fadeIn 1s ease forwards;
}

.quick-facts h2 {
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 18px;
  text-shadow: 0 0 10px rgba(45,156,255,0.4);
}

.facts-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 25px;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
}

.facts-grid div {
  background: #181d28;
  border: 1px solid #232a3a;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 260px;
  transition: all 0.3s ease;
}

.facts-grid div:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 12px rgba(45,156,255,0.3);
}

/* Responsywność */
@media (max-width: 700px) {
  .facts-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* --- WYŚRODKOWANIE CTA W PROGRAMIE --- */
.cta.center-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  margin-top: 25px;
}

.cta.center-text p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
}

.cta.center-text .btn {
  margin-top: 10px;
}

.card.bio h2 {
  display: block;       /* upewniamy się, że h2 jest blokiem */
  width: fit-content;   /* szerokość dopasowana do tekstu */
  margin: 0 auto 15px;  /* wyśrodkowanie poziome + odstęp od paragrafu */
}

/* === NAPRAWA POZYCJI ZDJĘCIA W SEKCJI HERO === */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: start;
  gap: 30px;
}

.hero figure {
  margin: 0;
}

.hero img.photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero figure {
    order: -1;
    margin-bottom: 20px;
  }
}

.typing {
  display: inline-block;
  max-width: 100vw;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .typing {
    display: block;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    max-width: 90vw;
    margin: 0 auto;
    border-right: none;
  }
}

.typing {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  animation: typing 3s steps(50, end) forwards, blink 0.7s infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 24ch; } /* Zamiast 100%, ustalona liczba znaków */
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* --- Naprawa widoku mobilnego --- */
@media (max-width: 768px) {
  .typing {
    display: block;
    max-width: 90vw;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    border-right: none; /* usuwa migający kursor na mobile */
    animation: none; /* opcjonalnie — wyłącza typing na małych ekranach */
  }
}
/* === POPRAWKA ANIMACJI TYPING (PEŁNY FIX MOBILE) === */
.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  box-sizing: border-box;
  max-width: 100%;
  text-align: center;
  animation: typing 3s steps(40, end) forwards, blink 0.7s infinite;
}

/* --- animacje --- */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 30ch; /* DŁUGOŚĆ TEKSTU – dopasuj do długości napisu */
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* --- na telefonach --- */
@media (max-width: 768px) {
  .typing {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    white-space: normal; /* ZAWIJA TEKST */
    overflow: visible;
    border-right: none; /* opcjonalnie usuń migający kursor na małym ekranie */
    animation: none; /* opcjonalnie wyłącz animację, jeśli wciąż rozwala układ */
  }
}
/* === OSTATECZNY FIX ANIMACJI TYPING NA MOBILE === */
.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  max-width: 100%;
  text-align: center;
  animation: typing 3s steps(40, end) forwards, blink 0.7s infinite;
  box-sizing: border-box;
}

@keyframes typing {
  from { width: 0; }
  to { width: 30ch; } /* dopasuj długość tekstu */
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* --- WERSJA NA TELEFONY (NIE ROZSUWA STRONY) --- */
@media (max-width: 768px) {
  .typing {
    white-space: normal !important; /* pozwala zawijać */
    word-break: break-word !important;
    overflow: visible !important;
    border-right: none !important;
    animation: none !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
  }
}
/* === FINALNY FIX ANIMACJI TYPING === */
.typing {
  position: relative;
  display: inline-block;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
  max-width: 100%;
}

/* Pseudo-element do efektu pisania */
.typing::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  color: var(--accent);
  border-right: 3px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  animation: typing-mask 3s steps(40, end) forwards, blink 0.7s infinite;
}

/* Kluczowe animacje */
@keyframes typing-mask {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Na telefonach – bez animacji, tekst widoczny od razu */
@media (max-width: 768px) {
  .typing::after {
    content: none;
  }
}
/* --- FINAL FIX: efekt typing bez rozjeżdżania ekranu --- */
.typing {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.2rem;
  border-right: 3px solid var(--accent);
  white-space: normal !important; /* pozwala na zawijanie tekstu */
  overflow: hidden;
  text-align: center;
  width: 100%; /* dopasowuje do kontenera */
  animation: none; /* wyłączamy stary efekt */
  margin: 15px 0 25px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Dodajmy delikatne miganie kursora, żeby efekt pozostał */
.typing::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 768px) {
  .typing {
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
  }
}
/* --- EFEKT TYPING Z ZAWIJANIEM --- */
.typing {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  border-right: 3px solid var(--accent);
  overflow: hidden;
  white-space: normal; /* ✅ pozwala na zawijanie */
  word-break: break-word;
  animation: typing 3.5s steps(40, end) forwards, blink 0.8s infinite;
  margin: 15px 0 25px;
  line-height: 1.4;
  text-align: center;
  max-width: 100%;
}

/* animacja pisania (używa widoczności znaków zamiast szerokości) */
@keyframes typing {
  from {
    clip-path: inset(0 100% 0 0); /* zaczynamy od ukrytego tekstu */
  }
  to {
    clip-path: inset(0 0 0 0); /* pokazujemy cały tekst */
  }
}

/* migający kursor */
@keyframes blink {
  50% { border-color: transparent; }
}

@media (max-width: 768px) {
  .typing {
    font-size: 1.1rem;
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
}
.typing {
  color: #e63946 !important; /* jasnoczerwony, testowy kolor */
  background: #ffeaea;       /* różowe tło, żeby było oczywiste */
  border-right: 3px solid #e63946;
}
