/* ── POPUP OVERLAY ────────────────────────────────────────── */

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.popup-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.76);
  backdrop-filter: blur(2.5px);
}

body.motion-lite .popup-backdrop {
  backdrop-filter: blur(1.5px);
}

body.motion-reduced .popup-backdrop {
  backdrop-filter: none;
}

/* ── POPUP CONTAINER ─────────────────────────────────────── */

.popup-container {
  position: relative;
  width: min(640px, 92vw);
  max-height: calc(100vh - 80px);
  overflow: auto;
  z-index: 1;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.3);
  will-change: transform, opacity;
  /* scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.popup-container::-webkit-scrollbar { width: 6px; }
.popup-container::-webkit-scrollbar-track { background: transparent; }
.popup-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
  transform: translateY(-1px);
}

.popup-inner {
  padding: 28px 28px 32px;
}

.popup-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.popup-title {
  font-family: var(--font-case);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.popup-subtitle {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.popup-body { line-height: 1.6; }

.popup-brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.12);
}

.popup-brand-mark {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.92), rgba(80, 80, 80, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.24);
}

.popup-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-brand-mark-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.popup-brand-mark-link:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 28px rgba(0, 0, 0, 0.28);
}

.popup-brand-mark-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.popup-brand-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.popup-brand-mark img.loaded ~ .popup-brand-fallback {
  display: none;
}

.popup-brand-copy {
  min-width: 0;
}

.popup-brand-eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  font-family: var(--font-case);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.64;
}

.popup-brand-copy h3 {
  margin: 0 0 2px;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.popup-brand-copy p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0.8;
}

.popup-body .detail-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.popup-body .detail-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.popup-body h3 {
  font-family: var(--font-case);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.popup-body p {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.credentials-archive {
  margin-top: 14px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.86) 0%, rgba(236, 222, 195, 0.92) 100%);
  border: 1px solid rgba(90, 74, 46, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 34px rgba(77, 54, 22, 0.08);
}

.archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.archive-copy {
  max-width: 560px;
}

.archive-kicker {
  margin: 0 0 6px;
  font-family: var(--font-case);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-summary {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.archive-count {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 12px 10px;
  border-radius: 20px;
  text-align: center;
  background: rgba(76, 54, 25, 0.08);
  border: 1px solid rgba(90, 74, 46, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.archive-count-value {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.archive-count-label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-case);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.certificate-card {
  position: relative;
  width: 100%;
  border: 1px solid rgba(90, 74, 46, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(245, 236, 218, 0.92) 100%);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 20px rgba(77, 54, 22, 0.08);
}

.certificate-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 28px rgba(77, 54, 22, 0.14);
}

.certificate-card:focus-visible {
  outline: 2px solid rgba(139, 26, 26, 0.72);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.certificate-card-top,
.certificate-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.certificate-card-label,
.certificate-card-year,
.certificate-card-tag,
.certificate-card-action {
  font-family: var(--font-case);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.certificate-card-label {
  font-size: 0.66rem;
  opacity: 0.78;
}

.certificate-card-year {
  font-size: 0.68rem;
  opacity: 0.56;
}

.certificate-card-title {
  display: block;
  margin: 14px 0 6px;
  font-size: 1rem;
  line-height: 1.3;
  color: #2e2516;
}

.certificate-card-issuer {
  display: block;
  min-height: 1.3em;
  margin-bottom: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(58, 48, 32, 0.78);
}

.certificate-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  background: rgba(90, 74, 46, 0.08);
  color: #5a4a2e;
}

.certificate-card-action {
  font-size: 0.66rem;
  color: #8b1a1a;
}

/* ── DOCUMENT VIEWER ─────────────────────────────────────── */

.document-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.document-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.document-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(120, 86, 34, 0.12), transparent 35%),
    rgba(3, 3, 6, 0.88);
  backdrop-filter: blur(8px);
}

body.motion-lite .document-backdrop {
  backdrop-filter: blur(5px);
}

body.motion-reduced .document-backdrop {
  backdrop-filter: none;
}

.document-container {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(205, 175, 118, 0.18);
  background:
    radial-gradient(circle at top right, rgba(174, 133, 59, 0.14) 0%, transparent 32%),
    linear-gradient(180deg, #151517 0%, #0f1012 52%, #0b0c0e 100%);
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.document-container::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  border: 1px solid rgba(205, 175, 118, 0.08);
  pointer-events: none;
}

.document-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  color: #eadcc0;
  background: rgba(234, 220, 192, 0.1);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.document-close:hover {
  transform: translateY(-1px);
  background: rgba(234, 220, 192, 0.18);
}

.document-close:focus-visible {
  outline: 2px solid rgba(234, 220, 192, 0.75);
  outline-offset: 3px;
}

.document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 72px 18px 28px;
  border-bottom: 1px solid rgba(234, 220, 192, 0.08);
}

