:root {
  --bg: #000;
  --ink: #fff;
  --accent: #e5163c;
  --accent-glow: 0 0 14px rgb(229 22 60 / 0.7);
  --ink-2: rgb(255 255 255 / 0.76);
  --ink-3: rgb(255 255 255 / 0.6);
  --line: rgb(255 255 255 / 0.14);
  --line-2: rgb(255 255 255 / 0.24);
  --glass-top: rgb(255 255 255 / 0.1);
  --glass-dim: rgb(0 0 0 / 0.22);
  --glass-low: rgb(255 255 255 / 0.035);
  --sheen: rgb(255 255 255 / 0.22);
  --shade: rgb(0 0 0 / 0.55);
  --sh-edge: inset 0 1px 0 var(--sheen);
  --sh-glass: var(--sh-edge), 0 30px 80px -30px var(--shade);
  --sh-lift: 0 10px 30px -10px rgb(255 255 255 / 0.35);
  --sh-halo: 0 0 120px 20px rgb(255 255 255 / 0.07);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 28px;
  --r-xl: 32px;
  --r-pill: 999px;

  --blur: 40px;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
img { max-width: 100%; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus-visible { transform: none; }

/* Światło za szkłem */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: drift 46s var(--ease) infinite alternate;
}

.orb--1 {
  width: 64vmax; height: 64vmax;
  left: -20vmax; top: -24vmax;
  background: radial-gradient(circle, rgb(255 255 255 / 0.2) 0%, rgb(255 255 255 / 0.07) 36%, transparent 66%);
}
.orb--2 {
  width: 54vmax; height: 54vmax;
  right: -18vmax; top: 22vh;
  background: radial-gradient(circle, rgb(205 205 212 / 0.15) 0%, rgb(205 205 212 / 0.05) 40%, transparent 66%);
  animation-duration: 58s;
  animation-delay: -12s;
}
.orb--3 {
  width: 19vmax; height: 19vmax;
  left: 52vw; top: 6vh;
  background: radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.62) 0%, rgb(230 230 236 / 0.3) 28%, rgb(150 150 160 / 0.12) 58%, rgb(150 150 160 / 0.08) 69%, transparent 70.5%);
  box-shadow: var(--sh-halo);
  animation-name: sphere-a;
  animation-duration: 34s;
}
.orb--4 {
  width: 42vmax; height: 42vmax;
  left: 6vw; bottom: -22vmax;
  background: radial-gradient(circle, rgb(175 175 184 / 0.18) 0%, rgb(175 175 184 / 0.06) 42%, transparent 66%);
  animation-duration: 64s;
  animation-delay: -30s;
}
.orb--5 {
  width: 9vmax; height: 9vmax;
  left: 14vw; top: 14vh;
  background: radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.7) 0%, rgb(225 225 232 / 0.3) 30%, rgb(150 150 160 / 0.1) 62%, rgb(150 150 160 / 0.07) 69%, transparent 70.5%);
  box-shadow: var(--sh-halo);
  animation-name: sphere-b;
  animation-duration: 28s;
  animation-delay: -9s;
}

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.16) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 80%);
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(12vw, 8vh, 0) scale(1.12); }
  100% { transform: translate3d(-6vw, 16vh, 0) scale(0.94); }
}
@keyframes sphere-a {
  0%   { transform: translate3d(0, 0, 0); }
  33%  { transform: translate3d(-18vw, 10vh, 0); }
  66%  { transform: translate3d(14vw, 22vh, 0); }
  100% { transform: translate3d(26vw, -4vh, 0); }
}
@keyframes sphere-b {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(22vw, 26vh, 0); }
  100% { transform: translate3d(-8vw, 48vh, 0); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Szkło */

.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(115deg, rgb(255 255 255 / 0.07) 0%, transparent 34%),
    linear-gradient(180deg, var(--glass-top), var(--glass-low) 46%, var(--glass-low)),
    linear-gradient(var(--glass-dim), var(--glass-dim));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: var(--sh-glass);
}

[data-light]::before,
[data-light]::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
[data-light]::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.07), transparent 62%);
}
[data-light]::after {
  inset: -1px;
  padding: 1px;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.6), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-light].is-lit::before,
[data-light].is-lit::after { opacity: 1; }

