/*
 * /links — the "link in bio" page (TikTok / Instagram).
 * Standalone on purpose: the main styles.css is ~320 KB, and this page must paint
 * instantly in in-app browsers on a phone. The tokens below are copied from
 * styles.css :root so the page stays on the site's palette.
 */
:root {
  --bg-0: #010104;
  --bg-1: #07070b;
  --surface: rgba(14, 14, 19, 0.74);
  --surface-hover: rgba(24, 24, 30, 0.9);
  --text: #ffffff;
  --muted: rgba(210, 210, 210, 0.78);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(207, 254, 37, 0.52);
  --accent: #cffe25;
  --accent-soft: #dfff67;
  --accent-tint: rgba(207, 254, 37, 0.08);
  --on-accent: #010104;
  --radius: 18px;
  --radius-chip: 12px;
  --shadow-glow: 0 16px 60px rgba(207, 254, 37, 0.2);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(640px 360px at 50% -6%, rgba(207, 254, 37, 0.14), transparent 70%),
    radial-gradient(520px 420px at 100% 100%, rgba(207, 254, 37, 0.05), transparent 70%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 60%, #000000 100%);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

.links-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 16px 32px;
  animation: links-rise 420ms var(--ease-out) both;
}

/* ---------- Header ---------- */

.links-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.links-avatar {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(207, 254, 37, 0.35),
    0 0 0 6px rgba(207, 254, 37, 0.06),
    var(--shadow-glow);
}

.links-name {
  margin: 18px 0 2px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.links-handle {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.links-tagline {
  margin: 12px 0 0;
  max-width: 34ch;
  font-size: 0.92rem;
  color: var(--muted);
  text-wrap: balance;
}

/* ---------- Link list ---------- */

.links-list,
.links-social {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links-list {
  display: grid;
  gap: 12px;
}

.links-section-label {
  margin: 28px 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.link {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.link:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.link:active {
  transform: scale(0.985);
}

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

.link__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-chip);
  background: var(--accent-tint);
  border: 1px solid rgba(207, 254, 37, 0.16);
  font-size: 1.3rem;
  line-height: 1;
}

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

.link__title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.link__sub {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.link__arrow {
  font-size: 1.05rem;
  color: var(--muted);
  transition: transform 160ms var(--ease-out), color 160ms ease;
}

.link:hover .link__arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.link__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
  white-space: nowrap;
}

/* Primary: the PC builder */
.link--primary {
  min-height: 76px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-glow);
}

.link--primary:hover {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.link--primary .link__icon {
  background: rgba(1, 1, 4, 0.9);
  border-color: transparent;
}

.link--primary .link__title {
  font-size: 1.06rem;
  font-weight: 700;
}

.link--primary .link__sub,
.link--primary .link__arrow,
.link--primary:hover .link__arrow {
  color: rgba(1, 1, 4, 0.72);
}

.link--primary:focus-visible {
  outline-color: var(--text);
}

/* Socials: compact two-column grid, same order left → right */
.links-social {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.link--compact {
  grid-template-columns: 36px 1fr;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px 10px 10px;
}

.link--compact .link__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.1rem;
}

.link--compact .link__title {
  font-size: 0.9rem;
}

.link--mail {
  margin-top: 10px;
}

.link--mail .link__title {
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.links-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.links-footer p {
  margin: 0 0 6px;
}

.links-footer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.links-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.links-footer a:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.links-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@keyframes links-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 340px) {
  .links-social {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .links-shell {
    animation: none;
  }

  .link,
  .link__arrow {
    transition: none;
  }

  .link:hover,
  .link:active,
  .link:hover .link__arrow {
    transform: none;
  }
}
