/* ═══════════════════════════════════════════
   Pedro Marvarez – Link Page
   ═══════════════════════════════════════════ */

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

/* ── Light mode (default) ── */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #444;
  --accent-glow: rgba(0, 0, 0, 0.03);
  --icon-bg: rgba(0, 0, 0, 0.05);
  --icon-bg-hover: rgba(0, 0, 0, 0.09);
  --overlay-bg: rgba(0, 0, 0, 0.4);
  --name-from: #222222;
  --name-to: #777777;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --card-shadow-hover: rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light dark;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-hover: #1e1e1e;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text: #f0f0f0;
    --text-muted: #888;
    --accent: #d0d0d0;
    --accent-glow: rgba(255, 255, 255, 0.06);
    --icon-bg: rgba(255, 255, 255, 0.06);
    --icon-bg-hover: rgba(255, 255, 255, 0.12);
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --name-from: #ffffff;
    --name-to: #999999;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --card-shadow-hover: rgba(0, 0, 0, 0.35);
  }
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

/* ── Page shell ── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 3rem 1rem 2rem;
}

.container {
  width: 100%;
  max-width: 480px;
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--name-from) 0%, var(--name-to) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Share Button ── */
.share-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Share Modal ── */
.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.3s ease;
  pointer-events: none;
}

.share-overlay--visible {
  background: var(--overlay-bg);
  pointer-events: auto;
}

.share-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 1.25rem 1.5rem 2rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.share-overlay--visible .share-modal {
  transform: translateY(0);
}

.share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.share-modal__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.share-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--icon-bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.share-modal__close:hover {
  background: var(--icon-bg-hover);
  color: var(--text);
}

.share-modal__close svg {
  width: 16px;
  height: 16px;
}

.share-modal__actions {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.share-modal__actions::-webkit-scrollbar {
  display: none;
}

.share-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  min-width: 64px;
  padding: 0;
  font-family: inherit;
}

.share-target__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.share-target:hover .share-target__icon {
  transform: scale(1.08);
}

.share-target__icon svg {
  width: 20px;
  height: 20px;
}

.share-target__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Section ── */
.section {
  margin-bottom: 1.5rem;
}

.section__heading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

/* ═══ Featured Cards (Twitch / YouTube) ═══ */
.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-bottom: 0.75rem;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--card-shadow), 0 0 0 1px var(--border-hover);
}

.card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card__body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--icon-bg);
  color: var(--text-muted);
}

.card__icon svg {
  width: 18px;
  height: 18px;
}

.card__text {
  display: flex;
  flex-direction: column;
}

.card__title {
  font-weight: 600;
  font-size: 0.95rem;
}

.card__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ═══ Podcast Card ═══ */
.card--podcast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: default;
}

.card--podcast:hover {
  transform: none;
  box-shadow: none;
}

.podcast__cover {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.podcast__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spotify-embed {
  margin-top: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ═══ Instagram Grid ═══ */
.instagram-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.instagram-grid:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--card-shadow);
}

.instagram-grid__large {
  grid-row: 1 / 3;
}

.instagram-grid__large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-grid__small {
  display: contents;
}

.instagram-grid__small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.instagram-handle svg {
  width: 14px;
  height: 14px;
}

/* ═══ Link Buttons ═══ */
.link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.link-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--card-shadow-hover);
}

.link-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.link-btn:hover svg {
  color: var(--text);
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Ambient glow behind page ── */
body::before {
  content: "";
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .page {
    padding: 2rem 0.75rem 1.5rem;
  }

  .name {
    font-size: 1.35rem;
  }

  .card__body {
    padding: 0.75rem 0.85rem;
  }

  .podcast__cover {
    width: 64px;
    height: 64px;
  }
}
