/* Font Faces */
@font-face {
  font-family: 'Akzidenz Grotesk';
  src: url('../fonts/AkzidenzGroteskStd-Md.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Apercu Mono';
  src: url('../fonts/Apercu Mono.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background-color: #000;
  background-image: url('https://unpkg.com/three-globe/example/img/night-sky.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Container */
.container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero Section - positioned at bottom */
.hero {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 2rem;
  max-width: 900px;
}

.hero-text {
  font-family: 'Apercu Mono', monospace;
  font-weight: normal;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  letter-spacing: 0;
  line-height: 1.5;
  color: #ffffff;
}

/* Globe Container - positioned so globe center is at bottom 1/5 of screen */
.globe-container {
  width: 100vw;
  height: 160vh;
  position: absolute;
  top: 0;
  left: 0;
}

/* Mobile Map Container */
.mobile-map-container {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

/* HUD Marker Styles
   Globe.gl sets an inline style.transform on this element to position it,
   which overrides any CSS transform. So the element's top-left lands at the
   lat/lng screen coordinate. The dot is the only in-flow child (height = 8px).
   The popup is absolutely positioned above using bottom: 100%. */
.hud-marker {
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
}

.hud-marker:hover {
  z-index: 20;
}

/* Floats above the dot — label at top, thumbnails below, connector at bottom */
.hud-marker-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.marker-label {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: #FFFFFF;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-align: center;
}

.connector-line {
  width: 1px;
  height: 0;
  background: #FFFFFF;
  box-shadow: 0 0 4px rgba(0, 255, 0, 0.6);
  animation: drawLine 0.6s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes drawLine {
  from { height: 0; }
  to { height: 25px; }
}

.marker-dot {
  width: 8px;
  height: 8px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.8), 0 0 4px rgba(0, 255, 0, 1);
  margin-top: 4px;
}

.thumbnail-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: calc(var(--delay, 0s) + 0.6s);
}

.project-thumb {
  display: block;
  width: 75px;
  height: 75px;
  border: 1px solid #FFFFFF;
  overflow: hidden;
  transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
  background: #111;
}

.project-thumb:hover {
  width: 150px;
  height: 150px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Coming-soon placeholder dots */
.coming-soon-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: default;
  z-index: 0;
}

.coming-soon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #808080;
}

.coming-soon-label {
  font-family: 'Apercu Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #808080;
  white-space: nowrap;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.coming-soon-marker:hover .coming-soon-label {
  opacity: 1;
}

/* Ensure LA marker renders in front of LV */
.hud-marker[data-city-id="inglewood"] {
  z-index: 10 !important;
}

/* Zoomable city indicator */
.marker-label.zoomable::after {
  content: ' +';
  opacity: 0.6;
}

/* Zoomed state - thumbnails spread */
.hud-marker.zoomed .thumbnail-row {
  flex-direction: column;
}

/* Two-project city: popup self-centers via left:50%/translateX(-50%) — no extra offset needed */

/* Back button for zoomed state */
.zoom-back-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  font-family: 'Apercu Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #FFFFFF;
  padding: 10px 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.zoom-back-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.zoom-back-btn:hover {
  background: rgba(0, 255, 0, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

/* Mobile Map Styles */
.mobile-map {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 120px;
}

.mobile-map .map-bg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.map-overlay {
  position: absolute;
  top: 120px;
  left: 0;
  width: 100%;
  height: calc(100% - 120px);
}

.city-marker {
  cursor: pointer;
}

.city-marker circle {
  fill: #FFFFFF;
  filter: drop-shadow(0 0 6px rgba(0, 255, 0, 0.8));
}

.city-marker text {
  font-family: 'Apercu Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  fill: #FFFFFF;
  text-anchor: middle;
}

.marker-pulse {
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    r: 6;
    opacity: 1;
  }
  50% {
    r: 10;
    opacity: 0.7;
  }
}

/* Mobile modal for project selection */
.mobile-project-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border-top: 1px solid #FFFFFF;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 100;
}

.mobile-project-modal.open {
  transform: translateY(0);
}

.mobile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mobile-modal-title {
  font-family: 'Apercu Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  color: #FFFFFF;
}

.mobile-modal-close {
  font-family: 'Apercu Mono', monospace;
  font-size: 20px;
  color: #FFFFFF;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #FFFFFF;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s ease;
}

.mobile-project-item:hover {
  background: rgba(0, 255, 0, 0.1);
}

.mobile-project-item img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border: 1px solid #FFFFFF;
}

.mobile-project-item span {
  font-family: 'Apercu Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 1024px) {
  .globe-container {
    display: none;
  }

  /* Mobile map replaced by projects list as homepage */
  .mobile-map-container {
    display: none;
  }

  /* Full-width dropdown panels on mobile — use left+right instead of width */
  #dropdown-projects {
    left: 0;
    right: 0;
    width: auto;
    border-right: none;
  }

  #dropdown-about {
    left: 0;
    right: 0;
    width: auto;
  }

  /* Hide globe-only footer toggles on mobile */
  #toggle-projects,
  #toggle-photos {
    display: none;
  }

  /* Hide header PROJECT MENU button on mobile — it lives in the footer instead */
  #btn-projects {
    visibility: hidden;
  }

  /* Hide back-to-globe in the footer on mobile — JS sets inline display so !important is needed */
  #btn-back-to-globe {
    display: none !important;
  }

  /* Remove photo journal from mobile — too heavy to load */
  a.mobile-footer-btn {
    display: none;
  }

  /* Show mobile footer nav */
  #site-footer {
    justify-content: space-between;
  }

  /* Higher specificity to beat the base display:none rule below */
  #site-footer .mobile-footer-btn {
    display: flex;
  }

  /* Compact personal projects section so more project list is visible */
  .personal-projects-header {
    padding: 12px 1.5rem;
  }

  .personal-project-link {
    padding: 10px 1.5rem;
  }

  .personal-project-link:last-child {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero-text {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }
}

