:root {
  --bg: #07030f;
  --bg-soft: #120821;
  --surface: #1a1030;
  --surface-2: #231542;
  --line: #4e2f7d;
  --ink: #f5ecff;
  --muted: #c5b1e6;
  --accent: #b06dff;
  --accent-2: #d2a9ff;
  --radius: 18px;
  --shadow: 0 20px 46px rgba(66, 18, 128, 0.5);
}

* {
  box-sizing: border-box;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
}

*::before,
*::after {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 18% 14%, #4c1a85 0%, transparent 35%),
    radial-gradient(circle at 84% 78%, #2f0f58 0%, transparent 33%),
    linear-gradient(160deg, #07030f 0%, #120821 54%, #1a0d32 100%);
  line-height: 1.55;
  overflow-x: hidden;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none;
}

::selection {
  background: transparent;
  color: inherit;
}

img,
a {
  -webkit-user-drag: none;
}

.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 18% 14%, #4c1a85 0%, transparent 35%),
    radial-gradient(circle at 84% 78%, #2f0f58 0%, transparent 33%),
    linear-gradient(160deg, #07030f 0%, #120821 54%, #1a0d32 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 350ms ease, visibility 350ms ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.page-loader__inner {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  text-align: center;
}

.page-loader__spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(210, 169, 255, 0.22);
  border-top-color: #d2a9ff;
  animation: loaderSpin 1s linear infinite;
}

.page-loader__text {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  color: #e8d4ff;
  font-size: 0.95rem;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.18;
  background-image: radial-gradient(#ffffff 0.42px, transparent 0.42px);
  background-size: 3px 3px;
}

.orb {
  position: fixed;
  width: 460px;
  height: 460px;
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -3;
}

.orb-a {
  top: -130px;
  left: -60px;
  background: #7a2fff;
}

.orb-b {
  right: -90px;
  bottom: -110px;
  background: #57229f;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  width: min(1040px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem;
  border-radius: 999px;
  background: rgba(22, 10, 41, 0.82);
  border: 1px solid rgba(203, 157, 255, 0.3);
  box-shadow: 0 10px 26px rgba(26, 8, 47, 0.5);
  backdrop-filter: blur(12px);
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  border: 1px solid #8d5fd0;
  background: linear-gradient(135deg, #7d37dd, #a35eff);
  overflow: hidden;
}

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

nav {
  display: flex;
  gap: 0.45rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(109, 67, 173, 0.15);
  border: 1px solid rgba(176, 122, 243, 0.24);
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: background 170ms ease, color 170ms ease;
}

nav a:hover {
  background: rgba(190, 139, 255, 0.2);
  color: #fff;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: clamp(2.8rem, 6vw, 5rem) 0 4rem;
}

.hero {
  display: grid;
  gap: 1.3rem;
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.eyebrow {
  margin: 0;
  color: #d4bcf7;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.9rem);
  max-width: 11ch;
}

h1 span {
  color: var(--accent-2);
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.06rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-stats article {
  background: linear-gradient(135deg, #1a1030, #2a1849);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.stat-number {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #f9f1ff;
}

.stat-label {
  margin: 0;
  color: #c0abd8;
  font-size: 0.88rem;
}

.discord-card {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.82rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1b1031, #2b184c);
  box-shadow: var(--shadow);
}

.discord-panel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas:
    "avatar content"
    "spotify spotify";
  width: 100%;
  align-items: start;
  gap: 0.9rem;
  background: linear-gradient(135deg, #21113a, #351b5b);
  border-color: rgba(198, 156, 255, 0.42);
}

.discord-content {
  grid-area: content;
  min-width: 0;
  display: grid;
  gap: 0.32rem;
}

.discord-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.discord-avatar {
  grid-area: avatar;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #8d5fd0;
  box-shadow: 0 8px 20px rgba(88, 35, 161, 0.45);
}

.discord-user {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8efff;
}

.status-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url("assets/discord_state/offline_state.png");
  box-shadow: none;
}

.status-dot.online {
  background-image: url("assets/discord_state/online_state.png");
}

.status-dot.idle {
  background-image: url("assets/discord_state/idle_state.png");
}

.status-dot.dnd {
  background-image: url("assets/discord_state/dnd_state.png");
}

.status-dot.offline {
  background-image: url("assets/discord_state/offline_state.png");
}

.discord-kicker,
.discord-line,
.discord-subline {
  margin: 0;
}

.discord-kicker {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
  color: #bfa3de;
  font-weight: 700;
}

.discord-line {
  color: #f7eeff;
  font-weight: 700;
}

.discord-subline {
  color: #cfb8ec;
  font-size: 0.92rem;
}

.discord-warning {
  margin: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffd7d8;
  background: rgba(180, 40, 48, 0.35);
  border: 1px solid rgba(255, 121, 127, 0.5);
}

.discord-panel.data-stale {
  background: linear-gradient(135deg, rgba(120, 21, 31, 0.84), rgba(159, 35, 44, 0.84));
  border-color: rgba(255, 102, 112, 0.8);
  box-shadow: 0 12px 32px rgba(122, 18, 27, 0.45);
}

.discord-panel.data-stale .discord-kicker,
.discord-panel.data-stale .discord-line,
.discord-panel.data-stale .discord-subline,
.discord-panel.data-stale .discord-user {
  color: #ffe8e9;
}

.hidden {
  display: none !important;
}

.spotify-now {
  grid-area: spotify;
  margin-top: 0.45rem;
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  align-self: stretch;
  padding: 0.45rem;
  border-radius: 12px;
  background: rgba(24, 14, 43, 0.55);
  border: 1px solid rgba(145, 108, 201, 0.38);
}

.spotify-artwork {
  width: auto;
  height: auto;
  max-width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  align-self: stretch;
}

.spotify-meta {
  flex: 1;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.spotify-kicker,
.spotify-song,
.spotify-artist {
  margin: 0;
}

.spotify-kicker {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.22rem;
  padding: 0.25rem 0.32rem 0.25rem 0.26rem;
  border-radius: 8px;
  background: rgba(113, 71, 175, 0.28);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #be9ef2;
  font-weight: 700;
}

.spotify-logo {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1db954;
  flex: 0 0 19px;
}

.spotify-logo svg {
  width: 19px;
  height: 19px;
}

.spotify-song {
  font-size: 0.9rem;
  color: #f3ebff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}

.spotify-song.is-marquee {
  text-overflow: clip;
}

.spotify-song .marquee-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-width: max-content;
  animation: spotifyMarquee var(--marquee-duration, 9s) linear infinite;
}

.spotify-song .marquee-gap {
  padding: 0 1rem;
  opacity: 0.75;
}

@keyframes spotifyMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--marquee-shift, 120px)));
  }
}

.spotify-artist {
  font-size: 0.82rem;
  color: #ceb6ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #b780ff;
  background: linear-gradient(135deg, #9c5dff, #c88cff);
  color: #10051f;
  text-decoration: none;
  font-weight: 800;
  padding: 0.72rem 1.2rem;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  filter: brightness(1.05);
}

.btn.ghost {
  background: rgba(144, 88, 227, 0.14);
  border-color: #7e4fc4;
  color: var(--ink);
}

.site-header .btn.ghost {
  padding: 0.58rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.section {
  margin-bottom: clamp(2.6rem, 6vw, 5rem);
}

.section-head {
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.project-card {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, border-color 220ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #b27df6;
}

.project-card--interactive {
  cursor: pointer;
}

.project-card--interactive:focus-visible {
  outline: 2px solid #d8b8ff;
  outline-offset: 2px;
}

.card-hint {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #b391df;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-details {
  display: none;
}

.project-details-text {
  margin: 0 0 0.55rem;
  font-size: 0.93rem;
  color: #ddcbf6;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(191, 145, 251, 0.45);
  background: rgba(106, 59, 170, 0.26);
  color: #f4e9ff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.72rem;
}

.project-links a[aria-disabled="true"] {
  opacity: 0.62;
}

.project-featured {
  min-height: 280px;
}

.card-tag {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #cdb0f0;
  font-weight: 700;
}

.project-card p,
.project-card ul,
.body-copy {
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feedback-block {
  grid-column: 1 / -1;
}

.contact-links {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.feedback-box {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(190, 145, 250, 0.22);
}

.feedback-box--standalone {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.feedback-toggle {
  min-width: 88px;
  padding-inline: 0.9rem;
}

.feedback-panel {
  margin-top: 0.7rem;
  max-height: 560px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 280ms ease, opacity 220ms ease, margin-top 220ms ease;
}

.feedback-panel.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.feedback-form {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.feedback-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 14px;
  border: 1px solid rgba(194, 151, 255, 0.58);
  background: linear-gradient(180deg, rgba(56, 31, 98, 0.88), rgba(32, 17, 59, 0.9));
  color: #f6ecff;
  padding: 0.74rem 0.86rem;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 20px rgba(18, 7, 33, 0.35);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.feedback-input::placeholder {
  color: rgba(225, 205, 252, 0.72);
}

.feedback-input:focus {
  outline: none;
  border-color: rgba(233, 201, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(190, 141, 255, 0.25), 0 12px 24px rgba(20, 8, 37, 0.45);
}

.feedback-input:-webkit-autofill,
.feedback-input:-webkit-autofill:hover,
.feedback-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f6ecff;
  box-shadow: 0 0 0 1000px rgba(41, 22, 74, 0.96) inset, 0 12px 24px rgba(20, 8, 37, 0.45);
  border-color: rgba(194, 151, 255, 0.58);
  transition: background-color 9999s ease-in-out 0s;
}

.feedback-textarea {
  resize: none;
  overflow: hidden;
  min-height: 46px;
  max-height: 300px;
}

.feedback-status {
  margin: 0.55rem 0 0;
  min-height: 1.2em;
  color: #d6c2ef;
  font-size: 0.9rem;
}

.feedback-status.ok {
  color: #b6ffd3;
}

.feedback-status.err {
  color: #ffc6cc;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(151, 94, 237, 0.15);
  color: #f4e7ff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.icon-link:hover {
  transform: translateY(-2px);
  border-color: #bc90f8;
  background: rgba(171, 115, 255, 0.24);
}

.icon-wrap {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-wrap svg {
  width: 18px;
  height: 18px;
}


.project-card ul {
  padding-left: 1rem;
  margin: 0;
  font-size: 0.93rem;
}

.pill-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill-row span {
  border: 1px solid var(--line);
  background: #1b1033;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  font-size: 0.9rem;
}

a {
  color: #debfff;
}

footer {
  width: min(1120px, 92vw);
  margin: 0 auto;
  color: #b59ad5;
  font-size: 0.91rem;
  padding: 0.5rem 0 2rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.footer-row p {
  margin: 0;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social .icon-link {
  padding: 0.34rem 0.62rem;
  font-size: 0.78rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader__spinner {
    animation: none;
  }
}

@media (max-width: 940px) {
  .project-grid,
  .hero-stats,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    top: 8px;
    width: min(94vw, 720px);
    padding: 0.5rem;
    border-radius: 20px;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .logo {
    display: none;
  }

  nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
  }

  nav a {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.48rem 0.4rem;
  }

  .site-header .ghost {
    display: none;
  }

  main {
    width: min(94vw, 720px);
    padding-top: clamp(2.2rem, 8vw, 3.2rem);
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3.3rem);
    max-width: 100%;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
    text-align: center;
  }

  .discord-card {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: 95vw;
  }

  nav {
    padding: 0.2rem;
  }

  nav a {
    font-size: 0.78rem;
    padding: 0.45rem 0.2rem;
  }

  .hero {
    gap: 1rem;
  }

  .section {
    margin-bottom: 2.2rem;
  }

  .project-card,
  .discord-card {
    padding: 1rem;
  }

  .discord-panel {
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-areas:
      "avatar content"
      "spotify spotify";
    gap: 0.7rem;
  }

  .status-dot {
    margin-left: auto;
  }

  .spotify-now {
    margin-top: 0.45rem;
  }

  .contact-links {
    width: 100%;
  }

  .icon-link {
    flex: 1;
    justify-content: center;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-social {
    width: 100%;
  }

  .footer-social .icon-link {
    flex: 1;
    justify-content: center;
  }

}
