/* ============================================================================
   ByteWhat Portfolio - styles
   Content lives in config.js; this file only controls how things look.
   The accent colors are set as CSS variables from config.js at load time.
   ========================================================================== */

/* Dark theme (default). Light theme overrides are right below -
   the navbar toggle flips data-theme on <html>. */
:root {
  --accent: #8b5cf6;
  --accent-2: #6366f1;
  --accent-light: color-mix(in oklab, var(--accent) 55%, #fff);
  --mesh-play: running;
  --mesh-opacity: 1;

  --bg: #0a0a0f;
  --card: #13131a;
  --card-alt: #1a1a24;
  --heading: #ffffff;
  --text: #e6e6ee;
  --text-soft: #a8a8bb;
  --text-muted: #9a9aad;
  --text-dim: #7a7a8e;
  --tag-text: #b8b8c9;
  --footer-text: #55556a;
  --border: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.13);
  --nav-bg: rgba(10, 10, 15, 0.72);
  --gradient-from: #ffffff;
  --thumb-base: #101018;
  --pill-bg: rgba(19, 19, 26, 0.55);
}

:root[data-theme="light"] {
  --accent-light: color-mix(in oklab, var(--accent) 75%, #1a1a2e);
  --mesh-opacity: 0.55;

  --bg: #f5f5f9;
  --card: #ffffff;
  --card-alt: #ececf3;
  --heading: #15151f;
  --text: #23232f;
  --text-soft: #4a4a5e;
  --text-muted: #5f5f75;
  --text-dim: #75758a;
  --tag-text: #4a4a5e;
  --footer-text: #8a8a9c;
  --border: rgba(15, 15, 40, 0.1);
  --border-soft: rgba(15, 15, 40, 0.08);
  --border-strong: rgba(15, 15, 40, 0.16);
  --nav-bg: rgba(245, 245, 249, 0.75);
  --gradient-from: #15151f;
  --thumb-base: #e6e6ef;
  --pill-bg: rgba(255, 255, 255, 0.6);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Light mode gets a soft white -> light blue gradient backdrop
   (fixed to the viewport so it shows at any scroll position) */
[data-theme="light"] body {
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 55%, #d8e8ff 100%);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-light); }

::selection {
  background: color-mix(in oklab, var(--accent) 40%, transparent);
}

/* ---------------- Animated mesh background ---------------- */

.mesh {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: var(--mesh-opacity);
  transition: opacity 0.3s ease;
}

/* Each blob sits in its own layer so the mouse-parallax (js/main.js)
   can move layers without fighting the drift keyframes on the blobs */
.mesh-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  animation-play-state: var(--mesh-play);
}

.mesh-blob-1 {
  top: -180px; left: -120px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 32%, transparent), transparent 70%);
  filter: blur(110px);
  animation: drift1 26s ease-in-out infinite alternate;
  animation-play-state: var(--mesh-play);
}

.mesh-blob-2 {
  top: 20%; right: -220px;
  width: 720px; height: 720px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-2) 26%, transparent), transparent 70%);
  filter: blur(130px);
  animation: drift2 32s ease-in-out infinite alternate;
  animation-play-state: var(--mesh-play);
}

.mesh-blob-3 {
  bottom: -260px; left: 30%;
  width: 680px; height: 680px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%);
  filter: blur(120px);
  animation: drift3 38s ease-in-out infinite alternate;
  animation-play-state: var(--mesh-play);
}

/* Multi-stop paths so the lights wander in curves instead of straight lines */
@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(90px, -50px) scale(1.08); }
  66%  { transform: translate(150px, 40px) scale(1.18); }
  100% { transform: translate(60px, 110px) scale(1.05); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  33%  { transform: translate(-70px, 60px) scale(1); }
  66%  { transform: translate(-140px, -30px) scale(0.92); }
  100% { transform: translate(-40px, 90px) scale(1.02); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(0.95); }
  33%  { transform: translate(70px, -60px) scale(1.05); }
  66%  { transform: translate(-40px, -110px) scale(1.12); }
  100% { transform: translate(80px, -30px) scale(1); }
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.035;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Navbar ---------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.3s ease;
}

/* Full-width bar: brand pinned left, links centered, theme toggle right */
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand links right";
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 24px;
  height: 68px;
  gap: 20px;
}

.brand {
  grid-area: brand;
  justify-self: start;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--heading); }
.brand-accent { color: var(--accent); }