.glass--xl { border-radius: var(--r-xl); }

/* Przyciski i pigułki */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font: 500 16px/1 var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn__icon { width: 18px; height: 18px; }

.btn--solid {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--sh-lift);
}
.btn--solid:hover { background: rgb(255 255 255 / 0.88); }

.btn--glass {
  color: var(--ink);
  background: rgb(255 255 255 / 0.06);
  border-color: var(--line-2);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--sh-edge);
}
.btn--glass:hover { background: rgb(255 255 255 / 0.12); }

.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 450;
  color: var(--ink-2);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid var(--line);
  box-shadow: var(--sh-edge);
  transition: color 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.pill__icon { width: 17px; height: 17px; fill: var(--ink); }
.pill:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 0.11);
  border-color: var(--line-2);
  transform: translateY(-1px);
}

.chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font: 500 13px/1 var(--mono);
  color: var(--ink);
  background: rgb(255 255 255 / 0.08);
  border: 1px solid var(--line-2);
}
.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* Nawigacja */

.nav-wrap {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-pill);
  --blur: 24px;
  animation: rise 1s var(--ease) 0.1s both;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 14px;
  min-height: 40px;
  border-radius: var(--r-pill);
}
.logo {
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--ink);
  white-space: nowrap;
}
.logo__dot { color: var(--accent); letter-spacing: 0; }
.hero__dot { color: var(--accent); }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ink); background: rgb(255 255 255 / 0.08); }
.nav .btn { margin-left: 6px; }

/* Hero */

.hero {
  padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}

.hero__window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(24px, 3vw, 44px);
  min-height: min(calc(100svh - 128px), 820px);
  padding: clamp(28px, 5vw, 72px);
  animation: window-in 1.4s var(--ease) both;
}

.hero__name {
  font-weight: 600;
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.06em;
  margin-left: -0.04em;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.hero__name > span {
  display: block;
  animation: name-in 1.4s var(--ease) both;
  animation-delay: 0.25s;
}
.hero__name > span + span { animation-delay: 0.38s; }

.hero__photo {
  margin: 0;
  width: clamp(200px, 17.5vw, 252px);
  aspect-ratio: 2 / 3;
  padding: 6px;
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.06);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-glass);
  animation: rise 1.2s var(--ease) 0.55s both;
}
.hero__photo picture, .hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__photo img {
  object-fit: cover;
  border-radius: calc(var(--r-md) - 6px);
  filter: grayscale(1) contrast(1.08) brightness(0.8);
}

.hero__lead {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  animation: rise 1.1s var(--ease) 0.6s both;
}
.hero__sub {
  margin-top: 10px;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  color: var(--ink-2);
  animation: rise 1.1s var(--ease) 0.7s both;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 3.5vw, 40px);
}
.socials li { animation: rise 1s var(--ease) both; }
.socials li:nth-child(1) { animation-delay: 0.8s; }
.socials li:nth-child(2) { animation-delay: 0.86s; }
.socials li:nth-child(3) { animation-delay: 0.92s; }
.socials li:nth-child(4) { animation-delay: 0.98s; }
.socials li:nth-child(5) { animation-delay: 1.04s; }

