/* ============================================================
   links.ralsadrah.xyz — link-in-bio page styles
   Self-contained (separate vhost root — no shared /assets/).
   Same design tokens as ralsadrah.xyz (Space Grotesk / Inter /
   JetBrains Mono, olive theme, light/dark via data-theme).
   ============================================================ */

:root {
  --bg:           #F4F0E6;
  --surface:      #ECE7D8;
  --surface-2:    #E3DDCB;
  --ink:          #25261C;
  --text:         #25261C;
  --text-muted:   #6B6852;
  --accent:       #5C6B2E;
  --accent-hover: #4A5524;
  --accent-soft:  #E9EBDA;
  --border:       #D6CEBB;
  --border-strong:#C4BBA4;
  --on-accent:    #FFFFFF;
  --shadow-md:    0 14px 34px -18px rgba(37, 38, 28, 0.28);
  --shadow-lg:    0 24px 60px -28px rgba(37, 38, 28, 0.35);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', 'Courier New', monospace;

  --radius:    4px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --transition: 200ms ease;
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg:           #191A12;
  --surface:      #22231A;
  --surface-2:    #2B2C21;
  --ink:          #E8E4D4;
  --text:         #E8E4D4;
  --text-muted:   #9A9578;
  --accent:       #8FA44A;
  --accent-hover: #A8C057;
  --accent-soft:  #262B17;
  --border:       #37382B;
  --border-strong:#474836;
  --on-accent:    #14150E;
  --shadow-md:    0 14px 34px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg:    0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

/* ── reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
  text-decoration: none;
  font-size: 0.875rem;
}
.skip-link:focus { left: 0; }

/* ── page column ────────────────────────────────────────── */
.links-page {
  width: 100%;
  max-width: 420px;
  padding: 3rem 1.25rem 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── theme toggle ────────────────────────────────────────── */
.theme-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.theme-toggle:hover { border-color: var(--border-strong); transform: rotate(15deg); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"]  .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-moon { display: block; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* ── profile ─────────────────────────────────────────────── */
.links-profile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.links-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface-2);
  box-shadow: var(--shadow-md);
  margin-bottom: 0.5rem;
}

.links-profile h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.links-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.links-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 34ch;
}

/* ── link buttons ────────────────────────────────────────── */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition) var(--ease-out),
              border-color var(--transition),
              background var(--transition),
              box-shadow var(--transition);

  /* reveal-on-load animation */
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 500ms var(--ease-out) forwards;
}
.links-list .link-btn:nth-child(1) { animation-delay: 60ms; }
.links-list .link-btn:nth-child(2) { animation-delay: 120ms; }
.links-list .link-btn:nth-child(3) { animation-delay: 180ms; }
.links-list .link-btn:nth-child(4) { animation-delay: 240ms; }
.links-list .link-btn:nth-child(5) { animation-delay: 300ms; }
.links-list .link-btn:nth-child(6) { animation-delay: 360ms; }
.links-list .link-btn:nth-child(7) { animation-delay: 420ms; }
.links-list .link-btn:nth-child(8) { animation-delay: 480ms; }
.links-list .link-btn:nth-child(9) { animation-delay: 540ms; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .link-btn { animation: none; opacity: 1; transform: none; }
  .theme-toggle:hover { transform: none; }
}

.link-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.link-btn:active { transform: translateY(0) scale(0.985); }

.link-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: var(--text-muted);
  transition: fill var(--transition);
}
.link-btn:hover svg { fill: var(--accent); }

/* per-network accent on hover */
.link-btn[data-brand="x"]:hover         { border-color: #25261C; }
.link-btn[data-brand="x"]:hover svg         { fill: #25261C; }
[data-theme="dark"] .link-btn[data-brand="x"]:hover         { border-color: #E8E4D4; }
[data-theme="dark"] .link-btn[data-brand="x"]:hover svg     { fill: #E8E4D4; }
.link-btn[data-brand="linkedin"]:hover     { border-color: #0A66C2; }
.link-btn[data-brand="linkedin"]:hover svg { fill: #0A66C2; }
.link-btn[data-brand="instagram"]:hover    { border-color: #C13584; }
.link-btn[data-brand="instagram"]:hover svg { fill: #C13584; }
.link-btn[data-brand="snapchat"]:hover     { border-color: #FFC403; }
.link-btn[data-brand="snapchat"]:hover svg { fill: #E2B007; }
.link-btn[data-brand="strava"]:hover     { border-color: #FC4C02; }
.link-btn[data-brand="strava"]:hover svg { fill: #FC4C02; }
.link-btn[data-brand="github"]:hover     { border-color: #25261C; }
.link-btn[data-brand="github"]:hover svg { fill: #25261C; }
[data-theme="dark"] .link-btn[data-brand="github"]:hover     { border-color: #E8E4D4; }
[data-theme="dark"] .link-btn[data-brand="github"]:hover svg { fill: #E8E4D4; }
.link-btn[data-brand="portfolio"]:hover,
.link-btn[data-brand="custom"]:hover       { border-color: var(--accent); }
.link-btn[data-brand="email"]:hover         { border-color: var(--accent); }

.link-text { display: flex; flex-direction: column; min-width: 0; }
.link-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: -0.01em;
}
.link-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── footer ──────────────────────────────────────────────── */
.links-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.links-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color var(--transition);
}
.links-footer a:hover { color: var(--accent); }
.footer-sep { color: var(--border-strong); }

/* ── toast (email copy) ──────────────────────────────────── */
.links-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms var(--ease-out);
  z-index: 50;
}
.links-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── larger screens ──────────────────────────────────────── */
@media (min-width: 480px) {
  .links-page { padding-top: 4rem; }
}

/* ── focus visibility ────────────────────────────────────── */
.link-btn:focus-visible,
.theme-toggle:focus-visible,
.links-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
