:root {
  --black: #050505;
  --purple: #8b3dff;
  --purple-dark: #5b1fba;
  --panel: rgba(9, 8, 13, 0.78);
  --panel-border: rgba(255, 255, 255, 0.18);
  --text-soft: #d8c8ff;
  --tile: 96px;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #f6f1ff;
  background-color: var(--black);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    conic-gradient(
      from 90deg,
      var(--black) 0deg 90deg,
      var(--purple) 90deg 180deg,
      var(--black) 180deg 270deg,
      var(--purple) 270deg 360deg
    );
  background-size:
    24px 24px,
    24px 24px,
    var(--tile) var(--tile);
  animation: missing-texture-pan 8s linear infinite;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 24rem),
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.44));
}

.locale-control {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(9, 8, 13, 0.72);
  align-items: center;
  backdrop-filter: blur(12px);
}

.locale-control label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.locale-control select {
  max-width: 132px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 5px 26px 5px 8px;
  background: rgba(0, 0, 0, 0.44);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  width: min(1180px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px);
  align-content: start;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.profile-panel {
  display: grid;
  grid-column: span 2;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  padding: clamp(22px, 5vw, 44px);
  align-items: center;
}

.discord-panel,
.socials-panel,
.projects-panel,
.badges-panel {
  display: grid;
  padding: 22px;
  align-items: center;
  justify-items: center;
}

.projects-panel,
.badges-panel {
  grid-column: span 2;
}

.pfp {
  display: grid;
  justify-self: center;
  align-self: center;
  width: clamp(112px, 18vw, 184px);
  height: clamp(112px, 18vw, 184px);
  aspect-ratio: 1;
  border: 2px solid #747f8d;
  border-radius: 8px;
  overflow: hidden;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  box-shadow:
    0 0 24px rgba(116, 127, 141, 0.45),
    inset 0 0 36px rgba(0, 0, 0, 0.5);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.pfp.is-online {
  border-color: #4cff84;
  box-shadow:
    0 0 26px rgba(76, 255, 132, 0.58),
    inset 0 0 36px rgba(0, 0, 0, 0.5);
}

.pfp.is-idle {
  border-color: #ffc857;
  box-shadow:
    0 0 26px rgba(255, 200, 87, 0.58),
    inset 0 0 36px rgba(0, 0, 0, 0.5);
}

.pfp.is-dnd {
  border-color: #ff4f6d;
  box-shadow:
    0 0 26px rgba(255, 79, 109, 0.58),
    inset 0 0 36px rgba(0, 0, 0, 0.5);
}

.pfp.is-offline {
  border-color: #747f8d;
  box-shadow:
    0 0 24px rgba(116, 127, 141, 0.45),
    inset 0 0 36px rgba(0, 0, 0, 0.5);
}

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

.profile-copy {
  text-align: center;
}

.kicker,
.bio,
.section-heading {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.kicker {
  margin: 0 0 12px;
  font-size: clamp(0.78rem, 1.8vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  position: relative;
  display: inline-block;
  isolation: isolate;
  margin: 0;
  color: #f8f2ff;
  text-shadow: none;
  font-size: clamp(3.25rem, 10vw, 8.5rem);
  line-height: 0.9;
  overflow-wrap: anywhere;
  transform: translateZ(0);
}

h1::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: attr(data-title);
  color: transparent;
  -webkit-text-stroke: 1px #d8c8ff;
  text-shadow:
    0 0 4px rgba(216, 200, 255, 0.9),
    0 0 12px rgba(139, 61, 255, 0.76),
    0 0 24px rgba(139, 61, 255, 0.42);
  pointer-events: none;
  transform: translateZ(0);
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1;
}

.tagline {
  max-width: 34rem;
  margin: 18px 0 0;
  font-size: clamp(1rem, 3vw, 1.45rem);
  line-height: 1.45;
}

.bio {
  max-width: 42rem;
  margin: 16px auto 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.activity {
  display: flex;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.activity > div {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.activity > div.is-updating {
  opacity: 0;
  transform: translateY(4px);
}

.activity-title,
.activity-detail {
  margin: 0;
}

.activity-title {
  font-weight: 800;
}

.activity-detail {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.button-grid {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.button-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.button-grid a,
.project,
.site-badge {
  color: #fff;
  text-decoration: none;
}

.button-grid a {
  display: grid;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  place-items: center;
  background: rgba(139, 61, 255, 0.18);
  color: #fff;
  font-weight: 800;
}

.button-grid svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: #fff;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
}

.project {
  display: grid;
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  align-content: space-between;
  justify-items: center;
  text-align: center;
}

.project span {
  font-weight: 900;
}

.project small {
  color: var(--text-soft);
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0;
  justify-content: center;
}

.badge-grid a {
  position: relative;
  display: grid;
  width: 88px;
  height: 31px;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  overflow: visible;
}

.copy-badge {
  cursor: copy;
}

.copy-badge::after {
  position: absolute;
  inset: 0;
  display: grid;
  content: attr(data-copy-label);
  color: #fff;
  place-items: center;
  background: rgba(0, 0, 0, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.copy-badge:hover::after,
.copy-badge:focus-visible::after {
  opacity: 1;
}

.copy-badge[data-copied="true"]::after {
  content: attr(data-copied-label);
  opacity: 1;
}

.badge-grid img {
  display: block;
  width: 88px;
  height: 31px;
}

.site-badge {
  display: grid;
  width: 110px;
  min-height: 34px;
  border: 2px solid #fff;
  place-items: center;
  background: #121212;
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 4px 4px 0 #000;
}

.button-grid a:hover,
.project:hover,
.site-badge:hover {
  border-color: rgba(255, 255, 255, 0.64);
  transform: translateY(-2px);
}

.button-grid a,
.project,
.site-badge {
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

@keyframes missing-texture-pan {
  from {
    background-position:
      0 0,
      0 0,
      0 0;
  }

  to {
    background-position:
      96px 96px,
      96px 96px,
      192px 192px;
  }
}

@media (min-width: 821px) and (min-height: 920px) {
  html,
  body {
    overflow: clip;
  }

  .shell {
    min-height: 100svh;
    align-content: center;
  }
}

@media (min-width: 821px) and (max-height: 919px) {
  .shell {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

@media (max-width: 820px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .shell {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 100svh;
    gap: 14px;
    padding: 18px;
    padding-top: 64px;
  }

  .locale-control {
    top: 10px;
    right: 10px;
  }

  .profile-panel,
  .projects-panel,
  .badges-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 16px;
  }

  .discord-panel,
  .socials-panel,
  .projects-panel,
  .badges-panel {
    padding: 16px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .pfp {
    width: clamp(96px, 34vw, 136px);
    height: clamp(96px, 34vw, 136px);
  }

  h1 {
    font-size: clamp(2.75rem, 16vw, 4.75rem);
  }

  .bio {
    margin-top: 10px;
    font-size: 0.96rem;
  }

  .activity {
    min-height: 70px;
    padding: 12px;
  }

  .activity-title,
  .activity-detail,
  .project small {
    overflow-wrap: anywhere;
  }

  .project {
    min-height: auto;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .locale-control {
    left: 10px;
    right: 10px;
    justify-content: space-between;
  }

  .locale-control select {
    max-width: 54vw;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation-duration: 24s;
  }
}
