@property --flashlight-size {
  syntax: "<length>";
  inherits: true;
  initial-value: 120px;
}

:root {
  --bg: #09090b;
  --text: #9fa1a7;
  --text-dim: #5f6268;
  --nav-link: #54575f;
  --nav-link-opacity: 0.8;
  --nav-link-hover-ms: 380ms;
  --font-main: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --grid-line: rgba(255, 255, 255, 0.12);
  --grid-line-soft: rgba(255, 255, 255, 0.01);
  --grid-faint-line: rgba(255, 255, 255, 0.022);
  --grid-faint-soft: rgba(255, 255, 255, 0.01);
  --mx: 50%;
  --my: 50%;
  --flashlight-size: 120px;
  --ui-fade-ms: 500ms;
  --nav-fade-delay: 0.9s;
  --intro-ease-soft: cubic-bezier(0.45, 0, 0.55, 1);
  --intro-grid-ms: 2s;
  --intro-flashlight-ms: 2.4s;
  --intro-logo-ms: 1.35s;
  --intro-title-ms: 1.25s;
  --intro-title-delay: 0.28s;
  --intro-link-ms: 1.1s;
  --intro-legal-ms: 1s;
  --intro-legal-delay: 1.25s;
  --accent: #5076a8;
  --accent-dim: rgba(80, 118, 168, 0.12);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-hover-border: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  user-select: none;
  -webkit-user-select: none;
}

::-webkit-scrollbar {
  display: none;
}

html {
  scroll-behavior: smooth;
  animation: flashlight-boot var(--intro-flashlight-ms) var(--intro-ease-soft) forwards;
}

@keyframes flashlight-boot {
  from {
    --flashlight-size: 168px;
  }

  to {
    --flashlight-size: 120px;
  }
}

html,
body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  text-transform: lowercase;
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
}

body::before,
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    linear-gradient(var(--grid-faint-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-faint-line) 1px, transparent 1px),
    linear-gradient(var(--grid-faint-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-faint-soft) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px;
  background-position: 0 0, 0 0, 14px 14px, 14px 14px;
  opacity: 0.35;
  animation: grid-reveal var(--intro-grid-ms) var(--intro-ease-soft) 0.12s forwards;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-soft) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px;
  background-position: 0 0, 0 0, 14px 14px, 14px 14px;
  mask-image: radial-gradient(circle var(--flashlight-size) at var(--mx) var(--my), black 0%, black 5%, transparent 0%);
  -webkit-mask-image: radial-gradient(circle var(--flashlight-size) at var(--mx) var(--my), black 0%, black 5%, transparent 50%);
  opacity: 0.35;
  animation: grid-reveal var(--intro-grid-ms) var(--intro-ease-soft) 0.12s forwards;
}

/* ── Hero section ────────────────────────────────── */

#hero {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.wrap {
  width: min(92vw, 680px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  margin-inline: auto;
}

.logo {
  font-size: 200%;
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
  margin-bottom: 5px;
  opacity: 0;
  animation: intro-fade var(--intro-logo-ms) var(--intro-ease-soft) forwards;
}

h1 {
  font-weight: 550;
  letter-spacing: 0.06em;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: 14px;
  padding-inline: 0.06em;
  box-sizing: border-box;
  width: 100%;
  opacity: 0;
  animation: intro-fade var(--intro-title-ms) var(--intro-ease-soft) var(--intro-title-delay) forwards;
}

h1 small {
  font-size: 0.45em;
  font-weight: 450;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  vertical-align: middle;
  margin-left: 0.3em;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  width: 100%;
}

nav:not(.nav-ready) {
  pointer-events: none;
}

nav a {
  color: var(--nav-link);
  opacity: 0;
  transition:
    opacity var(--nav-link-hover-ms) var(--intro-ease-soft),
    color var(--nav-link-hover-ms) var(--intro-ease-soft);
  animation: intro-fade-link var(--intro-link-ms) var(--intro-ease-soft) forwards;
  animation-delay: calc(var(--nav-fade-delay) + var(--link-stagger, 0s));
}

nav a:nth-child(1) {
  --link-stagger: 0s;
}

