/* ============================================
   Thomas Favilla — Editor | Resume / Map Game
   ============================================ */

/* ---- Page layout override ---- */
.resume-page {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px 80px;
}

/* ============================================
   PDF SECTION
   ============================================ */
.pdf-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.pdf-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 5px;
  color: #00E5FF;
  text-transform: uppercase;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: #00E5FF;
  border: 2px solid #00E5FF;
  padding: 14px 32px;
  position: relative;
  overflow: hidden;
  transition: color 0.2s, box-shadow 0.2s;
  background: none;
  cursor: pointer;
}

.pdf-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #00E5FF;
  transform: translateX(-105%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.pdf-btn:hover {
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.pdf-btn:hover::before { transform: translateX(0); }

.pdf-btn svg,
.pdf-btn span { position: relative; z-index: 1; }

.pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.pdf-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.pdf-content {
  position: relative;
  width: 69%;
  height: 90vh;
  background: #fff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 60px rgba(0,0,0,0.7);
  transform: scale(0.97) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}

.pdf-overlay.active .pdf-content {
  transform: scale(1) translateY(0);
}

.pdf-overlay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.12);
  color: #333;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pdf-overlay-close:hover {
  background: rgba(0,0,0,0.25);
  color: #000;
}

.pdf-iframe {
  width: 100%;
  flex: 1;
  border: none;
  background: #fff;
}

/* ============================================
   BOARD SECTION
   ============================================ */
.board-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* ============================================
   MAP TITLE
   ============================================ */
.map-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.85rem, 2.5vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 2px;
  color: #FFD600;
  text-shadow:
    0 0 12px rgba(255, 214, 0, 0.7),
    0 0 32px rgba(255, 214, 0, 0.25);
}

.map-instructions {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: #3a3a3a;
  text-align: center;
}

.map-instructions .ki {
  color: #00E5FF;
  opacity: 0.7;
}

.map-instructions .mobile-hint { display: none; }

/* ============================================
   MAP WRAPPER  (contains image + overlay)
   ============================================ */
.map-wrapper {
  position: relative;
  width: 100%;
  max-width: 880px;
  cursor: default;
  /* image-rendering: crisp pixel art */
}

.board-bg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
  -webkit-user-drag: none;
}

/* ============================================
   MAP OVERLAY  (absolutely covers board-bg)
   ============================================ */
.map-overlay {
  position: absolute;
  inset: 0;
}

/* ============================================
   NODE MARKERS
   Positioned as % of overlay (= % of image)
   ============================================ */
.node-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  /* --nx / --ny set by JS */
  left: var(--nx);
  top:  var(--ny);
}

/* Invisible touch/click target */
.node-hit {
  position: absolute;
  inset: -12px;
  border-radius: 4px;
}

