/* Marta Myszkowska — styl strony
   Kolory i typografia odwzorowane z projektu w Figma Sites.
   Breakpointy: telefon < 768 px, tablet 768–1279 px, komputer ≥ 1280 px. */

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/albert-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/albert-sans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-017F;
}
/* Zastępczy krój o zbliżonych proporcjach: ogranicza „skok” tekstu przy wczytywaniu fontu */
@font-face {
  font-family: "Albert Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 102.7%;
  ascent-override: 92.5%;
  descent-override: 24.3%;
  line-gap-override: 0%;
}

:root {
  --bg: #f6f6f0;
  --heading: #000;
  --text: #6f6f6c;
  --dark: #1d1d1d;
  --light: #f6f6f0;
  --radius: 16px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Albert Sans", "Albert Sans Fallback", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4583;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p {
  margin: 0;
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Nagłówek ---------- */

.hero {
  padding: 48.25px 24px 0;
  text-align: center;
}

.hero h1 {
  max-width: 311px;
  margin: 0 auto;
  color: var(--heading);
  font-size: 50px;
  line-height: 55px;
  letter-spacing: -0.025em;
}

.hero .role {
  margin-top: 25.75px;
  font-size: 16px;
}

/* ---------- Zdjęcie ---------- */

.photo {
  width: 311px;
  max-width: calc(100% - 48px);
  margin: 33.67px auto 0;
  aspect-ratio: 311 / 208;
  border-radius: var(--radius);
  overflow: hidden;
  background: #d9d6cf;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* ---------- O mnie ---------- */

.bio {
  padding: 65.91px 24px 52.7px;
}

.bio p + p {
  margin-top: 20px;
}

/* ---------- Kontakt (stopka) ---------- */

.contact {
  padding: 45.05px 24px 40.05px;
  background: var(--dark);
  color: var(--light);
  text-align: center;
}

.contact h2 {
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.contact address {
  margin-top: 55.87px;
  font-style: normal;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  word-spacing: 0.49em;
}

.contact .sep {
  margin-left: 0.74em;
}

/* Bardzo wąskie telefony (ok. 320 px): mniejszy tekst kontaktu,
   żeby adres e-mail mieścił się w ekranie */
@media (max-width: 359px) {
  .contact address {
    font-size: 17px;
  }
}

.contact a {
  word-spacing: normal;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.contact a:hover {
  text-decoration-thickness: 2px;
}

.contact .copy {
  margin-top: 26.5px;
  font-size: 16px;
  letter-spacing: -0.04em;
}

/* Delikatne pojawienie się stopki przy przewijaniu (jak w oryginale).
   Tylko w przeglądarkach, które to obsługują, i bez preferencji ograniczenia ruchu. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .contact {
      animation: contact-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
  }
}

@keyframes contact-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) {
  .hero {
    padding: 48.36px 80px 0;
  }

  .hero h1 {
    max-width: none;
    font-size: 64px;
    line-height: 70px;
  }

  .hero .role {
    margin-top: 17.19px;
  }

  .photo {
    width: auto;
    max-width: none;
    margin: 51.12px 80px 0;
    aspect-ratio: 3 / 2;
  }

  .bio {
    padding: 89.75px 80px 76.38px;
  }

  .contact {
    padding: 69.45px 80px 63.75px;
  }

  .contact h2 {
    letter-spacing: -0.025em;
  }

  .contact address {
    margin-top: 55.58px;
    font-size: 24px;
    letter-spacing: -0.035em;
  }

  .contact .copy {
    margin-top: 27.29px;
    letter-spacing: -0.05em;
  }
}

/* ---------- Komputer ---------- */

@media (min-width: 1280px) {
  .hero {
    padding: 79.86px 240px 0;
  }

  .hero .role {
    margin-top: 15.94px;
    font-size: 18px;
  }

  .photo {
    height: 534px;
    margin: 79.91px 240px 0;
    aspect-ratio: auto;
  }

  .bio {
    padding: 81.5px 240px 66.5px;
  }

  .bio .lead {
    font-size: 24px;
  }

  .bio .lead + p {
    margin-top: 19px;
  }

  .contact {
    padding: 84.69px 240px 80.12px;
  }

  .contact address {
    margin-top: 56.58px;
    letter-spacing: -0.04em;
  }

  .contact .copy {
    margin-top: 26.68px;
    letter-spacing: -0.06em;
  }
}