.document-header-copy {
  min-width: 0;
}

.document-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-case);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(234, 220, 192, 0.62);
}

.document-title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.15;
  color: #f8f1df;
}

.document-issuer {
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(248, 241, 223, 0.82);
}

.document-meta {
  margin: 8px 0 0;
  font-family: var(--font-case);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(205, 175, 118, 0.72);
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.document-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(205, 175, 118, 0.26);
  background: linear-gradient(180deg, rgba(205, 175, 118, 0.18) 0%, rgba(205, 175, 118, 0.08) 100%);
  font-family: var(--font-case);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f3e6c6;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.document-open-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(205, 175, 118, 0.4);
  background: linear-gradient(180deg, rgba(205, 175, 118, 0.26) 0%, rgba(205, 175, 118, 0.12) 100%);
}

.document-open-link:focus-visible {
  outline: 2px solid rgba(243, 230, 198, 0.75);
  outline-offset: 3px;
}

.document-chamber {
  padding: 20px 24px 24px;
}

.document-frame-shell {
  overflow: hidden;
  height: min(72vh, 820px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(251, 246, 235, 0.96) 0%, rgba(232, 220, 195, 0.92) 100%);
  border: 1px solid rgba(205, 175, 118, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 24px 50px rgba(0, 0, 0, 0.28);
}

.document-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.document-note {
  margin: 12px 4px 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(248, 241, 223, 0.68);
}

/* ── THEMED POPUP: FOLDER ────────────────────────────────── */

.popup-container.popup-folder {
  width: min(860px, 94vw);
  background:
    radial-gradient(circle at 70% 20%, rgba(200,170,120,0.15) 0%, transparent 40%),
    linear-gradient(180deg, #e6dac0 0%, #ddd0b2 40%, #d4c5a0 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.popup-folder .popup-close {
  background: rgba(80,60,30,0.25);
  color: #5a4a2e;
}

.popup-folder .popup-close:hover { background: rgba(80,60,30,0.4); }

.popup-folder .popup-header { border-bottom: 2px solid rgba(90,74,46,0.15); }

.popup-folder .popup-title { color: #8b1a1a; }
.popup-folder .popup-subtitle { color: #2e2516; }
.popup-folder .popup-body { color: #3a3020; }

.popup-folder .popup-body h3 { color: #5a4a2e; }

.popup-folder .popup-body .detail-section {
  border-bottom: 1px dashed rgba(90,74,46,0.15);
}

.popup-folder .section-stamp {
  color: #8b1a1a;
  font-size: 0.72rem;
  border-bottom: 1.5px solid rgba(139,26,26,0.2);
  padding-bottom: 4px;
  display: inline-block;
}

.popup-folder .archive-kicker,
.popup-folder .archive-count-value,
.popup-folder .certificate-card-title {
  color: #2e2516;
}

.popup-folder .archive-summary,
.popup-folder .certificate-card-issuer {
  color: rgba(58, 48, 32, 0.8);
}

.popup-folder .certificate-card-action {
  color: #8b1a1a;
}

.popup-folder .certificate-card:hover,
.popup-folder .certificate-card:focus-visible {
  border-color: rgba(139, 26, 26, 0.2);
}

.popup-folder .skill-tag {
  background: rgba(90,74,46,0.12);
  color: #4a3a20;
  border: 1px solid rgba(90,74,46,0.15);
}

.popup-folder .evidence-list li::before { color: #8b1a1a; }

/* ── THEMED POPUP: POLAROID ──────────────────────────────── */

.popup-container.popup-polaroid {
  background:
    radial-gradient(circle at 50% 80%, rgba(220,210,190,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #f5f3ee 0%, #eae6dc 100%);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(0,0,0,0.06);
}

.popup-polaroid .popup-close {
  background: rgba(0,0,0,0.08);
  color: #555;
}

.popup-polaroid .popup-close:hover { background: rgba(0,0,0,0.15); }

.popup-polaroid .popup-header { border-bottom: 1px solid rgba(0,0,0,0.08); }

.popup-polaroid .popup-title { color: #999; }
.popup-polaroid .popup-subtitle { color: #1e1e1e; }
.popup-polaroid .popup-body { color: #333; }

.popup-polaroid .popup-body h3 { color: #666; }

.popup-polaroid .popup-body .detail-section {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.popup-polaroid .skill-tag {
  background: rgba(100,126,234,0.1);
  color: #4a5ab8;
  border: 1px solid rgba(100,126,234,0.15);
}

.popup-polaroid .evidence-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.popup-polaroid .evidence-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(102,126,234,0.24);
}

/* ── THEMED POPUP: MAP ───────────────────────────────────── */

.popup-container.popup-map {
  background:
    radial-gradient(circle at 30% 60%, rgba(180,150,100,0.15) 0%, transparent 40%),
    linear-gradient(175deg, #e0d5be 0%, #d5c8a8 50%, #c8bb98 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.popup-map .popup-close {
  background: rgba(80,60,30,0.2);
  color: #5a4a2e;
}

.popup-map .popup-close:hover { background: rgba(80,60,30,0.35); }

.popup-map .popup-header { border-bottom: 2px dashed rgba(90,74,46,0.15); }

.popup-map .popup-title { color: #8a7450; }
.popup-map .popup-subtitle { color: #2e2516; }
.popup-map .popup-body { color: #3a3020; }

.popup-map .popup-body h3 { color: #6b5a3e; }

.popup-map .popup-body .detail-section {
  border-bottom: 1px dashed rgba(90,74,46,0.12);
}

.popup-map .evidence-link {
  background: rgba(90,74,46,0.15);
  color: #4a3a20;
  border: 1px solid rgba(90,74,46,0.2);
}

.popup-map .evidence-link:hover { background: rgba(90,74,46,0.25); }

/* ── THEMED POPUP: FIELD NOTES ──────────────────────────── */

.popup-container.popup-fieldnotes {
  width: min(760px, 92vw);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #ece3cf 0%, #e1d5bb 52%, #d7c8a9 100%);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.52),
    0 8px 24px rgba(0,0,0,0.28);
}

.popup-fieldnotes::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 28px,
      rgba(60, 48, 28, 0.05) 28px 29px
    );
  opacity: 0.72;
  pointer-events: none;
}

.popup-fieldnotes .popup-inner {
  position: relative;
  z-index: 1;
  padding: 34px 34px 40px;
}

.popup-fieldnotes .popup-close {
  background: rgba(80,60,30,0.18);
  color: #5a4a2e;
}

.popup-fieldnotes .popup-close:hover {
  background: rgba(80,60,30,0.32);
}

.popup-fieldnotes .popup-header {
  border-bottom: 2px dashed rgba(90,74,46,0.22);
}

.popup-fieldnotes .popup-title {
  color: #8b1a1a;
}

.popup-fieldnotes .popup-subtitle {
  font-family: var(--font-case);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5e4d32;
}

.popup-fieldnotes .popup-body {
  color: #3b311f;
}

.popup-fieldnotes .popup-body h3 {
  color: #6a573c;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.popup-fieldnotes .popup-body .detail-section {
  border-bottom: 1px dashed rgba(90,74,46,0.18);
}

.popup-fieldnotes .popup-body .detail-section:last-child {
  border-bottom: none;
}

.popup-fieldnotes .popup-body .evidence-list li {
  font-size: 0.95rem;
  line-height: 1.62;
}

.popup-fieldnotes .popup-body .evidence-list li::before {
  color: #8b1a1a;
}

/* ── THEMED POPUP: BLUEPRINT ─────────────────────────────── */

.popup-container.popup-blueprint {
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(180deg, #3a6fa0 0%, #2a5580 50%, #1e4468 100%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 0 60px rgba(0,0,0,0.2);
}

.popup-blueprint .popup-close {
  background: rgba(255,255,255,0.1);
  color: #a0c8f0;
}

.popup-blueprint .popup-close:hover { background: rgba(255,255,255,0.2); }

.popup-blueprint .popup-header { border-bottom: 1px solid rgba(255,255,255,0.1); }

.popup-blueprint .popup-title { color: rgba(255,255,255,0.5); }
.popup-blueprint .popup-subtitle { color: #d0e8ff; }
.popup-blueprint .popup-body { color: #b8d8f8; }

.popup-blueprint .popup-body h3 { color: rgba(255,255,255,0.6); }

.popup-blueprint .popup-body .detail-section {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.popup-blueprint .skill-tag {
  background: rgba(255,255,255,0.08);
  color: #a0c8f0;
  border: 1px solid rgba(255,255,255,0.12);
}

.popup-blueprint .evidence-list li::before { color: #6ab0ff; }

.popup-blueprint .evidence-link {
  background: rgba(255,255,255,0.1);
  color: #d0e8ff;
  border: 1px solid rgba(255,255,255,0.15);
}

.popup-blueprint .evidence-link:hover { background: rgba(255,255,255,0.18); }

/* ── THEMED POPUP: COMIC ─────────────────────────────────── */

.popup-container.popup-comic {
  border: 3px solid #222;
  background:
    radial-gradient(circle 2px, rgba(0,0,0,0.03) 0.5px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(180deg, #f8f3e8 0%, #efe8d6 50%, #e5dcc8 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.popup-comic .popup-close {
  background: #222;
  color: white;
}

.popup-comic .popup-close:hover { background: #444; }

.popup-comic .popup-header { border-bottom: 3px solid #222; }

.popup-comic .popup-title { color: #888; }
.popup-comic .popup-subtitle { color: #1e1d17; }
.popup-comic .popup-body { color: #2a2a22; }

.popup-comic .popup-body h3 { color: #555; }

.popup-comic .popup-body .detail-section {
  border-bottom: 2px solid rgba(0,0,0,0.06);
}

.popup-comic .evidence-link {
  background: #222;
  color: white;
}

.popup-comic .evidence-link:hover { background: #444; }

/* ── THEMED POPUP: LEDGER ────────────────────────────────── */

.popup-container.popup-ledger {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 27px,
      rgba(0, 100, 0, 0.06) 27px,
      rgba(0, 100, 0, 0.06) 28px
    ),
    linear-gradient(90deg, transparent 52px, rgba(200, 0, 0, 0.1) 52px, rgba(200, 0, 0, 0.1) 53px, transparent 53px),
    linear-gradient(180deg, #f2ede0 0%, #eae3d0 50%, #e0d8c4 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.popup-ledger .popup-close {
  background: rgba(46,125,50,0.1);
  color: #2e7d32;
}

.popup-ledger .popup-close:hover { background: rgba(46,125,50,0.2); }

.popup-ledger .popup-header { border-bottom: 2px solid rgba(0,0,0,0.08); }

.popup-ledger .popup-title { color: #2e7d32; }
.popup-ledger .popup-subtitle { color: #1a2a1a; }
.popup-ledger .popup-body { color: #2a3a2a; }

.popup-ledger .popup-body h3 { color: #2e7d32; }

.popup-ledger .popup-body .detail-section {
  border-bottom: 1px dotted rgba(0,0,0,0.1);
}

.popup-ledger .skill-tag {
  background: rgba(46,125,50,0.08);
  color: #2e7d32;
  border: 1px solid rgba(46,125,50,0.15);
}

.popup-ledger .evidence-link {
  background: rgba(46,125,50,0.1);
  color: #1a5e1e;
  border: 1px solid rgba(46,125,50,0.2);
}

.popup-ledger .evidence-link:hover { background: rgba(46,125,50,0.2); }

/* ── THEMED POPUP: NOTES ─────────────────────────────────── */

.popup-container.popup-notes {
  background:
    linear-gradient(180deg, #f8e77a 0%, #f0dc60 30%, #e8d450 100%);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 3px 10px rgba(0,0,0,0.3);
}

.popup-notes .popup-close {
  background: rgba(0,0,0,0.1);
  color: #5a5010;
}

.popup-notes .popup-close:hover { background: rgba(0,0,0,0.18); }

.popup-notes .popup-header { border-bottom: 2px solid rgba(0,0,0,0.08); }

.popup-notes .popup-title { color: rgba(0,0,0,0.4); }
.popup-notes .popup-subtitle { color: #2a2508; }
.popup-notes .popup-body { color: #333008; }

.popup-notes .popup-body h3 { color: #5a5010; }

.popup-notes .popup-body .detail-section {
  border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.popup-notes .evidence-list li::before { color: #8b6a1a; }

/* ── THEMED POPUP: ENVELOPE ──────────────────────────────── */

.popup-container.popup-envelope {
  background:
    linear-gradient(180deg, #e8e0d0 0%, #ddd5c4 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: visible;
}

.popup-envelope::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, #d5ccb8, #ccc3ae);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  z-index: -1;
}

.popup-envelope .popup-close {
  background: rgba(80,60,30,0.15);
  color: #6b5a3e;
}

.popup-envelope .popup-close:hover { background: rgba(80,60,30,0.3); }

.popup-envelope .popup-inner { padding-top: 20px; }

.popup-envelope .popup-header { border-bottom: 1px solid rgba(0,0,0,0.08); }

.popup-envelope .popup-title { color: #8a7450; }
.popup-envelope .popup-subtitle { color: #2a2a2a; }
.popup-envelope .popup-body { color: #3a3a3a; }

.popup-envelope .popup-body h3 { color: #6b5a3e; }

.popup-envelope .popup-body .detail-section {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.popup-envelope .evidence-link {
  background: rgba(80,60,30,0.12);
  color: #4a3a20;
  border: 1px solid rgba(80,60,30,0.2);
}

.popup-envelope .evidence-link:hover { background: rgba(80,60,30,0.22); }

.cv-download {
  font-size: 0.88rem;
  padding: 10px 20px;
}
