:root {
  --bg: #0c1110;
  --bg-elev: #121a18;
  --bg-soft: #18221f;
  --line: rgba(180, 220, 200, 0.12);
  --text: #e8f2ec;
  --muted: #8aa097;
  --accent: #3dff9a;
  --accent-dim: #1fbf6a;
  --accent-ink: #042015;
  --warn: #ffe08a;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 680px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(61, 255, 154, 0.16), transparent 60%),
    radial-gradient(700px 420px at 100% 20%, rgba(255, 224, 138, 0.06), transparent 55%),
    linear-gradient(180deg, #0e1613 0%, var(--bg) 40%, #0a0f0d 100%);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  min-height: 100vh;
  border-inline: 1px solid var(--line);
  background: rgba(12, 17, 16, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(12, 17, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 50%;
  border: 1px solid var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(61, 255, 154, 0.35);
  background: rgba(61, 255, 154, 0.08);
}

.btn-buy {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(61, 255, 154, 0.25), 0 10px 28px rgba(61, 255, 154, 0.18);
}

.btn-buy:hover {
  filter: brightness(1.05);
}

.cover {
  position: relative;
  height: clamp(160px, 28vw, 220px);
  overflow: hidden;
  background: var(--bg-soft);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: coverIn 1.1s ease both;
}

.cover-fade {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(12, 17, 16, 0.85));
}

.identity {
  position: relative;
  padding: 0 16px 20px;
  margin-top: -52px;
}

.avatar-wrap {
  position: relative;
  width: fit-content;
  animation: rise 0.7s ease both;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--line);
}

.online {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px rgba(61, 255, 154, 0.7);
  animation: pulse 2.4s ease infinite;
}

.identity-actions {
  position: absolute;
  top: 64px;
  right: 16px;
  display: flex;
  gap: 8px;
  animation: rise 0.7s ease 0.08s both;
}

.name-block {
  margin-top: 12px;
  animation: rise 0.7s ease 0.12s both;
}

.name-block h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.55em;
  font-weight: 800;
  vertical-align: middle;
}

.handle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.bio {
  margin: 14px 0 0;
  color: #cfe0d6;
  font-size: 1.02rem;
  animation: rise 0.7s ease 0.18s both;
}

.bio strong {
  color: var(--accent);
  font-weight: 700;
}

.meta {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  animation: rise 0.7s ease 0.22s both;
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--muted);
  animation: rise 0.7s ease 0.26s both;
}

.stats strong {
  color: var(--text);
  font-weight: 700;
  margin-right: 4px;
}

.ca-bar {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(61, 255, 154, 0.22);
  background:
    linear-gradient(90deg, rgba(61, 255, 154, 0.08), rgba(255, 224, 138, 0.04)),
    var(--bg-elev);
  animation: rise 0.7s ease 0.3s both;
}

.ca-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

#ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--text);
}

.btn-copy {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(61, 255, 154, 0.12);
  color: var(--accent);
  border: 1px solid rgba(61, 255, 154, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-copy:hover,
.btn-copy.is-copied {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-copy .icon-copy {
  width: 15px;
  height: 15px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 26, 24, 0.6);
  position: sticky;
  top: 64px;
  z-index: 15;
}

.tab {
  position: relative;
  min-height: 48px;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
  animation: tabIn 0.35s ease both;
}

.feed {
  padding-bottom: 40px;
}

.feed.is-hidden {
  display: none;
}

.post {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.55s ease both;
}

.post:nth-child(2) { animation-delay: 0.05s; }
.post:nth-child(3) { animation-delay: 0.1s; }
.post:nth-child(4) { animation-delay: 0.15s; }

.post:hover {
  background: rgba(255, 255, 255, 0.015);
}

.is-pinned {
  background:
    linear-gradient(180deg, rgba(61, 255, 154, 0.06), transparent 48%),
    transparent;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px 52px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pin-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.post-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.post-head img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.post-name {
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.post-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.post-body {
  margin: 10px 0 0 56px;
}

.post-text {
  margin: 0 0 12px;
  font-size: 1.02rem;
  color: #d8e8df;
}

.post-text:last-child {
  margin-bottom: 0;
}

.post-media {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.post-media img {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-media:hover img {
  transform: scale(1.03);
}

.post-media-square img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-height: 420px;
  margin-inline: auto;
}

.post-media-gallery img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-height: 560px;
  background: #050505;
}

.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.roadmap li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.phase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(61, 255, 154, 0.12);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
}

.roadmap strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.roadmap p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-foot {
  display: flex;
  gap: 22px;
  margin: 14px 0 0 56px;
  color: var(--muted);
  font-size: 0.88rem;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
}

.media-cell {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  min-height: 160px;
}

.media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.media-cell:hover img {
  transform: scale(1.05);
}

.media-cell figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.about-list {
  margin: 16px 0 0;
  padding: 14px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: grid;
  gap: 10px;
}

.about-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--warn);
}

.site-foot {
  padding: 24px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px rgba(61, 255, 154, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

@keyframes coverIn {
  from {
    opacity: 0.4;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 255, 154, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(61, 255, 154, 0); }
}

@keyframes tabIn {
  from { transform: scaleX(0.4); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@media (max-width: 560px) {
  .top-actions .btn-ghost span,
  .top-actions .btn-ghost {
    padding-inline: 10px;
  }

  .top-actions .btn-ghost {
    width: 40px;
    padding: 0;
  }

  .top-actions .btn-ghost svg {
    margin: 0;
  }

  /* hide "Follow" text on very small screens — keep icon */
  .top-actions .btn-ghost {
    font-size: 0;
  }

  .top-actions .btn-ghost svg {
    width: 18px;
    height: 18px;
  }

  .identity-actions {
    top: 68px;
  }

  .post-body,
  .post-foot,
  .pin-badge {
    margin-left: 0;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
