:root {
  --bg: #f7f7f4;
  --bg-glow-1: #ffffff;
  --bg-glow-2: #eceae3;
  --card-bg: #ffffff;
  --card-border: rgba(20, 20, 25, 0.08);
  --text: #16161a;
  --text-dim: #6b6b76;
  --row-bg: #ffffff;
  --row-bg-hover: #fafafa;
}

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

html, body {
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(60rem 60rem at 15% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(50rem 50rem at 110% 110%, var(--bg-glow-2), transparent 55%);
  background-attachment: fixed;
  display: flex;
  align-items: flex-start;   /* avoid stretch; vertical centering handled by card margin */
  justify-content: center;
  padding: 1.5rem;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Animated photo background: 3-frame flipbook, 1/3s per frame, centered, fills height */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;            /* fill 100% width OR height (whichever covers), centered */
  animation: bg-cycle 1s step-end infinite;
  /* preload all three frames so swaps don't flicker */
  will-change: background-image;
}

@keyframes bg-cycle {
  0%      { background-image: url(assets/bg-0.jpg); }
  33.333% { background-image: url(assets/bg-1.jpg); }
  66.666% { background-image: url(assets/bg-2.jpg); }
  100%    { background-image: url(assets/bg-0.jpg); }
}

@media (prefers-reduced-motion: reduce) {
  .bg { animation: none; background-image: url(assets/bg-0.jpg); }
}

.card {
  width: 100%;
  max-width: 22rem;
  margin: auto;              /* centers when it fits, collapses to top when taller than viewport (no clipping) */
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  padding: 1.4rem 1.2rem 1.1rem;
  box-shadow: 0 24px 60px -24px rgba(20, 20, 25, 0.45);
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.card__header {
  text-align: center;
  margin-bottom: 1.1rem;
}

.avatar {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--card-border);
  user-select: none;
}

.card__name {
  font-size: 0; /* container only; the logo carries the wordmark */
  line-height: 0;
}

.card__logo {
  width: 100%;
  max-width: 14rem;
  height: auto;
  margin: 0 auto;
}

.card__bio {
  margin: 0.6rem auto 0;
  max-width: 20rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.links + .links {
  margin-top: 0.9rem;
}

.links__section {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.1rem;
  padding-left: 0.15rem;
}

.link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.7rem;
  padding: 0.5rem 0.7rem;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.link:hover,
.link:focus-visible {
  background: var(--row-bg-hover);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 8px 20px -14px color-mix(in srgb, var(--brand) 80%, transparent);
  transform: translateY(-2px);
  outline: none;
}

.link__icon {
  flex: none;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

.link__icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.link__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.link__sub {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.link__handle {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.link__arrow {
  flex: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1;
}

.link__arrow--copy {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--card-border);
  border-radius: 0.4rem;
  padding: 0.15rem 0.4rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.link--button.copied .link__arrow--copy {
  color: #16a34a;
  border-color: #16a34a;
}

.card__footer {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .link:hover, .link:focus-visible { transform: none; }
}