.nav-links {
  grid-area: links;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-link:hover { color: var(--heading); }

.nav-right {
  grid-area: right;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.theme-toggle:hover,
.sound-toggle:hover {
  color: var(--heading);
  border-color: color-mix(in oklab, var(--accent) 55%, transparent);
  transform: translateY(-1px);
}
.theme-toggle svg,
.sound-toggle svg { display: block; }

/* ---------------- Site notice strip ---------------- */

.site-notice {
  position: relative;
  z-index: 9;
  text-align: center;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
}
.site-notice[hidden] { display: none; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  border-radius: 10px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s, background 0.25s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 32px -6px color-mix(in oklab, var(--accent) 80%, transparent);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  color: var(--heading);
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}

.btn-lg { padding: 13px 28px; font-size: 15px; }

.nav-cta {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px -4px color-mix(in oklab, var(--accent) 70%, transparent);
}

/* ---------------- Hero ---------------- */

main { position: relative; z-index: 1; }

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 32px 110px;
  text-align: center;
}

/* the 3D voxel island (drawn by js/voxel.js) */
.voxel-canvas {
  display: block;
  width: min(440px, 86vw);
  height: 300px;
  margin: 0 auto 4px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  margin: 14px 0 26px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

/* "not taking commissions" variant */
.hero-badge-closed {
  border-color: var(--border-strong);
  background: color-mix(in oklab, var(--text-dim) 8%, transparent);
  color: var(--text-muted);
}

.hero-badge-dot-closed {
  background: #f87171;
  box-shadow: 0 0 8px #f87171;
}

.hero-title {
  margin: 0 0 24px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 10vw, 120px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-from) 30%, var(--accent) 75%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 0 auto 44px;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------- Sections (shared) ---------------- */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 32px;
}

.section-contact { padding-bottom: 120px; }

.kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-heading {
  margin: 0 0 40px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.02em;
  color: var(--heading);
}
.section-heading.tight { margin-bottom: 24px; }

/* ---------------- Collapsible sections (collapsed: true in config) ---------------- */

.section-heading.toggle-heading { margin-bottom: 0; }

.section-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-align: left;
  cursor: pointer;
}

.section-plus {
  font-family: "JetBrains Mono", monospace;
  font-size: 30px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.3s;
}
.section-toggle:hover .section-plus { transform: scale(1.15); }
.section-toggle.open .section-plus { transform: rotate(45deg); }

.section-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-body-wrap.open { grid-template-rows: 1fr; }

.section-body-inner {
  overflow: hidden;
  /* side padding + negative margin give box-shadows room without shifting layout */
  padding: 40px 24px 44px;
  margin: 0 -24px;
}

/* ---------------- About ---------------- */

.about-text {
  margin: 0;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
  text-wrap: pretty;
}

/* ---------------- Skills ---------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.skill-card:hover {
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -14px color-mix(in oklab, var(--accent) 30%, transparent);
}

.skill-card h3 {
  margin: 0 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--heading);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--tag-text);
}

/* ---------------- Services ---------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -14px color-mix(in oklab, var(--accent) 30%, transparent);
}

.service-card h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--heading);
}

.service-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------------- Projects ---------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  color: inherit;
  border-color: color-mix(in oklab, var(--accent) 50%, transparent);
  transform: translateY(-5px);
  box-shadow: 0 18px 50px -16px color-mix(in oklab, var(--accent) 35%, transparent);
}

.thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(128, 128, 160, 0.03) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, color-mix(in oklab, var(--accent) 16%, var(--thumb-base)), var(--thumb-base) 70%);
  border-bottom: 1px solid var(--border-soft);
}

.thumb-placeholder span {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-body h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--heading);
}

.project-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
  text-wrap: pretty;
}

.proj-tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-light);
}

/* ---------------- Projects empty state ---------------- */

