#resumeModal.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150000;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(var(--header-offset, 74px) + clamp(10px, 2.4vh, 24px))
    clamp(12px, 3vw, 28px)
    max(12px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
}

#resumeModal.img-modal.show {
  display: flex !important;
}

#resumeModal .resume-modal-content {
  position: relative;
  z-index: 150001;
  width: min(88vw, 760px);
  height: min(78dvh, 660px);
  max-height: calc(100dvh - var(--header-offset, 74px) - 34px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(226, 232, 240, 0.72);
}

#resumeModal .resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

#resumeModal .resume-modal-title {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#resumeModal .img-modal-close {
  position: static;
  top: auto;
  right: auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  text-shadow: none;
  z-index: 150002;
  transition: transform 0.2s ease, background 0.2s ease;
}

#resumeModal .img-modal-close:hover {
  background: #1d4ed8;
  color: #ffffff;
  transform: scale(1.04);
}

#resumeModal .resume-modal-frame {
  position: relative;
  isolation: isolate;
  min-height: 0;
  background: #0f172a;
  overflow: hidden;
}

#resumeModal .resume-modal-frame iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

#resumeModal .download-resume-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: filter 0.2s ease, transform 0.2s ease;
}

#resumeModal .download-resume-btn:hover {
  filter: brightness(1.06);
}

body.resume-modal-open {
  overflow: hidden;
}

body.resume-modal-open #arrowTopBtn {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  #resumeModal.img-modal {
    padding-top: calc(var(--header-offset, 74px) + 10px);
  }

  #resumeModal .resume-modal-content {
    width: min(90vw, 640px);
    height: min(72dvh, 560px);
    max-height: calc(100dvh - var(--header-offset, 74px) - 28px);
  }
}

@media (max-width: 600px) {
  #resumeModal.img-modal {
    padding:
      calc(var(--header-offset, 74px) + 8px)
      10px
      max(10px, env(safe-area-inset-bottom));
  }

  #resumeModal .resume-modal-content {
    width: min(92vw, 500px);
    height: min(68dvh, 520px);
    max-height: calc(100dvh - var(--header-offset, 74px) - 38px);
    border-radius: 14px;
  }

  #resumeModal .resume-modal-header {
    padding: 12px 14px;
  }

  #resumeModal .resume-modal-title {
    font-size: 0.88rem;
  }

  #resumeModal .img-modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.55rem;
  }

  #resumeModal .download-resume-btn {
    min-height: 54px;
    padding: 12px 16px;
    font-size: 0.96rem;
  }
}
