:root {
  --bg: #0f1115;
  --surface: #181b22;
  --border: #272b35;
  --text: #e8e6e3;
  --muted: #8b909c;
  --accent: #e0a458;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
body.has-mini { padding-bottom: 84px; }

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(224, 164, 88, .12), transparent 70%),
    radial-gradient(35% 35% at 80% 70%, rgba(94, 234, 212, .07), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(5%, 4%, 0) scale(1.1); } }

/* ---------- header & logo ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: rgba(15, 17, 21, .75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.logo .word { display: flex; align-items: baseline; gap: .35rem; line-height: 1; }
.logo strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .2em;
  background: linear-gradient(135deg, #f6d8a8, #e0a458 55%, #c9822f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo em { font-size: 1.35rem; font-style: normal; font-weight: 300; letter-spacing: .1em; color: var(--text); }

.bars { display: flex; align-items: center; gap: 3px; height: 28px; }
.bars i { width: 3px; border-radius: 2px; background: var(--accent); }
.bars i:nth-child(1) { height: 10px; }
.bars i:nth-child(2) { height: 20px; }
.bars i:nth-child(3) { height: 28px; }
.bars i:nth-child(4) { height: 16px; }
.bars i:nth-child(5) { height: 8px; }

nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  padding-bottom: 4px;
  transition: color .2s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--accent); }
nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
nav a:hover::after, nav a.active::after { transform: scaleX(1); }

/* ---------- layout ---------- */
main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem; }
h2 { color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; }

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 2rem 0 .25rem;
  background: linear-gradient(90deg, var(--accent), #f6d8a8, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero p { color: var(--muted); font-size: 1.15rem; margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card h3 { margin: 0; }
.meta { color: var(--muted); font-size: .85rem; margin: .15rem 0 .75rem; }

.hero, .card {
  animation: rise .6s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    border-color: rgba(224, 164, 88, .5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  }
  .work:hover { transform: none; box-shadow: none; }
}

/* ---------- play button, waveform, icons ---------- */
.play {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1305;
  font-size: .75rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s, filter .15s;
}
.play:hover { transform: scale(1.08); filter: brightness(1.1); }
.play.playing { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 164, 88, .5); }
  100% { box-shadow: 0 0 0 16px rgba(224, 164, 88, 0); }
}

.wave { min-width: 0; height: 36px; cursor: pointer; }
.wave canvas { display: block; width: 100%; height: 100%; }
.time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dl, .more, .icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.dl:hover, .more:hover, .icon:hover { color: var(--accent); background: rgba(224, 164, 88, .12); }
.icon:disabled { opacity: .35; cursor: default; background: transparent; color: var(--muted); }
.more svg { transition: transform .25s; }
.more.open { color: var(--accent); }
.more.open svg { transform: rotate(180deg); }
.dl:focus-visible, .more:focus-visible, .icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- compact music row ---------- */
.work {
  display: grid;
  grid-template-columns: 36px minmax(120px, 200px) 1fr auto auto auto;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  margin-bottom: .5rem;
}
.work.current { border-color: rgba(224, 164, 88, .45); }
.work .info { min-width: 0; }
.work h3 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work .meta { margin: 0; font-size: .75rem; }
.work .time { min-width: 3ch; text-align: right; }
.work .desc { grid-column: 1 / -1; margin: .15rem 0 .25rem; color: var(--muted); font-size: .9rem; }

/* ---------- mini player ---------- */
.mini {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-areas: "prev play next info wave time";
  grid-template-columns: auto auto auto minmax(120px, 220px) 1fr auto;
  align-items: center;
  gap: .5rem .75rem;
  padding: .6rem 1.25rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(24, 27, 34, .92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.mini[hidden] { display: none; }
.m-prev { grid-area: prev; }
.m-play { grid-area: play; width: 44px; height: 44px; font-size: .85rem; }
.m-next { grid-area: next; }
.m-info { grid-area: info; min-width: 0; line-height: 1.25; }
.m-info strong, .m-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-info span { color: var(--muted); font-size: .75rem; }
.m-wave { grid-area: wave; }
.m-time { grid-area: time; text-align: right; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- games ---------- */
.game { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; }
.game img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; background: var(--border); }

.btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .4rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  transition: background .2s, color .2s, transform .15s;
}
.btn:hover { background: var(--accent); color: #1a1305; transform: translateY(-1px); }
button.btn { background: transparent; cursor: pointer; font: inherit; }

/* ---------- contact ---------- */
.lead { color: var(--muted); }
.contact { display: grid; gap: 1rem; }
.contact label { display: grid; gap: .35rem; color: var(--muted); font-size: .9rem; }
.contact input, .contact textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem .9rem;
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.contact input:focus, .contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 164, 88, .2);
}
.contact .btn { justify-self: start; }
.status { margin: 0; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: .85rem; }
footer .privacy { max-width: 60ch; margin: .5rem auto 0; font-size: .75rem; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  body.has-mini { padding-bottom: 130px; }
  body::before { animation: none; }

  header { position: static; flex-direction: column; align-items: stretch; gap: .5rem; padding: .85rem 1rem; }
  .logo { align-self: center; }
  .logo strong, .logo em { font-size: 1.15rem; }
  nav { display: flex; justify-content: space-between; }
  nav a { margin: 0; padding: .55rem .5rem; }
  nav a::after { bottom: 0; }

  main { padding: 1.25rem 1rem; }
  .card { padding: 1rem; }
  .game { grid-template-columns: 1fr; }

  .work { grid-template-columns: 36px 1fr auto auto; gap: .5rem .6rem; padding: .7rem .85rem; }
  .work .wave { grid-column: 1 / 4; grid-row: 2; }
  .work .time { grid-column: 4; grid-row: 2; }
  .dl, .more, .icon { width: 40px; height: 40px; }

  .mini {
    grid-template-areas: "play info prev next" "wave wave wave time";
    grid-template-columns: auto 1fr auto auto;
    padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  }
}

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