/* ============================================================
   Reset & Base
   ============================================================ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: #fff;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Canvas
   ============================================================ */

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#canvas-container canvas {
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   Title Overlay
   ============================================================ */

#title-overlay {
  position: fixed;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  user-select: none;
  animation: fadeInUp 1.5s ease forwards;
  opacity: 0;
}

#title-overlay h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  opacity: 0.9;
}

#title-overlay p {
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  opacity: 0.45;
  text-transform: uppercase;
}

/* ============================================================
   Email Widget
   ============================================================ */

#email-widget {
  margin-top: 1.1em;
  font-size: clamp(0.65rem, 1.1vw, 0.85rem);
  letter-spacing: 0.1em;
  min-height: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: wrap;
}

#email-trigger {
  opacity: 0.38;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
  pointer-events: all;
}

#email-trigger:hover {
  opacity: 0.75;
}

#email-trigger.hidden {
  display: none;
}

#email-address {
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  text-transform: lowercase;
  transition: color 0.2s ease;
  pointer-events: all;
  min-width: 0;
}

#email-address:hover {
  color: #fff;
}

#email-address.typing::after {
  content: '|';
  animation: blink 0.7s step-end infinite;
}

#email-copied {
  opacity: 0;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-size: 0.75em;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#email-copied.visible {
  opacity: 1;
}



@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   Hint Text
   ============================================================ */

#hint-text {
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  animation: showThenFade 5s ease forwards;
  animation-delay: 1.5s;
}

@keyframes showThenFade {
  0%   { opacity: 0; }
  15%  { opacity: 0.45; }
  70%  { opacity: 0.45; }
  100% { opacity: 0; }
}

/* ============================================================
   Vertex Labels (always-visible, projected from 3D)
   ============================================================ */

.vertex-label {
  position: fixed;
  z-index: 15;
  pointer-events: none;
  transform: translate(-50%, -100%);          /* centre above the dot */
  margin-top: -10px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  white-space: nowrap;
  background: #000;
  padding: 3px 9px;
  transition: color 0.2s ease, opacity 0.3s ease;
  user-select: none;
}

.vertex-label.hovered {
  color: rgba(255, 255, 255, 0.95);
}

.vertex-label.hidden {
  opacity: 0;
}

/* ============================================================
   Hover Label (Tooltip)
   ============================================================ */

#hover-label {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 18px;
  border-radius: 24px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

#hover-label.visible {
  opacity: 1;
}

/* ============================================================
   Popup Overlay
   ============================================================ */

#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#popup-overlay.active {
  opacity: 1;
}

/* ============================================================
   Popup Panel
   ============================================================ */

#popup-panel {
  position: relative;
  background: rgba(16, 16, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 44px 40px 36px;
  max-width: 720px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
  opacity: 0;
}

#popup-overlay.active #popup-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Popup Close Button */

#popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  padding: 4px 8px;
}

#popup-close:hover {
  color: #fff;
  transform: scale(1.15);
}

/* Popup Title */

#popup-title {
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Popup Content */

#popup-content {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-weight: 300;
}

/* ============================================================
   Video Container (16:9)
   ============================================================ */

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Links List
   ============================================================ */

.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.links-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease,
              transform 0.2s ease;
}

.links-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: translateX(4px);
}

.links-list .link-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  opacity: 0.7;
}

/* ============================================================
   Bio Text
   ============================================================ */

.bio-text {
  font-size: 1rem;
  line-height: 1.85;
}

.bio-text p {
  margin-bottom: 1.1em;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Custom Scrollbar
   ============================================================ */

#popup-panel::-webkit-scrollbar {
  width: 4px;
}

#popup-panel::-webkit-scrollbar-track {
  background: transparent;
}

#popup-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
  #title-overlay {
    bottom: 5vh;
  }

  #title-overlay h1 {
    letter-spacing: 0.15em;
  }

  #popup-panel {
    padding: 32px 24px 28px;
    border-radius: 14px;
    width: 94%;
  }

  #popup-title {
    font-size: 1.1rem;
  }

  .links-list a {
    padding: 13px 16px;
    font-size: 0.9rem;
  }
}
