:root {
  --bg: #0a0a0a;
  --text: #f2f2f2;
  --white: #fff;
  --muted: #b5b5b5;
  --max: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* płynne przewijanie */
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #0a0a0a;
  color: #f2f2f2;
  padding: 80px 20px;
}

.section:nth-child(even) {
  background: #111;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.section p {
  max-width: 700px;
  line-height: 1.6;
}

a {
  color: inherit; /* przejmuje kolor tekstu z otoczenia */
  text-decoration: none; /* usuwa podkreślenie */
}

a:hover {
  text-decoration: underline; /* opcjonalnie lekki efekt po najechaniu */
}

#contact a {
  color: inherit;
  text-decoration: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

/* ===== HEADER – Apple Liquid Glass Menu ===== */
header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 50;
  padding: 0;
  background: rgba(61, 61, 61, 0.15);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.25),
    inset 0 4px 20px rgba(255, 255, 255, 0.25);
}

/* 🩵 Gradientowy border (tak jak w .project-card) */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.76) 2%,
    rgba(255, 255, 255, 0) 21%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0) 70%,
    rgba(255, 255, 255, 0.8) 110%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* zawartość menu nad szkłem */
header * {
  position: relative;
  z-index: 1;
}

/* 🔥 Efekt po scrollu — mocniejszy szklisty blur (pływający efekt) */
header.scrolled {
  background: rgba(123, 123, 123, 0.2);
  box-shadow:
    0 12px 40px rgba(31, 38, 135, 0.3),
    inset 0 6px 25px rgba(255, 255, 255, 0.4);
  backdrop-filter: url(#liquidGlass) blur(8px) saturate(320%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(8px) saturate(320%);
}

.wrap {
  max-width: var(--max);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left,
.nav-right {
  flex: 1;
  display: flex;
  gap: 307px;
  align-items: center;
}
.nav-left {
  justify-content: flex-end;
}
.nav-right {
  justify-content: flex-start;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  margin: 0 32px;
  font-weight: 215;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--white);
}

.logo-center img {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

/* 🎬 Animacja płynnego wjazdu menu z góry na dół */
header {
  animation: slideDown 0.1s ease-out forwards;
  transition: all 0.4s ease;
}

@keyframes slideDown {
  0% {
    transform: translate(-50%, -150%);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* 🌐 Dynamiczne, płynne dopasowanie menu */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(10px, 5vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.nav-left,
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(40px, 18vw, 307px);
  transition: all 0.3s ease;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  margin: 0 clamp(6px, 2vw, 32px);
  font-weight: 215;
  font-size: clamp(0.9rem, 1vw, 1rem);
  transition: all 0.3s ease;
}

.logo-center img {
  height: clamp(44px, 4vw, 42px);
  width: auto;
  display: block;
  filter: brightness(1.1);
  transition: all 0.3s ease;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  z-index: 3;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  transform: translateY(60px);
  animation: showHero 1.5s ease forwards;
  animation-delay: 6s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;

  /* 🔥 efekt rozmytego tła */
  background: rgba(0, 0, 0, 0.35); /* półprzezroczysty czarny */
  backdrop-filter: blur(40px); /* rozmycie tego, co pod spodem */
  -webkit-backdrop-filter: blur(12px); /* wsparcie dla Safari */
  border-radius: 12px; /* delikatne zaokrąglenie */
}

/* przyspieszony tryb – aktywowany przez JS */
.hero-content.fast {
  animation-delay: 2s; /* np. tylko 2 sekundy */
}

@keyframes showHero {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-logo {
  width: 300px;
  max-width: 80%;
  margin-bottom: 24px;
}

.hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  opacity: 0.9;
  font-size: 18px;
}

.cta {
  margin-top: 36px;
  display: inline-block;
  background: var(--white);
  color: #000;
  padding: 14px 28px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.cta:hover {
  background: #e5e5e5;
  transform: scale(1.03);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 10px;
  border-top: 1px solid #222;
  color: var(--muted);
  font-size: 14px;
  background: #0b0b0b;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 35px;
  width: 89%;
  max-width: var(--max);
  justify-items: center;
}

/* 🔮 Efekt Apple Liquid Glass (realny, refrakcyjny) */
.project-card {
  position: relative;
  background: rgba(61, 61, 61, 0.15);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  overflow: hidden;
  max-width: 700px;
  transition: all 0.3s ease;

  /* 🌈 efekt szkła */
  backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);

  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.25),
    inset 0 4px 20px rgba(255, 255, 255, 0.25);
}

/* 🩵 Gradientowy border z zaokrągleniem */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px; /* grubość obramowania */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.76) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* zawartość nad szkłem */
.project-card * {
  position: relative;
  z-index: 1;
}

/* hover – lekkie rozświetlenie */
.project-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: rgba(123, 123, 123, 0.2);
  box-shadow:
    0 12px 40px rgba(31, 38, 135, 0.3),
    inset 0 6px 25px rgba(255, 255, 255, 0.4);

  /* 🌈 zwiększona saturacja przy hoverze */
  backdrop-filter: url(#liquidGlass) blur(6px) saturate(320%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(6px) saturate(320%);
}

/* ====== Treść ====== */
.project-card img {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 16px;
  object-fit: contain;
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
  color: var(--white);
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: justify; /* 🔹 tekst od lewej do prawej */
  line-height: 1.6;
}

.project-card h3::after,
.project-card p::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.42), transparent);
  margin: 10px 0; /* 🔹 linia też od lewej do prawej, bez auto-centrowania */
}