/* Glow ring — invisible by default; shown when active */
.node-glow {
  position: absolute;
  inset: -10px;
  border-radius: 6px;
  border: 2px solid var(--nc, #00E5FF);
  opacity: 0;
  transition: opacity 0.2s, box-shadow 0.2s;
  pointer-events: none;
}

/* Junction nodes: keep fully invisible unless active */
.nm-junction .node-glow { opacity: 0; }

/* Content + start: very subtle resting glow so they're findable */
.nm-content .node-glow,
.nm-start   .node-glow {
  opacity: 0.12;
}

/* Link nodes: subtle purple resting glow */
.nm-link .node-glow {
  opacity: 0.18;
  border-color: #9B2FEB;
}

/* Special nodes: subtle cyan resting glow */
.nm-special .node-glow {
  opacity: 0.18;
  border-color: #00E5FF;
}

/* ---- Active state (character is here) ---- */
.node-marker.nm-active .node-glow {
  opacity: 1;
  box-shadow:
    0 0 10px var(--nc, #00E5FF),
    0 0 24px var(--nc, #00E5FF),
    0 0 40px color-mix(in srgb, var(--nc, #00E5FF) 50%, transparent);
  animation: nodeActivePulse 1.3s ease-in-out infinite;
}

@keyframes nodeActivePulse {
  0%, 100% { box-shadow: 0 0 10px var(--nc), 0 0 24px var(--nc); opacity: 0.95; }
  50%       { box-shadow: 0 0 18px var(--nc), 0 0 40px var(--nc); opacity: 1; }
}

/* ---- ENTER prompt — now lives on the character, not the node ---- */
.node-enter-hint {
  display: none;
}

/* "PRESS ENTER" overlay centered on the character sprite */
.char-enter-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #0a0a0f;
  background: #00E5FF;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 14px #00E5FF;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 20;
}

.map-char.show-enter-hint .char-enter-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: hintChip 1.1s ease-in-out infinite;
}

@keyframes hintChip {
  0%, 100% { box-shadow: 0 0 10px var(--nc); }
  50%       { box-shadow: 0 0 22px var(--nc), 0 0 40px color-mix(in srgb, var(--nc) 40%, transparent); }
}

/* ============================================
   CHARACTER SPRITE
   ============================================ */
.map-char {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  /* --cx, --cy set by JS */
  left: var(--cx, 16.5%);
  top:  var(--cy, 37%);
  /* Center anchored at the node position */
  transform: translate(-50%, -50%);
  width: 14%;       /* % of board width */
  transition:
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    top  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Walking bounce during movement — applied to inner img so glow isn't interrupted */
.map-char.is-moving .char-img,
.map-char.is-moving .char-fallback {
  animation: charWalk 0.15s steps(1) infinite, charGlowPulse 2.2s ease-in-out infinite;
}

@keyframes charWalk {
  0%  { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.char-img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Glow that follows the character's outline (respects PNG transparency) */
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.8))
    drop-shadow(0 0 10px rgba(0, 229, 255, 0.75))
    drop-shadow(0 0 18px rgba(0, 229, 255, 0.45));
  animation: charGlowPulse 2.2s ease-in-out infinite;
}

@keyframes charGlowPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 2px rgba(255,255,255,0.95))
      drop-shadow(0 0 5px rgba(255,255,255,0.8))
      drop-shadow(0 0 10px rgba(0,229,255,0.75))
      drop-shadow(0 0 18px rgba(0,229,255,0.45));
  }
  50% {
    filter:
      drop-shadow(0 0 3px rgba(255,255,255,1))
      drop-shadow(0 0 8px rgba(255,255,255,0.9))
      drop-shadow(0 0 16px rgba(0,229,255,0.9))
      drop-shadow(0 0 28px rgba(0,229,255,0.6));
  }
}

.char-fallback {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 0 3px rgba(255,255,255,0.9))
    drop-shadow(0 0 8px rgba(0,229,255,0.8))
    drop-shadow(0 0 16px rgba(0,229,255,0.5));
}

/* Subtle ground shadow beneath character */
.map-char::after {
  content: '';
  position: absolute;
  bottom: -3%;
  left: 15%;
  right: 15%;
  height: 5px;
  background: radial-gradient(ellipse, rgba(0,229,255,0.35), transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
}

/* ============================================
   INFO BAR
   ============================================ */
.map-info-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  min-height: 1.5em;
}

.mib-loc {
  color: #3a3a3a;
  transition: color 0.2s;
}

