/* CSS Custom Properties */
:root {
  --header-height: 15vh;
  --nav-height: 100vh;
  --vh: 1vh; /* Will be set by JavaScript for mobile */
  --transition-speed: 200ms;
  --dev-color: #2c3e50;
  --dev-hover-color: #2f3f4f;
  --music-color: #6b562b;
  --music-hover-color: #876e3c;
  --text-color: #d1d1d1;
  --header-text-color: #e1e1e1;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Momo Trust Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  overflow: hidden;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

/* Header Styling */
header {
  height: var(--header-height);
  display: flex;
  top: 0;
  left: 0;
  width: 100%;
  align-items: center;
  justify-content: center;
  background-color: #ffffff00;
  position: fixed;
  z-index: 1000;
}

header h1 {
  font-size: 8rem;
  font-weight: 700;
  color: var(--header-text-color);
  letter-spacing: 0.05em;
  padding-top: 5rem;
  text-shadow:
    2px 2px rgba(0, 0, 0, 0.3),
    4px 4px 4px rgba(0, 0, 0, 0.3);
}

/* benface container - visible by default and draggable */
.benface-container {
  position: absolute;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
  pointer-events: auto;
  margin: 0 auto;
  top: 50vh;
  left: 50vw;
  width: 15rem;
  height: 15rem;
  border: #000000 2px solid;
  border-radius: 50%;
  overflow: visible;
  z-index: 2000;
  box-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.3),
    4px 4px 8px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

/* Curved text SVG styling */
.curved-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 300ms ease;
  animation: pulseGlow 1s infinite;
}

@keyframes pulseGlow {
  0% {
    filter: drop-shadow(0 0 0px #4da3ff);
  }
  50% {
    filter: drop-shadow(0 0 12px #4da3ff);
  }
  100% {
    filter: drop-shadow(0 0 0px #4da3ff);
  }
}

.curved-text.visible {
  opacity: 1;
}

.curved-text-path {
  fill: var(--header-text-color);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow:
    2px 2px rgba(0, 0, 0, 0.3),
    4px 4px 4px rgba(0, 0, 0, 0.3);
}

/* Image wrapper to maintain circular clip */
.benface-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

/* Shrink benface when dragging */
.benface-container.dragging {
  transform: translate(-50%, -50%) scale(0.93);
}

header h1:hover {
  text-shadow:
    2px 2px rgba(0, 0, 0, 0.3),
    4px 4px 4px rgba(0, 0, 0, 0.3);
}

img.benface {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  object-fit: cover; /* preserves aspect ratio, fills box, crops excess */
  object-position: center; /* adjust focal point if needed */
  display: block;
  transition: opacity 200ms ease-in-out; /* smooth transitions between images */
}

/* Navigation Container */
.navigation-container {
  height: var(--nav-height);
  display: flex;
  position: relative;
  overflow: visible;
  transition: all 200ms ease-in-out;
}

/* Navigation Links */
.nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-color);
  font-size: 4rem;
  font-weight: 600;
  transition:
    all var(--transition-speed) ease-in-out,
    transform var(--transition-speed) ease-in-out;
  position: relative;
  text-shadow:
    2px 2px rgba(0, 0, 0, 0.3),
    4px 4px 4px rgba(0, 0, 0, 0.3);
}

.nav-dev {
  background-color: var(--dev-color);
  border-right: #000000 1px solid;
}

.nav-music {
  background-color: var(--music-color);
  border-left: #000000 1px solid;
}

/* Hover States */
.nav-dev:hover {
  background-color: var(--dev-hover-color);
  border-right: #000000 2px solid;
  transform: scale(1.02);
}

.nav-music:hover {
  background-color: var(--music-hover-color);
  border-left: #000000 2px solid;
  transform: scale(1.02);
}

.nav-link span {
  display: inline-block;
  /* transition: all var(--transition-speed) ease-in-out; */
}

.nav-link:hover span {
  /* translate: 0px -10px; */
  letter-spacing: 0.1em;
}

/* Rotating dashed border animation for drop targets */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Drop-target state for circular borders during drag */
.nav-link span.drop-target {
  position: relative;
  border: none;
  border-radius: 50%;
  width: 14rem;
  height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rotating dashed border using pseudo-element */
.nav-link span.drop-target::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 5px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: rotateBorder 15s linear infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.wrapper .nav-link {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* Drag message styling */
.drag-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  font-weight: 700;
  color: var(--header-text-color);
  text-shadow:
    2px 2px rgba(0, 0, 0, 0.3),
    4px 4px 4px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms ease,
    visibility 0s linear 300ms;
  pointer-events: none;
}

.drag-message.visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

@media (max-width: 1024px) {
  header h1 {
    font-size: 6rem;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  header {
    position: absolute;
    background-color: #222e3a;
    box-shadow: 0px 1px 40px 2px #000000df;
    z-index: 500;
  }

  header h1 {
    font-size: 3rem;
    padding-top: 0;
  }

  .nav-link {
    font-size: 2.5rem;
  }

  .drag-message {
    font-size: 3rem;
  }

  /* Stack navigation vertically on small screens */
  .navigation-container {
    flex-direction: column;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    height: calc(var(--vh, 1vh) * 100 - var(--header-height));
  }

  .nav-dev {
    border-right: none;
    border-bottom: #000000 1px solid;
  }

  .nav-music {
    border-left: none;
    border-top: #000000 1px solid;
  }

  .nav-dev:hover {
    border-right: none;
    border-bottom: #000000 2px solid;
  }

  .nav-music:hover {
    border-left: none;
    border-top: #000000 2px solid;
  }

  /* Recenter benface between nav links on small screens */
  .benface-container {
    top: calc(
      var(--header-height) + (var(--vh, 1vh) * 100 - var(--header-height)) / 2
    );
    width: 10rem;
    height: 10rem;
  }

  /* Smaller drop-target circles on small screens */
  .nav-link span.drop-target {
    width: 9rem;
    height: 9rem;
  }

  .nav-link span.drop-target::before {
    border-width: 3px;
  }
}