/* ==========================================
   Splash Screen
   ========================================== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease;
}

#splash.splash-hiding {
  opacity: 0;
  pointer-events: none;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background-image: url('../public/splash.gif');
  background-size: cover;
  background-position: center;
}

.splash-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.splash-enter {
  font-family: 'Apercu Mono', monospace;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, text-shadow 0.2s;
}

.splash-enter:hover {
  color: #00ff00;
  text-shadow: 0 0 12px rgba(0, 255, 0, 0.6);
}

.splash-sound {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.splash-sound:hover {
  opacity: 1;
}

.splash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  display: inline-block;
  margin: 0 2px;
  transition: background 0.2s, box-shadow 0.2s;
}

.splash-dot--on {
  background: #00ff00;
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
}

.splash-sound .toggle-label {
  margin-left: 6px;
}

/* Loading state */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Apercu Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  color: #FFFFFF;
  z-index: 5;
}

.loading::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ==========================================
   CSS Variables
   ========================================== */
:root {
  --header-height: 44px;
  --footer-height: 44px;
}

/* ==========================================
   Site Header
   ========================================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #000;
  border-bottom: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 200;
}

.header-title {
  font-family: 'Apercu Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.header-btn {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  padding: 4px 0;
  transition: color 0.2s, text-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.header-btn:hover,
.header-btn.active {
  color: #00ff00;
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

/* ==========================================
   Dropdowns
   ========================================== */
.dropdown {
  position: fixed;
  top: var(--header-height);
  bottom: var(--footer-height);
  width: 20vw;
  background: #000;
  z-index: 190;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) !important;
}

/* Projects: slides in from the left */
#dropdown-projects {
  left: 0;
  border-right: 1px solid #fff;
  transform: translateX(-12px);
}

/* About: slides in from the right */
#dropdown-about {
  right: 0;
  border-left: 1px solid #fff;
  transform: translateX(12px);
}

/* Projects dropdown */
.dropdown-list {
  display: flex;
  flex-direction: column;
}

.dropdown-list a {
  display: flex;
  flex-direction: column;
  font-family: 'Apercu Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 20px 2rem;
  border-bottom: 1px solid #fff;
  transition: background 0.15s, color 0.15s;
}

.dropdown-list a .project-name {
  font-size: 12px;
}

.dropdown-list a .project-location {
  font-size: 10px;
  opacity: 0.5;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdown-list a:hover {
  background: #fff;
  color: #000;
}

.dropdown-list a:hover .project-location {
  opacity: 0.5;
  color: #000;
}

/* Personal Projects section — pinned to bottom of projects dropdown */
#dropdown-projects {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dropdown-projects .dropdown-list {
  flex: 1;
  overflow-y: auto;
}

.personal-projects {
  flex-shrink: 0;
}

.personal-projects-header {
  font-family: 'Apercu Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 20px 2rem;
  border-bottom: 1px solid #fff;
}

.personal-project-link {
  display: flex;
  align-items: center;
  padding: 20px 2rem;
  border-bottom: 1px solid #fff;
  text-decoration: none;
  transition: background 0.15s;
}

.personal-project-link:hover {
  background: #fff;
}

.personal-project-logo {
  height: 18.7px;
  width: auto;
  display: block;
  position: relative;
  top: -2px;
}

.personal-project-logo--catalogue {
  height: 32.3px;
}

.personal-project-link:last-child {
  padding-top: 28px;
  padding-bottom: 28px;
}

.personal-project-link:hover .personal-project-logo {
  filter: invert(1);
}

/* About dropdown */
.dropdown-about-content {
  padding: 3rem 2rem;
  font-family: 'Apercu Mono', monospace;
  font-size: 13px;
  line-height: 1.9;
  color: #fff;
  max-width: 720px;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.about-contact-btn {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border: 1px solid #fff;
  padding: 8px 16px;
  background: #000;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.about-contact-btn:hover {
  background: #fff;
  color: #000;
}

.about-linkedin {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.about-linkedin:hover {
  opacity: 1;
}

/* ==========================================
   Site Footer
   ========================================== */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: #000;
  border-top: 1px solid #fff;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 200;
  gap: 2rem;
}

.footer-toggle {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  text-transform: uppercase;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
}

.toggle-bracket {
  opacity: 0.6;
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  background: transparent;
  transition: background 0.2s, box-shadow 0.2s;
}

/* Projects: green dot when active */
#toggle-projects .toggle-dot.visible {
  background: #00ff00;
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
}

