/*
   =========================================
   PORTFOLIO - BARTEK
   =========================================
*/

:root {
  --bg-color: #040000;
  --secondary-bg: #080000;
  --accent-color: #ff1e1e;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --glow-shadow: 0 0 15px rgba(255, 30, 30, 0.6);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --font-main: 'Montserrat', sans-serif;
  --font-outfit: 'Outfit', sans-serif;
  --font-roboto: 'Roboto', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- DECORATIVE ELEMENTS --- */
.glow-bg {
  position: absolute;
  border-radius: 9999px;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 40px 0;
  background: transparent;
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo img {
  height: 50px;
}

.nav-menu {
  display: flex;
  gap: 60px;
}

.nav-menu a {
  font-size: 1.25rem;
  font-family: var(--font-outfit);
  font-weight: 400;
  color: var(--text-primary);
  text-transform: lowercase;
}

.nav-menu a:hover,
.dropdown-trigger:hover {
  color: var(--accent-color);
}

/* --- DROPDOWN MENU --- */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 15px 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(10px);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 12px 25px;
  font-size: 1.1rem !important;
  text-align: center;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color) !important;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: var(--transition);
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-color);
}

.hero-circles {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.hero-circle {
  position: absolute;
  pointer-events: none;
  animation: floatSlow linear infinite;
  filter: drop-shadow(0 0 50px rgba(255, 30, 30, 0.4));
}

.circle-1 {
  width: 440px;
  height: 440px;
  top: -50px;
  right: -80px;
  animation-duration: 12s;
}

.circle-2 {
  width: 250px;
  height: 250px;
  top: 150px;
  left: -180px;
  animation-duration: 15s;
  animation-delay: -2s;
}

.circle-3 {
  width: 150px;
  height: 150px;
  bottom: -20px;
  right: 80px;
  animation-duration: 18s;
  animation-delay: -5s;
}

@keyframes floatSlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(15px, -20px) rotate(1deg); }
  66% { transform: translate(-10px, 10px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.wave-mesh {
  position: absolute;
  left: 0;
  width: 100%;
  height: 250px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,100 Q250,0 500,100 T1000,100" fill="none" stroke="rgba(255,255,255,0.25)" stroke-width="0.8"/><path d="M0,80 Q250,-20 500,80 T1000,80" fill="none" stroke="rgba(255,255,255,0.15)" stroke-width="0.8"/><circle cx="0" cy="100" r="1.5" fill="white" opacity="0.5"><animate attributeName="cx" values="0;1000" dur="8s" repeatCount="indefinite"/></circle><circle cx="250" cy="50" r="1.5" fill="white" opacity="0.5"><animate attributeName="cy" values="50;70;50" dur="4s" repeatCount="indefinite"/></circle></svg>');
  background-size: 200% 100%;
  z-index: 2;
  opacity: 0.7;
  animation: waveMove 15s linear infinite;
}

.wave-mesh.top {
  top: 0;
  transform: rotate(180deg);
  filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.2));
}

.wave-mesh.bottom {
  bottom: 0;
  filter: drop-shadow(0 -5px 15px rgba(255, 255, 255, 0.2));
}

/* Wzorzec siatki z punktów (bardziej zbliżony do example) */
.wave-mesh::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.6) 1.5px, transparent 1.5px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, black, black, transparent);
  animation: meshDistort 8s ease-in-out infinite alternate;
}

@keyframes meshDistort {
  0% { transform: scaleY(1) skewX(0deg); }
  100% { transform: scaleY(1.1) skewX(2deg); }
}

@keyframes waveMove {
  0% { background-position-x: 0; }
  100% { background-position-x: 200%; }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 100%;
  position: relative;
  z-index: 5;
  padding-top: 100px; /* Dodano padding na górze */
}

.hero-left {
  display: flex;
  justify-content: flex-start;
  align-self: flex-end; /* Wyrównanie do dołu kontenera */
}

