/* Główny plik stylów */
:root {
  --background: #00000D; 
  --foreground: #e2e8f0;
  --primary: #a855f7;
  --primary-glow: rgba(168, 85, 247, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* =========================================================================
   ANIMOWANE TŁO GWIAZD
   ========================================================================= */
#stars-bg {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(1px 1px at 40px 60px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 120px 140px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 180px 30px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 250px 180px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 320px 90px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 380px 220px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 420px 50px, rgba(255, 255, 255, 0.5), transparent);
  background-size: 450px 450px;
  animation: starDrift 100s linear infinite;
}

@keyframes starDrift {
  from { background-position: 0 0; }
  to { background-position: -450px -450px; }
}

/* =========================================================================
   KOMETA MIĘDZY SEKCJA (Z POZYCJONOWANIEM ABSOLUTNYM DLA BEZPIECZEŃSTWA)
   ========================================================================= */
#comet-transition-section {
  position: relative;
  overflow: hidden;
  z-index: 20; 
}

#section-arc-comet {
  position: absolute;
  top: 50%; /* Wymuszone poprawne wyśrodkowanie wewnątrz #comet-transition-section */
  left: 0;
  width: 320px;
  pointer-events: none;
  z-index: 25;
  transform-origin: center center;
  will-change: transform;
  filter: none; 
}

#section-arc-comet img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================================
   INTERAKTYWNY WIDGET KONTAKTOWY 3D FLIP (ULTRA MAŁY, BEZ CHMUREK)
   ========================================================================= */
.contact-item {
  position: relative;
  width: 22px; /* Ultra małe wg życzenia (dawniej 28px) */
  height: 22px;
  border-radius: 4px;
  background-color: transparent;
  transition: background-color 0.4s ease;
  perspective: 1000px; /* Dla efektu 3D */
}

.contact-item .letter,
.contact-item .icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-item .letter {
  opacity: 1;
  transform: rotateX(0deg);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.65rem; /* Zmniejszone litery (ok 10px) */
}

.contact-item .icon {
  opacity: 0;
  transform: rotateX(-90deg);
  color: #000000;
}

/* Kaskadowe wyzwalanie tła dla wszystkich kafelków podczas Hoveru głównego widgetu */
#contact-widget:hover .contact-item {
  background-color: #ffffff;
}

/* 3D Obrót podczas Hoveru głównego widgetu */
#contact-widget:hover .contact-item .letter {
  opacity: 0;
  transform: rotateX(90deg);
}

#contact-widget:hover .contact-item .icon {
  opacity: 1;
  transform: rotateX(0deg);
}

/* Najechanie na pojedynczą ikonę sprawia, że lekko się podnosi */
#contact-widget .contact-item:hover .icon {
  transform: rotateX(0deg) scale(1.15);
}

/* --- Kaskadowe Opóźnienia (Cascade Delays) od lewej do prawej --- */
/* Wjazd animacji (z lewej do prawej) */
#contact-widget:hover .contact-item:nth-child(1), #contact-widget:hover .contact-item:nth-child(1) .letter, #contact-widget:hover .contact-item:nth-child(1) .icon { transition-delay: 0.00s; }
#contact-widget:hover .contact-item:nth-child(2), #contact-widget:hover .contact-item:nth-child(2) .letter, #contact-widget:hover .contact-item:nth-child(2) .icon { transition-delay: 0.05s; }
#contact-widget:hover .contact-item:nth-child(3), #contact-widget:hover .contact-item:nth-child(3) .letter, #contact-widget:hover .contact-item:nth-child(3) .icon { transition-delay: 0.10s; }
#contact-widget:hover .contact-item:nth-child(4), #contact-widget:hover .contact-item:nth-child(4) .letter, #contact-widget:hover .contact-item:nth-child(4) .icon { transition-delay: 0.15s; }
#contact-widget:hover .contact-item:nth-child(5), #contact-widget:hover .contact-item:nth-child(5) .letter, #contact-widget:hover .contact-item:nth-child(5) .icon { transition-delay: 0.20s; }
#contact-widget:hover .contact-item:nth-child(6), #contact-widget:hover .contact-item:nth-child(6) .letter, #contact-widget:hover .contact-item:nth-child(6) .icon { transition-delay: 0.25s; }
#contact-widget:hover .contact-item:nth-child(7), #contact-widget:hover .contact-item:nth-child(7) .letter, #contact-widget:hover .contact-item:nth-child(7) .icon { transition-delay: 0.30s; }

