/* Work Sans, self-hosted (not loaded from Google's CDN) so no visitor IP is
   sent to a third party just to render text. Variable font: one file per
   subset covers every weight we use (300-600). */
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/work-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/work-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --max-width: 1200px;
  --header-height: 64px;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--header-height);
  /* Kontrola "wdów" (samotne krótkie linie/słowa na końcu akapitu) —
     dziedziczone przez CAŁĄ treść strony (akapity, listy, linki, przyciski).
     Progresywne wsparcie w przeglądarkach — tam, gdzie CSS text-wrap nie
     jest jeszcze obsługiwane, po prostu nic się nie zmienia. */
  text-wrap: pretty;
}

a {
  color: inherit;
}

/* Nagłówki dostają wyrównanie linii zamiast kontroli wdów — lepsze przy
   krótkich, łamiących się blokach tekstu jak tytuły sekcji. */
h1,
h2,
h3 {
  text-wrap: balance;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  position: relative;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a.active {
  color: var(--text);
  pointer-events: none;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  padding: 0.75rem;
}

.menu-toggle-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
}

.hamburger span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Nav overlay */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(360px, 100%);
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 110;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
}

.site-nav.open {
  transform: translateX(0);
}

.site-nav-inner {
  padding: 2rem;
  width: 100%;
}

.nav-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.nav-list li + li {
  margin-top: 1.25rem;
}

.nav-list a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.nav-sublist {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0 0 0 1rem;
}

.nav-sublist li + li {
  margin-top: 0.6rem;
}

.nav-sublist a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-sublist a:hover {
  color: var(--text);
}

.nav-list a:hover {
  color: var(--muted);
}

.nav-top-left {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-lang-switch {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.nav-lang-switch a {
  text-decoration: none;
  color: var(--muted);
}

.nav-lang-switch a:hover {
  color: var(--text);
}

.nav-lang-switch a.active {
  color: var(--text);
  pointer-events: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 105;
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Gallery */

.category-title,
#about,
#collaboration,
#contact {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.gallery-header {
  padding-top: 3rem;
  padding-bottom: 1.5rem;
  text-align: center;
}

.gallery-header h1 {
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin: 0;
}

.category-title {
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 3rem 0 1.5rem;
}

.category-title:first-child {
  margin-top: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1px;
  gap: 1rem;
  padding-bottom: 3rem;
}

.gallery-item {
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-item img,
.lightbox-image {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.gallery-item:hover img {
  opacity: 0.9;
}

/* Text sections */

.text-section {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 960px;
}

.about-layout {
  display: flow-root; /* zawiera wysokość pływającego portretu, niezależnie od długości tekstu obok */
  margin-bottom: 1.5rem;
}

.about-portrait {
  float: left;
  width: 380px;
  margin: 0 2rem 1.5rem 0;
}

.about-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(1);
}

.about-text p:first-child {
  /* Domyślny margin-top przeglądarki na <p> przesuwał pierwszą linię tekstu
     niżej niż górna krawędź zdjęcia, mimo wyrównania do góry. */
  margin-top: 0;
}

@media (max-width: 700px) {
  .about-portrait {
    float: none;
    width: auto;
    max-width: 280px;
    margin: 0 auto 1.5rem;
  }
}

.text-section h2 {
  font-weight: 500;
  font-size: 1.3rem;
  margin-top: 2rem;
}

.text-section h2:first-child {
  margin-top: 0;
}

.text-section h3 {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 1.75rem;
}

#about p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
}

.awards-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.awards-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.awards-list li:last-child {
  border-bottom: 1px solid var(--border);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0.5rem;
}

.lightbox-close {
  top: 1rem;
  right: 1.5rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

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

.footer-links a:hover {
  color: var(--muted);
}

.copyright {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* Responsive */

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .menu-toggle-label {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Ikona Instagrama jest zdublowana w panelu nawigacji (.nav-top-left) —
     na wąskich telefonach chowamy ją z headera, żeby logo + przycisk menu
     zawsze mieściły się w jednym wierszu bez ryzyka przepełnienia. */
  .header-social {
    display: none;
  }

  /* Wyśrodkowane logo przy większej czcionce mogłoby nachodzić na przełącznik
     języka i przycisk menu po prawej — na wąskich ekranach zmniejszamy je. */
  .logo {
    font-size: 0.9rem;
  }
}
