/* /links: one-screen profile page. Shares tokens, fonts and base styles with /styles.css */

.links-wrap {
  position: relative;
  width: 100%;
  max-width: 31rem;
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.links-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.links-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.links-back .ico {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.links-back:hover { color: #fff; }
.links-back:hover .ico { transform: translateX(-3px); }

/* ---- Header ---- */
.links-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.links-avatar {
  width: 96px;
  height: 96px;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}

.links-header h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.links-role {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.links-meta {
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.links-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.06);
  font-size: 0.8rem;
  color: #a7f3c0;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ok);
}

/* ---- Groups ---- */
.links-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.links-heading {
  margin: 0 0 0.2rem 0.15rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 3.6rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

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

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

.link-card > .ico:first-child,
.email-main > .ico:first-child {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

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

.link-text strong {
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
}

.link-text small {
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  width: 16px;
  height: 16px;
  color: var(--dim);
  transition: transform 0.25s var(--ease), color 0.25s ease;
}

.link-card:hover .link-arrow {
  transform: translate(2px, -2px);
  color: #fff;
}

/* Primary action matches the main site's solid light button */
.link-card--primary {
  border-color: transparent;
  background: #f1f5f9;
  color: #0b0f17;
}

.link-card--primary:hover {
  border-color: transparent;
  background: #fff;
}

.link-card--primary > .ico:first-child,
.link-card--primary .link-arrow,
.link-card--primary .link-text strong {
  color: #0b0f17;
}

.link-card--primary .link-text small {
  color: rgba(11, 15, 23, 0.72);
}

.link-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.link-split .link-card {
  gap: 0.7rem;
  padding-inline: 0.9rem;
}

/* Email card: the address is a link, the button copies it */
.link-card--email {
  padding: 0.35rem 0.5rem 0.35rem 0;
}

.link-card--email:hover {
  transform: none;
  background: var(--surface);
  border-color: var(--line);
}

.email-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
  min-height: 3.1rem;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.email-main:hover .link-text strong { text-decoration: underline; text-underline-offset: 4px; }

.link-card--email .copy-btn {
  width: 40px;
  height: 40px;
}

/* ---- Social buttons: 2 x 2 ---- */
.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.2rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.social-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.social-btn:active { transform: scale(0.97); }
.social-btn .ico { width: 18px; height: 18px; color: var(--accent); }

/* ---- Footer ---- */
.links-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--dim);
}

.brand-link {
  display: inline-flex;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.25s var(--ease);
}

.brand-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ---- Entrance (reduced motion is neutralised globally in /styles.css) ---- */
@keyframes linkIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.links-header,
.links-group,
.links-footer {
  animation: linkIn 0.6s var(--ease) both;
}

.links-header { animation-delay: 0.04s; }
.links-group:nth-of-type(1) { animation-delay: 0.1s; }
.links-group:nth-of-type(2) { animation-delay: 0.16s; }
.links-group:nth-of-type(3) { animation-delay: 0.22s; }
.links-footer { animation-delay: 0.28s; }
