@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Figtree:wght@400;500;600;700&display=swap");

:root {
  --tpl-fg: #10231f;
  --tpl-muted: #4d6a63;
  --tpl-subtle: #7a958c;
  --tpl-accent: #0d9488;
  --tpl-accent-bright: #2dd4bf;
  --tpl-accent-deep: #0f766e;
  --tpl-ink: #0a1a16;
  --tpl-surface: #f3faf8;
  --tpl-font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --tpl-font: "Figtree", "Segoe UI", system-ui, sans-serif;
  --tpl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tpl-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body.tpl-flexible-classic {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  position: relative;
  color: var(--tpl-fg);
  font-family: var(--tpl-font);
  background-color: #d8ebe6;
  background-image:
    radial-gradient(ellipse 95% 55% at 50% -12%, rgba(45, 212, 191, 0.32), transparent 58%),
    radial-gradient(ellipse 55% 40% at 100% 90%, rgba(13, 148, 136, 0.12), transparent 55%),
    linear-gradient(168deg, #f4fbf9 0%, #e4f3ef 42%, #d5eae4 100%);
}

/* —— Atmosphere —— */
.tpl-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.tpl-aurora {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.48;
}

.tpl-aurora--a {
  top: -18%;
  left: -14%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.45), transparent 68%);
  animation: tpl-aurora-drift 18s ease-in-out infinite;
}

.tpl-aurora--b {
  top: 38%;
  right: -20%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.22), transparent 70%);
  animation: tpl-aurora-drift 22s ease-in-out infinite reverse;
}

.tpl-grid {
  position: absolute;
  inset: -28% -12%;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(13, 148, 136, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at 50% 26%, #000 16%, transparent 74%);
  animation: tpl-grid-drift 24s linear infinite;
}

.tpl-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.tpl-orb--a {
  width: 22rem;
  height: 22rem;
  top: -8rem;
  left: -7rem;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.4), transparent 68%);
  animation: tpl-orb-float 13s ease-in-out infinite;
}

.tpl-orb--b {
  width: 26rem;
  height: 26rem;
  top: 22%;
  right: -11rem;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.18), transparent 70%);
  animation: tpl-orb-float 16s ease-in-out infinite reverse;
}

.tpl-orb--c {
  width: 18rem;
  height: 18rem;
  bottom: -5rem;
  left: 16%;
  background: radial-gradient(circle, rgba(153, 246, 228, 0.55), transparent 72%);
  animation: tpl-orb-float 14s ease-in-out infinite 1s;
}

.tpl-ray {
  position: absolute;
  left: 50%;
  top: -6%;
  width: min(28rem, 90vw);
  height: 60vh;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(45, 212, 191, 0.16) 0%,
    rgba(13, 148, 136, 0.05) 42%,
    transparent 100%
  );
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
  animation: tpl-ray-pulse 5.8s ease-in-out infinite;
}

.tpl-glow {
  position: absolute;
  left: 50%;
  bottom: -10rem;
  width: min(42rem, 135vw);
  height: 20rem;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(13, 148, 136, 0.14), transparent 70%);
}

.tpl-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(45, 212, 191, 0.9) 45%, transparent 70%);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.75);
  animation: tpl-spark-float 7.5s ease-in-out infinite;
  opacity: 0;
}

.tpl-spark--1 { top: 16%; left: 12%; animation-delay: 0s; }
.tpl-spark--2 { top: 28%; right: 14%; animation-delay: 1.1s; }
.tpl-spark--3 { top: 50%; left: 8%; animation-delay: 2.3s; }
.tpl-spark--4 { top: 66%; right: 12%; animation-delay: 0.6s; }
.tpl-spark--5 { top: 38%; left: 24%; animation-delay: 3s; width: 4px; height: 4px; }
.tpl-spark--6 { top: 20%; right: 28%; animation-delay: 1.9s; width: 4px; height: 4px; }

/* —— Shell / page —— */
.tpl-shell {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  width: 100%;
  margin: 0 auto;
  padding: 2.6rem 1.3rem 3.4rem;
}