.avatar-wrapper {
  width: 100%;
  max-width: 550px; /* Zwiększono z 438px */
  position: relative;
  display: flex;
  align-items: flex-end;
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%); /* Efekt fade to black/transparent */
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.avatar-bg {
  position: absolute;
  bottom: 0;
  left: -10px;
  width: 550px; /* Zwiększono z 438px */
  height: auto;
  z-index: 1;
}

.avatar-img {
  position: relative;
  width: 550px; /* Zwiększono z 438px */
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
  display: block;
}

.hero-right {
  display: flex;
  justify-content: flex-end; /* Zmieniono z flex-end, aby umożliwić przesunięcie */
  align-items: center;
}

.portfolio-btn-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px;
}

.btn-glass {
  position: relative;
  z-index: 3;
  display: inline-block;
  padding: 25px 50px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 2.2rem;
  font-family: var(--font-outfit);
  font-weight: 900;
  text-align: center;
  transition: var(--transition);
}

.btn-glass:hover {
  transform: translateY(-5px) scale(1.02);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.btn-glass.large {
  font-size: 2.2rem;
  padding: 30px 60px;
}

.hero-bottom-gradient {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(360deg, black 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.about-top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(180deg, black 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.about-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(0deg, black 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

/* --- ABOUT SECTION --- */
.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--secondary-bg);
  overflow: hidden; /* Dodano, aby animacje tła nie wystawały */
}

/* --- ABOUT BACKGROUND ANIMATION --- */
.about-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.about-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  animation: floatGlow 15s infinite ease-in-out;
}

.glow-1 {
  top: 10%;
  left: 10%;
  animation-duration: 18s;
}

.glow-2 {
  bottom: 10%;
  right: 15%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.glow-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  animation-duration: 25s;
  animation-delay: -10s;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.1) 0%, transparent 70%);
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.9); }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 50px;
  max-width: 1444px;
  margin: 0 auto;
  justify-content: center;
  position: relative; /* Dodano */
  z-index: 2; /* Dodano */
}

.about-col-text {
  font-size: 1.45rem;
  font-family: var(--font-roboto);
  font-weight: 700;
  line-height: 1.5;
}

.about-col-center {
  text-align: center;
}

.about-col-center h2 {
  font-size: 3.75rem;
  font-family: var(--font-roboto);
  color: var(--text-primary);
  margin-bottom: 30px;
}

.about-image-wrapper {
  display: flex;
  justify-content: center;
}

.about-main-img {
  max-width: 400px;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.about-col-skills {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

.skills-row {
  display: flex;
  gap: 20px;
  justify-content: center;
}


.skills-row img {
  width: 76px;
  height: 76px;
  transition: var(--transition);
}

.skills-row img:hover {
  transform: translateY(-10px) scale(1.1);
}

.section-divider {
  width: 100%;
  height: 3px; /* Zwiększono grubość linii */
  background: white;
  margin: 80px 0; /* Przywrócono większe marginesy dla ogólnego zastosowania */
  position: relative;
  overflow: visible; /* Widoczność wykraczającego poza wysokość paska pojazdu */
}

/* Pierwszy divider tuż pod sekcją about lub w innym miejscu, gdzie ma tworzyć drogę */
.section-divider-road {
  margin-top: 0;
  margin-bottom: 0;
}

.section-divider-road + .section-divider-road {
  margin-top: 50px; /* Znacznie mniejsza droga */
  margin-bottom: 30px; /* Zredukowany odstęp pod drogą wewnątrz sekcji projects */
}

.f1-car-container {
  position: absolute;
  bottom: -30px; /* Wyśrodkowanie bolidu względem dolnej linii (połowa wysokości bolidu 100px) */
  left: 0;
  width: 100%;
  overflow: visible;
  height: 50px; /* Zmniejszona wysokość kontenera do nowej drogi */
  pointer-events: none;
}

.f1-car {
  position: absolute;
  height: 100px; /* Zwiększono wysokość pojazdu dla lepszej widoczności */
  left: -250px;
  display: flex;
  align-items: center;
  animation: f1Drive 4s linear infinite;
  z-index: 10;
}

.f1-car.car-1 {
  bottom: 0px;
  animation-delay: 0s;
}

.f1-car.car-2 {
  bottom: 0px;
  animation-delay: 0.8s;
}

.f1-car.car-3 {
  bottom: 0px;
  animation-delay: 1.6s;
}

.f1-car.car-4 {
  bottom: 0px;
  animation-delay: 2.4s;
}

.f1-car.car-5 {
  bottom: 0px;
  animation-delay: 3.2s;
}

.f1-img {
  height: 100%;
  width: auto;
  filter: invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.5)); /* Inwersja koloru (na biały) i mocniejszy blask */
}

