/* RICO-style palette: near-black surfaces, gold accent. Light theme mirrors the app's light mode. */
:root {
  --bg: #000000;
  --card: #121214;
  --card-hover: #1a1a1e;
  --outline: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --text-2: #9a9aa2;
  --text-3: #6e6e76;
  --accent: #ffd700;
  --accent-fg: #ffd700;
  --accent-ink: #000000;
  --glow: rgba(255, 215, 0, 0.14);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f4f6;
    --card: #ffffff;
    --card-hover: #ececef;
    --outline: rgba(0, 0, 0, 0.08);
    --text: #0a0a0c;
    --text-2: #6b6b72;
    --text-3: #9a9aa0;
    --glow: rgba(255, 215, 0, 0.22);
    --accent-fg: #9a7500;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f4f4f6;
  --card: #ffffff;
  --card-hover: #ececef;
  --outline: rgba(0, 0, 0, 0.08);
  --text: #0a0a0c;
  --text-2: #6b6b72;
  --text-3: #9a9aa0;
  --glow: rgba(255, 215, 0, 0.22);
  --accent-fg: #9a7500;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Soft gold light from the top, the only decoration on the page. */
.glow {
  position: fixed;
  top: -260px;
  left: 50%;
  width: 720px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 20px 32px;
  display: flex;
  flex-direction: column;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 36px;
}

.avatar {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px var(--bg), 0 0 0 8px var(--outline);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar span {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-fg);
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.nick {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}

.nick .at { color: var(--accent-fg); }

.tagline {
  margin: 16px auto 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-3);
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.link:hover,
.link:focus-visible {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1.5px var(--accent);
  outline: none;
}

.link:active { transform: translateY(0) scale(0.99); }

.ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--accent-fg);
  transition: background 0.2s ease, color 0.2s ease;
}

.ico svg { width: 20px; height: 20px; }

.link:hover .ico,
.link:focus-visible .ico {
  background: var(--accent);
  color: var(--accent-ink);
}

.txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.txt b { font-size: 15px; font-weight: 600; }
.txt small { font-size: 13px; color: var(--text-3); }

.chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link:hover .chev,
.link:focus-visible .chev {
  color: var(--accent-fg);
  transform: translateX(3px);
}

/* ---------- Footer ---------- */
.foot {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover { color: var(--accent-fg); background: var(--card-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }

/* Show the icon of the theme you'd switch to. */
.icon-sun { display: block; }
.icon-moon { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ---------- Entrance ---------- */
/* `backwards` fill: items are hidden during their delay, then return to their normal
   styles, so the hover transform isn't overridden by a finished animation. */
@media (prefers-reduced-motion: no-preference) {
  .hero, .link, .foot {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  .link:nth-child(1) { animation-delay: 0.10s; }
  .link:nth-child(2) { animation-delay: 0.16s; }
  .link:nth-child(3) { animation-delay: 0.22s; }
  .link:nth-child(4) { animation-delay: 0.28s; }
  .link:nth-child(5) { animation-delay: 0.34s; }
  .foot { animation-delay: 0.45s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 380px) {
  .page { padding-top: 64px; }
  h1 { font-size: 25px; }
}