.tpl-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.55rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* —— Identity —— */
.tpl-identity {
  text-align: center;
  animation: tpl-identity-in 0.95s var(--tpl-ease-out) both;
}

.tpl-avatar-wrap {
  position: relative;
  width: 7.2rem;
  height: 7.2rem;
  margin: 0 auto 1.15rem;
  animation: tpl-avatar-pop 0.9s var(--tpl-ease-out) both;
}

.tpl-avatar-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(45, 212, 191, 0.45);
  animation: tpl-pulse-ring 2.8s var(--tpl-ease) infinite;
}

.tpl-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 160deg,
    rgba(45, 212, 191, 0.08),
    rgba(13, 148, 136, 0.95),
    rgba(45, 212, 191, 0.25),
    rgba(15, 118, 110, 0.9),
    rgba(45, 212, 191, 0.08)
  );
  animation: tpl-ring-spin 8s linear infinite;
}

.tpl-avatar-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(165deg, #f4fbf9, #d8ebe6);
}

.tpl-avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(13, 148, 136, 0.14),
    0 16px 40px rgba(15, 118, 110, 0.2);
  background: linear-gradient(145deg, #5eead4, #0f766e);
}

.tpl-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.tpl-avatar-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--tpl-font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.tpl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  padding: 0.28rem 0.75rem 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: tpl-rise 0.75s var(--tpl-ease-out) 0.12s both;
}

.tpl-kicker-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: tpl-live-pulse 1.8s ease-out infinite;
}

.tpl-kicker-text {
  font-family: var(--tpl-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tpl-accent-deep);
}

.tpl-name {
  margin: 0;
  font-family: var(--tpl-font-display);
  font-size: clamp(1.75rem, 5.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--tpl-ink);
  animation: tpl-rise 0.8s var(--tpl-ease-out) 0.18s both;
}

.tpl-subtitle {
  margin: 0.55rem 0 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--tpl-accent-deep);
  animation: tpl-rise 0.8s var(--tpl-ease-out) 0.26s both;
}

.tpl-flourish {
  display: block;
  width: 4.5rem;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #0f766e, transparent);
  transform-origin: center;
  animation: tpl-flourish-draw 1s var(--tpl-ease-out) 0.34s both;
}

/* —— Story (soft mint panel) —— */
.tpl-story {
  position: relative;
  padding: 1.5rem 1.35rem 1.55rem 1.45rem;
  border-radius: 1.5rem;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.72), rgba(243, 250, 248, 0.88));
  border: 1px solid rgba(13, 148, 136, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(15, 118, 110, 0.1);
  animation: tpl-panel-in 0.85s var(--tpl-ease-out) 0.38s both;
}

.tpl-story::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2dd4bf, #0f766e);
  opacity: 0.9;
}

.tpl-story-sheen,
.tpl-story-corner {
  display: none;
}

@media (min-width: 640px) {
  .tpl-story {
    padding: 1.7rem 1.55rem 1.75rem 1.65rem;
  }
}

.tpl-body {
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: #35564e;
  text-align: left;
  overflow-wrap: anywhere;
}

.tpl-body > *:first-child { margin-top: 0; }
.tpl-body > *:last-child { margin-bottom: 0; }

.tpl-body p {
  margin: 0 0 1rem;
}

.tpl-body p:first-of-type {
  font-size: 1.1rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  color: var(--tpl-ink);
}