.mib-loc.loc-start   { color: #FF2D78; text-shadow: 0 0 8px rgba(255,45,120,0.4); }
.mib-loc.loc-content { color: #00E5FF; text-shadow: 0 0 8px rgba(0,229,255,0.4); animation: infoFlash 0.3s ease; }
.mib-loc.loc-junction{ color: #444; }
.mib-loc.loc-link    { color: #9B2FEB; text-shadow: 0 0 8px rgba(155,47,235,0.5); animation: infoFlash 0.3s ease; }
.mib-loc.loc-special { color: #00E5FF; text-shadow: 0 0 8px rgba(0,229,255,0.4); animation: infoFlash 0.3s ease; }

.mib-hint {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: #00E5FF;
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 0 10px rgba(0,229,255,0.7);
}

.mib-hint.visible {
  opacity: 1;
  animation: hintBarPulse 1.2s ease-in-out infinite;
}

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

@keyframes infoFlash {
  from { opacity: 0.2; }
  to   { opacity: 1; }
}

/* ============================================
   D-PAD MOBILE CONTROLS
   ============================================ */
.map-dpad {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.dpad-row {
  display: flex;
  gap: 4px;
}

.dpad-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  background: rgba(10,10,20,0.8);
  border: 1px solid #2a2a2a;
  color: #444;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
  border-radius: 4px;
  user-select: none;
}

.dpad-btn:active {
  background: rgba(0,229,255,0.1);
  border-color: #00E5FF;
  color: #00E5FF;
}

.dpad-enter {
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: #333;
  border-color: #222;
  width: 72px;
}

.dpad-enter:active {
  background: rgba(255,45,120,0.15);
  border-color: #FF2D78;
  color: #FF2D78;
}

/* Lit up when character is on an interactive node */
.dpad-enter.interactive {
  border-color: #00E5FF;
  color: #00E5FF;
  animation: enterBtnGlow 1.1s ease-in-out infinite;
}

@keyframes enterBtnGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,229,255,0.4); }
  50%       { box-shadow: 0 0 18px rgba(0,229,255,0.8); }
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  position: relative;
  background: #08080f;
  border: 2px solid rgba(0,229,255,0.35);
  box-shadow:
    0 0 50px rgba(0,229,255,0.12),
    inset 0 0 50px rgba(0,0,0,0.8);
  max-width: 680px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 44px 40px 40px;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

/* CRT scanlines */
.modal-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
}

.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #444;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  font-family: monospace;
  transition: border-color 0.15s, color 0.15s;
  z-index: 2;
}

.modal-close-btn:hover {
  border-color: #FF2D78;
  color: #FF2D78;
}

.modal-title {
  position: relative;
  z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.modal-body-wrap {
  position: relative;
  z-index: 1;
}

/* ---- Modal content components ---- */
.modal-placeholder {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: #2a2a2a;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-style: italic;
}

.credit-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
}

.credit-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: 'Share Tech Mono', monospace;
}

.credit-show {
  font-size: 1.02rem;
  color: #ddd;
}

.credit-role {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

.credit-note {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  margin-top: 2px;
  letter-spacing: 0;
}

.credit-net {
  font-size: 0.81rem;
  white-space: nowrap;
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  border: 1px solid rgba(255,214,0,0.25);
  color: rgba(255,214,0,0.75);
  padding: 5px 12px;
  transition: border-color 0.15s, color 0.15s;
}

.skill-tag:hover {
  border-color: #FFD600;
  color: #FFD600;
}

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skills-list li {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  padding-left: 14px;
  border-left: 2px solid rgba(0,229,255,0.3);
}

.skill-highlight {
  color: #00E5FF;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
}

.skill-year {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
}

/* ── Awards ── */
.awards-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-org {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #FFD600;
  margin: 0 0 12px;
  opacity: 0.85;
}

.award-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,214,0,0.1);
}

.award-entry:last-child {
  border-bottom: none;
}

.award-category {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
}

.award-year {
  grid-column: 2;
  grid-row: 1;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: #FFD600;
  white-space: nowrap;
}

.award-show {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 0.95rem;
  color: #fff;
  margin-top: 3px;
}

.award-episode {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  margin-top: 2px;
}

/* ── Showreel video ── */
.modal-wide {
  padding: 12px;
}

.modal-wide .modal-box {
  max-width: 66vw;
  width: 66vw;
  padding: 44px 24px 24px;
}

.showreel-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.showreel-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  outline: none;
}

/* ── Certificate image ── */
.cert-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-img {
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(255,45,120,0.3);
  box-shadow: 0 0 24px rgba(255,45,120,0.15);
}

/* ── Contact ── */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #FFD600;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.contact-line {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
}

a.contact-link {
  color: #00E5FF;
  text-decoration: none;
  transition: color 0.15s;
}

a.contact-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Education ── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edu-entry {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,214,0,0.1);
}

.edu-entry:last-child {
  border-bottom: none;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.edu-degree {
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
}

.edu-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: #FFD600;
  white-space: nowrap;
}

.edu-school {
  font-size: 0.88rem;
  color: #00E5FF;
  margin-top: 4px;
}

.edu-detail {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  margin-top: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 800px) {
  .map-dpad { display: flex; }
  .map-instructions .desktop-hint { display: none; }
  .map-instructions .mobile-hint  { display: inline; }
  .map-char { width: 17%; }
}

@media (max-width: 500px) {
  .map-char { width: 20%; }
  .modal-box { padding: 36px 18px 28px; }
  .modal-title { font-size: 0.9rem; letter-spacing: 2px; }
  .credit-list li { grid-template-columns: 1fr auto; }
  .credit-net { display: none; }
  .resume-page { padding: 20px 12px 60px; }
}