.f1-light {
  position: absolute;
  width: 10px; /* Nieco większe światła */
  height: 10px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px #fff, 0 0 25px var(--accent-color);
  animation: lightBlink 0.15s ease-in-out infinite alternate;
  z-index: 11;
  /* Pozycjonowanie na prawym końcu (przód/nos bolidu) */
  right: 0px;
  top: 50%; /* Wyśrodkowanie światła w pionie względem bolidu */
}

@keyframes f1Drive {
  0% { left: -250px; }
  100% { left: 100%; }
}

@keyframes lightBlink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* --- PROJECTS SECTION --- */
.projects {
  background-color: var(--bg-color);
  position: relative;
  scroll-margin-top: 130px;
  padding-top: 0px;
}

.projects-title-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top:50px;
}

.projects-main-title {
  text-align: center;
  margin-bottom: 0px;
  width: 100%;
}

.projects-main-title h2 {
  font-size: 3.75rem;
  font-family: var(--font-roboto);
  color: var(--text-primary);
}

.projects-main-title .section-divider {
  margin: 0;
  width: 100%;
}

.projects-title-block h3 {
  font-size: 3.75rem;
  font-family: var(--font-roboto);
  line-height: 1.1;
  margin-bottom: 0;
}

/* --- PROJECTS GRID (4 columns) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 100px;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.5s ease;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

.project-item:hover {
  transform: translateY(-15px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 35px 60px -15px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.project-item:hover img {
  transform: scale(1.1);
}

.f-one-logo-wrapper img {
  max-width: 350px;
  max-height: 200px;
  margin-top: -20px;
}

.fone-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-top: 50px;
}

.fone-left {
  flex: 1.5;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

.fone-right {
  flex: 1.2;
}

.fone-tshirt-stack {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fone-tshirt {
  position: absolute;
  width: 480px;
  transition: var(--transition);
}

.fone-tshirt img {
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  position: relative;
  z-index: 2;
}

.tshirt-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: var(--accent-color);
  border-radius: 50%;
  filter: blur(50px);
  z-index: 1;
  opacity: 0;
  animation: redLightPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.t-left .tshirt-light { animation-delay: 0s; }
.t-center .tshirt-light { animation-delay: 0.6s; }
.t-right .tshirt-light { animation-delay: 1.2s; }

@keyframes redLightPulse {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.fone-tshirt.t-left {
  transform: translateX(-180px) rotate(-15deg);
  z-index: 1;
}

.fone-tshirt.t-center {
  z-index: 3;
  width: 520px;
}

.fone-tshirt.t-right {
  transform: translateX(180px) rotate(15deg);
  z-index: 2;
}

.fone-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.2) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.project-desc {
  max-width: 600px;
  text-align: right;
  font-size: 1.6rem;
  font-family: var(--font-roboto);
  line-height: 1.4;
  color: var(--text-primary);
}

/* --- POSTERS SECTION --- */
.posters {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.posters-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.poster-glow {
  position: absolute;
  width: 700px; /* Zwiększono z 450px */
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.2) 0%, transparent 70%); /* Zwiększono intensywność z 0.12 */
  filter: blur(100px); /* Zwiększono blur z 80px */
  animation: floatGlow 20s infinite ease-in-out;
}

.p-glow-1 {
  top: 10%;
  left: -15%;
  animation-duration: 25s;
}

