@font-face {
  font-family: 'Pinyon Script';
  src: url('assets/pinyon-script.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('assets/courier-prime.ttf') format('truetype');
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-rows: auto 1fr;
  min-block-size: 100vh;
  min-block-size: 100svh;
  margin: 0;
  background: #000;
  color: #fff;
  font-family: system-ui, sans-serif;
}

.top-bar {
  display: grid;
  min-block-size: 76px;
  place-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #242424;
}

.top-bar img {
  display: block;
  inline-size: clamp(150px, 24vw, 198px);
  block-size: auto;
}

main {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 48px 20px 92px;
}

.backdrop {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  inline-size: min(100%, 115svh, 1280px);
  block-size: clamp(250px, 38svh, 520px);
  margin-inline: auto;
  isolation: isolate;
  background: #000;
  opacity: 0.68;
  pointer-events: none;
}

.backdrop img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: plus-lighter;
  opacity: 0;
}

.backdrop img:first-child {
  opacity: 1;
}

.backdrop img:nth-child(2) {
  object-position: center 48%;
}

.backdrop img:nth-child(3) {
  object-position: center 15%;
}

.backdrop::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000, transparent 18% 82%, #000),
    linear-gradient(#000, transparent 25%, #0005);
  content: '';
}

.background-controls {
  position: absolute;
  inset: auto 16px 12px auto;
  display: flex;
  gap: 2px;
}

.photo-credit,
.background-pause {
  position: relative;
}

.photo-credit summary span,
.background-pause span,
.photo-credit-panel {
  border: 1px solid #595959;
  border-radius: 5px;
  background: #141414;
  color: #c7c7c7;
}

.photo-credit summary,
.background-pause {
  display: grid;
  inline-size: 26px;
  block-size: 26px;
  place-items: end;
  list-style: none;
  cursor: pointer;
}

.photo-credit summary span,
.background-pause span {
  display: grid;
  inline-size: 14px;
  block-size: 14px;
  place-items: center;
  border-radius: 3px;
  font: italic 700 10px/1 Georgia, serif;
}

.photo-credit summary::-webkit-details-marker {
  display: none;
}

.photo-credit summary:hover span,
.background-pause:hover span,
.photo-credit[open] summary span {
  color: #fff;
  border-color: #a6a6a6;
}

.photo-credit-panel {
  position: absolute;
  inset-block-end: 100%;
  inset-inline-end: 0;
  inline-size: max-content;
  max-inline-size: calc(100vw - 32px);
  padding: 4px 6px;
  font-size: 0.6875rem;
}

.photo-credit a {
  color: inherit;
  text-underline-offset: 2px;
}

.background-pause {
  display: none;
}

.background-pause input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.background-pause input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.background-pause span::before {
  content: 'Ⅱ';
}

.background-pause input:checked + span::before {
  content: '▸';
}

@media (prefers-reduced-motion: no-preference) {
  .background-pause {
    display: grid;
  }

  .backdrop img {
    animation: backdrop-cycle 15s cubic-bezier(0.77, 0, 0.175, 1) infinite;
  }

  .backdrop img:nth-child(2) {
    animation-delay: -10s;
  }

  .backdrop img:nth-child(3) {
    animation-delay: -5s;
  }

  main:has(.background-pause input:checked) .backdrop img {
    animation-play-state: paused;
  }
}

@keyframes backdrop-cycle {
  0%, 28%, 100% { opacity: 1; }
  33.333333%, 94.666667% { opacity: 0; }
}

.intro {
  text-align: center;
}

h1 {
  margin: 0;
  font-family: 'Pinyon Script', 'Snell Roundhand', cursive;
  font-size: clamp(3.75rem, 10vw, 7.75rem);
  font-weight: 400;
  line-height: 1.07;
  text-wrap: balance;
}

p {
  max-inline-size: 46ch;
  margin: 13px auto 0;
  color: #bcbcbc;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  line-height: 1.55;
  text-wrap: balance;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-block-start: 32px;
}

.social {
  display: grid;
  inline-size: 48px;
  block-size: 48px;
  place-items: center;
  border: 1px solid #ffffff26;
  border-radius: 7px;
  color: #fff;
}

.social svg {
  inline-size: 20px;
  block-size: 20px;
}

.instagram {
  background: linear-gradient(115deg, #ca0065, #d81937 50%, #c74f00);
}

.linkedin {
  background: linear-gradient(115deg, #0655f5, #006fce);
}

.x {
  background: #141414;
  border-color: #595959;
}

.social:hover {
  border-color: #ffffffb3;
}

.social:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .top-bar {
    min-block-size: 64px;
  }

  main {
    padding-block-end: 76px;
  }
}
