/*
 * hytree-templates.css — HyTree Bio Link Page Template System
 * 8 animated templates + shared base + button/animation variants.
 * Standalone — does NOT depend on tokens.css or ios-system.css.
 *
 * Usage: <link rel="stylesheet" href="/css/hytree-templates.css">
 * Apply classes to root:  .ht-page .ht-tpl-{slug} .ht-btn-{style} .ht-anim-{type}
 *
 * Created: 2026-06-06
 */

/* ═══════════════════════════════════════════════════════════════════════
   §0  Google Fonts
   ═══════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&family=Press+Start+2P&display=swap');

/* ═══════════════════════════════════════════════════════════════════════
   §1  Custom Properties (HyTree defaults)
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --ht-accent: #00ffa3;
  --ht-accent-dim: rgba(0, 255, 163, 0.15);
  --ht-accent-glow: rgba(0, 255, 163, 0.35);
  --ht-bg: #0a0a0a;
  --ht-bg-card: rgba(255, 255, 255, 0.06);
  --ht-text: #ffffff;
  --ht-text-muted: rgba(255, 255, 255, 0.6);
  --ht-border: rgba(255, 255, 255, 0.12);
  --ht-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ht-radius: 12px;
  --ht-btn-radius: 12px;
  --ht-ring-color: var(--ht-accent);
  --ht-ring-glow: var(--ht-accent-glow);
  --ht-transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ═══════════════════════════════════════════════════════════════════════
   §2  Shared Base Styles  (.ht-page)
   ═══════════════════════════════════════════════════════════════════════ */
.ht-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ht-bg);
  color: var(--ht-text);
  font-family: var(--ht-font);
  padding: 48px 20px 64px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ht-page * { box-sizing: border-box; }

/* ── Container ──────────────────────────────────────────────────────── */
.ht-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: htFadeInUp 0.6s ease-out both;
}

/* ── Avatar ─────────────────────────────────────────────────────────── */
.ht-avatar-wrap {
  position: relative;
  width: 102px;
  height: 102px;
  margin-bottom: 16px;
}

.ht-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--ht-ring-color);
  animation: htRingPulse 3s ease-in-out infinite;
}

.ht-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 3px;
  left: 3px;
  background: var(--ht-bg-card);
}

/* ── Profile Info ───────────────────────────────────────────────────── */
.ht-display-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  text-align: center;
  color: var(--ht-text);
}

.ht-bio {
  font-size: 14px;
  color: var(--ht-text-muted);
  text-align: center;
  margin: 0 0 28px;
  max-width: 380px;
  line-height: 1.5;
}

/* ── Link Buttons ───────────────────────────────────────────────────── */
.ht-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.ht-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--ht-btn-radius);
  background: var(--ht-bg-card);
  border: 1px solid var(--ht-border);
  color: var(--ht-text);
  font-family: var(--ht-font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ht-transition),
              background var(--ht-transition),
              border-color var(--ht-transition),
              box-shadow var(--ht-transition),
              color var(--ht-transition);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.ht-link-btn:active {
  transform: scale(0.97);
}

.ht-link-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Ripple Effect ──────────────────────────────────────────────────── */
.ht-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: htRipple 0.6s ease-out forwards;
  pointer-events: none;
}

/* ── Embeds ─────────────────────────────────────────────────────────── */
.ht-embed {
  width: 100%;
  border-radius: var(--ht-radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.ht-embed iframe {
  width: 100%;
  border: none;
  border-radius: var(--ht-radius);
}

/* ── Social Row ─────────────────────────────────────────────────────── */
.ht-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.ht-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ht-bg-card);
  border: 1px solid var(--ht-border);
  color: var(--ht-accent);
  text-decoration: none;
  transition: transform var(--ht-transition),
              background var(--ht-transition),
              border-color var(--ht-transition),
              box-shadow var(--ht-transition);
}

