:root {
  --text: #f4f4f5;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.55);
  --glass: rgba(12, 12, 14, 0.52);
  --glass-border: rgba(255, 255, 255, 0.1);
  --online: #23a55a;
  --idle: #f0b232;
  --dnd: #f23f43;
  --offline: #80848e;
  --join: #248046;
  --join-hover: #1d6b3a;
  --modrinth: #1bd96a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: auto;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
  background: #070708;
}

body {
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.5) 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35));
}

.sound {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: #fff;
}

.sound input[type="range"] {
  width: 0;
  opacity: 0;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
  transition: width 0.28s ease, opacity 0.28s ease, margin 0.28s ease;
}

.sound:hover input[type="range"],
.sound:focus-within input[type="range"] {
  width: 92px;
  opacity: 1;
  margin-left: 14px;
}

#mute {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

#mute svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#mute .icon-off {
  display: none;
}

#mute.is-muted .icon-on {
  display: none;
}

#mute.is-muted .icon-off {
  display: block;
}

#mute:hover,
.sound:hover {
  background: rgba(20, 20, 24, 0.72);
}

#hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 96px;
}

.hero-inner {
  width: min(900px, 100%);
}

.profile {
  display: flex;
  align-items: center;
  gap: 22px;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

#avatar,
.avatar-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1d;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.avatar-fallback {
  background:
    radial-gradient(circle at 35% 30%, #3a3a40, #151518 70%);
}

.status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #111;
  background: var(--offline);
}

.status-dot.online { background: var(--online); }
.status-dot.idle { background: var(--idle); }
.status-dot.dnd { background: var(--dnd); }
.status-dot.offline { background: var(--offline); }

.profile-text h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.diamond {
  font-size: 0.55em;
  vertical-align: middle;
  color: #e8e8ee;
  margin-left: 4px;
}

#status {
  margin: 8px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 500;
}

#joined {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--faint);
}

.widgets {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}

.widget {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  min-width: 0;
  flex: 1 1 210px;
  max-width: 100%;
}

.widget[data-mini],
.widget[data-invite] {
  flex: 1 1 280px;
}

.widget[data-mini] {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  align-items: stretch;
  min-height: 92px;
  background-color: rgba(12, 12, 14, 0.55);
  background-size: cover;
  background-position: center;
}

.presence-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.widget[data-mini][data-banner]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
}

.widget[data-mini] > * {
  position: relative;
  z-index: 1;
}

.presence-av {
  position: relative;
  flex: 0 0 auto;
}

.presence-av .status-dot {
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-color: #111;
}

.widget-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
}

.who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clan-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  height: 18px;
  padding: 0 5px 0 3px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.widget .clan-tag img {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: none;
  flex: 0 0 auto;
}

.widget[data-invite] {
  align-self: flex-start;
  height: auto;
  position: relative;
  overflow: hidden;
  background-color: rgba(12, 12, 14, 0.55);
  background-size: cover;
  background-position: center;
}

.widget[data-invite][data-banner]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.4));
}

.widget[data-invite] > * {
  position: relative;
  z-index: 1;
}

.widget .ph.note {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #e8e8ee;
}

.widget img,
.widget .ph {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #2a2a30;
  flex: 0 0 auto;
}

.widget .ph.circle,
.widget img.circle {
  border-radius: 50%;
}

.widget-copy {
  min-width: 0;
}

.widget-copy strong {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.widget-copy > span,
.widget-copy .sub {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.counts i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.counts .on i { background: var(--online); }
.counts .mem i { background: #fff; }

.rich {
  margin-top: 12px;
  min-width: 0;
}

.rich-label {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.rich-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.rich-art {
  position: relative;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
}

.widget .rich-large {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: #1e1f22;
}

.widget .rich-small {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #111;
  background: #1e1f22;
}

.rich-copy {
  min-width: 0;
  flex: 1;
}

.rich-copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rich-copy > span {
  display: block;
  margin-top: 1px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rich-copy > span.elapsed {
  display: flex;
  align-items: center;
  gap: 5px;
}

.elapsed svg {
  width: 14px;
  height: 14px;
  fill: #3ba55d;
  flex: 0 0 auto;
}

.join {
  margin-left: auto;
  flex: 0 0 auto;
  background: var(--join);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.join:hover {
  background: var(--join-hover);
}

.links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.links a {
  color: #fff;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  opacity: 0.92;
}

.links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.links svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.hero-meta {
  position: absolute;
  left: 22px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.views {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eye {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/></svg>") center / contain no-repeat;
}

.dot-sep {
  opacity: 0.5;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.85;
}

.scroll-hint svg {
  width: 52px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bob 1.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(-14px); }
  50% { transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 72px 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

#projects-page,
#talk {
  min-height: 0;
  align-items: flex-start;
}

#projects-page {
  padding-bottom: 12px;
}

#talk {
  padding-top: 20px;
  padding-bottom: 88px;
}

.work-inner {
  width: min(920px, 100%);
  margin: 0 auto;
}

.page h2 {
  margin: 0 0 28px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}

.modrinth-user {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(560px, 100%);
  margin: 0 auto 28px;
  padding: 14px 16px;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}

.modrinth-user img,
.modrinth-user .ph {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a30;
  flex: 0 0 auto;
}

.modrinth-user strong {
  display: block;
  font-size: 1.05rem;
}

.modrinth-user:hover strong {
  color: var(--modrinth);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.row {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 22px;
  align-items: center;
}

.blurb {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.invite-card,
.project-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  min-width: 0;
}

.invite-card img,
.project-card img,
.invite-card .ph,
.project-card .ph {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  background: #2a2a30;
  flex: 0 0 auto;
}

.invite-card .copy,
.project-card .copy {
  min-width: 0;
  flex: 1;
}

.invite-card strong,
.project-card strong {
  display: block;
  font-size: 0.98rem;
}

.project-card a {
  color: inherit;
  text-decoration: none;
}

.project-card a:hover {
  color: var(--modrinth);
}

.dl {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--faint);
}

.discord-cta {
  width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.discord-cta > p:first-child {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.ask-note {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.copy-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.copy-user code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1rem;
}

.copy-user span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
}

#discord-me {
  display: inline-block;
  border: 0;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  cursor: pointer;
}

#discord-me:hover {
  background: #4752c4;
}

#discord-web {
  display: block;
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .status-dot {
    right: 6px;
    bottom: 6px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    left: 16px;
    right: 16px;
    bottom: 56px;
    font-size: 0.82rem;
    flex-wrap: wrap;
  }

  .scroll-hint {
    bottom: 16px;
  }
}
