/* ============================================
   Work page — skyline mark with clickable points
   ============================================ */
.work-hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-2);
}

.work-hero h1 { margin-bottom: var(--space-2); }

.graph-instructions {
  margin-top: var(--space-2);
}

.mark-stage {
  padding: var(--space-4) 0 var(--space-6);
}

.mark-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.mark-image {
  width: 100%;
  height: auto;
  display: block;
}

.points-layer {
  position: absolute;
  inset: 0;
}

.work-point {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  animation: point-in 0.5s ease-out forwards;
}

.work-point-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--text), 0 0 12px 2px rgba(232, 230, 225, 0.5);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  animation: point-pulse 2.2s ease-in-out infinite;
}

.work-point:nth-of-type(1) .work-point-dot { animation-duration: 2.0s; animation-delay: -0.3s; }
.work-point:nth-of-type(2) .work-point-dot { animation-duration: 2.6s; animation-delay: -1.1s; }
.work-point:nth-of-type(3) .work-point-dot { animation-duration: 2.2s; animation-delay: -0.6s; }
.work-point:nth-of-type(4) .work-point-dot { animation-duration: 2.8s; animation-delay: -1.8s; }
.work-point:nth-of-type(5) .work-point-dot { animation-duration: 2.1s; animation-delay: -0.9s; }
.work-point:nth-of-type(6) .work-point-dot { animation-duration: 2.5s; animation-delay: -1.4s; }

.work-point:hover .work-point-dot,
.work-point:focus-visible .work-point-dot {
  background: var(--accent);
  border-color: var(--bg);
  transform: scale(1.35);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 10px var(--accent-dim), 0 0 18px 4px rgba(63, 224, 197, 0.6);
  animation-play-state: paused;
}

.work-point:focus-visible {
  outline: none;
}

@keyframes point-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes point-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--text), 0 0 12px 2px rgba(232, 230, 225, 0.5); }
  50% { box-shadow: 0 0 0 2px var(--text), 0 0 18px 6px rgba(232, 230, 225, 0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .work-point { animation: none; opacity: 1; }
  .work-point-dot { animation: none; }
}

/* The mark image is a wide, short banner (~4:1) — below 720px it renders
   short enough that several points sit close together. Shrinking the hit
   area here (rather than growing it) keeps neighbouring points from
   overlapping down to a 320px-wide screen; the full work list below
   the image is the reliable fallback for smaller taps. */
@media (max-width: 720px) {
  .work-point { width: 30px; height: 30px; }
  .work-point-dot { width: 12px; height: 12px; }
}

/* ============================================
   Modal overlay
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 14, 17, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3) var(--space-3);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.22s ease;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

#modal-content h3 {
  margin: var(--space-1) 0 var(--space-2);
  font-size: 1.3rem;
}

#modal-content p {
  margin-bottom: var(--space-2);
}

#modal-content .tag-row .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 0.15rem 0.5rem;
  margin: 0 0.3rem 0.3rem 0;
}