.p-glow-2 {
  bottom: 10%;
  right: -10%;
  animation-duration: 22s;
  animation-delay: -7s;
  background: radial-gradient(circle, rgba(214, 109, 111, 0.18) 0%, transparent 70%); /* Zwiększono intensywność z 0.1 */
}

.p-glow-3 {
  top: 40%;
  left: 50%;
  width: 800px; /* Zwiększono z 550px */
  height: 800px;
  animation-duration: 30s;
  animation-delay: -12s;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.15) 0%, transparent 70%); /* Zwiększono intensywność z 0.08 */
}

.p-glow-4 {
  bottom: 5%;
  left: 10%;
  width: 600px;
  height: 600px;
  animation-duration: 28s;
  animation-delay: -5s;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.12) 0%, transparent 70%);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
  z-index: 2;
}

.poster-item {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 15px;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: var(--transition);
}

.poster-item:hover {
  transform: translateY(-15px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 30, 30, 0.3);
}

.poster-item:hover img {
  transform: scale(1.02);
}

.poster-item {
  cursor: pointer;
}

/* --- POSTER MODAL --- */
.poster-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.poster-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-modal.active .modal-content {
  transform: scale(1);
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 15px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 50px;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2010;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

/* Modal Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 60px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2010;
  padding-bottom: 8px; /* Visual center for arrow character */
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-color);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
  left: 40px;
}

.modal-nav.next {
  right: 40px;
}

@media (max-width: 768px) {
  .modal-close {
    top: 20px;
    right: 25px;
    font-size: 40px;
  }

  .modal-nav {
    width: 50px;
    height: 50px;
    font-size: 30px;
    padding-bottom: 4px;
  }

  .modal-nav.prev {
    left: 15px;
  }

  .modal-nav.next {
    right: 15px;
  }
}

/* --- GRIMWEAR SECTION --- */
.grimwear {
  position: relative;
  overflow: hidden;
}

.grimwear-header h2 {
  font-size: 3.75rem;
  font-family: var(--font-roboto);
  text-align: center;
  margin-bottom: 100px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-top:65px;
}

.grimwear-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  margin-bottom: 100px;
}

.grim-large img {
  max-width: 580px;
}

.grim-stack {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.grim-stack img {
  max-width: 380px;
  filter: grayscale(1);
  transition: var(--transition);
}

.grim-stack img:hover {
  filter: grayscale(0);
}

.more-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

/* --- FOOTER --- */
.footer {
  padding: 100px 0;
  background: black;
  position: relative;
  overflow: hidden;
}

.footer-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.footer-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  animation: floatGlow 15s infinite ease-in-out;
}

.f-glow-1 {
  top: -10%;
  left: -10%;
  animation-duration: 20s;
}

