/* exlynk — public bio page.
 *
 * Matched against the live linktr.ee/TheTradingParrot theme, measured from its
 * computed styles on 2026-08-04 (not eyeballed):
 *   background #888888 flat · profile font Karla (variable, self-hosted —
 *   no Google Fonts request, preserving the no-third-party privacy stance)
 *   name 24px/600 white · bio 16px/400 white · section headings 16px/600
 *   white sentence-case · cards #fff, radius 0, no shadow, min-height 64px,
 *   14px side margins on mobile · card titles 16px/500 near-black, centered
 *   avatar 96px round · social icons ~28px white.
 * TTP's own marks only; no Linktree logo or wordmark.
 */

@font-face {
  font-family: "Karla";
  src: url("/static/fonts/karla-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #888888;                /* measured: flat, no gradient */
  --card: #ffffff;
  --card-fg: #111111;
  --card-fg-dim: #4a4a4a;
  --fg: #ffffff;
  --radius: 0;                  /* measured: square cards */
  --maxw: 580px;
  --gap: 16px;
  --font: "Karla", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── layout ─────────────────────────────────────────────────────────────── */
.profile {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 14px calc(48px + env(safe-area-inset-bottom));
}

/* ── header ─────────────────────────────────────────────────────────────── */
.profile__head { text-align: center; margin-bottom: 32px; }

.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
}

.profile__name {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 4px;
}

.profile__bio {
  font-size: 16px;
  font-weight: 400;
  margin: 0 auto;
  max-width: 40ch;
}

/* ── socials ────────────────────────────────────────────────────────────── */
.socials {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px; margin-top: 20px;
}
.socials__item {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--fg);
  text-decoration: none;
  transition: transform .15s ease;
}
.socials__item:hover { transform: scale(1.1); }
.socials__item svg { width: 28px; height: 28px; fill: currentColor; display: block; }

/* ── groups ─────────────────────────────────────────────────────────────── */
.group { margin-bottom: 24px; }

.group__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
  margin: 0 0 16px;
}

/* ── link cards ─────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  transition: transform .15s cubic-bezier(.2, .8, .3, 1);
}
.card:hover { transform: scale(1.02); }
.card:active { transform: scale(.998); }

.card__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px;
  color: var(--card-fg);
  text-decoration: none;
  border-radius: var(--radius);
}

.card__thumb {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #f1f1f1;
}
.card__thumb--placeholder {
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: #8a8a8a;
}

.card__title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  /* Offset the thumbnail so the title optically centres in the card, as the
     original does. Without this, titles sit visibly right of centre. */
  margin-left: -56px;
  padding-left: 56px;
  overflow-wrap: anywhere;
}
/* When a toggle is present, reserve symmetric space on the right too. */
.card__spacer { flex: 0 0 28px; }

/* ── description toggle ─────────────────────────────────────────────────── */
.card__toggle {
  position: absolute;
  top: 32px; right: 8px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent;
  border: 0; border-radius: 50%;
  color: #8a8a8a;
  cursor: pointer;
  transition: background-color .15s ease;
}
.card:not(.card--open) .card__toggle { top: 50%; }
.card__toggle:hover { background: rgba(0, 0, 0, .06); }
.card__toggle:focus-visible { outline: 2px solid #555; outline-offset: 2px; }
.card__toggle svg { width: 18px; height: 18px; transition: transform .18s ease; }
.card--open .card__toggle svg { transform: rotate(180deg); }

.card__desc {
  padding: 0 20px 14px;
  color: var(--card-fg-dim);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.card__desc p { margin: 0; }

/* ── disclaimer ─────────────────────────────────────────────────────────── */
.disclaimer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .35);
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.disclaimer p { margin: 0; }

/* ── dev/preview-only geo badge (never rendered for the public) ─────────── */
.devbar {
  position: sticky; top: 0; z-index: 10;
  background: #111; color: #eee;
  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 9px 12px;
  display: flex; gap: 12px; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.devbar strong { color: #7ee787; }
.devbar__links { display: flex; gap: 6px; }
.devbar__links a {
  color: #eee; text-decoration: none;
  border: 1px solid #444; border-radius: 4px;
  padding: 3px 7px;
}
.devbar__links a:hover { background: #333; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .profile { padding-top: 48px; }
}

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