:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: #050505;
}

.particle-field {
  position: absolute;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 22rem),
    radial-gradient(circle at 20% 80%, rgba(239, 255, 56, 0.08), transparent 18rem),
    #050505;
}

.particle-field span {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--x);
  top: var(--y);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.72), 0 0 42px rgba(255, 255, 255, 0.24);
  opacity: 0.22;
  animation: particlePulse var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

.particle-field span:nth-child(1) {
  --x: 4%;
  --y: 12%;
  --size: 4px;
  --duration: 4.8s;
  --delay: -1.1s;
}

.particle-field span:nth-child(2) {
  --x: 14%;
  --y: 72%;
  --size: 5px;
  --duration: 5.6s;
  --delay: -2.4s;
}

.particle-field span:nth-child(3) {
  --x: 24%;
  --y: 32%;
  --size: 3px;
  --duration: 4.2s;
  --delay: -0.8s;
}

.particle-field span:nth-child(4) {
  --x: 35%;
  --y: 82%;
  --size: 6px;
  --duration: 6.2s;
  --delay: -3.2s;
}

.particle-field span:nth-child(5) {
  --x: 47%;
  --y: 22%;
  --size: 4px;
  --duration: 5.2s;
  --delay: -1.8s;
}

.particle-field span:nth-child(6) {
  --x: 55%;
  --y: 62%;
  --size: 5px;
  --duration: 4.9s;
  --delay: -2.8s;
}

.particle-field span:nth-child(7) {
  --x: 66%;
  --y: 16%;
  --size: 7px;
  --duration: 6.8s;
  --delay: -4.1s;
}

.particle-field span:nth-child(8) {
  --x: 74%;
  --y: 76%;
  --size: 3px;
  --duration: 4.4s;
  --delay: -1.5s;
}

.particle-field span:nth-child(9) {
  --x: 86%;
  --y: 36%;
  --size: 6px;
  --duration: 5.8s;
  --delay: -2.1s;
}

.particle-field span:nth-child(10) {
  --x: 94%;
  --y: 68%;
  --size: 4px;
  --duration: 5.1s;
  --delay: -3.4s;
}

.particle-field span:nth-child(11) {
  --x: 18%;
  --y: 18%;
  --size: 2px;
  --duration: 6.4s;
  --delay: -2.7s;
}

.particle-field span:nth-child(12) {
  --x: 80%;
  --y: 10%;
  --size: 3px;
  --duration: 4.7s;
  --delay: -1.9s;
}

.soft-shimmer {
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #d8d8d8 34%, #ffffff 52%, #a9a9a9 72%, #ffffff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerText 7s ease-in-out infinite;
}

@keyframes particlePulse {
  0%,
  100% {
    opacity: 0.12;
    transform: translate3d(0, 0, 0) scale(0.72);
  }

  50% {
    opacity: 0.86;
    transform: translate3d(0, -12px, 0) scale(1);
  }
}

@keyframes shimmerText {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.noise::before {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  content: "";
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 80ms;
}

.reveal-delay-2 {
  transition-delay: 160ms;
}

.project-shot {
  object-fit: contain;
  object-position: center;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-shot,
.project-card:focus-visible .project-shot {
  transform: scale(1.018);
}

.contact-row {
  grid-template-columns: minmax(0, 1fr) 4.75rem;
  align-items: stretch;
}

.contact-link,
.contact-copy {
  min-height: 4.85rem;
}

.contact-copy:hover img {
  filter: invert(0);
}

.copy-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  z-index: 20;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #050505;
  background: #f7f7f2;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.35rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.contact-copy.is-copied .copy-tooltip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .contact-row {
    grid-template-columns: minmax(0, 1fr) 4.25rem;
  }

  .contact-link,
  .contact-copy {
    min-height: 4.6rem;
  }

  .project-card:hover .project-shot,
  .project-card:focus-visible .project-shot {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .particle-field span {
    animation: none;
  }

  .soft-shimmer {
    animation: none;
  }
}
