/* -------------------------------------- */
/* ROOT */
/* -------------------------------------- */

:root {
  color-scheme: dark;
  --background: #0b0914;
  --surface: rgba(23, 18, 38, 0.78);
  --surface-hover: rgba(36, 26, 55, 0.92);
  --border: rgba(192, 132, 252, 0.17);
  --border-hover: rgba(216, 180, 254, 0.5);
  --text: #f7f2ff;
  --muted: #aaa0bc;
  --accent: #d8b4fe;
  --pink: #f0abfc;
  --purple: #9333ea;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(ellipse at 50% -15%, rgba(126, 34, 206, 0.2), transparent 42rem), var(--background);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

.container {
  width: min(100% - 2.5rem, 1040px);
  margin-inline: auto;
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--pink);
  font-family: "Space Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.intro h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.04em;
}

.intro p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

section {
  margin-top: 3rem;
}

/* -------------------------------------- */
/* KARTA POWITALNA, ABOUT, TECHSTACK */
/* -------------------------------------- */

.card-full {
  margin-bottom: 2rem;
  width: 100%;
}

/* KONTENER DLA TECH STACKU */
.tech-stack-container {
  margin-top: 2rem;
}

.tech-stack-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

/* SIATKA MAŁYCH KAFELKÓW */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

/* MAŁY KAFELEK TECHNOLOGII */
.tech-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.tech-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.tech-icon {
  font-size: 1.35rem;
  color: var(--accent); /* Nadaje im fioletowy akcent motywu */
}

.tech-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* -------------------------------------- */
/* PEŁNOEKRANOWA SEKCJA HERO (SPLIT LAYOUT) */
/* -------------------------------------- */
.hero-fullscreen {
  width: 100vw;
  min-height: calc(100svh - 80px);
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 74% 48%, rgba(147, 51, 234, 0.16), transparent 34rem),
    linear-gradient(135deg, rgba(30, 15, 60, 0.92) 0%, rgba(11, 9, 20, 0.98) 76%);
  border-bottom: 1px solid var(--border);
  padding: clamp(4rem, 8vh, 7rem) clamp(1.5rem, 5vw, 4rem);
  box-sizing: border-box;
  overflow: hidden;
}

.hero-fullscreen::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(216, 180, 254, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 180, 254, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, #000 55%, transparent);
  pointer-events: none;
}

.hero-fullscreen::after {
  position: absolute;
  right: -14rem;
  bottom: -26rem;
  width: 48rem;
  height: 48rem;
  border: 1px solid rgba(216, 180, 254, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(216, 180, 254, 0.025),
    0 0 0 8rem rgba(216, 180, 254, 0.018);
  content: "";
  pointer-events: none;
}

/* WEWNĘTRZNY KONTENER DLA DWÓCH KOLUMN */
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

/* LEWA STRONA - AWATAR */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual::before {
  position: absolute;
  width: 115%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.28), transparent 68%);
  content: "";
  pointer-events: none;
}

.avatar-frame {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid rgba(216, 180, 254, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(147, 51, 234, 0.22);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-frame:hover .hero-avatar-img {
  transform: scale(1.06);
}

.avatar-glow {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(11, 9, 20, 0.32));
  pointer-events: none;
}

/* PRAWA STRONA - TREŚĆ */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.hero-tags {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.hero-fullscreen .hero-tags .tag {
  padding: 0.35rem 0.7rem;
  border-color: rgba(216, 180, 254, 0.2);
  background: rgba(216, 180, 254, 0.065);
  color: #ded0f0;
  font-size: 0.7rem;
}

.hero-fullscreen .subtitle {
  max-width: 650px;
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

/* -------------------------------------- */

.hero-fullscreen .badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.42rem 0.85rem;
  border: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.16);
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.spark {
  color: var(--pink);
}

.name {
  margin: 0;
  /* Pełna obsługa fioletowego gradientu w każdej przeglądarce */
  background: linear-gradient(135deg, #ffffff 20%, var(--accent) 60%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  word-break: break-word;
}

.subtitle {
  max-width: 590px;
  margin: 0 auto 1.75rem auto;
  color: var(--muted, #94a3b8);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border: 1px solid rgba(216, 180, 254, 0.25);
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #7022b8);
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    filter 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
  box-shadow: 0 8px 24px rgba(112, 34, 184, 0.24);
}

.action.secondary {
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
  box-shadow: none;
}

.action:hover {
  transform: translateY(-2px);
  filter: brightness(1.16);
  box-shadow: 0 12px 28px rgba(112, 34, 184, 0.35);
}

.action.secondary:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.action:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* -------------------------------------- */
/* KAFELKI */
/* -------------------------------------- */

.card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* NAGŁÓWEK KARTY (Ikona z lewej + Tytuł) */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.card-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 12px;
  background: rgba(147, 51, 234, 0.15);
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-header h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text);
}

/* PODGLĄD MEDIA (ZDJĘCIE Z GRADIENTEM ZANIKAJĄCYM) */
.card-media {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 9, 20, 0) 40%, var(--surface) 100%);
  pointer-events: none;
}

/* OPIS KARTY */
.card p,
.card-description {
  margin: 0 0 1.15rem 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}

.tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(192, 132, 252, 0.16);
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.1);
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 180ms ease,
    gap 180ms ease;
}

.card-link:hover {
  color: #fff;
}

.card-link span {
  transition: transform 180ms ease;
}

.card-link:hover span {
  transform: translateX(3px);
}

.card-link.disabled {
  color: var(--muted);
  opacity: 0.6;
  cursor: default;
}

.note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* -------------------------------------- */
/* FOOTER */
/* -------------------------------------- */

footer {
  margin-top: 4.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* -------------------------------------- */
/* RESPONSYWNOŚĆ DLA TELEFONÓW */
/* -------------------------------------- */

@media (max-width: 650px) {
  .container {
    width: min(100% - 1.5rem, 1040px);
  }

  .banner-frame {
    height: 370px;
    margin-top: 0.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 245px;
  }

  .footer-inner {
    flex-direction: column;
  }

  header {
    margin-bottom: 5rem;
  }

  .hero-fullscreen {
    min-height: calc(100svh - 5rem);
    overflow: visible;
    padding: 3rem 1.5rem 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.75rem;
  }

  .hero-content {
    align-items: center;
    gap: 1rem;
  }

  .hero-fullscreen .subtitle {
    line-height: 1.65;
  }

  .hero-fullscreen .actions {
    justify-content: center;
  }

  .avatar-frame {
    width: min(200px, 60vw);
  }

  .hero-fullscreen::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
