:root {
  --bg: #0b1220;
  --panel: #111b2e;
  --panel-2: #16233b;
  --line: #22324f;
  --ice: #5bc0eb;
  --ice-2: #a8e4ff;
  --text: #e8f1fb;
  --muted: #8ea3bf;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  /* stud pattern background */
  background-image: radial-gradient(circle at 12px 12px, rgba(91,192,235,.07) 6px, transparent 7px);
  background-size: 24px 24px;
}
a { color: inherit; text-decoration: none; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(11,18,32,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: 2px; }
.stud {
  width: 22px; height: 22px; border-radius: 6px; background: var(--ice);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
  position: relative;
}
.stud::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--ice-2); box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 15px; color: var(--muted); }
nav a:hover { color: var(--ice-2); }

.hero { padding: clamp(40px, 8vw, 90px) clamp(16px, 4vw, 48px) 32px; max-width: 1200px; margin: 0 auto; }
.kicker { color: var(--ice); font-weight: 700; text-transform: uppercase; letter-spacing: 3px; font-size: 13px; margin-bottom: 10px; }
h1 { font-size: clamp(36px, 7vw, 72px); line-height: 1.05; font-weight: 900; }
h1 span { color: var(--ice); }
.sub { margin-top: 16px; color: var(--muted); max-width: 520px; font-size: 17px; }

.viewer-wrap {
  max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr 300px; gap: 20px;
}
.stage {
  position: relative; background: radial-gradient(ellipse at 50% 30%, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  min-height: 560px; display: flex; flex-direction: column;
}
model-viewer { width: 100%; flex: 1; min-height: 460px; --poster-color: transparent; background: transparent; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.progress .bar { height: 100%; width: 0; background: var(--ice); transition: width .2s; }
.stage-info {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px; border-top: 1px solid var(--line); background: rgba(11,18,32,.5);
}
.stage-info h2 { font-size: 22px; }
.stage-info p { color: var(--muted); font-size: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(91,192,235,.12); color: var(--ice-2); border: 1px solid rgba(91,192,235,.25); }
.stage-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.stage-tools button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(11,18,32,.7); color: var(--text); font-size: 18px; cursor: pointer;
}
.stage-tools button:hover, .stage-tools button.on { border-color: var(--ice); color: var(--ice-2); }

.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-height: 560px; overflow: auto; }
.list h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 12px; }
.list h3 span { color: var(--ice); }
.list ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list li button {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid transparent; color: var(--text);
  cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px;
}
.list li button small { color: var(--muted); font-size: 12px; }
.list li button:hover { border-color: var(--line); }
.list li button.active { border-color: var(--ice); background: rgba(91,192,235,.1); }

.about, .contact { max-width: 1200px; margin: 0 auto; padding: 70px clamp(16px, 4vw, 48px) 0; }
.about h2, .contact h2 { font-size: 28px; margin-bottom: 12px; }
.about p { color: var(--muted); max-width: 640px; font-size: 17px; }
.links { display: flex; gap: 12px; flex-wrap: wrap; }
.links a { padding: 12px 22px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.links a:hover { border-color: var(--ice); color: var(--ice-2); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 70px 16px 30px; }

@media (max-width: 860px) {
  .viewer-wrap { grid-template-columns: 1fr; }
  .stage { min-height: 440px; }
  model-viewer { min-height: 360px; }
  .list { max-height: none; }
}