/* Wyjazd animacji (Odwrócona kolejność: z prawej do lewej jak uciekasz myszką) */
#contact-widget:not(:hover) .contact-item:nth-child(1), #contact-widget:not(:hover) .contact-item:nth-child(1) .letter, #contact-widget:not(:hover) .contact-item:nth-child(1) .icon { transition-delay: 0.30s; }
#contact-widget:not(:hover) .contact-item:nth-child(2), #contact-widget:not(:hover) .contact-item:nth-child(2) .letter, #contact-widget:not(:hover) .contact-item:nth-child(2) .icon { transition-delay: 0.25s; }
#contact-widget:not(:hover) .contact-item:nth-child(3), #contact-widget:not(:hover) .contact-item:nth-child(3) .letter, #contact-widget:not(:hover) .contact-item:nth-child(3) .icon { transition-delay: 0.20s; }
#contact-widget:not(:hover) .contact-item:nth-child(4), #contact-widget:not(:hover) .contact-item:nth-child(4) .letter, #contact-widget:not(:hover) .contact-item:nth-child(4) .icon { transition-delay: 0.15s; }
#contact-widget:not(:hover) .contact-item:nth-child(5), #contact-widget:not(:hover) .contact-item:nth-child(5) .letter, #contact-widget:not(:hover) .contact-item:nth-child(5) .icon { transition-delay: 0.10s; }
#contact-widget:not(:hover) .contact-item:nth-child(6), #contact-widget:not(:hover) .contact-item:nth-child(6) .letter, #contact-widget:not(:hover) .contact-item:nth-child(6) .icon { transition-delay: 0.05s; }
#contact-widget:not(:hover) .contact-item:nth-child(7), #contact-widget:not(:hover) .contact-item:nth-child(7) .letter, #contact-widget:not(:hover) .contact-item:nth-child(7) .icon { transition-delay: 0.00s; }

/* USUNIĘTO CAŁKOWICIE TOOLTIPY W CSS ZGODNIE Z PROŚBĄ */


/* =========================================================================
   KOMETY (SHOOTING STARS) PO BOKACH
   ========================================================================= */
.comet {
  position: absolute;
  top: -100px;
  width: 2px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
  border-radius: 2px;
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.9));
  animation: fall linear forwards;
  opacity: 0;
}

@keyframes fall {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(120vh); opacity: 0; }
}

/* =========================================================================
   GWIAZDKI PO KLIKNIĘCIU
   ========================================================================= */
.click-star {
  position: fixed;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8), 0 0 20px 6px rgba(168, 85, 247, 0.6);
  animation: starBurst 0.8s ease-out forwards;
  z-index: 9999;
}

@keyframes starBurst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(45deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(90deg); }
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(135deg, #c084fc, #9333ea);
}

#mouse-glow {
  position: fixed;
  inset: 0;
  pointer-events: none; 
  z-index: 1; 
  background: radial-gradient(
    550px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), 
    var(--primary-glow),
    transparent 70%
  );
  mix-blend-mode: screen; 
}

/* =========================================================================
   LINIA POD MENU
   ========================================================================= */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0%;
  height: 1px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* =========================================================================
   SEKCJA HERO (Ziemia)
   ========================================================================= */
.earth-container {
  mix-blend-mode: screen;
}

.earth-img {
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 20%, black 50%, transparent 95%);
  mask-image: radial-gradient(ellipse 95% 95% at 50% 20%, black 50%, transparent 95%);
}

/* =========================================================================
   SEKCJA PROJEKTY (SLIDER) ORAZ SCROLLBAR
   ========================================================================= */
.hide-scrollbar::-webkit-scrollbar {
  display: none; 
}
.hide-scrollbar {
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}

/* =========================================================================
   CANVAS TECH STACK
   ========================================================================= */
#canvas-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 450px;
  margin: 0 auto;
  z-index: 10;
}

#tech-stack-canvas {
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
}

#tech-stack-canvas:active {
  cursor: grabbing;
}

#tooltip {
  position: absolute;
  display: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  pointer-events: none; 
  transform: translate(-50%, -100%);
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  background-color: var(--tooltip-bg, #9333ea);
  color: var(--tooltip-text, #ffffff);
}

#tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--tooltip-bg, #9333ea) transparent transparent transparent;
}

/* =========================================================================
   REFLECT.APP STOPKA 1:1
   ========================================================================= */
.footer-wrapper {
  background-color: transparent; 
  position: relative;
  margin-top: 120px; /* Zwiększony odstęp przed stopką */
  padding-top: 0;
  border-top: none; 
  box-shadow: none; 
}

.black-hole-media-container {
  position: relative;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none; 
  z-index: 0; 
}

.bh-anim-media {
  width: 100%;
  max-width: 1300px; 
  height: auto;
  mix-blend-mode: screen; 
  
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%),
                      linear-gradient(to bottom, transparent 0%, black 10%, black 100%);
  -webkit-mask-composite: source-in; 
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%),
              linear-gradient(to bottom, transparent 0%, black 10%, black 100%);
  mask-composite: intersect; 
}

.glass-reflection {
  position: absolute;
  top: 50%; 
  left: 0;
  width: 100%;
  height: 50%; 
  
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  background: linear-gradient(to bottom, rgba(0, 0, 13, 0.15) 0%, rgba(0, 0, 13, 1) 90%);
  z-index: 2; 
}

.footer-content {
  position: relative;
  z-index: 10;
  max-width: 960px; 
  margin: 0 auto;
  margin-top: -300px; 
  padding: 0 24px 70px 24px; 
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr; 
  gap: 48px;
  color: #e2e8f0;
}

@media (max-width: 1200px) {
  .footer-content { margin-top: -240px; }
}
@media (max-width: 900px) {
  .footer-content { margin-top: -160px; }
}
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: -120px;
  }
}
@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: -60px;
  }
  .social-links-reflect {
    justify-content: center;
  }
}

.footer-col {
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.footer-col h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #e4e4e7; 
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.social-links-reflect {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.social-links-reflect a {
  color: #e4e4e7;
  transition: color 0.2s ease;
}

.social-links-reflect a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border-subtle); 
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: #71717a; 
  font-size: 0.8rem;
  position: relative;
  z-index: 10;
}

.footer-bottom-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-bottom-links a {
  color: #71717a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
