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

:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --ink: #15130f;
  --quiet: rgba(21, 19, 15, 0.52);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(21, 19, 15, 0.045), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family: "Ahsing", "Cormorant Garamond", Georgia, serif;
  overflow: hidden;
}

body::after {
  position: fixed;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(21, 19, 15, 0.08);
  content: "";
  opacity: 0;
  animation: room-tone 1400ms ease 500ms both;
}

.site-nav {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 100% 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  color: var(--quiet);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  text-transform: lowercase;
  animation: dismissive-underline 7s ease-in-out 1.8s infinite;
  transition: background-size 260ms ease, color 260ms ease, opacity 260ms ease;
}

.site-nav a:nth-child(2) {
  animation-delay: 2.4s;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background-position: 0 100%;
  background-size: 100% 1px;
  color: var(--ink);
  outline: none;
}

.site-nav .ig-link {
  background: none;
  animation: none;
  display: inline-flex;
}

.site-nav .ig-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.home {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px;
}

.brand {
  margin: 0;
  color: inherit;
  animation:
    arrival 1200ms cubic-bezier(0.16, 1, 0.3, 1) both,
    aloof-drift 8s ease-in-out 1300ms infinite;
  will-change: transform, opacity, filter;
}

/* the wordmark itself — set in Ahsing, pulled as vector from infinetal.com */
.brand svg {
  display: block;
  width: clamp(240px, 32vw, 420px);
  height: auto;
  fill: currentColor;
  filter: drop-shadow(0 18px 42px rgba(21, 19, 15, 0.08));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.contact-card {
  text-align: center;
  animation: arrival 1200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-card p {
  margin: 0;
}

.contact-label {
  color: var(--quiet);
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.contact-email {
  margin-top: 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.1;
}

@keyframes arrival {
  from {
    opacity: 0;
    filter: blur(12px);
    letter-spacing: 0.09em;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    filter: blur(0);
    letter-spacing: 0.015em;
    transform: translateY(0) scale(1);
  }
}

@keyframes aloof-drift {
  0%,
  100% {
    opacity: 0.9;
    filter: blur(0);
    letter-spacing: 0.015em;
    transform: translate3d(0, 0, 0) scale(1);
  }

  38% {
    opacity: 1;
    filter: blur(0);
    letter-spacing: 0.028em;
    transform: translate3d(0, -4px, 0) scale(1.006);
  }

  62% {
    opacity: 0.82;
    filter: blur(0.4px);
    letter-spacing: 0.01em;
    transform: translate3d(2px, 1px, 0) scale(0.998);
  }
}

@keyframes dismissive-underline {
  0%,
  72%,
  100% {
    background-position: 100% 100%;
    background-size: 0 1px;
    opacity: 0.46;
  }

  80%,
  88% {
    background-position: 0 100%;
    background-size: 100% 1px;
    opacity: 1;
  }
}

@keyframes room-tone {
  to {
    opacity: 1;
  }
}

/* Infinity motif — a keyboard that never resolves */
.infinity-motif {
  position: fixed;
  right: 34px;
  bottom: 28px;
  width: 180px;
  height: 90px;
  pointer-events: none;
  transform-origin: 100% 100%;
  animation: room-tone 1400ms ease 1200ms both;
}

.infinity-motif svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.motif-line {
  fill: none;
  stroke: rgba(21, 19, 15, 0.42);
  stroke-width: 1.5;
  stroke-dasharray: 282;
  stroke-dashoffset: 282;
  animation: motif-cycle 14s linear 1400ms infinite;
}

/* draw on → hold → erase forward → rest, forever */
@keyframes motif-cycle {
  0% {
    stroke-dashoffset: 282;
    animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1);
  }

  26% {
    stroke-dashoffset: 0;
  }

  62% {
    stroke-dashoffset: 0;
    animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1);
  }

  88% {
    stroke-dashoffset: -282;
  }

  100% {
    stroke-dashoffset: -282;
  }
}

/* the pianist and his notes ride the loop single-file */
.motif-pianist,
.motif-note {
  position: absolute;
  top: 0;
  left: 0;
  offset-path: path(
    "M10,45 C10,15 80,15 90,45 C100,75 170,75 170,45 C170,15 100,15 90,45 C80,75 10,75 10,45 Z"
  );
  offset-rotate: 0deg;
  animation: procession 22s linear infinite;
}

.motif-pianist {
  offset-anchor: 50% 86%;
}

.motif-pianist svg {
  display: block;
  width: 42px;
  height: auto;
  fill: var(--ink);
}

.motif-note {
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  opacity: 0.68;
  animation-delay: -20.2s;
}

.motif-note:nth-of-type(2) {
  font-size: 12px;
  animation-delay: -18.7s;
}

@keyframes procession {
  from {
    offset-distance: 0%;
  }

  to {
    offset-distance: 100%;
  }
}

@media (max-width: 640px) {
  .infinity-motif {
    right: 20px;
    bottom: 20px;
    transform: scale(0.68);
  }
}

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

  .motif-line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }
}