/* 🌈 Centralny nagłówek sekcji – styl szkła jak w kartach projektów */
.project-card-center {
  position: relative;
  background: rgba(61, 61, 61, 0.15);
  border-radius: 24px;
  width: min(90%, var(--max)); /* dopasowanie do szerokości grida */
  padding: 15px 28px;
  text-align: center;
  overflow: hidden;
  margin: 0 auto 0 auto; /* centrowanie */
  transition: all 0.4s ease;

  /* 🌫️ efekt szkła z refrakcją RGB */
  backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);

  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.25),
    inset 0 4px 20px rgba(255, 255, 255, 0.25);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 🩵 Gradientowy border z zaokrągleniem – taki sam jak w .project-card */
.project-card-center::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.76) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* 🔠 Tekst wewnątrz */
.project-card-center h2 {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 8px;
  z-index: 1;
}

.project-card-center p {
  font-size: 1rem;
  color: var(--muted);
  z-index: 1;
}

/* zawartość nad szkłem */
.project-card * {
  position: relative;
  z-index: 1;
}
.cta {
  margin-top: 20px;
  display: inline-block;
  background: var(--white);
  color: #000;
  padding: 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.cta:hover {
  background: #e5e5e5;
  transform: scale(1.05);
}

#projects {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.projects-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
  transform: rotate(-4deg) scale(1.3);
  filter: blur(5px) brightness(0.4);
}

.projects-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== ABOUT (dopasowane 1:1 do .project-card) ===== */
#about {
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 80px 20px;
}

/* tło jak w #projects */
.about-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
  transform: scale(1);
  filter: blur(4px) brightness(0.8) saturate(100%);
}
.about-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 78, 255, 0.38), rgba(0, 100, 255, 0.1) 92%, transparent 76%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  filter: blur(73px);
  opacity: 0.4;
}

.about-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

/* 🧊 Dopasowane do .project-card i .project-card-center */
.about-content {
  position: relative;
  background: rgba(61, 61, 61, 0.15);
  border-radius: 24px;
  width: min(90%, var(--max)); /* 🔥 taka sama szerokość i skalowanie */
  padding: 32px 28px;
  text-align: center;
  margin: 0 auto 40px auto; /* centrowanie i odstęp */
  overflow: hidden;
  transition: all 0.4s ease;

  backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);
  -webkit-backdrop-filter: url(#liquidGlass) blur(6px) saturate(220%);

  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.25),
    inset 0 4px 20px rgba(255, 255, 255, 0.25);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 🩵 Gradientowy border – jak w .project-card */
.about-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.76) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* Tekst – bez zmian */
.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--white);
  z-index: 1;
}

.about-content p {
  color: var(--muted);
  font-size: 1rem; /* poprawione, bo -39rem to błąd */
  line-height: 1.7;
  margin-bottom: 13px;
  margin-top: 24px;
  max-width: 1028px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify; /* 🔹 pełne wyrównanie od lewej do prawej */
  z-index: 1;
}

.about-content p::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.42), transparent);
  margin: 13px 0; /* 🔹 linia też od lewej do prawej, bez auto-centrowania */
}

/* ===== CONTACT ===== */
.contact-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  overflow: hidden;
  z-index: 1;
  
}

/* 🎬 Tło wideo */
.contact-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.contact-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}

/* 📄 Treść na środku */
.contact-content {
  position: relative;
  z-index: 2;
  padding: 301px 24px;
}

.contact-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.contact-content p {
  font-size: 1.05rem;
  color: #fff;
}

.contact-content a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.contact-content a:hover {
  text-decoration: underline;
}

#projects::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, transparent, #0a0a0a);
  z-index: 2;
}

#about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, transparent, #0a0a0a);
  z-index: 2;
}
.scroll-down {
  position: absolute;
  bottom: 86px;
  left: 50%;
  width: 36px;
  height: 35px;
  border-left: 4px solid #fff;
  border-radius: 7px; 

  border-bottom: dashed;
  transform: translateX(-50%) rotate(-45deg);
  animation: bounce 2s infinite;
  opacity: 0.8;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease; /* 🔹 to dodaje płynne przejście */
}
.scroll-down:hover {
  opacity: 1;
  bottom: 80px;
  width: 40px;
  height: 38px;
}
@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, 0) rotate(-45deg);
  }
  50% {
    transform: translate(-50%, 10px) rotate(-45deg);
  }
}
.scroll-up {
  position: absolute;
  bottom: -35px;
  left: 46%;
  width: 35px;
  height: 36px;
  /* ===== border-left: 7px solid #fff; ===== */
  border-bottom: 4px solid #fff;
  border-radius: 7px; 

  border-left: dashed;


  transform: rotate(135deg) scale(1);
  opacity: 0.8;
  cursor: pointer;
  animation: floatUp 2s infinite;
  z-index: 10;
  transition: all 0.3s ease; /* 🔹 to dodaje płynne przejście */
  
}

.scroll-up:hover {
  opacity: 1;
  bottom: -32px;
  width: 38px;
  height: 40px;
}

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0) rotate(135deg);
  }
  50% {
    transform: translateY(-8px) rotate(135deg);
  }
}