.projects-empty { text-align: left; }
.projects-empty p {
  margin: 0;
  max-width: 560px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------------- Code showcase ----------------
   The code window intentionally stays dark in light mode, like an editor. */

.code-window {
  max-width: 920px;
  background: #0e0e15;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: #12121b;
}

.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot-r { background: #ff5f57; }
.code-dot-y { background: #febc2e; }
.code-dot-g { background: #28c840; }

.code-filename {
  margin-left: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: #6b6b80;
}

.code-body {
  margin: 0;
  padding: 24px 26px;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: #d8d8e4;
  text-align: left;
  white-space: pre;
}

.code-note {
  max-width: 920px;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
  text-wrap: pretty;
}

.tok-cmt { color: #565669; }
.tok-kw  { color: #a78bfa; }
.tok-str { color: #6ee7b7; }
.tok-fn  { color: #c084fc; }
.tok-bi  { color: #7dd3fc; }
.tok-ty  { color: #7dd3fc; }
.tok-num { color: #fbbf24; }

/* ---------------- Free scripts ---------------- */

.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.script-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.script-card:hover {
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -14px color-mix(in oklab, var(--accent) 30%, transparent);
}

.script-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--heading);
}

.script-file {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.script-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
  text-wrap: pretty;
}

.script-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.script-dl,
.script-view {
  padding: 9px 20px;
  font-size: 13.5px;
}

button.script-view {
  font-family: inherit;
  cursor: pointer;
  background: transparent;
}

/* ---------------- Script preview modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }

.modal-window {
  width: min(920px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.modal-window .code-titlebar { flex: none; }

.modal-body {
  flex: 1;
  overflow: auto;
}

.modal-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #6b6b80;
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #12121b;
}

.modal-foot-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: #6b6b80;
}

/* ---------------- Discord bot demo ----------------
   Deliberately styled like Discord itself (and stays dark in light mode) */

.discord-window {
  max-width: 720px;
  background: #313338;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

.discord-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2b2d31;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  font-weight: 600;
  font-size: 15px;
  color: #f2f3f5;
}
.discord-hash { color: #80848e; font-size: 18px; font-weight: 500; }

.discord-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  max-height: 360px;
  overflow-y: auto;
}

.discord-msg { display: flex; gap: 12px; }

.discord-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}
.discord-avatar.is-bot { background: var(--accent); }

.discord-msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.discord-author { font-weight: 600; font-size: 14.5px; color: #f2f3f5; }
.discord-author.bot { color: #c4b5fd; }

.discord-bot-tag {
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  position: relative;
  top: -1px;
}

.discord-time { font-size: 11.5px; color: #80848e; }

.discord-content {
  margin-top: 3px;
  font-size: 14.5px;
  line-height: 1.45;
  color: #dbdee1;
}

.discord-cmd-text {
  color: #949cf7;
  background: rgba(88, 101, 242, 0.18);
  padding: 1px 5px;
  border-radius: 3px;
}

.discord-embed {
  margin-top: 6px;
  max-width: 440px;
  background: #2b2d31;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
}
.discord-embed-title { font-weight: 600; font-size: 14.5px; color: #f2f3f5; margin-bottom: 4px; }
.discord-embed-line { font-size: 13.5px; color: #dbdee1; line-height: 1.5; }
.discord-embed-footer { margin-top: 8px; font-size: 11.5px; color: #80848e; }

.discord-typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.discord-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80848e;
  animation: typingBounce 1.2s infinite;
}
.discord-typing i:nth-child(2) { animation-delay: 0.15s; }
.discord-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.discord-cmdbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #2b2d31;
  border-top: 1px solid rgba(0, 0, 0, 0.3);
}

.demo-cmd {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #c3c9f8;
  background: #383a40;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.demo-cmd:hover { background: #45474f; transform: translateY(-1px); }

/* ---------------- Commission steps ---------------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: border-color 0.3s, transform 0.3s;
}
.step-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
  transform: translateY(-3px);
}

.step-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--heading);
}

.step-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------------- Testimonials ---------------- */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.3s, transform 0.3s;
}
.testimonial-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
  transform: translateY(-3px);
}

.testimonial-mark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
  line-height: 0.5;
  color: var(--accent);
  margin-top: 10px;
}

.testimonial-card blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--tag-text);
  flex: 1;
  text-wrap: pretty;
}

.testimonial-name { font-weight: 600; font-size: 14px; color: var(--heading); }
.testimonial-role { font-size: 13px; color: var(--text-dim); margin-top: 3px; }

/* ---------------- FAQ ---------------- */

.faq-list {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.25s;
}
.faq-item:hover,
.faq-item[open] {
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--heading);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.25s;
  flex: none;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------------- Contact ---------------- */

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 48px 40px;
  text-align: center;
}

.contact-subtext {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.contact-handle {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--card-alt);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.contact-link:hover {
  color: var(--heading);
  border-color: color-mix(in oklab, var(--accent) 55%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px color-mix(in oklab, var(--accent) 40%, transparent);
}

/* click-to-copy variant renders as a <button> - normalize it */
button.contact-link {
  font-family: inherit;
  cursor: pointer;
}
.contact-link.is-copied {
  border-color: color-mix(in oklab, var(--accent) 70%, transparent);
  color: var(--accent-light);
}

/* ---------------- Custom sections ---------------- */

.custom-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-soft);
  text-wrap: pretty;
}
.custom-body p { margin: 0 0 1em; }
.custom-body p:last-child { margin-bottom: 0; }
.custom-body strong { color: var(--heading); }

/* ---------------- Footer ---------------- */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--footer-text);
}

/* ---------------- Visitor counter ---------------- */

.visit-counter {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 5;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0.45;
  transition: opacity 0.25s;
}
.visit-counter:hover { opacity: 0.95; }

@media (max-width: 720px) {
  .visit-counter { right: 10px; bottom: 10px; font-size: 10.5px; }
}

/* ---------------- Scroll reveal ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 720px) {
  /* brand top-left, toggle top-right, links wrap underneath */
  .nav-inner {
    height: auto;
    min-height: 60px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand right"
      "links links";
    padding: 12px 16px;
    row-gap: 10px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
  }
  .hero { padding: 44px 20px 80px; }
  .voxel-canvas { height: 220px; }
  .section { padding: 64px 20px; }
  .section-contact { padding-bottom: 90px; }
  .panel { padding: 36px 22px; }
  .code-body { padding: 18px; font-size: 12.5px; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh-blob { animation: none; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
