:root {
  --bg: #161617;
  --card: #2a2a2c;
  --blue: 64 120 255;
  --violet: 150 110 255;
  --text: #f2f2f4;
  --muted: #8e8e93;
  --shine: #9cb8f0;
  --gap: clamp(6px, 1.2vw, 14px);
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  padding: var(--gap) max(var(--gap), env(safe-area-inset-right)) var(--gap) max(var(--gap), env(safe-area-inset-left));
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 1;
  display: grid;
  grid-template: "mark contact" auto ". ." 1fr "headline now" auto / 1fr 1fr;
  padding: clamp(20px, 3vw, 40px);
  border-radius: clamp(10px, 1.4vw, 16px);
  background: linear-gradient(160deg, transparent 25%, rgb(var(--blue) / .05)), var(--card);
}

.mark {
  grid-area: mark;
  width: clamp(28px, 2.6vw, 38px);
  fill: none;
  stroke: var(--text);
  stroke-width: 4;
  stroke-linecap: round;
}

.headline {
  grid-area: headline;
  display: grid;
  gap: .06em;
  font-size: clamp(34px, 5.4vw, 92px);
}

.glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.glow span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--c) / var(--a)), transparent);
  animation:
    orbit var(--t) linear infinite var(--dir, normal),
    breathe calc(var(--t) / 3) ease-in-out infinite alternate;
}

.glow span:nth-child(1) { --c: var(--blue); --a: .17; --size: 90vmax; --x: 6%; --y: 96%; --r: 9vmax; --t: 16s; }
.glow span:nth-child(2) { --c: var(--violet); --a: .11; --size: 66vmax; --x: 18%; --y: 84%; --r: 12vmax; --t: 21s; --dir: reverse; }

.card > * {
  animation: enter .9s cubic-bezier(.2, .7, .2, 1) both;
}

.card > .mark {
  animation: spin-in 1.1s .15s cubic-bezier(.2, .8, .2, 1) both;
}

.card > .glow {
  animation: enter .9s cubic-bezier(.2, .7, .2, 1) both, tint 36s ease-in-out infinite alternate;
}

.title {
  margin: 0;
  background: linear-gradient(100deg, var(--text) 42%, var(--shine) 50%, var(--text) 58%) 100% 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.name {
  margin: 0;
  color: var(--text);
  cursor: default;
  font-size: clamp(34px, 5.4vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.name span,
.contact a span {
  display: inline-block;
}

.title {
  /* keep descenders inside the gradient fill */
  padding-bottom: .14em;
  margin-bottom: -.14em;
  font-size: clamp(26px, 4.1vw, 70px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  opacity: .5;
  animation: enter .9s cubic-bezier(.2, .7, .2, 1) both, shine-once 1.1s 1.5s cubic-bezier(.45, 0, .25, 1);
}

.now {
  grid-area: now;
  align-self: end;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--muted);
}

.ai {
  position: relative;
  color: var(--text);
  text-decoration: underline dotted rgb(255 255 255 / .35);
  text-underline-offset: 4px;
  cursor: default;
  outline: none;
}

.ai:focus-visible { text-decoration-color: var(--text); }

.tools {
  position: absolute;
  left: -10px;
  bottom: calc(100% + 6px);
  z-index: 1;
  display: grid;
  justify-items: center;
  width: 268px;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transform-origin: 24px 100%;
  transition: opacity .25s ease, transform .4s cubic-bezier(.2, .9, .3, 1);
  pointer-events: none;
}

.arc {
  position: relative;
  width: 100%;
  height: 142px;
}

.arc img {
  position: absolute;
  left: calc(50% - 15px);
  top: 93px;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / .25);
  opacity: 0;
}

.drop {
  position: absolute;
  left: calc(50% - 20px);
  top: 88px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 11px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(110deg, transparent 40%, #fff 50%, transparent 60%) 0 0 / 200% 100% border-box,
    radial-gradient(circle at 0 0, #a9bcff, #c3b6ff 22%, transparent 48%) border-box,
    #dde2ea border-box;
  animation: edge 2.6s linear infinite;
  box-shadow: 0 6px 18px rgb(0 0 0 / .3);
  transform-origin: 50% 100%;
}

.drop img {
  position: static;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  box-shadow: none;
  opacity: 1;
}

.ai:hover .tools,
.ai:focus .tools {
  opacity: 1;
  transform: none;
}


.name,
.title {
  transition: opacity .4s ease;
}

.contact {
  grid-area: contact;
  align-self: start;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: clamp(10.5px, 1.06vw, 11.5px);
}

.contact li:first-child a { color: var(--text); }

.contact a {
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s;
}

.contact a:hover { color: var(--text); }

.contact a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); filter: blur(4px); }
}

@keyframes spin-in {
  from { opacity: 0; transform: rotate(-540deg) scale(.3); }
  60% { opacity: 1; }
  to { transform: none; }
}

@keyframes edge {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, -200% 0, 0 0; }
}

@keyframes orbit {
  from { transform: rotate(0turn) translateX(var(--r)); }
  to { transform: rotate(1turn) translateX(var(--r)); }
}

@keyframes tint {
  from { filter: hue-rotate(-18deg); }
  to { filter: hue-rotate(36deg); }
}

@keyframes breathe {
  from { scale: .9; }
  to { scale: 1.12; }
}

@keyframes shine-once {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .glow span, .card > *, .card > .glow, .card > .mark, .title { animation: none; }
  .tools { transition: opacity .3s; }
  .drop { animation: none; }
}

@media (max-width: 640px) {
  .card {
    grid-template: "mark contact" auto ". ." 1fr "headline headline" auto "now now" auto / auto 1fr;
    gap: 18px 24px;
  }
  .contact { justify-items: end; }

  /* the card sits over the name on narrow screens, so step the name back */
  .card:has(.ai:hover, .ai:focus) .name,
  .card:has(.ai:hover, .ai:focus) .title {
    opacity: .25;
  }
}
