:root {
  --board: #16301f;
  --board-2: #0e2116;
  --chalk: #f4f7f2;
  --chalk-soft: rgba(244, 247, 242, 0.72);
  --chalk-faint: rgba(244, 247, 242, 0.28);
  --chalk-line: rgba(244, 247, 242, 0.35);
  --accent: #ffd45e;
  --accent-2: #7ee0b8;
  --purple: #b388ff;
  --purple-2: #8b5cf6;
  --purple-deep: #4c1d95;
  --shadow: 0 12px 30px rgba(6, 3, 18, 0.32);
  --glow: 0 12px 34px rgba(139, 92, 246, 0.42);
  --radius: 18px;
  --maxw: 500px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 18px 56px;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--chalk);
  background-color: var(--board);
  background-image:
    radial-gradient(115% 72% at 84% -8%, rgba(139, 92, 246, 0.4), transparent 60%),
    radial-gradient(100% 62% at 46% -2%, rgba(48, 138, 84, 0.62), transparent 62%),
    radial-gradient(130% 85% at 6% 38%, rgba(179, 136, 255, 0.16), transparent 64%),
    linear-gradient(168deg, #1f442b 0%, #16301f 34%, #1b1330 74%, #120c20 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.06) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 41%, rgba(255, 255, 255, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 41% 78%, rgba(255, 255, 255, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 68%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 8% 60%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px);
  background-size: 340px 340px, 420px 420px, 300px 300px, 500px 500px, 380px 380px;
}

.symbols {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.symbols span {
  position: absolute;
  font-family: "Caveat", cursive;
  color: var(--chalk);
  opacity: 0.06;
  animation: float 12s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  user-select: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-18px) rotate(calc(var(--rot, 0deg) + 6deg)); }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.profile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: rise 0.7s ease both;
}

.avatar {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 140deg, var(--purple), var(--accent-2), var(--accent), var(--purple-2), var(--purple));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--glow);
  margin-bottom: 12px;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #244a34;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: "Caveat", cursive;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.name {
  font-family: "Fraunces", "Nunito", serif;
  font-size: clamp(2rem, 7.6vw, 2.55rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.5px;
}

.handle {
  font-weight: 700;
  color: var(--purple);
  font-size: 0.98rem;
  letter-spacing: 0.2px;
}

.bio {
  max-width: 40ch;
  margin-top: 6px;
  color: var(--chalk-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: rise 0.7s ease 0.08s both;
}

.social {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--chalk);
  border: 1.5px solid var(--chalk-faint);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social:hover,
.social:focus-visible {
  transform: translateY(-3px) scale(1.06);
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  border-color: var(--purple);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.5);
}

.social svg {
  width: 22px;
  height: 22px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--chalk-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--chalk);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  animation: rise 0.6s ease both;
  animation-delay: var(--delay, 0s);
  overflow: hidden;
}

.link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.link:hover::after,
.link:focus-visible::after {
  transform: translateX(120%);
}

.link:hover,
.link:focus-visible {
  transform: translateY(-3px);
  border-color: var(--purple);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: 0 14px 30px rgba(76, 29, 149, 0.35);
}

.link-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(179, 136, 255, 0.16);
  color: var(--purple);
  transition: background 0.18s ease, color 0.18s ease;
}

.link:hover .link-icon,
.link:focus-visible .link-icon {
  background: rgba(179, 136, 255, 0.26);
}

.link-icon svg {
  width: 21px;
  height: 21px;
}

.link-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.link-title {
  line-height: 1.2;
}

.link-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--chalk-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  margin-left: auto;
  color: var(--chalk-faint);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link:hover .link-arrow,
.link:focus-visible .link-arrow {
  transform: translateX(4px);
  color: var(--purple);
}

.link.highlight {
  border-color: var(--accent-2);
  background: rgba(126, 224, 184, 0.1);
}

.link.highlight .link-icon {
  background: rgba(126, 224, 184, 0.18);
  color: var(--accent-2);
}

.link.special {
  padding: 18px;
  color: #ffffff;
  border: 1.5px solid transparent;
  background:
    linear-gradient(120deg, #3b1d78 0%, var(--purple-2) 55%, #5b21b6 100%) padding-box,
    linear-gradient(120deg, var(--purple), var(--accent-2) 50%, var(--purple)) border-box;
  box-shadow: var(--glow);
  animation: rise 0.6s ease both, pulseGlow 3.2s ease-in-out infinite;
}

.link.special:hover,
.link.special:focus-visible {
  border-color: transparent;
  background:
    linear-gradient(120deg, #4c1d95 0%, var(--purple-2) 50%, var(--purple) 100%) padding-box,
    linear-gradient(120deg, var(--accent-2), var(--purple) 50%, var(--accent-2)) border-box;
  transform: translateY(-3px) scale(1.015);
}

.link.special .link-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.link.special .link-sub {
  color: rgba(255, 255, 255, 0.85);
}

.link.special .link-arrow {
  color: rgba(255, 255, 255, 0.75);
}

.link.special:hover .link-arrow,
.link.special:focus-visible .link-arrow {
  color: #ffffff;
}

.link-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #2a1a00;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  vertical-align: middle;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 16px 46px rgba(179, 136, 255, 0.78); }
}

.footer {
  text-align: center;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: rise 0.7s ease 0.2s both;
}

.formula {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
  color: var(--chalk-faint);
}

.footer-text {
  font-size: 0.78rem;
  color: var(--chalk-faint);
}

.heart {
  display: inline-block;
  color: #ff6fb5;
  font-size: 0.9rem;
  animation: beat 1.6s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  background: var(--accent);
  color: var(--board-2);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  width: calc(100% - 36px);
  max-width: var(--maxw);
  transform: translate(-50%, 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--chalk-line);
  background: rgba(14, 33, 22, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

.cookie-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.cookie-text {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--chalk-soft);
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--chalk-faint);
  background: transparent;
  color: var(--chalk);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--purple);
}

.cookie-btn.accept {
  border-color: transparent;
  background: linear-gradient(120deg, var(--purple-2), var(--purple));
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  body {
    background-image:
      radial-gradient(130% 55% at 82% -6%, rgba(139, 92, 246, 0.34), transparent 60%),
      radial-gradient(150% 62% at 42% -2%, rgba(48, 138, 84, 0.72), transparent 62%),
      radial-gradient(140% 72% at 8% 40%, rgba(179, 136, 255, 0.14), transparent 64%),
      linear-gradient(168deg, #20492e 0%, #16301f 36%, #1b1330 74%, #120c20 100%);
  }
}

@media (max-width: 420px) {
  body { padding: 28px 14px 44px; }
  .avatar { width: 98px; height: 98px; }
  .link { padding: 14px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
