:root {
  --bg: #05060a;
  --bg-2: #0a0c14;
  --panel: rgba(14, 17, 28, 0.62);
  --border: rgba(120, 140, 255, 0.14);
  --text: #e6ecff;
  --muted: #8a93b8;
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --green: #39ff9f;
  --radius: 18px;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 800px at 50% -10%, #0d1230 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.spotlight {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), rgba(0, 240, 255, 0.075), transparent 60%);
  transition: background 0.05s linear;
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative; z-index: 2;
  width: min(880px, 100% - 32px);
  margin: 0 auto;
  padding: 12vh 0 64px;
  display: grid; gap: 56px;
}

/* ---------- hero ---------- */
.hero { text-align: center; display: grid; justify-items: center; gap: 10px; }
.wolf {
  width: 96px; height: 96px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.55));
  animation: float 6s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.wolf:hover { transform: scale(1.06) rotate(-3deg); filter: drop-shadow(0 0 22px rgba(0, 240, 255, 0.9)); }
.wolf:active { transform: scale(0.94); }
.wolf svg { width: 100%; height: 100%; overflow: visible; }
.wolf-head { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linejoin: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.6s 0.2s ease forwards; }
.wolf-eyes { stroke: var(--magenta); stroke-width: 3.5; stroke-linecap: round; animation: blink 5s 2s infinite; transform-origin: center; }
.wolf-nose { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wolf.howl { animation: howl 0.6s ease; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@keyframes howl { 30% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(8deg) scale(1.05); } }

.title {
  position: relative; margin: 0;
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(3rem, 11vw, 6.5rem); letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(100deg, #fff 0%, var(--cyan) 45%, var(--magenta) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(0, 240, 255, 0.35));
}
.title::before, .title::after {
  content: attr(data-text); position: absolute; inset: 0;
  background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; pointer-events: none;
}
.title.glitch::before { opacity: 0.8; animation: glitch-a 0.35s steps(2) both; }
.title.glitch::after  { opacity: 0.8; animation: glitch-b 0.35s steps(2) both; }
@keyframes glitch-a { 0% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, -2px); } 50% { clip-path: inset(50% 0 20% 0); transform: translate(4px, 1px); } 100% { clip-path: inset(80% 0 0 0); transform: translate(-2px, 0); } }
@keyframes glitch-b { 0% { clip-path: inset(60% 0 10% 0); transform: translate(4px, 2px); } 50% { clip-path: inset(15% 0 55% 0); transform: translate(-4px, -1px); } 100% { clip-path: inset(0 0 85% 0); transform: translate(2px, 0); } }

.subtitle { margin: 6px 0 0; font-family: var(--mono); color: var(--muted); font-size: clamp(0.95rem, 2.6vw, 1.15rem); min-height: 1.6em; }
.prompt { color: var(--green); }
.caret { color: var(--cyan); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 22px 26px 26px;
}
.glow-card { --gx: 50%; --gy: 50%; --glow: var(--cyan); overflow: hidden; isolation: isolate; }
.glow-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(380px circle at var(--gx) var(--gy), color-mix(in srgb, var(--glow) 16%, transparent), transparent 55%);
  opacity: 0; transition: opacity 0.3s ease;
}
.glow-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--gx) var(--gy), var(--glow), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s ease;
}
.glow-card:hover::before, .glow-card:hover::after { opacity: 1; }

.card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.card-head .dot { width: 11px; height: 11px; border-radius: 50%; background: #2a2f45; }
.card-head .dot:nth-child(1) { background: #ff5f7a; }
.card-head .dot:nth-child(2) { background: #ffcc4d; }
.card-head .dot:nth-child(3) { background: #39ff9f; }
.card-head h2 { margin: 0 0 0 8px; font: 500 0.9rem var(--mono); color: var(--muted); }

.about-body p { margin: 0 0 12px; font-size: 1.05rem; color: #cfd6f5; }
.about-body strong { color: var(--cyan); font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li {
  font: 0.85rem var(--mono); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.facts li span { color: var(--muted); margin-right: 6px; }

/* ---------- socials ---------- */
.section-title { font: 600 0.95rem var(--mono); color: var(--muted); text-transform: lowercase; margin: 0 0 18px; letter-spacing: 0.05em; }
.section-title span { color: var(--magenta); }
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; perspective: 900px; }
.social {
  --glow: var(--cyan);
  display: grid; justify-items: start; gap: 14px;
  padding: 20px; text-decoration: none; cursor: pointer; text-align: left;
  font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
}
.social:hover, .social:focus-visible {
  border-color: color-mix(in srgb, var(--glow) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 25%, transparent),
              0 10px 40px -8px color-mix(in srgb, var(--glow) 55%, transparent);
  outline: none;
}
.social svg { width: 30px; height: 30px; fill: currentColor; transition: color 0.25s, filter 0.25s, transform 0.25s; transform: translateZ(30px); }
.social:hover svg, .social:focus-visible svg { color: var(--glow); filter: drop-shadow(0 0 10px var(--glow)); }
.social .s-label { font-weight: 700; font-size: 1.05rem; transform: translateZ(20px); }
.social .s-handle { font: 0.82rem var(--mono); color: var(--muted); transform: translateZ(14px); }
.social .s-arrow { position: absolute; top: 16px; right: 18px; color: var(--muted); font-family: var(--mono); transition: transform 0.25s, color 0.25s; }
.social:hover .s-arrow { color: var(--glow); transform: translate(3px, -3px); }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  padding: 24px 16px 40px; font: 0.8rem var(--mono); color: #525a7c;
}
.footer .sep { opacity: 0.5; }
.secret {
  flex-basis: 100%; text-align: center; text-decoration: none; color: var(--green);
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s ease, opacity 0.5s ease, text-shadow 0.3s;
}
.secret.on { max-height: 40px; opacity: 1; text-shadow: 0 0 12px var(--green); }
.secret:hover { text-shadow: 0 0 18px var(--green), 0 0 4px var(--green); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 12px;
  font: 0.9rem var(--mono); color: var(--text);
  background: rgba(14, 17, 28, 0.92); border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 30px -6px rgba(0, 240, 255, 0.6);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-content: center; text-align: center; gap: 12px; }
.notfound .title { font-size: clamp(4rem, 18vw, 9rem); }
.notfound a { font-family: var(--mono); color: var(--cyan); }

@media (max-width: 560px) {
  .wrap { padding-top: 8vh; gap: 40px; }
  .card { padding: 18px; }
  .socials { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .social { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .wolf-head { stroke-dashoffset: 0; }
}
