*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #C98AEA;
  --surface: rgba(0,0,0,0.15);
  --border: rgba(255,255,255,0.2);
  --text: #fff;
  --muted: rgba(255,255,255,0.6);
  --accent: #fff;
  --gap: clamp(16px, 2.5vw, 32px);
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

.gallery-item,
.thumb-wrap,
.lb-img-wrap {
  -webkit-user-select: none;
  user-select: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Landing cursor & counter ───────────────────────── */

#trailCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Hide system cursor everywhere on landing page */
body.landing-page,
body.landing-page * {
  cursor: none !important;
}

#clickCounter {
  position: fixed;
  bottom: 28px;
  right: 32px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.25);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  user-select: none;
}

#clickCounter.visible {
  opacity: 1;
}

/* ── Landing ─────────────────────────────────────────── */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: 48px;
  padding: var(--gap);
  user-select: none;
  -webkit-user-select: none;
}

/* Sphere wrap */
.logo-sphere-wrap {
  max-width: min(360px, 80vw);
  width: 100%;
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

#logoImg {
  transition: filter 0.08s ease;
}

.logo {
  max-width: min(360px, 80vw);
  width: 100%;
  display: block;
  user-select: none;
  text-decoration: none;
}

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

/* fallback text logo */
.logo-text {
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

.logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  perspective: 500px;
}

.landing-name {
  transform-style: preserve-3d;
}

.landing-name {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.nl {
  display: inline-block;
  transition: color 0.15s ease;
}

.landing-nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Gallery page ────────────────────────────────────── */

.gallery-page {
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(20px, 3vw, 40px) clamp(24px, 5vw, 80px);
  border-bottom: 1px solid var(--border);
}

.site-header .header-right {
  justify-self: end;
}

.header-logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.header-logo img {
  height: 36px;
  width: auto;
  display: block;
  transition: filter 0.08s ease;
}

.header-logo-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  justify-self: start;
}

.header-sphere-wrap {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  cursor: pointer;
}

.header-name {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.header-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-social-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

.header-social-link svg {
  width: 16px;
  height: 16px;
  transition: filter 0.08s ease, color 0.08s ease;
  display: block;
}

.gallery-main {
  flex: 1;
  padding: clamp(32px, 5vw, 72px) clamp(24px, 5vw, 80px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--gap);
}

.gallery-item {
  cursor: pointer;
  group: true;
}

.thumb-wrap {
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition), opacity var(--transition);
}

.gallery-item:hover .thumb-wrap img {
  transform: scale(1.04);
  opacity: 0.85;
}


.thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  background: rgba(0,0,0,0.25);
}

.gallery-item:hover .thumb-overlay { opacity: 1; }

.thumb-overlay svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  stroke-width: 1.5;
  fill: none;
}

.item-caption {
  margin-top: 12px;
  padding: 0 2px;
}

.item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.item-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

/* ── Lightbox ────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 64px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(1100px, 100%);
  max-height: 100%;
  gap: 20px;
}

.lb-img-wrap {
  position: relative;
  width: 100vw;
  height: calc(100dvh - 160px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
  pointer-events: none;
}

.lb-img-wrap img {
  display: block;
  position: absolute;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  border-radius: var(--radius);
  image-rendering: high-quality;
  cursor: default;
}

.lb-img-wrap.zoomed      { cursor: grab; }
.lb-img-wrap.zoomed.drag { cursor: grabbing; }

/* Zoom hint */
.lb-zoom-hint {
  position: fixed;
  bottom: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
  z-index: 10;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Zoom level badge */
.lb-zoom-level {
  position: fixed;
  top: clamp(16px, 3vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lb-caption {
  text-align: center;
  max-width: 600px;
}

.lb-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.lb-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}

.lb-close {
  position: fixed;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--muted);
  transition: color var(--transition);
  line-height: 0;
}

.lb-close:hover { color: var(--accent); }

.lb-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  color: var(--muted);
  transition: color var(--transition);
  line-height: 0;
}

.lb-prev { left: clamp(8px, 2vw, 24px); }
.lb-next { right: clamp(8px, 2vw, 24px); }
.lb-prev:hover, .lb-next:hover { color: var(--accent); }