.f-glow-2 {
  bottom: -10%;
  right: -10%;
  animation-duration: 25s;
  animation-delay: -7s;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.footer-logo {
  height: 177px;
}

.footer-right {
  display: flex;
  gap: 100px;
}

.contact-col h4 {
  font-size: 1.25rem;
  font-family: var(--font-outfit);
  font-weight: 400;
  margin-bottom: 20px;
}

.contact-col p {
  font-size: 1.25rem;
  font-family: var(--font-outfit);
  font-weight: 400;
  margin-bottom: 10px;
}

.contact-col a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.footer-email {
  cursor: pointer;
}

/* --- CONTACT MODAL --- */
.contact-modal {
  display: none;
  position: fixed;
  z-index: 2100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-modal.active {
  display: flex;
  opacity: 1;
}

.contact-modal-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  padding: 40px 60px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.contact-modal.active .contact-modal-content {
  transform: translateY(0);
}

.contact-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.contact-modal-close:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.contact-modal-content h2 {
  font-family: var(--font-roboto);
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--text-primary);
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.form-group {
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: white;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 30, 30, 0.2);
}

.contact-form textarea {
  resize: none;
}

.contact-form .btn-glass.small {
  width: 100%;
  cursor: pointer;
  border-radius: 15px;
}

.form-status {
  margin-top: 15px;
  font-size: 1rem;
  font-family: var(--font-main);
  min-height: 24px;
}

.form-status.success {
  color: #00ff88;
}

.form-status.error {
  color: var(--accent-color);
}

.contact-modal-info {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
}

.btn-glass.small {
  padding: 15px 30px;
  font-size: 1.2rem;
  border-radius: 15px;
  margin-top: 15px;
}

/* --- SIDE NAV (Dots) --- */
.side-nav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.side-nav ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dot {
  display: block;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.dot span {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-family: var(--font-outfit);
  font-size: 0.9rem;
  text-transform: lowercase;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.dot:hover span {
  opacity: 1;
  visibility: visible;
  right: 25px;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.dot.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.5);
  box-shadow: 0 0 15px var(--accent-color);
}

.dot.active span {
  opacity: 1;
  visibility: visible;
  right: 25px;
  color: var(--accent-color);
}

@media (max-width: 1024px) {
  .side-nav {
    display: none;
  }
}

@media (min-width: 1921px) {
  html {
    font-size: 20px; /* Zwiększenie bazowego fontu dla rem */
  }

  .container, .nav-container {
    max-width: 1600px; /* Rozszerzenie kontenerów */
  }

  .avatar-wrapper {
    max-width: 600px; /* Większy awatar na 4K */
  }

  .avatar-bg, .avatar-img {
    width: 600px !important;
  }

  /* Przeskalowanie bolidów, aby nie były za małe na szerokiej drodze */
  .f1-car {
    height: 140px;
  }

  .f1-car-container {
    height: 140px;
    bottom: -30px; /* Centrowanie bolidu (140px) w prześwicie 80px: (140-80)/2 = 30px w dół od dolnej linii */
  }

  .section-divider-road + .section-divider-road {
    margin-top: 80px; /* Większy prześwit drogi na 4K */
  }
}

/* --- ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
  .hero-right .btn-glass { font-size: clamp(1.4rem, 4vw, 1.8rem); }
  .about-col-center h2, .projects-title-block h3, .grimwear-header h2 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .projects-main-title h2 { font-size: clamp(2.5rem, 10vw, 3.75rem); }
}

@media (max-width: 1024px) {
  .container { width: 95%; }
  .poster-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; padding-top: 120px; }
  .hero-right { justify-content: center; padding-right: 0; padding-top: 20px; }
  .hero-left { justify-content: center; align-self: center; }
  .avatar-wrapper { max-width: 350px; margin: 0 auto; }
  .avatar-bg, .avatar-img { width: 350px !important; height: auto !important; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-col-text { text-align: center; order: 2; padding: 0 10px; }
  .about-col-center { order: 1; }
  .about-col-center h2 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .about-col-skills { align-items: center; order: 3; }
  .skills-row { justify-content: center; gap: 20px; }
  .skills-row img { width: 50px; height: 50px; }
  .skills-row.id-aligned { padding-left: 0px; }

  .fone-content { flex-direction: column; gap: 80px; text-align: center; }
  .fone-left { min-height: 350px; width: 100%; }
  .fone-tshirt { width: 250px; }
  .fone-tshirt.t-center { width: 280px; }
  .fone-tshirt.t-left { transform: translateX(-80px) rotate(-8deg); }
  .fone-tshirt.t-right { transform: translateX(80px) rotate(8deg); }
  .fone-glow { width: 100%; height: 100%; }
  .project-desc { text-align: center; margin: 0 auto; padding: 0 15px; font-size: 1.1rem; }

  .grimwear-content { flex-direction: column; gap: 40px; }
  .grim-large img, .grim-stack img { max-width: 95%; }
  .footer-container { flex-direction: column; align-items: center; gap: 40px; text-align: center; padding: 60px 20px; }
  .footer-right { flex-direction: column; gap: 25px; }
}

@media (max-width: 768px) {
  .navbar { padding: 15px 0; background: rgba(0,0,0,0.95); }
  .nav-container { padding: 0 20px; }
  .hamburger { display: block; right: 20px; }
  .nav-menu {
    position: fixed; left: -100%; top: 80px; flex-direction: column;
    background-color: var(--bg-color); width: 100%; padding: 40px 0; gap: 25px;
    height: calc(100vh - 80px); overflow-y: auto; align-items: center;
  }
  .nav-menu li { width: 100%; text-align: center; }
  .nav-menu.active { left: 0; }

  /* Dropdown on mobile */
  .nav-item-dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 15px;
  }

  .nav-item-dropdown.active .dropdown-menu {
    display: flex;
  }

  .dropdown-menu a {
    font-size: 1.2rem !important;
    color: var(--text-secondary) !important;
  }

  .nav-menu a { font-size: 1.4rem; width: 100%; text-align: center; }
  .poster-grid { grid-template-columns: 1fr; gap: 30px; }
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  .contact-modal-content { padding: 40px 30px; border-radius: 30px; }
  .contact-modal-content h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .about-col-center h2, .projects-title-block h3, .grimwear-header h2 { font-size: 1.8rem; }
  .f-one-logo-wrapper img { max-width: 250px; }
  .fone-tshirt { width: 180px; }
  .fone-tshirt.t-center { width: 200px; }
  .fone-tshirt.t-left { transform: translateX(-50px) rotate(-5deg); }
  .fone-tshirt.t-right { transform: translateX(50px) rotate(5deg); }
  .project-desc { font-size: 1rem; }

  .projects-grid { grid-template-columns: 1fr; }
  .hero-circle { width: 150px; }
  .avatar-wrapper { max-width: 280px; }
  .avatar-bg, .avatar-img { width: 280px !important; }

  .section-divider-road { margin-top: 40px; }
  .f1-car-container { transform: scale(0.8); }
}

