@font-face {
  font-family: Newsreader;
  src: url("./fonts/newsreader-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Newsreader;
  src: url("./fonts/newsreader-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f8f5;
  --ink: #253c4b;
  --muted: #526672;
  --accent: #456f87;
  --rule: #9dabb1;
  --selection: #dce8ed;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--rule) var(--paper);
}

* { box-sizing: border-box; }

body { margin: 0; }

.introduction {
  position: relative;
  display: grid;
  align-items: center;
  min-height: max(700px, 100svh);
  isolation: isolate;
  overflow: clip;
}

.introduction__content {
  position: relative;
  z-index: 1;
  width: min(480px, 43vw);
  margin-left: max(8vw, calc((100vw - 1160px) / 2));
  padding-block: 80px 96px;
}

.greeting {
  margin: 0 0 30px;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(4.5rem, 7vw, 6rem);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.greeting em {
  display: block;
  font-weight: 400;
  color: var(--accent);
}

p { margin: 0; }

.biography {
  max-width: 36ch;
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--muted);
  text-wrap: pretty;
}

.aviation { color: var(--accent); font-weight: 500; }

.contact {
  margin-top: 44px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  max-width: 100%;
  min-height: 48px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
}

.email span {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: text-decoration-color 250ms ease;
}

.email__arrow {
  flex: 0 0 18px;
  transition: transform 450ms var(--ease-out);
}

.email:hover span { text-decoration-color: currentColor; }
.email:hover .email__arrow { transform: translate(3px, -3px); }
.email:active .email__arrow { transform: translate(1px, -1px); }
.email:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.sky {
  position: absolute;
  z-index: 0;
  top: 0;
  right: -3%;
  width: 68%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%), linear-gradient(0deg, transparent 0%, #000 24%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%), linear-gradient(0deg, transparent 0%, #000 24%, #000 80%, transparent 100%);
  mask-composite: intersect;
}

.sky__parallax {
  position: absolute;
  inset: -12px;
  transform: translate3d(var(--sky-x, 0px), var(--sky-y, 0px), 0);
  transition: transform 1100ms var(--ease-out);
}

.sky__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.flight {
  position: absolute;
  top: 10%;
  right: 7%;
  width: 87%;
  height: 74%;
  color: var(--accent);
  overflow: visible;
}

.flight__path { opacity: 0.28; }

.flight__plane {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection { background: var(--selection); color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .greeting { animation: arrive 650ms var(--ease-out) both; }
  .biography { animation: arrive 650ms 100ms var(--ease-out) both; }
  .contact { animation: arrive 650ms 200ms var(--ease-out) both; }
  @keyframes arrive {
    from { opacity: 0.35; transform: translateY(9px); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }
}

@media (min-width: 1800px) {
  .sky { width: 64%; }
}

@media (max-width: 900px) and (min-width: 701px) {
  .introduction__content { margin-left: 7vw; width: 48vw; }
  .greeting { font-size: 4.5rem; }
  .biography { max-width: 320px; font-size: 1rem; }
  .sky { width: 65%; right: -12%; opacity: 0.85; }
}

@media (max-width: 700px) {
  .introduction { display: block; min-height: 100svh; }
  .introduction__content {
    width: auto;
    margin: 0;
    padding: clamp(52px, 10svh, 88px) 28px 0;
  }
  .greeting { margin-bottom: 24px; font-size: clamp(3.75rem, 15vw, 4.5rem); line-height: 1.04; }
  .biography { font-size: 1rem; line-height: 1.85; }
  .contact { margin-top: 32px; }
  .email { gap: 18px; }
  .sky {
    position: relative;
    width: calc(100% + 48px);
    height: clamp(260px, 42svh, 380px);
    margin: 4px -24px -24px;
    right: auto;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 24%, #000 64%, transparent 100%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 24%, #000 64%, transparent 100%);
  }
  .sky__image { object-position: 65% 68%; }
  .flight { width: 94%; height: 110%; top: -9%; right: 3%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sky__parallax { transform: none; }
}