nav a:nth-child(2) {
  --link-stagger: 0.05s;
}

nav a:nth-child(3) {
  --link-stagger: 0.1s;
}



a {
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.86;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  position: relative;
  display: inline-block;
}

nav a:hover,
nav a:focus-visible {
  opacity: 1;
  color: var(--text);
}

/* ── Projects section ────────────────────────────── */

.projects-section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 120px;
  box-sizing: border-box;
}

.projects-wrap {
  width: min(92vw, 960px);
  max-width: 100%;
  margin-inline: auto;
}

.section-title {
  font-weight: 550;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 6px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-card {
  display: flex;
  gap: 28px;
  padding: 22px 0;
  opacity: 0;
  transform: translateY(22px);
}

.project-card.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 420ms ease, box-shadow 420ms ease;
}



.project-image {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
}

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

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(80, 118, 168, 0.1) 0%, rgba(80, 118, 168, 0.03) 100%);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.project-image-placeholder span {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 0.04em;
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.project-title {
  font-weight: 550;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.project-visit {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 320ms ease, color 320ms ease;
  text-decoration: none;
  width: fit-content;
}

.project-visit:hover,
.project-visit:focus-visible {
  opacity: 1;
  color: #6d8fb8;
}

.project-visit.is-placeholder {
  pointer-events: none;
  opacity: 0.3;
  cursor: default;
}

/* ── Team section ────────────────────────────── */

.team-section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 120px;
  box-sizing: border-box;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
  opacity: 0;
  transform: translateY(20px);
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}

.member-card:hover {
  border-color: var(--accent-dim);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.member-card:active {
  transform: translateY(0) scale(0.98);
}

.member-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.member-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.member-avatar-skeleton {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card-border);
  animation: pulse 1.5s infinite ease-in-out;
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--card-border);
  position: relative;
  z-index: 1;
}

.member-avatar-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  /* Decorations are typically larger than avatars */
  height: 120%;
  pointer-events: none;
  z-index: 2;
}

.member-avatar-decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.member-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3f3f46;
  /* offline */
  border: 3px solid var(--bg);
  transition: background 0.3s ease;
  z-index: 3;
}

.status-online {
  background: #22c55e;
}

.status-idle {
  background: #eab308;
}

.status-dnd {
  background: #ef4444;
}

.status-offline {
  background: #71717a;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.member-name {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.member-username-small {
  font-size: 0.8rem;
  font-weight: 450;
  color: var(--text-dim);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

.member-clan-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}



/* ── Spotify Info ────────────────────────────────── */

.member-spotify {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.spotify-track-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  min-width: 0;
}

.spotify-logo-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.spotify-song {
  font-weight: 550;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-artist {
  color: var(--text-dim);
  opacity: 0.75;
}

.spotify-progress-wrap {
  width: 100%;
}

.spotify-progress-bg {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.spotify-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grid-line);
  border-radius: 4px;
  transition: width 0.3s linear;
}

.spotify-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
  opacity: 0.6;
  margin-top: -2px;
}

.member-activity {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }
}

/* ── Legal ───────────────────────────────────────── */

.legal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 16px 24px;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 100;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  opacity: 0;
  animation: intro-fade var(--intro-legal-ms) var(--intro-ease-soft) var(--intro-legal-delay) forwards;
}

/* ── Ripple & copy hint ──────────────────────────── */

.ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(159, 161, 167, 0.34);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0.55;
  pointer-events: none;
  animation: ripple 620ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  z-index: 5;
}

.copy-hint {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(-2px);
  padding: 2px 6px;
  color: var(--text-dim);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 2;
}

.copy-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Keyframes ───────────────────────────────────── */

@keyframes grid-reveal {
  to {
    opacity: 1;
  }
}

@keyframes intro-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes intro-fade-link {
  from {
    opacity: 0;
  }

  to {
    opacity: var(--nav-link-opacity);
  }
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(14);
    opacity: 0;
  }
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 640px) {
  .project-card {
    flex-direction: column;
    gap: 16px;
  }

  .project-image {
    width: 100%;
    height: 160px;
  }

  .projects-section {
    padding: 60px 18px 80px;
  }
}