/* =========================================================
   Nyashuu ✿  — kawaii japanese profile
   4-file vanilla build
========================================================= */

:root {
  --bg: #fff5f9;
  --bg-2: #ffeaf3;
  --card: #ffffff;
  --text: #5b4a52;
  --muted: #a98b98;
  --accent: #ff8fb8;
  --accent-deep: #ff5f97;
  --accent-soft: #ffe3ee;
  --blue: #8fb4ff;
  --yellow: #ffd98f;
  --ring: #ffd0e2;
  --shadow: 30px 40px 80px rgba(255, 120, 170, 0.16);
  --radius: 28px;
}

body.dark {
  --bg: #191324;
  --bg-2: #241a34;
  --card: #241b33;
  --text: #f4e9f4;
  --muted: #b79fc4;
  --accent: #ff9ec4;
  --accent-deep: #ffb3d1;
  --accent-soft: #34233f;
  --blue: #9db8ff;
  --yellow: #ffe0a0;
  --ring: #46304f;
  --shadow: 30px 40px 80px rgba(0, 0, 0, 0.45);
}

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

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 90% at 15% 10%, var(--bg-2) 0%, transparent 55%),
    radial-gradient(120% 90% at 90% 90%, var(--bg-2) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Zen Maru Gothic", system-ui, sans-serif;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

/* soft floating aura behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 35%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 45%),
    radial-gradient(circle at 78% 68%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 45%);
  filter: blur(30px);
  animation: auraDrift 16s ease-in-out infinite alternate;
}

@keyframes auraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.03); }
}

/* sparkle trail canvas */
#sparkle-canvas {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 26px;
  right: 26px;
  z-index: 100;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent-deep);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(255, 120, 170, 0.28);
  transition: transform 0.5s cubic-bezier(.34,1.56,.64,1), background 0.4s;
}
.theme-toggle:hover { transform: rotate(-18deg) scale(1.12); }
.theme-toggle:active { transform: scale(0.92); }
.toggle-icon { display: inline-block; transition: transform 0.5s cubic-bezier(.34,1.56,.64,1); }

/* ---------- layout ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 90px 32px 40px;
}

/* ---------- profile ---------- */
.profile {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 264px;
  height: 264px;
  display: grid;
  place-items: center;
  animation: floatBob 5.5s ease-in-out infinite;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.avatar-ring,
.avatar-ring.ring-2 {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 3px dashed var(--ring);
  animation: spin 22s linear infinite;
}
.avatar-ring.ring-2 {
  inset: -26px;
  border-style: dotted;
  border-color: color-mix(in srgb, var(--blue) 60%, transparent);
  animation: spin 30s linear infinite reverse;
  opacity: 0.7;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-tilt {
  position: relative;
  width: 232px;
  height: 232px;
  border-radius: 50%;
  transition: transform 0.25s ease;
  will-change: transform;
}

#avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 8px var(--card),
    0 0 0 12px var(--accent-soft),
    0 20px 44px rgba(255, 95, 151, 0.28);
  transition: box-shadow 0.4s ease;
}
.avatar-wrap:hover #avatar {
  box-shadow:
    0 0 0 8px var(--card),
    0 0 0 12px color-mix(in srgb, var(--accent) 45%, var(--accent-soft)),
    0 26px 54px rgba(255, 95, 151, 0.4);
}

/* little decorative cat ears poking up */
.ear {
  position: absolute;
  top: -6px;
  width: 46px;
  height: 46px;
  background: var(--accent);
  border-radius: 60% 60% 8% 8% / 90% 90% 8% 8%;
  box-shadow: inset 0 -10px 0 -4px color-mix(in srgb, var(--accent-soft) 80%, #fff);
  transform-origin: bottom center;
  animation: earTwitch 4s ease-in-out infinite;
}
.ear-l { left: 34px; transform: rotate(-22deg); }
.ear-r { right: 34px; transform: rotate(22deg); animation-delay: .4s; }
@keyframes earTwitch {
  0%, 92%, 100% { transform: rotate(var(--r, -22deg)); }
  96% { transform: rotate(calc(var(--r, -22deg) + -8deg)); }
}
.ear-l { --r: -22deg; }
.ear-r { --r: 22deg; }

.status-dot {
  position: absolute;
  right: 34px;
  bottom: 26px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #64d78a;
  border: 4px solid var(--card);
  box-shadow: 0 0 0 0 rgba(100, 215, 138, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(100, 215, 138, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(100, 215, 138, 0); }
}

.name {
  margin-top: 30px;
  font-family: "Mochiy Pop One", "Kiwi Maru", serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--accent-deep);
  letter-spacing: 0.01em;
  text-shadow: 0 4px 0 var(--card), 0 6px 16px rgba(255,95,151,0.25);
}
.flower { display: inline-block; animation: spin 6s linear infinite; }

.handle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.tag {
  background: var(--card);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: 0 6px 16px rgba(255,120,170,0.18);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), color 0.3s;
}
.tag:hover { transform: translateY(-4px) rotate(-2deg); color: var(--accent-deep); }

.socials {
  margin-top: 22px;
  display: flex;
  gap: 14px;
}
.social-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: var(--card);
  color: var(--accent-deep);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255,120,170,0.2);
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1), background 0.3s, color 0.3s;
}
.social-btn:hover {
  transform: translateY(-6px) scale(1.08);
  background: var(--accent);
  color: #fff;
}
.social-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--accent-deep);
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.social-btn:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- about card ---------- */
.about { max-width: 520px; width: 100%; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 32px 34px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover { transform: translateY(-6px); }

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.card-head .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff8fa3; }
.dot.amber { background: var(--yellow); }
.dot.green { background: #7fd8a0; }
.card-title {
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: "Kiwi Maru", monospace;
}

.lead { font-size: 1.02rem; line-height: 1.9; }
.lead b { color: var(--accent-deep); }
.soft {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 300;
}

.stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  background: var(--accent-soft);
  border-radius: 18px;
  padding: 16px 8px;
  text-align: center;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.stat:hover { transform: translateY(-4px) scale(1.03); }
.stat .num {
  display: block;
  font-family: "Mochiy Pop One", sans-serif;
  font-size: 1.6rem;
  color: var(--accent-deep);
  line-height: 1;
}
.stat .lbl {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 0 30px;
  color: var(--muted);
  font-size: 0.85rem;
}
.beat { color: var(--accent-deep); display: inline-block; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.35); }
  30% { transform: scale(1); }
}

/* ---------- reveal on load ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  animation: reveal 0.9s cubic-bezier(.22,1,.36,1) forwards;
}
.profile.reveal { animation-delay: 0.1s; }
.about.reveal   { animation-delay: 0.28s; }
.footer.reveal  { animation-delay: 0.5s; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* floating decorative petals */
.petal {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 80% 0 80% 0;
  background: color-mix(in srgb, var(--accent) 60%, #fff);
  opacity: 0.7;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .container {
    flex-direction: column;
    gap: 44px;
    padding: 96px 24px 30px;
  }
  .avatar-wrap { width: 220px; height: 220px; }
  .avatar-tilt { width: 196px; height: 196px; }
  .about { max-width: 100%; }
}

@media (max-width: 420px) {
  .card { padding: 24px 20px 28px; }
  .theme-toggle { top: 18px; right: 18px; width: 46px; height: 46px; }
  .stats { gap: 8px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