.ht-social-icon:hover {
  transform: scale(1.1);
  border-color: var(--ht-accent);
  background: var(--ht-accent-dim);
}

.ht-social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.ht-footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
}

.ht-footer a {
  font-size: 12px;
  color: var(--ht-text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity var(--ht-transition);
}

.ht-footer a:hover { opacity: 1; }

/* ── 404 Page ───────────────────────────────────────────────────────── */
.ht-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.ht-404-code {
  font-size: 72px;
  font-weight: 800;
  color: var(--ht-accent);
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.4;
}

.ht-404-msg {
  font-size: 16px;
  color: var(--ht-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   §3  Base Keyframes
   ═══════════════════════════════════════════════════════════════════════ */
@keyframes htFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes htRingPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--ht-ring-glow); }
  50%      { box-shadow: 0 0 12px 4px var(--ht-ring-glow); }
}

@keyframes htRipple {
  to { transform: scale(4); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   §4  Button Style Variants
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Fill ───────────────────────────────────────────────────────────── */
.ht-btn-fill .ht-link-btn {
  background: var(--ht-accent);
  color: #000;
  border-color: transparent;
  font-weight: 600;
}
.ht-btn-fill .ht-link-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px var(--ht-accent-glow);
}

/* ── Outline ────────────────────────────────────────────────────────── */
.ht-btn-outline .ht-link-btn {
  background: transparent;
  border: 2px solid var(--ht-accent);
  color: var(--ht-accent);
}
.ht-btn-outline .ht-link-btn:hover {
  background: var(--ht-accent-dim);
}

/* ── Shadow ─────────────────────────────────────────────────────────── */
.ht-btn-shadow .ht-link-btn {
  background: var(--ht-bg-card);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ht-btn-shadow .ht-link-btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ── Glass ──────────────────────────────────────────────────────────── */
.ht-btn-glass .ht-link-btn {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ht-btn-glass .ht-link-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   §5  Animation Variants
   ═══════════════════════════════════════════════════════════════════════ */

/* ── None ───────────────────────────────────────────────────────────── */
.ht-anim-none .ht-link-btn { transition: none; }
.ht-anim-none .ht-container { animation: none; }

/* ── Float ──────────────────────────────────────────────────────────── */
.ht-anim-float .ht-link-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ── Pulse ──────────────────────────────────────────────────────────── */
.ht-anim-pulse .ht-link-btn:hover {
  animation: htPulse 0.4s ease-in-out;
}
@keyframes htPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ── Slide ──────────────────────────────────────────────────────────── */
.ht-anim-slide .ht-link-btn {
  opacity: 0;
  transform: translateX(-24px);
  animation: htSlideIn 0.5s ease-out forwards;
}

.ht-anim-slide .ht-link-btn:nth-child(1)  { animation-delay: 0.05s; }
.ht-anim-slide .ht-link-btn:nth-child(2)  { animation-delay: 0.10s; }
.ht-anim-slide .ht-link-btn:nth-child(3)  { animation-delay: 0.15s; }
.ht-anim-slide .ht-link-btn:nth-child(4)  { animation-delay: 0.20s; }
.ht-anim-slide .ht-link-btn:nth-child(5)  { animation-delay: 0.25s; }
.ht-anim-slide .ht-link-btn:nth-child(6)  { animation-delay: 0.30s; }
.ht-anim-slide .ht-link-btn:nth-child(7)  { animation-delay: 0.35s; }
.ht-anim-slide .ht-link-btn:nth-child(8)  { animation-delay: 0.40s; }
.ht-anim-slide .ht-link-btn:nth-child(9)  { animation-delay: 0.45s; }
.ht-anim-slide .ht-link-btn:nth-child(10) { animation-delay: 0.50s; }

@keyframes htSlideIn {
  to { opacity: 1; transform: translateX(0); }
}

/* ── Bounce ─────────────────────────────────────────────────────────── */
.ht-anim-bounce .ht-link-btn:hover {
  animation: htBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes htBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.06); }
  50%  { transform: scale(0.97); }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   §6  Template: Minimal
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-minimal {
  --ht-accent: #333333;
  --ht-accent-dim: rgba(0, 0, 0, 0.06);
  --ht-accent-glow: rgba(0, 0, 0, 0.08);
  --ht-bg: #fafafa;
  --ht-bg-card: #ffffff;
  --ht-text: #1a1a1a;
  --ht-text-muted: #6b7280;
  --ht-border: rgba(0, 0, 0, 0.1);
  --ht-ring-color: #d1d5db;
  --ht-ring-glow: rgba(0, 0, 0, 0.05);
  --ht-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ht-btn-radius: 10px;
}

.ht-tpl-minimal .ht-avatar-ring {
  animation: none;
  border-color: #e5e7eb;
}

.ht-tpl-minimal .ht-link-btn {
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ht-tpl-minimal .ht-link-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.ht-tpl-minimal .ht-social-icon {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #6b7280;
}

.ht-tpl-minimal .ht-social-icon:hover {
  background: #f3f4f6;
  color: #1a1a1a;
  border-color: #d1d5db;
}

/* ═══════════════════════════════════════════════════════════════════════
   §7  Template: Neon
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-neon {
  --ht-accent: #00ff88;
  --ht-accent-dim: rgba(0, 255, 136, 0.1);
  --ht-accent-glow: rgba(0, 255, 136, 0.4);
  --ht-bg: #0a0a0a;
  --ht-bg-card: rgba(0, 255, 136, 0.04);
  --ht-text: #00ff88;
  --ht-text-muted: rgba(0, 255, 136, 0.5);
  --ht-border: rgba(0, 255, 136, 0.2);
  --ht-ring-color: #00ff88;
  --ht-ring-glow: rgba(0, 255, 136, 0.5);
  --ht-font: 'Share Tech Mono', 'Fira Code', 'Courier New', monospace;
  --ht-btn-radius: 4px;
}

.ht-tpl-neon .ht-link-btn {
  border: 1px solid rgba(0, 255, 136, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.ht-tpl-neon .ht-link-btn:hover {
  border-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3),
              0 0 24px rgba(0, 255, 136, 0.15),
              inset 0 0 8px rgba(0, 255, 136, 0.05);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  animation: htNeonGlow 1.5s ease-in-out infinite;
}

.ht-tpl-neon .ht-avatar-ring {
  animation: htNeonRing 2s ease-in-out infinite;
}

.ht-tpl-neon .ht-social-icon {
  border-color: rgba(0, 255, 136, 0.25);
  color: #00ff88;
}

.ht-tpl-neon .ht-social-icon:hover {
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
  border-color: #00ff88;
}

@keyframes htNeonGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,255,136,.3), 0 0 24px rgba(0,255,136,.12); }
  50%      { box-shadow: 0 0 12px rgba(0,255,136,.45), 0 0 36px rgba(0,255,136,.2); }
}

@keyframes htNeonRing {
  0%, 100% { box-shadow: 0 0 6px rgba(0,255,136,.4), 0 0 20px rgba(0,255,136,.15); border-color: #00ff88; }
  50%      { box-shadow: 0 0 12px rgba(0,255,136,.6), 0 0 32px rgba(0,255,136,.25); border-color: #66ffbb; }
}

/* ═══════════════════════════════════════════════════════════════════════
   §8  Template: Glass
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-glass {
  --ht-accent: #a78bfa;
  --ht-accent-dim: rgba(167, 139, 250, 0.12);
  --ht-accent-glow: rgba(167, 139, 250, 0.3);
  --ht-bg: linear-gradient(135deg, #0f0c29 0%, #1a1040 40%, #24243e 100%);
  --ht-bg-card: rgba(255, 255, 255, 0.08);
  --ht-text: #f0eeff;
  --ht-text-muted: rgba(240, 238, 255, 0.55);
  --ht-border: rgba(255, 255, 255, 0.1);
  --ht-ring-color: rgba(167, 139, 250, 0.6);
  --ht-ring-glow: rgba(167, 139, 250, 0.25);
  --ht-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ht-btn-radius: 16px;
}

.ht-tpl-glass {
  background: linear-gradient(135deg, #0f0c29 0%, #1a1040 40%, #24243e 100%);
}

.ht-tpl-glass .ht-link-btn {
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ht-tpl-glass .ht-link-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ht-tpl-glass .ht-avatar-ring {
  border: 3px solid rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.05);
  animation: htGlassRing 4s ease-in-out infinite;
}

.ht-tpl-glass .ht-social-icon {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #a78bfa;
}

.ht-tpl-glass .ht-social-icon:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
}

@keyframes htGlassRing {
  0%, 100% { box-shadow: 0 0 8px rgba(167,139,250,.2); border-color: rgba(167,139,250,.4); }
  50%      { box-shadow: 0 0 16px rgba(167,139,250,.35); border-color: rgba(167,139,250,.6); }
}

/* ═══════════════════════════════════════════════════════════════════════
   §9  Template: Gradient
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-gradient {
  --ht-accent: #ffffff;
  --ht-accent-dim: rgba(255, 255, 255, 0.15);
  --ht-accent-glow: rgba(255, 255, 255, 0.2);
  --ht-bg-card: rgba(255, 255, 255, 0.12);
  --ht-text: #ffffff;
  --ht-text-muted: rgba(255, 255, 255, 0.7);
  --ht-border: rgba(255, 255, 255, 0.2);
  --ht-ring-color: rgba(255, 255, 255, 0.7);
  --ht-ring-glow: rgba(255, 255, 255, 0.2);
  --ht-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ht-btn-radius: 12px;
}

.ht-tpl-gradient {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: htGradientShift 15s ease infinite;
}

.ht-tpl-gradient .ht-link-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ht-tpl-gradient .ht-link-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

.ht-tpl-gradient .ht-avatar-ring {
  border-color: rgba(255, 255, 255, 0.8);
}

.ht-tpl-gradient .ht-social-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.ht-tpl-gradient .ht-social-icon:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

@keyframes htGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   §10  Template: Brutalist
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-brutalist {
  --ht-accent: #000000;
  --ht-accent-dim: rgba(0, 0, 0, 0.08);
  --ht-accent-glow: rgba(0, 0, 0, 0.1);
  --ht-bg: #ffffff;
  --ht-bg-card: #ffffff;
  --ht-text: #000000;
  --ht-text-muted: #555555;
  --ht-border: #000000;
  --ht-ring-color: #000000;
  --ht-ring-glow: rgba(0, 0, 0, 0.1);
  --ht-font: 'Share Tech Mono', 'Courier New', monospace;
  --ht-btn-radius: 0;
}

.ht-tpl-brutalist .ht-avatar-ring {
  border: 3px solid #000;
  animation: none;
}

.ht-tpl-brutalist .ht-display-name {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 22px;
}

.ht-tpl-brutalist .ht-link-btn {
  border: 3px solid #000;
  background: #fff;
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.ht-tpl-brutalist .ht-link-btn:hover {
  background: #000;
  color: #fff;
}

.ht-tpl-brutalist .ht-social-icon {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  color: #000;
}

.ht-tpl-brutalist .ht-social-icon:hover {
  background: #000;
  color: #fff;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   §11  Template: Retro
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-retro {
  --ht-accent: #00ff41;
  --ht-accent-dim: rgba(0, 255, 65, 0.1);
  --ht-accent-glow: rgba(0, 255, 65, 0.35);
  --ht-bg: #0d0221;
  --ht-bg-card: rgba(0, 255, 65, 0.05);
  --ht-text: #00ff41;
  --ht-text-muted: rgba(0, 255, 65, 0.5);
  --ht-border: rgba(0, 255, 65, 0.3);
  --ht-ring-color: #00ff41;
  --ht-ring-glow: rgba(0, 255, 65, 0.4);
  --ht-font: 'Press Start 2P', 'Courier New', monospace;
  --ht-btn-radius: 2px;
}

/* CRT scanline overlay */
.ht-tpl-retro::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 10;
}

/* CRT vignette */
.ht-tpl-retro::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 10;
}

.ht-tpl-retro .ht-display-name {
  font-size: 14px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.ht-tpl-retro .ht-bio {
  font-size: 10px;
  line-height: 2;
}

.ht-tpl-retro .ht-link-btn {
  border: 2px solid rgba(0, 255, 65, 0.4);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}

.ht-tpl-retro .ht-link-btn:hover {
  border-color: #00ff41;
  background: rgba(0, 255, 65, 0.1);
  animation: htGlitch 0.3s ease-in-out;
}

.ht-tpl-retro .ht-avatar-ring {
  border: 2px solid #00ff41;
  animation: htRetroRing 2s steps(4) infinite;
}

.ht-tpl-retro .ht-avatar {
  image-rendering: pixelated;
}

.ht-tpl-retro .ht-social-icon {
  border: 2px solid rgba(0, 255, 65, 0.3);
  border-radius: 2px;
  color: #00ff41;
}

.ht-tpl-retro .ht-social-icon:hover {
  background: rgba(0, 255, 65, 0.15);
  border-color: #00ff41;
  transform: none;
}

@keyframes htGlitch {
  0%   { transform: translate(0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(2px, -1px); }
  60%  { transform: translate(-1px, -1px); }
  80%  { transform: translate(1px, 2px); }
  100% { transform: translate(0); }
}

@keyframes htRetroRing {
  0%, 100% { box-shadow: 0 0 4px rgba(0,255,65,.4); }
  25%      { box-shadow: 0 0 8px rgba(0,255,65,.6); }
  50%      { box-shadow: 0 0 12px rgba(0,255,65,.5); }
  75%      { box-shadow: 0 0 6px rgba(0,255,65,.7); }
}

/* ═══════════════════════════════════════════════════════════════════════
   §12  Template: Luxury
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-luxury {
  --ht-accent: #c9a84c;
  --ht-accent-dim: rgba(201, 168, 76, 0.1);
  --ht-accent-glow: rgba(201, 168, 76, 0.25);
  --ht-bg: #0a0806;
  --ht-bg-card: rgba(201, 168, 76, 0.04);
  --ht-text: #f5efe0;
  --ht-text-muted: rgba(245, 239, 224, 0.5);
  --ht-border: rgba(201, 168, 76, 0.2);
  --ht-ring-color: #c9a84c;
  --ht-ring-glow: rgba(201, 168, 76, 0.3);
  --ht-font: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ht-btn-radius: 2px;
}

.ht-tpl-luxury .ht-display-name {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.ht-tpl-luxury .ht-bio {
  font-family: 'Inter', -apple-system, sans-serif;
  font-style: italic;
}

.ht-tpl-luxury .ht-link-btn {
  border: 1px solid rgba(201, 168, 76, 0.25);
  font-size: 14px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(201,168,76,0.02) 100%);
  position: relative;
  overflow: hidden;
}

.ht-tpl-luxury .ht-link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.ht-tpl-luxury .ht-link-btn:hover::before {
  transform: translateX(100%);
}

.ht-tpl-luxury .ht-link-btn:hover {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.1);
}

.ht-tpl-luxury .ht-avatar-ring {
  border-color: #c9a84c;
  animation: htLuxuryRing 4s ease-in-out infinite;
}

.ht-tpl-luxury .ht-social-icon {
  border-color: rgba(201, 168, 76, 0.2);
  color: #c9a84c;
}

.ht-tpl-luxury .ht-social-icon:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.15);
}

@keyframes htLuxuryRing {
  0%, 100% { box-shadow: 0 0 6px rgba(201,168,76,.2); }
  50%      { box-shadow: 0 0 14px rgba(201,168,76,.35); }
}

/* ═══════════════════════════════════════════════════════════════════════
   §13  Template: Ocean
   ═══════════════════════════════════════════════════════════════════════ */
.ht-tpl-ocean {
  --ht-accent: #22d3ee;
  --ht-accent-dim: rgba(34, 211, 238, 0.1);
  --ht-accent-glow: rgba(34, 211, 238, 0.3);
  --ht-bg: #020c1b;
  --ht-bg-card: rgba(34, 211, 238, 0.06);
  --ht-text: #e0f7fa;
  --ht-text-muted: rgba(224, 247, 250, 0.5);
  --ht-border: rgba(34, 211, 238, 0.15);
  --ht-ring-color: #22d3ee;
  --ht-ring-glow: rgba(34, 211, 238, 0.35);
  --ht-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ht-btn-radius: 24px;
}

.ht-tpl-ocean {
  background: linear-gradient(180deg, #020c1b 0%, #0a1628 40%, #0c2340 100%);
  position: relative;
}

/* Wave pattern overlay */
.ht-tpl-ocean::before {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200'%3E%3Cpath fill='rgba(34,211,238,0.04)' d='M0,120 C360,180 720,60 1080,120 C1260,150 1380,100 1440,120 L1440,200 L0,200 Z'/%3E%3C/svg%3E") repeat-x bottom,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200'%3E%3Cpath fill='rgba(34,211,238,0.025)' d='M0,140 C480,80 960,180 1440,100 L1440,200 L0,200 Z'/%3E%3C/svg%3E") repeat-x bottom;
  animation: htWave 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.ht-tpl-ocean .ht-container {
  position: relative;
  z-index: 1;
}

.ht-tpl-ocean .ht-link-btn {
  background: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(6,182,212,0.06) 100%);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 24px;
}

.ht-tpl-ocean .ht-link-btn:hover {
  background: linear-gradient(135deg, rgba(34,211,238,0.16) 0%, rgba(6,182,212,0.12) 100%);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.12);
  transform: translateY(-2px);
}

.ht-tpl-ocean .ht-avatar-ring {
  border-color: #22d3ee;
  animation: htOceanRing 3s ease-in-out infinite;
}

.ht-tpl-ocean .ht-social-icon {
  border-color: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  border-radius: 50%;
}

.ht-tpl-ocean .ht-social-icon:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

@keyframes htWave {
  0%   { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-40px) translateY(-8px); }
}

@keyframes htOceanRing {
  0%, 100% { box-shadow: 0 0 6px rgba(34,211,238,.25); }
  50%      { box-shadow: 0 0 14px rgba(34,211,238,.45); }
}

/* ═══════════════════════════════════════════════════════════════════════
   §14  Reduced Motion
   ═══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ht-container { animation: none; }
  .ht-avatar-ring { animation: none; }
  .ht-link-btn { transition: none; }
  .ht-tpl-gradient { animation: none; }
  .ht-tpl-retro::before { display: none; }
  .ht-tpl-ocean::before { animation: none; }
  .ht-tpl-luxury .ht-link-btn::before { display: none; }
  .ht-anim-slide .ht-link-btn { animation: none; opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   §15  Responsive Tweaks
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .ht-page {
    padding: 36px 16px 48px;
  }
  .ht-display-name { font-size: 18px; }
  .ht-bio { font-size: 13px; }
  .ht-link-btn { min-height: 44px; font-size: 14px; }
  .ht-tpl-retro .ht-display-name { font-size: 12px; }
  .ht-tpl-retro .ht-link-btn { font-size: 9px; }
}

@media (min-width: 769px) {
  .ht-page { padding: 64px 24px 80px; }
  .ht-container { max-width: 500px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   §16  Template: Cyberpunk
   Animated neon-grid backdrop, multi-color title shimmer, rotating gradient
   borders + neon bloom on links, color-cycling avatar ring, and a staggered
   link reveal. Fully additive — does NOT modify other templates. Honors
   prefers-reduced-motion. Page theme.bg (if set) shows through behind the
   grid; theme.accent overrides --ht-accent as usual.
   Added: 2026-06-13
   ═══════════════════════════════════════════════════════════════════════ */
@property --ht-cyber-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.ht-tpl-cyberpunk {
  --ht-accent: #00ffa3;
  --ht-accent-dim: rgba(0, 255, 163, 0.12);
  --ht-accent-glow: rgba(0, 255, 163, 0.40);
  --ht-cyber-cyan: #3ac9ff;
  --ht-cyber-purple: #b47aff;
  --ht-cyber-pink: #ff6ec7;
  --ht-bg: #05010a;                       /* fallback — page theme.bg overrides */
  --ht-bg-card: rgba(10, 16, 28, 0.55);
  --ht-text: #eafff7;
  --ht-text-muted: rgba(175, 255, 228, 0.62);
  --ht-border: rgba(0, 255, 163, 0.28);
  --ht-ring-color: var(--ht-accent);
  --ht-ring-glow: var(--ht-accent-glow);
  --ht-btn-radius: 12px;
}

/* Animated neon grid — drifts diagonally, faded toward the edges */
.ht-tpl-cyberpunk::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 163, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 201, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
  animation: htCyberGrid 24s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 28%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 85% 65% at 50% 28%, #000 30%, transparent 100%);
}

/* Drifting, hue-shifting glow bloom near the top */
.ht-tpl-cyberpunk::after {
  content: '';
  position: fixed;
  top: -130px;
  left: 50%;
  width: min(460px, 92vw);
  height: 320px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, var(--ht-accent-glow) 0%, transparent 70%);
  filter: blur(44px);
  opacity: 0.45;
  animation: htCyberBloom 14s ease-in-out infinite;
}

