/* Brianna Godfrey: link card page. Tokens match css/styles.css */

:root {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --ink: #141418;
  --ink-2: #55535E;
  --line: rgba(20, 20, 24, 0.10);
  --line-strong: rgba(20, 20, 24, 0.18);
  --accent: #5A3FE8;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECE8FF;
  --cyan: #0E8C96;
  --glow-a: #6EC1F2;
  --spark: #3E8FD6;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 24, 0.04), 0 18px 40px -18px rgba(20, 20, 24, 0.22);

  color-scheme: light;
}

/* Dark theme: follows the phone or computer setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C22;
    --surface: #26262E;
    --ink: #EDEBE6;
    --ink-2: #B3B1BC;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.20);
    --accent: #A898FF;
    --accent-ink: #141418;
    --accent-soft: #2B2645;
    --cyan: #7DE3EC;
    --glow-a: #A898FF;
    --spark: #EDEBE6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

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

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Layout: one narrow column, centered */

.card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 14px 0 0 var(--cyan);
  margin-right: 24px;
}

.name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 11vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
}
.name .dot { color: var(--accent); }

.role {
  margin: 10px 0 0;
  font-weight: 500;
  color: var(--ink-2);
}

.line {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.line em { font-style: italic; color: var(--accent); }

/* Primary action: save contact */

.save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.save:hover { filter: brightness(1.08); }
.save:active { transform: scale(0.98); }

/* Link list */

.links {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.links a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  padding: 14px 52px 14px 20px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}
.links a + a { border-top: 1px solid var(--line); }
.links a::after {
  content: "→";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-2);
  transition: transform 0.15s ease, color 0.15s ease;
}
.links a:hover { background: var(--accent-soft); }
.links a:hover::after { color: var(--accent); transform: translate(3px, -50%); }

.label { font-weight: 600; }
.hint {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* Contact */

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  font-family: var(--mono);
  font-size: 14px;
}
.contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
}
.contact a:hover { color: var(--accent); text-decoration: underline; }

/* Background glow: two soft lights drifting slowly behind the page */

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glow::before,
.glow::after {
  content: "";
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  will-change: transform;
}
.glow::before {
  top: -30vmax;
  left: -25vmax;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 70%);
  opacity: 0.55;
  animation: drift-a 14s ease-in-out infinite alternate;
}
.glow::after {
  bottom: -32vmax;
  right: -28vmax;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  opacity: 0.55;
  animation: drift-b 18s ease-in-out infinite alternate;
}
@media (prefers-color-scheme: dark) {
  .glow::before { opacity: 0.45; }
  .glow::after { opacity: 0.36; }
}

@keyframes drift-a {
  to { transform: translate(35vw, 40vh) scale(1.25); }
}
@keyframes drift-b {
  to { transform: translate(-38vw, -36vh) scale(1.2); }
}

/* Entrance: words rise into focus, then the rest of the page follows */

.w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  filter: blur(6px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.name .w:nth-child(1) { animation-delay: 120ms; }
.name .w:nth-child(2) { animation-delay: 190ms; }
.line > .w:nth-child(1) { animation-delay: 460ms; }
.line > .w:nth-child(2) { animation-delay: 520ms; }
.line > .w:nth-child(3) { animation-delay: 580ms; }
.line em .w:nth-child(1) { animation-delay: 660ms; }
.line em .w:nth-child(2) { animation-delay: 720ms; }
.line em .w:nth-child(3) { animation-delay: 780ms; }
.line em .w:nth-child(4) { animation-delay: 840ms; }

.eyebrow,
.role,
.save,
.links,
.contact {
  animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.eyebrow { animation-delay: 0ms; }
.role { animation-delay: 340ms; }
.save { animation-delay: 960ms; }
.links { animation-delay: 1040ms; }
.contact { animation-delay: 1120ms; }

@keyframes rise {
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Sparkles: a few small stars that twinkle in place, one or two at a time */

.sparkles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.sparkles i {
  position: absolute;
  width: var(--s, 14px);
  height: var(--s, 14px);
  background: var(--spark);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px var(--spark));
  opacity: 0;
  animation: twinkle 4.5s ease-in-out infinite;
}
.sparkles i:nth-child(1) { top: 9%;  left: 82%; --s: 22px; animation-delay: 0s; }
.sparkles i:nth-child(2) { top: 22%; left: 90%; --s: 13px; animation-delay: 1.2s; }
.sparkles i:nth-child(3) { top: 31%; left: 68%; --s: 16px; animation-delay: 2.6s; }
.sparkles i:nth-child(4) { top: 6%;  left: 12%; --s: 14px; animation-delay: 3.3s; }
.sparkles i:nth-child(5) { top: 74%; left: 8%;  --s: 18px; animation-delay: 1.8s; }
.sparkles i:nth-child(6) { top: 88%; left: 78%; --s: 15px; animation-delay: 0.6s; }
.sparkles i:nth-child(7) { top: 57%; left: 93%; --s: 12px; animation-delay: 3.9s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 0.85; transform: scale(1) rotate(20deg); }
}

/* Reduced motion: no entrance, glow holds still, no sparkles */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .w, .eyebrow, .role, .save, .links, .contact {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .glow::before, .glow::after { animation: none; }
  .sparkles { display: none; }
}