@media (max-height: 600px) and (orientation: landscape) {
  .hero-container { padding-top: 80px; }
  .avatar-wrapper { max-width: 200px; }
  .avatar-bg, .avatar-img { width: 200px !important; }
  .nav-menu { top: 60px; height: calc(100vh - 60px); }
}

/* --- OTHERS GALLERY MODAL --- */
.others-gallery-modal {
  display: none;
  position: fixed;
  z-index: 2500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 0, 0, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
  padding: 80px 0;
  overflow-x: hidden;
}

/* --- OTHERS BACKGROUND ANIMATION --- */
.others-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.others-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.12) 0%, transparent 70%);
  filter: blur(70px);
  animation: floatGlow 18s infinite ease-in-out;
}

.g-glow-1 {
  top: 5%;
  left: -5%;
  animation-duration: 20s;
}

.g-glow-2 {
  bottom: 10%;
  right: -5%;
  animation-duration: 25s;
  animation-delay: -7s;
}

.g-glow-3 {
  top: 40%;
  left: 60%;
  width: 600px;
  height: 600px;
  animation-duration: 30s;
  animation-delay: -12s;
  background: radial-gradient(circle, rgba(255, 30, 30, 0.08) 0%, transparent 70%);
}

.others-gallery-modal.active {
  display: block;
  opacity: 1;
}

.others-gallery-content {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.others-modal-close {
  position: fixed;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 50px;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2600;
  line-height: 1;
}

.others-modal-close:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.others-gallery-header {
  text-align: center;
  margin-bottom: 60px;
}

.others-gallery-header h2 {
  font-family: var(--font-outfit);
  font-size: 3rem;
  letter-spacing: 5px;
  margin: 0;
  background: linear-gradient(to bottom, #fff, #444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.others-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  padding-bottom: 50px;
}

.others-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  aspect-ratio: 1 / 1;
}

.others-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.others-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 30px rgba(255, 30, 30, 0.2);
  transform: translateY(-5px);
}

.others-item:hover img {
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .others-gallery-modal {
    padding: 60px 0;
  }

  .others-modal-close {
    top: 15px;
    right: 20px;
    font-size: 40px;
  }

  .others-gallery-header h2 {
    font-size: 2rem;
  }

  .others-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }
}