.tpl-body a {
  color: var(--tpl-accent-deep);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(13, 148, 136, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tpl-body a:hover {
  color: #0f766e;
  border-bottom-color: rgba(15, 118, 110, 0.75);
}

.tpl-body h1,
.tpl-body h2,
.tpl-body h3,
.tpl-body h4 {
  margin: 1.4rem 0 0.55rem;
  font-family: var(--tpl-font-display);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--tpl-ink);
}

.tpl-body h1 { font-size: 1.35rem; }
.tpl-body h2 { font-size: 1.18rem; }
.tpl-body h3 { font-size: 1.06rem; }
.tpl-body h4 { font-size: 1.02rem; }

.tpl-body h1:first-child,
.tpl-body h2:first-child,
.tpl-body h3:first-child,
.tpl-body h4:first-child {
  margin-top: 0;
}

.tpl-body ul,
.tpl-body ol {
  margin: 0.4rem 0 1.05rem;
  padding: 0;
  list-style: none;
}

.tpl-body li {
  position: relative;
  margin: 0 0 0.55rem;
  padding: 0 0 0 1.2rem;
  color: #2f5249;
}

.tpl-body li:last-child {
  margin-bottom: 0;
}

.tpl-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #2dd4bf, #0f766e);
}

.tpl-body ol {
  counter-reset: tpl-item;
}

.tpl-body ol li {
  counter-increment: tpl-item;
  padding-left: 1.7rem;
}

.tpl-body ol li::before {
  content: counter(tpl-item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--tpl-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--tpl-accent-deep);
}

.tpl-body strong {
  color: var(--tpl-ink);
  font-weight: 700;
}

.tpl-body blockquote {
  margin: 1.1rem 0;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 0.95rem;
  background: rgba(13, 148, 136, 0.08);
  color: var(--tpl-muted);
  font-style: italic;
  box-shadow: inset 3px 0 0 var(--tpl-accent-bright);
}

.tpl-body hr {
  border: 0;
  height: 1px;
  margin: 1.35rem 0;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.4), transparent);
}

.tpl-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.1rem 0;
  border-radius: 1rem;
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.14);
}

.tpl-body code {
  padding: 0.12rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(13, 148, 136, 0.1);
  font-size: 0.9em;
}

.tpl-body pre {
  margin: 1.1rem 0;
  padding: 0.95rem 1rem;
  overflow-x: auto;
  border-radius: 0.95rem;
  background: #0f2a26;
  color: #d1fae5;
  font-size: 0.88rem;
  line-height: 1.55;
}

.tpl-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

/* —— Footer —— */
.tpl-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  color: var(--tpl-subtle);
  animation: tpl-rise 0.7s var(--tpl-ease-out) 0.55s both;
}

.tpl-footer-line {
  display: block;
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.45), transparent);
}

.tpl-footer a {
  color: #3d5a52;
  text-decoration: none;
  font-weight: 650;
}

.tpl-footer a:hover {
  color: var(--tpl-accent);
  text-decoration: underline;
}

/* —— Motion —— */
@keyframes tpl-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -20px) scale(1.04); }
}

@keyframes tpl-aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(38px, 26px) scale(1.08); }
}

@keyframes tpl-ray-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

@keyframes tpl-grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(34px); }
}

@keyframes tpl-spark-float {
  0% { opacity: 0; transform: translateY(8px) scale(0.6); }
  20% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-42px) scale(1); }
}

@keyframes tpl-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes tpl-pulse-ring {
  0% { transform: scale(0.92); opacity: 0.65; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

@keyframes tpl-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes tpl-flourish-draw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes tpl-identity-in {
  from { opacity: 0; filter: blur(6px); transform: translateY(14px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes tpl-avatar-pop {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes tpl-panel-in {
  from { opacity: 0; filter: blur(6px); transform: translateY(18px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@media (max-width: 420px) {
  .tpl-shell {
    padding: 2.25rem 1.1rem 3rem;
  }

  .tpl-avatar-wrap {
    width: 6.4rem;
    height: 6.4rem;
  }

  .tpl-story {
    padding: 1.3rem 1.15rem 1.4rem 1.25rem;
    border-radius: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpl-orb,
  .tpl-aurora,
  .tpl-ray,
  .tpl-grid,
  .tpl-spark,
  .tpl-avatar-ring,
  .tpl-avatar-pulse,
  .tpl-kicker-dot,
  .tpl-identity,
  .tpl-avatar-wrap,
  .tpl-kicker,
  .tpl-name,
  .tpl-subtitle,
  .tpl-flourish,
  .tpl-story,
  .tpl-footer {
    animation: none !important;
  }
}
