  :root {
    --pink-100: #fff0fe; --pink-200: #fad2fc; --pink-300: #f0a8f5; --pink-400: #e070e8;
    --purple-100: #f0dcff; --purple-200: #c37eff; --purple-300: #a855d8; --purple-400: #8b35c0;
    --indigo-100: #e0dcff; --indigo-200: #9d95f5; --indigo-300: #5943e8; --indigo-400: #3b2bb5;
    --vanilla-100: #fffae8; --vanilla-200: #fff2c0; --vanilla-300: #ffe8a9; --vanilla-400: #f5d070;
    --neutral-900: #0e0920;
    --bg: #faf7ff; --surface: #ffffff; --surface-tinted: #f7f0ff;
    --text-primary: #1a1230; --text-secondary: #4a3870; --text-muted: #7a6a9e;
    --border: #e4daff;
    --grad-logo: linear-gradient(135deg, #fad2fc 0%, #c37eff 50%, #5943e8 100%);
    /* twinkling star palette: --star-3 swaps to a light-safe gold so it doesn't
       vanish against the light background (it's bright vanilla again in dark mode) */
    --star-1: #fad2fc; --star-2: #c37eff; --star-3: #e0b84a; --star-4: #ffdcff; --star-5: #5943e8;
  }

  :root[data-site-theme="dark"] {
    --bg: var(--neutral-900); --surface: #1a1230; --surface-tinted: #241a3d;
    --text-primary: #f5f0ff; --text-secondary: #cbb8ee; --text-muted: #9884c2;
    --border: #362a58;
    --star-3: #fff2c0;
  }

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

  html { color-scheme: light; }
  html[data-site-theme="dark"] { color-scheme: dark; }

  html, body {
    min-height: 100%;
    font-family: 'Nunito', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
  }

  body {
    background: var(--bg);
    position: relative;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    padding: 48px 16px 32px;
    transition: background-color 0.3s ease;
  }

  /* Two stacked nebula layers crossfade via opacity on theme change —
     background-image itself can't be transitioned smoothly across browsers. */
  .nebula {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    transition: opacity 0.45s ease;
  }
  .nebula-light {
    opacity: 1;
    background-image:
      radial-gradient(ellipse 70% 50% at 50% -10%, rgba(195,126,255,0.22) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 90% 100%, rgba(255,199,255,0.25) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 0% 90%, rgba(157,149,245,0.18) 0%, transparent 60%);
  }
  .nebula-dark {
    opacity: 0;
    background-image:
      radial-gradient(ellipse 70% 50% at 50% -10%, rgba(147,0,255,0.35) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 90% 100%, rgba(200,122,255,0.22) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 0% 90%, rgba(89,67,232,0.3) 0%, transparent 60%);
  }
  [data-site-theme="dark"] .nebula-light { opacity: 0; }
  [data-site-theme="dark"] .nebula-dark  { opacity: 1; }

  .sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }

  .stars { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
  .star { position: absolute; border-radius: 50%; animation: twinkle 3s ease-in-out infinite; }
  @keyframes twinkle { 0%,100%{opacity:.25;transform:scale(1)} 50%{opacity:1;transform:scale(1.5)} }

  .motif { position: fixed; pointer-events: none; z-index: 0; opacity: 0.12; animation: float 9s ease-in-out infinite; }
  .motif svg { width: 100%; height: 100%; display: block; fill: var(--purple-200); }
  .motif.m-moon    { width: 84px; top: 6%; left: 6%; animation-duration: 11s; }
  .motif.m-sparkle1 { width: 34px; top: 14%; right: 8%; animation-duration: 7s; animation-delay: .5s; }
  .motif.m-sparkle2 { width: 26px; bottom: 10%; left: 9%; animation-duration: 8s; animation-delay: 1.2s; }
  .motif.m-heart    { width: 46px; bottom: 16%; right: 7%; animation-duration: 10s; animation-delay: .8s; }
  @media (max-width: 640px) {
    .motif.m-moon { width: 54px; }
    .motif.m-heart { width: 32px; }
  }
  @keyframes float {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
  }

  @media (prefers-reduced-motion: reduce) {
    .star, .motif { animation: none !important; }
    .link-card:hover, .link-card:focus-visible,
    .link-card:active, .theme-toggle:hover, .theme-toggle:active {
      transform: none !important;
    }
    .link-icon, .link-icon::before, .link-icon::after {
      animation: none !important;
    }
  }

  .page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
  }

  /* ── CARD ── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 28px 32px;
    box-shadow: 0 12px 40px rgba(89,67,232,0.14), 0 2px 8px rgba(89,67,232,0.08);
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  }

  [data-site-theme="dark"] .card {
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 60px rgba(157,149,245,0.1), 0 2px 8px rgba(0,0,0,0.3);
  }

  .logo-lockup { width: 100%; max-width: 250px; height: auto; margin: 0 auto 18px; display: block; }

  .subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--purple-300);
    margin-bottom: 6px;
  }

  .meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 18px;
  }

  .tags {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 30px;
  }
  .tag {
    padding: 4px 13px; border-radius: 100px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  }
  .tag-purple { background: var(--purple-100); color: var(--purple-400); }
  .tag-pink   { background: var(--pink-100); color: var(--pink-400); }
  .tag-vanilla{ background: var(--vanilla-100); color: #a08030; }

  /* ── LINKS ── */
  .links { display: flex; flex-direction: column; gap: 12px; }

  .link-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(89,67,232,0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.3s ease;
  }
  .link-card:hover, .link-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(89,67,232,0.18);
    border-color: var(--purple-200);
  }
  .link-card:active { transform: translateY(-1px); }
  .link-card:focus-visible {
    outline: 2.5px solid var(--indigo-300);
    outline-offset: 2px;
  }

  [data-site-theme="dark"] .link-card { box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
  [data-site-theme="dark"] .link-card:hover, [data-site-theme="dark"] .link-card:focus-visible {
    box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 24px rgba(157,149,245,0.15);
  }

  .link-icon {
    position: relative;
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
  }
  .link-icon svg { width: 21px; height: 21px; position: relative; z-index: 1; }

  /* hover: icon hops, sparks pop out from behind it */
  .link-card:hover .link-icon { animation: icon-hop 0.5s cubic-bezier(0.34,1.56,0.64,1); }

  .link-icon::before, .link-icon::after {
    content: '';
    position: absolute;
    width: 7px; height: 7px;
    background: currentColor;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
  }
  .link-icon::before { top: -4px; left: -4px; }
  .link-icon::after   { bottom: -4px; right: -4px; width: 5px; height: 5px; }
  .link-card:hover .link-icon::before { animation: spark-pop-a 0.6s ease-out; }
  .link-card:hover .link-icon::after  { animation: spark-pop-b 0.6s ease-out 0.08s; }

  @keyframes icon-hop {
    0%   { transform: translateY(0) scale(1); }
    35%  { transform: translateY(-7px) scale(1.08); }
    60%  { transform: translateY(0) scale(0.96); }
    100% { transform: translateY(0) scale(1); }
  }
  @keyframes spark-pop-a {
    0%   { opacity: 0; transform: scale(.2) translate(0,0) rotate(0deg); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: scale(1.3) translate(-7px,-9px) rotate(50deg); }
  }
  @keyframes spark-pop-b {
    0%   { opacity: 0; transform: scale(.2) translate(0,0) rotate(0deg); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: scale(1.3) translate(7px,9px) rotate(-50deg); }
  }

  .link-text { flex: 1 1 auto; text-align: left; min-width: 0; }
  .link-title { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); }
  .link-sub { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .link-arrow { flex: 0 0 auto; color: var(--text-muted); opacity: 0.6; }
  .link-arrow svg { width: 16px; height: 16px; }

  .ic-instagram { background: var(--pink-100); color: var(--pink-400); }
  .ic-vgen       { background: var(--indigo-100); color: var(--indigo-400); }
  .vgen-badge {
    position: relative; z-index: 1;
    width: 22px; height: 22px;
    background-color: var(--indigo-400);
    -webkit-mask-image: url('assets/vgen-badge.png');
    -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
    mask-image: url('assets/vgen-badge.png');
    mask-size: contain; mask-repeat: no-repeat; mask-position: center;
  }
  .ic-bluesky    { background: var(--indigo-100); color: var(--indigo-300); }
  .ic-telegram   { background: var(--purple-100); color: var(--purple-400); }
  .ic-mail       { background: var(--vanilla-100); color: #a08030; }

  /* ── FOOTER ── */
  .tagline {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.15rem;
    color: var(--purple-300);
    margin-top: 30px;
    letter-spacing: 0.02em;
  }

  .credit {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px;
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.18s ease;
  }
  .credit:hover { color: var(--indigo-300); }
  .credit:focus-visible { outline: 2.5px solid var(--indigo-300); outline-offset: 3px; border-radius: 4px; }
  .credit span.brand {
    background: var(--grad-logo); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
    font-family: 'Unbounded', sans-serif; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .footer-space { height: 24px; }

  /* ── THEME TOGGLE ── */
  .theme-toggle {
    position: fixed;
    top: 18px; right: 18px;
    z-index: 20;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--purple-300);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(89,67,232,0.16);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  }
  .theme-toggle:hover { transform: translateY(-2px) rotate(-8deg); border-color: var(--purple-200); }
  .theme-toggle:active { transform: translateY(0) scale(0.92); }
  .theme-toggle:focus-visible { outline: 2.5px solid var(--indigo-300); outline-offset: 2px; }
  .theme-toggle svg { width: 20px; height: 20px; }
  .theme-toggle .icon-moon { display: none; }
  [data-site-theme="dark"] .theme-toggle { color: var(--vanilla-300); box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
  [data-site-theme="dark"] .theme-toggle .icon-sun { display: none; }
  [data-site-theme="dark"] .theme-toggle .icon-moon { display: block; }

  @media (max-width: 480px) {
    .theme-toggle { top: 12px; right: 12px; }
  }
