:root {
  --ink: #f7f4ff;
  --muted: #d7d0ea;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  background: #12081f;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #07040f;
}

.sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 32% at 82% 16%, rgba(255, 214, 140, 0.95), transparent 62%),
    radial-gradient(36% 28% at 8% 8%, rgba(90, 50, 210, 0.45), transparent 70%),
    linear-gradient(180deg, #14082c 0%, #4a1578 28%, #d23a78 58%, #ff7a3c 78%, #ffc56a 100%);
  background-size: 130% 130%;
  animation: sky 18s ease-in-out infinite;
}

.sun {
  position: absolute;
  top: 7vh;
  right: -1.5rem;
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e4 0 16%, #ffb15a 36%, rgba(255, 90, 130, 0.28) 62%, transparent 74%);
  animation: glow 7s ease-in-out infinite;
}

.hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
}

.hills path:nth-child(1) { fill: #b85a86; }
.hills path:nth-child(2) { fill: #5a246e; }
.hills path:nth-child(3) { fill: #160a22; }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bar, main, .dock { position: relative; z-index: 1; }

.bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.2rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffe56a;
}

main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem 1.2rem 1rem;
}

.portrait {
  margin: 0.4rem 0 1rem;
  width: 9.2rem;
  height: 9.2rem;
  padding: 0.28rem;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff3d8a, #ffe56a, #3dccc7, #7b5cff, #ff3d8a);
  animation: spin 8s linear infinite;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #12081f;
  animation: spin 8s linear infinite reverse;
}

h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 560;
  font-size: clamp(4rem, 16vw, 8.4rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.row { display: block; }

.hue {
  background: linear-gradient(100deg, #ffe56a, #ff7ad9, #7dfff1, #9b8cff, #ffe56a);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 5s linear infinite;
}

.wave {
  color: #fff;
  font-style: italic;
  animation: rise 1.1s ease both;
}

.role {
  margin: 1rem 0 0;
  color: #7dfff1;
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: rise 1.3s ease both;
}

.dock {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.75rem;
  padding: 0.4rem 1rem 1.2rem;
}

.piece, .mail {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 6rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  color: inherit;
  text-decoration: none;
  background: rgba(18, 8, 31, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.piece { box-shadow: inset 0 0 0 1px rgba(255, 61, 138, 0.35); }
.mail { box-shadow: inset 0 0 0 1px rgba(61, 204, 199, 0.4); }

.piece:hover { background: rgba(255, 61, 138, 0.18); }
.mail:hover { background: rgba(61, 204, 199, 0.16); }

.label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffe56a;
}

.piece-name {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.7rem;
}

.piece-text, .mail span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes sky {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 40% 8%; }
}

@keyframes glow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.95; }
  50% { transform: translate3d(-2vw, 1vh, 0) scale(1.06); opacity: 1; }
}

@keyframes spin { to { transform: rotate(1turn); } }

@keyframes sheen {
  to { background-position: 240% 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.6rem); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .dock { grid-template-columns: 1fr; }
  .portrait { width: 7.4rem; height: 7.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sky, .sun, .portrait, .portrait img, .hue, .wave, .role { animation: none; }
}
