:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --fg: #f2f2f0;
  --muted: #a7a3bd;
  --lilac: #b9b2ee;
  --line: rgba(185,178,238,0.45);
  --ease: cubic-bezier(.22,1,.36,1);
  --wave-dot-size: 2.2;
  --wave-cell-size: 120;
  --wave-dot-color: rgba(185,178,238,0.38);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Cabin', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
body > .wave-background { position: fixed; z-index: 0; background: var(--bg); }
body > .wave-background::after { background: radial-gradient(ellipse at center, transparent 40%, var(--bg) 100%); }
.wave-background canvas { mix-blend-mode: normal; }
body > *:not(.wave-background) { position: relative; z-index: 1; }

.wrap {
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  width: min(1000px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.top { padding: 24px 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: 'Asul', serif; font-weight: 700; font-size: 20px; letter-spacing: -1px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.back:hover svg { transform: translateX(-4px); }

main { flex: 1; }

.hero { display: flex; align-items: center; gap: 28px; padding: clamp(40px, 10vh, 100px) 0 clamp(40px, 8vh, 72px); }
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(88px, 14vw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--lilac);
  font-family: 'Asul', serif;
  font-size: clamp(40px, 6vw, 56px);
  color: var(--lilac);
}
.avatar::after {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.role { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
h1 { font-family: 'Asul', serif; font-weight: 400; font-size: clamp(56px, 11vw, 120px); line-height: 1; letter-spacing: -0.04em; }

.section-head { position: relative; display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; margin-bottom: 24px; }
.section-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--lilac); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .3s; }
.section-head.in::after { transform: none; }
.section-head h2 { font-family: 'Asul', serif; font-weight: 400; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; }
.count { font-size: 13px; color: var(--muted); letter-spacing: .1em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 56px 24px;
  position: relative;
  border-radius: 16px;
  background: rgba(11,11,12,0.6);
}
.empty-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.empty-frame rect { fill: none; stroke: var(--line-strong, rgba(185,178,238,.75)); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 6 6; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -12; } }
.empty > svg:not(.empty-frame) { width: 28px; height: 28px; margin-bottom: 8px; fill: none; stroke: var(--lilac); stroke-width: 1.4; stroke-linecap: round; animation: pulse 2.4s var(--ease) infinite; }
.empty-title { font-family: 'Asul', serif; font-size: 24px; }
.empty-text { max-width: 340px; color: var(--muted); font-size: 15px; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 28px 0; margin-top: 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer a { transition: color .3s; }
.footer a:hover { color: var(--fg); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.mask.reveal { opacity: 1; transform: none; overflow: hidden; padding-bottom: .08em; }
.mask.reveal > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: inherit; }
.mask.reveal.in > span { transform: none; }

@media (max-width: 520px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .mask.reveal > span { opacity: 1; transform: none; }
}