@keyframes window-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes name-in {
  from { opacity: 0; transform: translateY(0.25em); filter: blur(18px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Sekcje */

.section {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(96px, 12vw, 160px) var(--gutter) 0;
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 40rem;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.section__title {
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.section__desc {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--ink-2);
  max-width: 34rem;
}

/* Projekty */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 300px;
  padding: clamp(24px, 2.6vw, 36px);
  border-radius: var(--r-lg);
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), background-color 0.6s var(--ease);
}
.card--digan { grid-column: span 7; min-height: 380px; }
.card--rm    { grid-column: span 5; min-height: 380px; }
.card--lab   { grid-column: span 5; }
.card--club  { grid-column: span 7; }

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card__domain {
  font: 400 15px/1 var(--mono);
  color: var(--ink-3);
  letter-spacing: -0.01em;
}
.card__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.05);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), transform 0.5s var(--ease);
}
.card__go svg { width: 18px; height: 18px; }
.card:hover .card__go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  transform: scale(1.05);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__name {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.card--digan .card__name { font-size: clamp(2.75rem, 5.6vw, 5rem); }
.card__desc {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 30rem;
}
.card__body .chip { margin-bottom: 6px; }

/* Droga */

.timeline {
  border-radius: var(--r-xl);
  padding: clamp(8px, 1.5vw, 16px) clamp(20px, 3vw, 40px);
}

.step {
  position: relative;
  display: grid;
  --gap: clamp(16px, 2vw, 32px);
  grid-template-columns: 9rem 24px 1fr;
  align-items: start;
  gap: 0 var(--gap);
  padding: 28px 0;
}
.step::before {
  content: "";
  position: absolute;
  left: calc(9rem + var(--gap) + 11.5px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}
.step:first-child::before { top: 44px; }
.step:last-child::before { bottom: auto; height: 44px; }
.step + .step { border-top: 1px solid var(--line); }

.step__year {
  font: 500 15px/1.6 var(--mono);
  color: var(--ink-3);
  padding-top: 4px;
}
.step__dot {
  position: relative;
  width: 12px; height: 12px;
  margin: 10px auto 0;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.45);
  background: var(--bg);
  z-index: 1;
}
.step--now .step__dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  outline: 5px solid rgb(229 22 60 / 0.16);
}
.step--now .step__year { color: var(--ink); }

.step__text { display: flex; flex-direction: column; gap: 6px; }
.step__title {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.step__desc { font-size: 16px; color: var(--ink-2); max-width: 36rem; }

/* Kontakt */

.contact {
  padding: clamp(32px, 5.5vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.contact__title {
  font-size: clamp(2.5rem, 6.4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.055em;
  max-width: 14ch;
}
.contact__desc {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--ink-2);
  max-width: 34rem;
}
.contact__mail { color: var(--ink); font-weight: 500; white-space: nowrap; }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.contact__sub {
  margin-top: clamp(56px, 7vw, 88px);
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

.links {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 184px), 1fr));
  gap: 12px;
}
.link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 76px;
  padding: 14px;
  border-radius: var(--r-md);
  --blur: 18px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.link:hover { transform: translateY(-3px); border-color: var(--line-2); }
.link__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.08);
  border: 1px solid var(--line);
}
.link__icon svg { width: 18px; height: 18px; fill: var(--ink); }
.link__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link__handle { font-size: 15px; font-weight: 550; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.link__what { font-size: 15px; color: var(--ink-3); }

/* Stopka */

.footer {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 56px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 15px;
  color: var(--ink-3);
}
.footer__brand { display: inline-flex; padding: 8px 0; margin-right: auto; }
.footer a { transition: color 0.3s var(--ease); }
.footer a:hover { color: var(--ink); }

/* Responsywność */

@media (max-width: 960px) {
  .card--digan, .card--rm, .card--lab, .card--club { grid-column: span 12; min-height: 280px; }
}

@media (max-width: 640px) {
  :root { --blur: 26px; }
  body { font-size: 16px; }

  .nav__brand { padding: 0 8px 0 12px; }
  .logo { font-size: 14px; letter-spacing: 0.1em; }
  .nav__links a { padding: 0 12px; }

  .hero { padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
  .hero__window { min-height: calc(100svh - 108px); padding: 28px 22px; }
  .hero__window { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: stretch; gap: 28px; }
  .hero__photo { order: -1; width: 132px; }
  .hero__text { align-self: end; }
  .hero__name { font-size: 23vw; line-height: 0.84; }
  .socials { gap: 8px; }
  .pill { padding: 0 14px 0 12px; }

  .card { min-height: 240px; gap: 36px; }
  .card--digan, .card--rm, .card--lab, .card--club { min-height: 240px; }

  .step { grid-template-columns: 16px 1fr; gap: 6px 16px; padding: 22px 0; }
  .step__year { grid-column: 2; padding-top: 0; }
  .step__dot { grid-column: 1; grid-row: 1; margin: 6px 0 0 2px; }
  .step::before { left: 7.5px; }
  .step:first-child::before { top: 34px; }
  .step:last-child::before { height: 34px; }
  .step__text { grid-column: 2; }

  .contact__actions .btn { flex: 1 1 auto; }
  .orb--4 { display: none; }
}

@media (hover: none) {
  [data-light]::before, [data-light]::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .orb { animation: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgb(22 22 22 / 0.92); }
}