/* Keep all content above the backdrop layers */
.ht-tpl-cyberpunk .ht-container { position: relative; z-index: 1; }

/* Multi-color shimmering display name with neon bloom */
.ht-tpl-cyberpunk .ht-display-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ht-accent);                /* fallback if background-clip unsupported */
  background-image: linear-gradient(
    100deg,
    var(--ht-accent) 0%,
    var(--ht-cyber-cyan) 25%,
    var(--ht-cyber-purple) 50%,
    var(--ht-cyber-pink) 72%,
    var(--ht-accent) 100%
  );
  background-size: 250% auto;
  filter: drop-shadow(0 0 10px var(--ht-accent-glow));
  animation: htCyberShimmer 6s linear infinite;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ht-tpl-cyberpunk .ht-display-name {
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.ht-tpl-cyberpunk .ht-bio { color: var(--ht-text-muted); }

/* Frosted neon link buttons with a staggered entrance reveal.
   Entrance uses the independent `translate` property so the hover
   `transform` lift still composes after the reveal settles. */
.ht-tpl-cyberpunk .ht-link-btn {
  background: var(--ht-bg-card);
  border: 1px solid var(--ht-border);
  color: var(--ht-text);
  font-weight: 600;
  letter-spacing: 0.015em;
  text-shadow: 0 0 6px rgba(0, 255, 163, 0.22);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  opacity: 0;
  animation: htCyberReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Rotating conic-gradient border ring (masked to the edge, shown on hover) */
.ht-tpl-cyberpunk .ht-link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--ht-cyber-angle),
    var(--ht-accent),
    var(--ht-cyber-cyan),
    var(--ht-cyber-purple),
    var(--ht-cyber-pink),
    var(--ht-accent)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ht-tpl-cyberpunk .ht-link-btn:hover {
  transform: translateY(-2px);
  background: rgba(16, 24, 38, 0.72);
  border-color: transparent;
  box-shadow:
    0 0 18px var(--ht-accent-glow),
    0 0 42px rgba(58, 201, 255, 0.18),
    inset 0 0 18px rgba(0, 255, 163, 0.06);
  text-shadow: 0 0 10px var(--ht-accent);
}
.ht-tpl-cyberpunk .ht-link-btn:hover::before {
  opacity: 1;
  animation: htCyberBorder 3s linear infinite;
}

/* Staggered reveal delays */
.ht-tpl-cyberpunk .ht-link-btn:nth-child(1)  { animation-delay: 0.05s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(2)  { animation-delay: 0.10s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(3)  { animation-delay: 0.15s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(4)  { animation-delay: 0.20s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(5)  { animation-delay: 0.25s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(6)  { animation-delay: 0.30s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(7)  { animation-delay: 0.35s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(8)  { animation-delay: 0.40s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(9)  { animation-delay: 0.45s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(10) { animation-delay: 0.50s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(11) { animation-delay: 0.55s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(12) { animation-delay: 0.60s; }
.ht-tpl-cyberpunk .ht-link-btn:nth-child(n+13) { animation-delay: 0.62s; }

/* Color-cycling glow ring around the avatar */
.ht-tpl-cyberpunk .ht-avatar-ring {
  border-color: var(--ht-accent);
  animation: htCyberRing 4.5s ease-in-out infinite;
}

/* Neon social icons */
.ht-tpl-cyberpunk .ht-social-icon {
  background: var(--ht-bg-card);
  border-color: var(--ht-border);
  color: var(--ht-accent);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.ht-tpl-cyberpunk .ht-social-icon:hover {
  border-color: var(--ht-accent);
  background: var(--ht-accent-dim);
  box-shadow: 0 0 12px var(--ht-accent-glow), 0 0 24px rgba(0, 255, 163, 0.20);
  transform: translateY(-2px) scale(1.08);
}

/* Footer link picks up the neon accent on hover */
.ht-tpl-cyberpunk .ht-footer a:hover { color: var(--ht-accent); }

/* ── Cyberpunk keyframes ── */
@keyframes htCyberGrid {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 44px 44px, 44px 44px; }
}
@keyframes htCyberBloom {
  0%, 100% { opacity: 0.35; filter: blur(44px) hue-rotate(0deg); }
  50%      { opacity: 0.60; filter: blur(54px) hue-rotate(55deg); }
}
@keyframes htCyberShimmer {
  to { background-position: 250% center; }
}
@keyframes htCyberBorder {
  to { --ht-cyber-angle: 360deg; }
}
@keyframes htCyberReveal {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes htCyberRing {
  0%, 100% { border-color: var(--ht-accent);       box-shadow: 0 0 10px var(--ht-accent-glow), 0 0 26px rgba(0, 255, 163, 0.18); }
  33%      { border-color: var(--ht-cyber-cyan);   box-shadow: 0 0 12px rgba(58, 201, 255, 0.50), 0 0 30px rgba(58, 201, 255, 0.20); }
  66%      { border-color: var(--ht-cyber-purple); box-shadow: 0 0 12px rgba(180, 122, 255, 0.50), 0 0 30px rgba(180, 122, 255, 0.20); }
}

/* Cyberpunk — reduced motion: freeze animations, keep everything legible */
@media (prefers-reduced-motion: reduce) {
  .ht-tpl-cyberpunk::before,
  .ht-tpl-cyberpunk::after,
  .ht-tpl-cyberpunk .ht-display-name,
  .ht-tpl-cyberpunk .ht-avatar-ring { animation: none; }
  .ht-tpl-cyberpunk .ht-link-btn { animation: none; opacity: 1; translate: none; }
  .ht-tpl-cyberpunk .ht-link-btn:hover::before { animation: none; }
}
