:root {
  --bg: #0b0f1a;
  --bg-2: #0e1424;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --accent: #55ffe0;
  --accent-2: #ff4d9a;
  --card: #111a2d;
  --border: #1b2540;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -20%, rgba(85,255,224,0.08), transparent),
              radial-gradient(800px 500px at 100% 0%, rgba(255,77,154,0.06), transparent),
              var(--bg);
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-height: 1.6;
}

.container {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.header { padding: 72px 0 8px; text-align: left; }
.brand {
  font-family: "Space Grotesk", ui-sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 7vw, 72px);
  letter-spacing: 0.02em;
  margin: 0;
}

.bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.fx-grid {
  background-image: linear-gradient(transparent 95%, rgba(255,255,255,0.04) 96%),
                    linear-gradient(90deg, transparent 95%, rgba(255,255,255,0.04) 96%);
  background-size: 24px 24px, 24px 24px;
  mask-image: radial-gradient(1200px 800px at 50% -20%, black, transparent 70%);
}
.fx-noise {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 100 100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.fx-scanline {
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px);
  opacity: 0.04;
}

.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 12px rgba(85,255,224,0.4);
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  clip-path: inset(0 0 0 0);
  opacity: 0.6;
}
.glitch::before {
  color: var(--accent);
  transform: translate(2px, -1px);
  mix-blend-mode: screen;
  animation: glitch-shift 3.2s infinite linear alternate-reverse;
}
.glitch::after {
  color: var(--accent-2);
  transform: translate(-2px, 1px);
  mix-blend-mode: screen;
  animation: glitch-shift 2.6s infinite linear alternate;
}
@keyframes glitch-shift {
  0% { clip-path: inset(0 0 85% 0); }
  10% { clip-path: inset(15% 0 60% 0); }
  20% { clip-path: inset(60% 0 20% 0); }
  30% { clip-path: inset(30% 0 40% 0); }
  40% { clip-path: inset(10% 0 70% 0); }
  50% { clip-path: inset(80% 0 5% 0); }
  60% { clip-path: inset(40% 0 30% 0); }
  70% { clip-path: inset(20% 0 50% 0); }
  80% { clip-path: inset(70% 0 10% 0); }
  90% { clip-path: inset(50% 0 25% 0); }
  100% { clip-path: inset(0 0 85% 0); }
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 18px;
}
.card {
  position: relative;
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center;
  gap: 14px;
  padding: 16px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  box-shadow: 0 8px 24px var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  box-shadow: 0 12px 32px rgba(85,255,224,0.18);
  background: linear-gradient(180deg, rgba(85,255,224,0.06), rgba(255,77,154,0.05));
}
.card__icon { color: var(--accent); display: grid; place-items: center; }
.card__text { font-weight: 600; letter-spacing: .2px; }
.card__hover { position: absolute; inset: 0; pointer-events: none; }

.fx-sweep {
  --angle: 75deg;
  background:
    linear-gradient(var(--angle), transparent 45%, rgba(255,255,255,0.12) 50%, transparent 55%);
  background-size: 200% 200%;
  transform: translateZ(0);
  opacity: 0; transition: opacity .15s ease, background-position .5s ease;
}
.card:hover .fx-sweep { opacity: 1; background-position: 200% 200%; }


.footer {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  color: var(--muted);
  padding: 28px 0 48px;
}
.footer a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed transparent; }
.footer a:hover { color: var(--text); border-bottom-color: var(--accent); }
.footer .dot { opacity: .5; }

/* monospace utility */
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.95rem; }

@media (max-width: 520px) {
  .card { grid-template-columns: 24px 1fr; gap: 12px; }
  .card .card__hover { display: none; }
}
