@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #e2e2e2;
  --surface: #ededed;
  --ink: #7d0c14;
  --muted: #7a4a4e;
  --line: rgba(125, 12, 20, .15);
  --line-strong: rgba(125, 12, 20, .4);
  --ink-hover: #6c0b12;
  --on-ink-muted: #e8d0d0;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Everything vertical follows the screen height, so the page fits without scrolling. */
  --space-page-top: clamp(12px, calc(7svh - 16px), 48px);
  --space-page-bottom: clamp(8px, 2.5svh, 24px);
  --space-group: clamp(8px, calc(6svh - 18px), 32px);
  --space-card: clamp(6px, 1.4svh, 12px);
  --avatar: clamp(48px, calc(20svh - 48px), 112px);
  --card: clamp(50px, calc(11svh - 16px), 72px);
  --card-pad: clamp(2px, calc(1.4svh - 3px), 12px);
  --icon: clamp(36px, 5.5svh, 44px);
}

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

html {
  background: var(--bg);
}

body {
  min-height: 100svh;
  display: grid;
  grid-template-columns: min(520px, 100%);
  place-content: center;
  gap: var(--space-group);
  padding: var(--space-page-top) 24px var(--space-page-bottom);
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: var(--ink);
}

header {
  margin-bottom: var(--space-group);
  text-align: center;
}

.avatar {
  display: block;
  width: var(--avatar);
  height: var(--avatar);
  margin: 0 auto clamp(6px, 2svh, 16px);
  border-radius: 50%;
  border: 1px solid var(--line);
}

h1 {
  font-size: clamp(1.5rem, 4svh, 2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.role {
  margin-top: clamp(0px, .5svh, 4px);
  font-size: clamp(1rem, 2.3svh, 1.125rem);
  line-height: 1.5;
}

.status {
  margin-top: clamp(2px, 1svh, 8px);
  font-size: clamp(.875rem, 1.9svh, .9375rem);
  line-height: 1.4;
  color: var(--muted);
  text-wrap: balance;
}

#links {
  display: flex;
  flex-direction: column;
  gap: var(--space-card);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--card);
  padding: var(--card-pad) 16px var(--card-pad) 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease);
  /* backwards, not both: a forwards fill would override the hover transform */
  animation: rise 300ms var(--ease) backwards;
  animation-delay: calc(var(--i) * 50ms);
}

.link-card--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.link-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.link-card:active {
  transform: translateY(1px) scale(.985);
  transition-duration: 90ms;
}

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--icon);
  height: var(--icon);
  border-radius: 8px;
  background: var(--bg);
}

.icon img {
  display: block;
  object-fit: contain;
}

.text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.text strong {
  font-size: 1rem;
  font-weight: 500;
  line-height: clamp(1.25rem, 3svh, 1.5rem);
}

.text small {
  font-size: .875rem;
  line-height: clamp(1.125rem, 2.5svh, 1.25rem);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.link-card--primary small {
  color: var(--on-ink-muted);
}

.arrow {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

footer {
  font-size: .8125rem;
  line-height: 1.25rem;
  text-align: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Touch screens would otherwise keep :hover stuck on after a tap */
@media (hover: hover) {
  .link-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
  }

  .link-card--primary:hover {
    border-color: var(--ink-hover);
    background: var(--ink-hover);
  }

  .link-card:active {
    transform: translateY(1px) scale(.985);
  }

  .link-card:hover .arrow {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
