@font-face {
  font-family: "patchy-robots";
  src: url("patchy-robots.otf");
  font-display: swap;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root {
  --bg: #161616;
  --fg: #f5f5f5;
  --radius: 6px;
  --dim: 0.5;
  --ease: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

::view-transition-old(brand),
::view-transition-old(team) {
  display: none;
}

::view-transition-new(brand),
::view-transition-new(team) {
  animation: none;
  width: 100%;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "patchy-robots", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sprite {
  display: none;
}

.icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.title {
  font-size: clamp(1.6rem, 8vw, 4.5rem);
  margin: 60px 0 60px 0;
  text-align: center;
  letter-spacing: 0.05em;
  font-weight: normal;
}

.nav {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 100;
}

.nav > a {
  text-decoration: none;
  display: inline-block;
  color: var(--fg);
  padding: 12px 24px;
  transition: opacity var(--ease);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.nav > a:hover {
  opacity: var(--dim);
}

main {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects {
  display: flex;
  justify-content: center;
  max-width: 100%;
  gap: 40px;
  margin-bottom: 80px;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  transition: opacity var(--ease);
}

.projects:hover > .project:not(:hover) {
  opacity: var(--dim);
}

.project-media {
  display: block;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 360 / 268;
  object-fit: cover;
  border-radius: var(--radius);
  background: #000;
}

.video-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.yt-video {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  width: 580px;
  max-width: 100%;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  margin-bottom: 20px;
  padding: 0;
}

.yt-video > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--ease);
}

.yt-video:hover > img {
  opacity: 0.7;
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: var(--radius);
  background: rgba(22, 22, 22, 0.85);
  transition:
    background var(--ease),
    color var(--ease);
  color: var(--fg);
}

.yt-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent currentColor;
}

.yt-video:hover .yt-play {
  background: var(--fg);
  color: var(--bg);
}

footer {
  width: 100%;
  max-width: 800px;
  margin-top: 80px;
  padding-top: 40px;
}

.contact {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 24px;
}

.contact > a {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--fg);
  opacity: var(--dim);
  transition: opacity var(--ease);
}

.contact > a:hover {
  opacity: 1;
}

.copyright {
  text-align: center;
  font-size: 0.9rem;
  opacity: var(--dim);
  margin-bottom: 40px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  justify-items: center;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 30px;
  width: 100%;
  max-width: 300px;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: normal;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.profile-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
  filter: grayscale(100%);
  transition: filter var(--ease);
}

.profile:hover .profile-image {
  filter: grayscale(0);
}

.profile-links {
  display: flex;
  gap: 24px;
}

.profile-links > a {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--fg);
  opacity: var(--dim);
  transition: opacity var(--ease);
}

.profile-links > a:hover {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .nav {
    top: 20px;
    right: 20px;
  }

  .nav > a {
    padding: 10px 18px;
    font-size: 1rem;
  }

  .title {
    margin: 50px 0 40px 0;
  }

  .projects {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
  }

  .yt-video {
    margin-bottom: 40px;
  }

  footer {
    margin-top: 60px;
    padding-top: 30px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 15px;
  }

  .profile-image {
    width: 140px;
    height: 140px;
  }
}

.brand,
.team {
  display: inline-block;
}

.brand {
  view-transition-name: brand;
}

.team {
  view-transition-name: team;
}

.comet {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--comet-size, 200px);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  mask-image: linear-gradient(to left, transparent, #000 40%);
}

.comet.flying {
  animation: comet var(--comet-duration) linear both;
}

@keyframes comet {
  0% {
    transform: translate(var(--comet-from)) translate(-50%, -50%)
      rotate(var(--comet-angle)) scaleX(var(--comet-flip));
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translate(var(--comet-to)) translate(-50%, -50%)
      rotate(var(--comet-angle)) scaleX(var(--comet-flip));
    opacity: 0;
  }
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.stars > span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.2;
  animation: twinkle var(--period) ease-in-out var(--phase) infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.1;
  }
  to {
    opacity: 0.6;
  }
}
