/* themes.css - base mobile-first layout and theme variables */

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

html {
  height: 100%;
}

body {
  background: var(--bg, #ffffff);
  color: var(--text, #1a1a1a);
  font-family: system-ui, sans-serif;
  margin: 0;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

main,
.profile-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}

#avatar {
  display: block;
  max-width: 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem auto;
}

h1,
h2,
h3 {
  margin: 0.5rem 0;
}

p {
  margin: 0.5rem 0 1rem 0;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  background: var(--button-bg, #333333);
  color: var(--button-text, #ffffff);
  text-decoration: none;
  font-size: 1.1rem;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease-in-out;
}

.link-button .link-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.15);
}

.link-button .link-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--button-text, #ffffff);
  background: transparent;
  border: 1.5px solid currentColor;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
}

.link-button .link-label {
  flex: 1 1 auto;
  text-align: center;
}

/* keep the label optically centered despite the leading icon */
.link-button .link-icon + .link-label {
  margin-right: 24px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 0.7em;
  vertical-align: middle;
}

/* Spotlight — draw the eye to a featured link */
.link-button.spotlight {
  box-shadow: 0 0 0 2px var(--button-bg, #333), 0 0 18px rgba(255, 255, 255, 0.35);
  animation: spotlight-pulse 2.2s ease-in-out infinite;
}

@keyframes spotlight-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .link-button.spotlight { animation: none; }
}

/* Inline embeds (YouTube / Spotify) */
.embed-wrap {
  margin: 0.5rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.embed-wrap iframe {
  width: 100%;
  border: 0;
  display: block;
}

.embed-youtube iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-spotify iframe { height: 152px; }

/* Email capture form */
#subscribe-form {
  margin: 1.5rem auto 0;
  max-width: 480px;
  padding: 1rem;
  border-radius: 8px;
  background: var(--button-bg, #333);
  color: var(--button-text, #fff);
}

#subscribe-form .subscribe-title {
  margin: 0 0 0.6rem;
  font-weight: 600;
}

#subscribe-form .subscribe-row {
  display: flex;
  gap: 0.5rem;
}

#subscribe-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
}

#subscribe-form button {
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  background: var(--bg, #fff);
  color: var(--text, #111);
  cursor: pointer;
}

#subscribe-msg {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
}

.link-button:hover,
.link-button:focus {
  opacity: 0.85;
}

.link-button:active {
  opacity: 0.7;
}

/* ============ Themes ============ */

.theme-light {
  --bg: #ffffff;
  --text: #1a1a1a;
  --button-bg: #222222;
  --button-text: #ffffff;
}

.theme-dark {
  --bg: #0d0d0d;
  --text: #f5f5f5;
  --button-bg: #e0e0e0;
  --button-text: #111111;
}

.theme-ocean {
  --bg: #05213a;
  --text: #eaf6ff;
  --button-bg: #1fb6a8;
  --button-text: #04222a;
}

.theme-sunset {
  --bg: linear-gradient(180deg, #ff9a56 0%, #6a3093 100%);
  --text: #2a0f1e;
  --button-bg: #e14b3c;
  --button-text: #fff5eb;
}

.theme-sunset body,
body.theme-sunset {
  background: var(--bg);
}