.lb-prev svg, .lb-next svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.lb-counter {
  position: fixed;
  bottom: clamp(16px, 3vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  z-index: 10;
}

/* ── Social page ─────────────────────────────────────── */

.social-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-items {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 80px;
  padding: 80px 60px 100px;
  flex-wrap: wrap;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.social-cover-slot {
  width: 155px;
  height: 155px;
}

.social-cover-link {
  display: block;
  width: 155px;
  height: 155px;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.4s ease;
}

.social-cover-link:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7), 0 0 14px 3px rgba(255,255,255,0.13);
}

.social-cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.9) brightness(0.85) opacity(0.22);
  transition: filter 0.4s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.social-label {
  margin-top: 14px;
  text-align: center;
}

.social-platform {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.35s ease;
  user-select: none;
}

.social-handle {
  font-size: 9px;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.1em;
  margin-top: 5px;
  transition: color 0.35s ease;
  user-select: none;
}

.social-item:hover .social-platform {
  color: rgba(255,255,255,0.72);
}

.social-item:hover .social-handle {
  color: rgba(255,255,255,0.42);
}

/* ── Social tooltip bubble ───────────────────────────── */

/* Wrapper handles fixed positioning + continuous box animation */
#ttBubbleWrap {
  position: fixed;
  pointer-events: none;
  z-index: 101;
  display: none;
}


/* Bubble handles opacity fade + mouse tilt on top of wrapper animation */
#ttBubble {
  pointer-events: none;
  opacity: 0;
  width: 185px;
  padding: 13px 16px;
  background: transparent;
  border: 2px solid rgba(235, 200, 255, 0.88);
  clip-path: polygon(
    14px 0%, calc(100% - 14px) 0%,
    100% 14px, 100% calc(100% - 14px),
    calc(100% - 14px) 100%, 14px 100%,
    0% calc(100% - 14px), 0% 14px
  );
  transition: transform 0.85s ease;
  transform-origin: center center;
}

#ttText {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.05em;
  line-height: 1.7;
  font-family: inherit;
}

/* ── Bio page ────────────────────────────────────────── */

.bio-main {
  flex: 1;
  padding: clamp(32px, 5vw, 72px) clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.bio-intro {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  max-width: 800px;
}

.bio-photo-wrap {
  flex-shrink: 0;
  width: 180px;
  border-radius: 4px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.4s ease;
  cursor: default;
}

.bio-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.9) brightness(0.85) opacity(0.22);
  transition: filter 0.4s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.bio-photo-wrap:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7), 0 0 10px 2px rgba(255,255,255,0.15);
}

@media (max-width: 600px) {
  .bio-intro {
    flex-direction: column;
    align-items: center;
  }
  .bio-photo-wrap {
    width: 140px;
  }
}

.bio-text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  letter-spacing: 0.01em;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.bio-name {
  font-weight: 700;
}

.bio-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 32px;
}

/* Games grid */
.games-grid {
  display: grid;
  /* Fixed-size covers — they stay a constant size and reflow to fewer/more
     per row instead of stretching with the window. */
  grid-template-columns: repeat(auto-fill, 140px);
  justify-content: center;
  gap: 24px 16px;
}

.game-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.4s ease;
  border-radius: 3px;
}

.game-item:hover {
  box-shadow: 0 0 60px 30px rgba(0,0,0,0.55);
}

.game-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(0,0,0,0.1);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* Default: faded into the purple background */
.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.9) brightness(0.85) opacity(0.22);
  transition: filter 0.4s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* White glow outline on hover */
.game-cover {
  transition: box-shadow 0.4s ease;
}

.game-cover:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7), 0 0 10px 2px rgba(255,255,255,0.15);
}

/* Year overlay — fades in on hover */
.game-year {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-cover:hover .game-year {
  opacity: 1;
}


/* Placeholder shown when image is missing */
.game-cover img[src=""],
.game-cover img:not([src]) {
  visibility: hidden;
}

.game-title {
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.game-title--wrap {
  white-space: normal;
}

.game-item:hover .game-title {
  color: rgba(255,255,255,0.7);
}

@media (max-width: 480px) {
  .games-grid {
    /* Smaller fixed covers on phones so a few fit per row */
    grid-template-columns: repeat(auto-fill, 96px);
    gap: 16px 10px;
  }
}

/* ── Timeline ────────────────────────────────────────── */


/* ── Footer ──────────────────────────────────────────── */

.coming-soon-text {
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 60px 0;
}

.site-footer {
  padding: 24px clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .lb-prev, .lb-next { display: none; }
}