/* Photo Journal: red dot when active */
#toggle-photos .toggle-dot.visible {
  background: #ff3333;
  box-shadow: 0 0 6px rgba(255, 51, 51, 0.8);
}

.toggle-label {
  margin-left: 6px;
}

.mobile-footer-btn {
  display: none;
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
  align-items: center;
  transition: color 0.2s;
}

.mobile-footer-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   Footer Audio Player (desktop only)
   ========================================== */
.audio-player {
  /* Left edge aligned with the About dropdown column */
  position: absolute;
  left: calc(100vw - 20vw);
  right: 1.5rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-btn {
  font-family: 'Apercu Mono', monospace;
  font-size: 14px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s;
  letter-spacing: 0;
  line-height: 1;
}

.audio-btn:hover {
  opacity: 1;
  color: #00ff00;
}

.audio-track-info {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.audio-artist-block {
  font-family: 'Apercu Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.audio-sep {
  color: rgba(255, 255, 255, 0.3);
}

.audio-title-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.audio-title-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2rem;
  background: linear-gradient(to right, transparent, #000);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.audio-title-wrap.is-overflowing::after {
  opacity: 1;
}

.audio-title {
  font-family: 'Apercu Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  display: block;
  transition: color 0.15s;
}

.audio-title:hover {
  color: #00ff00;
}

@media (max-width: 1024px) {
  .audio-player { display: none; }
}

/* ==========================================
   SPA Iframe Overlay — Back to Globe button
   ========================================== */
.btn-back-to-globe {
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00ff00;
  text-decoration: none;
  white-space: nowrap;
  transition: text-shadow 0.2s;
}

.btn-back-to-globe:hover {
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

/* ==========================================
   All Photos Button
   ========================================== */
.btn-all-photos {
  position: fixed;
  bottom: calc(var(--footer-height) + 1rem);
  left: 1.5rem;
  z-index: 150;
  font-family: 'Apercu Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  display: none;
  transition: color 0.2s;
}

.btn-all-photos:hover {
  color: rgba(255, 255, 255, 0.7);
}

.btn-all-photos.visible {
  display: block;
}

/* ==========================================
   SPA Iframe Overlay — hide duplicate chrome
   ========================================== */
.in-overlay #site-header,
.in-overlay #site-footer,
.in-overlay #dropdown-projects,
.in-overlay #dropdown-about,
.in-overlay .btn-all-photos {
  display: none;
}

/* ==========================================
   Globe Marker Highlight State
   ========================================== */
.hud-marker.marker-highlighted .marker-label {
  color: #00ff00;
  text-shadow: 0 0 12px rgba(0, 255, 0, 1), 0 0 24px rgba(0, 255, 0, 0.6);
}

.hud-marker.marker-highlighted .connector-line {
  background: #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 1);
}

.hud-marker.marker-highlighted .marker-dot {
  background: #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 1), 0 0 6px rgba(0, 255, 0, 1);
  transform: scale(1.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.hud-marker.marker-highlighted .project-thumb {
  opacity: 0.3;
  transition: opacity 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-thumb.thumb-highlighted {
  opacity: 1 !important;
  box-shadow: 0 0 16px rgba(0, 255, 0, 0.7);
  border-color: rgba(0, 255, 0, 0.8);
}

/* ==========================================
   Photo Journal Globe Markers
   ========================================== */

/* Only the dot is in normal flow — its bottom is the globe anchor (lat/lng).
   The popup is absolutely positioned above the dot. */
.photo-hud-marker {
  position: relative;
  align-items: center;
}

/* Remove top margin so element height = exactly 8px (dot only),
   ensuring translate(-50%, -100%) pins the dot to the lat/lng. */
.photo-hud-marker .marker-dot {
  margin-top: 0;
}

/* Popup sits above the dot: bottom aligns to the dot's top edge */
.photo-hud-marker .photo-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

/* Thumbnail: no top margin (thumbnail sits above connector, not below) */
.photo-hud-marker .thumbnail-row {
  margin: 0;
}

/* Thumbnail at resting small size */
.photo-hud-marker .project-thumb {
  width: 34.5px;
  height: 34.5px;
}

/* On dot hover: expand thumbnail to full size with glow */
.photo-hud-marker:hover .project-thumb {
  width: 172.5px;
  height: 172.5px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

/* ==========================================
   Photo Journal Pins
   ========================================== */
.photo-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  cursor: pointer;
}

.photo-pin-inner {
  width: 72px;
  height: 72px;
  border: 2px solid #fff;
  overflow: hidden;
  background: #111;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.photo-pin-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-pin:hover .photo-pin-inner {
  box-shadow: 0 0 16px rgba(255, 51, 51, 0.7);
  border-color: #ff3333;
}

.photo-pin-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  margin-top: 4px;
}

/* ==========================================
   Zoom back button — clear header
   ========================================== */
.zoom-back-btn {
  top: calc(var(--header-height) + 12px);
}
