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

:root {
  --navy: #1a2b5f;
  --lavender: #e8e4f5;
  --text-muted: #7a8ba8;
  --page-gradient: linear-gradient(180deg, var(--lavender) 0%, #fff 40%);
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background: var(--page-gradient);
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--navy);
  background: transparent;
  min-height: 100vh;
  padding-top: 5.5rem;
}

.page {
  min-height: calc(100vh - 5.5rem);
}

/* Sticky nav bar — Peter Pongo style */
.site-bar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 2rem);
}

.site-bar__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.45rem 0.65rem 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(26, 43, 95, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(26, 43, 95, 0.08);
}

.site-bar__logo {
  display: block;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  text-decoration: none;
}

.site-bar__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-bar__nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-bar__indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: rgba(26, 43, 95, 0.06);
  pointer-events: none;
  opacity: 0;
  will-change: transform, width, height;
}

.site-bar__link {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: color 0.35s ease;
}

.site-bar__link:hover {
  color: var(--navy);
}

.site-bar__link--active {
  color: var(--navy);
  font-weight: 600;
  background: transparent;
}

html.is-page-enter main.page > *,
html.is-page-enter .footer {
  opacity: 0;
}

.hero {
  text-align: center;
  padding: 3rem 2rem 6.5rem;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(26, 43, 95, 0.1);
  border-radius: 999px;
}

.hero__eyebrow {
  margin-bottom: 0.85rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 1.25rem;
  line-height: 1.15;
}

.hero__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 auto 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero__cta {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero__cta--primary {
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
}

.hero__cta--primary:hover {
  background: #24356f;
  transform: translateY(-1px);
}

.hero__cta--ghost {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(26, 43, 95, 0.15);
}

.hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.hero__scroll {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.7;
}

.projects__eyebrow {
  margin: 0 0 1.25rem;
  padding-left: 0.15rem;
}

.projects {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform, border-radius;
  border-radius: 1.25rem;
}

.project-card__cover,
.project-card__hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.project-card__hover {
  opacity: 0;
  z-index: 2;
}

.project-card__cover.is-hidden,
.project-card__hover.is-hidden {
  display: none;
}

.project-card__cover {
  position: relative;
  z-index: 1;
}

.project-card__cover[src=""],
.project-card__cover:not([src]) {
  opacity: 0;
}

.project-card__label {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 4;
  max-width: calc(100% - 1.7rem);
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(26, 43, 95, 0.06);
  pointer-events: none;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.project-card:hover .project-card__label {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.5);
}

.project-card__label-inner {
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  white-space: nowrap;
}

.project-card__label-short {
  font-weight: 600;
}

.project-card__label-sep {
  opacity: 0.5;
  margin: 0 0.15em;
  font-weight: 400;
}

.project-card__label-detail {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font-weight: 500;
  color: #24356f;
  transition: max-width 0.5s ease, opacity 0.35s ease, color 0.35s ease;
}

.project-card:hover .project-card__label-detail {
  max-width: 24rem;
  opacity: 1;
  color: var(--navy);
}

.project-card--tris .project-card__media { background: #2e2e2e; }
.project-card--dotyk .project-card__media { background: #f3b896; }
.project-card--haui .project-card__media { background: #2e2e2e; }
.project-card--klietka .project-card__media { background: #c9b8e8; }
.project-card--marble .project-card__media { background: #e8e0d4; }
.project-card--balon .project-card__media { background: #d4a843; }

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.about {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.about-page .about__content h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
}

.about__linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: 1.5rem;
  color: var(--navy);
  text-decoration: none;
  border-radius: 50%;
  border: 1px solid rgba(26, 43, 95, 0.15);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.about__linkedin:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.about__linkedin svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.about__inner {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 3rem;
  align-items: start;
}

.about__photo {
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--lavender);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo img.is-hidden {
  display: none;
}

.about__content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
}

.about__content p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about__process {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.about__process li {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.about__process strong {
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.about__linkedin-note {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.about__linkedin-note a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 43, 95, 0.2);
}

.about__linkedin-note a:hover {
  border-color: var(--navy);
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.about__skills li {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(26, 43, 95, 0.15);
  border-radius: 2rem;
  color: var(--navy);
}

.contact {
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  background: transparent;
}

.contact__inner {
  max-width: 32rem;
  margin: 0 auto;
}

.contact h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.contact__lead {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact__cta {
  display: inline-block;
  margin-bottom: 0;
  padding: 0.7rem 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact__cta:hover {
  background: #24356f;
  transform: translateY(-1px);
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.contact__links a:hover {
  color: var(--navy);
}

.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(26, 43, 95, 0.08);
}

/* Contact modal */
body.contact-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.contact-modal.contact-modal--gsap {
  transition: none;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 43, 95, 0.35);
  backdrop-filter: blur(6px);
}

.contact-modal__panel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding: 2.25rem 2.25rem 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 24px 64px rgba(26, 43, 95, 0.18);
  will-change: transform, opacity;
}

.contact-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(26, 43, 95, 0.06);
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal__close:hover {
  background: rgba(26, 43, 95, 0.12);
}

.contact-modal__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contact-modal__title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.contact-modal__lead {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form__field {
  display: grid;
  gap: 0.35rem;
}

.contact-form__field span {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(26, 43, 95, 0.15);
  border-radius: 0.5rem;
  font: inherit;
  color: var(--navy);
  background: #fff;
  resize: none;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.contact-form__submit {
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.contact-form__submit:hover:not(:disabled) {
  background: #24356f;
}

.contact-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-form__status {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.contact-form__status--success {
  color: #1a6b3a;
}

.contact-form__status--error {
  color: #a32d2d;
}

.contact-form__status--pending {
  color: var(--text-muted);
}

a.site-bar__link[data-contact-open] {
  display: inline-block;
}

@media (max-width: 768px) {
  body {
    padding-top: 7rem;
  }

  .site-bar {
    top: 0.75rem;
    width: max-content;
    max-width: calc(100% - 1.25rem);
  }

  .site-bar__inner {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  }

  .site-bar__logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-bar__nav {
    gap: 0.1rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .site-bar__link {
    font-size: 0.67rem;
    padding: 0.48rem 0.62rem;
    letter-spacing: 0.05em;
  }

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

  .about__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__photo {
    max-width: 14rem;
  }
}
