/* ============================================
   Link-in-bio | Premium influencer style
   Mobile-first, max-width 620px
   ============================================ */

/* CSS Variables */
:root {
  --bg-dark: #1a1a1a;
  --bg-graphite: #2d2d2d;
  --text-white: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.7);
  --radius: 28px;
  --radius-sm: 22px;
  --gap: 16px;
  --gap-sm: 12px;
  --transition: 0.3s ease;
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Rozmazane tło – soft, jasne, fashion editorial */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  background-image: url('/photos/mainzdj.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(1.25) saturate(1.05);
  transform: scale(1.15);
  z-index: -1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  min-height: 100vh;
  color: #222;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  background: #e8e6e3; /* fallback – jasny, ciepły odcień */
}

/* Fade-in on load */
body.loading .container > * {
  opacity: 0;
  transform: translateY(20px);
}

body:not(.loading) .container > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body .container > *:nth-child(1) { transition-delay: 0.05s; }
body .container > *:nth-child(2) { transition-delay: 0.1s; }
body .container > *:nth-child(3) { transition-delay: 0.15s; }
body .container > *:nth-child(4) { transition-delay: 0.2s; }
body .container > *:nth-child(5) { transition-delay: 0.25s; }
body .container > *:nth-child(6) { transition-delay: 0.3s; }

/* Main container */
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ============================================
   Profile Section (Header / Hero)
   ============================================ */
.profile-section {
  margin-bottom: var(--gap);
}

.profile-image-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  transition: box-shadow var(--transition);
}

.profile-hero {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.profile-image {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  filter: brightness(1.05) contrast(1.04);
}

/* Milk glass overlay – jasny, miękki frosted glass + minimalny glow */
.profile-overlay {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  padding: 22px 26px;
  text-align: center;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 40px rgba(255, 255, 255, 0.2);
  color: #0a0a0a;
  transition: opacity var(--transition);
}

.profile-username {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.social-icons__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.social-icons__link:hover {
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 6px 20px rgba(0, 0, 0, 0.08);
}

.social-icons__link img,
.social-icons__link svg {
  width: 24px;
  height: 24px;
  display: block;
}

.social-icons__link--instagram svg {
  width: 22px;
  height: 22px;
}

.profile-bio {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}

.profile-flags {
  font-size: 1.4rem;
  line-height: 1;
  text-align: center;
  margin: 0;
}

/* ============================================
   Links Section
   ============================================ */
.links-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* Link tiles - base */
.link-tile {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition);
}

.link-tile:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.link-tile__image {
  width: 100%;
  display: block;
  object-fit: cover;
  vertical-align: middle;
  filter: brightness(1.05) contrast(1.03);
}

.link-tile__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
  pointer-events: none;
}

.link-tile__text {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.link-tile__icon {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 1rem;
  opacity: 0.9;
}

.link-tile__brand-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.link-tile__brand-icon svg {
  display: block;
}

/* Large tile – prostokątny banner, nie drugi hero */
.link-tile--large {
  border-radius: 26px;
}

.link-tile--large .link-tile__image {
  aspect-ratio: 4 / 5;
  max-height: 340px;
  object-fit: cover;
}

.link-tile--large .link-tile__gradient {
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

.link-tile--large .link-tile__text {
  font-size: 1.43rem;
  bottom: 18px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Grid tiles */
.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.link-tile--grid .link-tile__image {
  aspect-ratio: 1;
}

.link-tile--grid .link-tile__text {
  font-size: 1.17rem;
  white-space: normal;
  max-width: 90%;
}

/* Very small screens - single column */
@media (max-width: 350px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-section {
  margin-top: var(--gap);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  justify-items: center;
  align-items: center;
}

.gallery-item {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1;
  width: 70%;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(1.05) contrast(1.03);
}

/* ============================================
   Lightbox Modal
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  text-align: center;
  padding: 12px 20px 16px;
  max-width: 620px;
  margin: 0 auto;
}

.site-footer__text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.site-footer__text a {
  color: #000;
  text-decoration: none;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (min-width: 481px) {
  .container {
    padding: 32px 24px 56px;
  }
  
  body {
    padding: 28px 0;
  }
}
