/* style-dossier.css - Federal Bureau of Control / Department of Unhuman Affairs Classified Agent Dossier Theme */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Special+Elite&family=VT323&display=swap');

@font-face {
  font-family: 'Departure Mono';
  src: url('fonts/DepartureMono-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --dossier-bg: #ece9e2;
  --dossier-paper: #f4f1ea;
  --dossier-paper-dark: #ded7c8;
  --ink-black: #111111;
  --ink-gray: #333333;
  --ink-muted: #555555;
  --stamp-red: #a81c1c;
  --stamp-black: #222222;
  --classified-blue: #1c3b68;
  
  --font-typewriter: 'Special Elite', 'Courier Prime', monospace;
  --font-mono: 'Courier Prime', 'Departure Mono', monospace;
  --font-signature: 'Caveat', cursive, sans-serif;
  --font-pixel: 'VT323', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #1a1a1a;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(30, 30, 30, 0.8), rgba(10, 10, 10, 0.95)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.15) 2px, rgba(0,0,0,0.15) 4px);
  color: var(--ink-black);
  font-family: var(--font-mono);
  line-height: 1.5;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Back navigation bar */
.top-nav-bar {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.back-stamp-btn, .print-stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-typewriter);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dossier-paper);
  background: #2a2a2a;
  border: 2px solid #555;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.back-stamp-btn:hover, .print-stamp-btn:hover {
  background: var(--stamp-red);
  border-color: #ff4d4d;
  color: #fff;
  transform: translateY(-2px);
}

/* Dossier Container - Realistic Aged Classified Paper Document */
.dossier-sheet {
  background-color: var(--dossier-paper);
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(210, 195, 170, 0.4), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(180, 165, 140, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.05) 100%);
  width: 100%;
  max-width: 900px;
  padding: 3rem 3.5rem;
  position: relative;
  box-shadow: 
    0 0 20px rgba(0,0,0,0.8),
    inset 0 0 80px rgba(160, 140, 110, 0.25);
  border: 1px solid #c8c0b0;
  border-radius: 2px;
  color: var(--ink-black);
}

/* Paper creases and stain overlay */
.dossier-sheet::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: 
    linear-gradient(90deg, transparent 49.5%, rgba(0,0,0,0.08) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 33%, rgba(0,0,0,0.05) 33.3%, transparent 33.6%),
    radial-gradient(ellipse at 15% 12%, rgba(140, 90, 40, 0.12) 0%, transparent 20%);
  z-index: 10;
}

/* Top Agency Header */
.agency-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--ink-black);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.agency-seal-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agency-seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px double var(--ink-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: var(--font-typewriter);
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 4px;
  background: rgba(0,0,0,0.03);
  text-transform: uppercase;
}

.agency-seal span {
  display: block;
  line-height: 1.1;
}

.agency-title-text {
  font-family: var(--font-typewriter);
}

.agency-title-text h2 {
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

.agency-title-text p {
  font-size: 0.75rem;
  color: var(--ink-gray);
  letter-spacing: 1px;
}

.agency-address {
  text-align: right;
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--ink-gray);
}

.agency-address strong {
  font-size: 0.85rem;
  color: var(--ink-black);
}

/* Main Subject Bar */
.subject-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 1px dashed rgba(0,0,0,0.3);
  padding-bottom: 0.8rem;
}

.subject-id-box h1 {
  font-family: var(--font-typewriter);
  font-size: 2.2rem;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

.subject-id-box h1 span.sub-code {
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--ink-muted);
}

.subject-label {
  font-family: var(--font-typewriter);
  font-size: 1.1rem;
  letter-spacing: 4px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--ink-black);
}

/* Red Classified Stamp Overlay */
.stamp-classified {
  position: absolute;
  top: 85px;
  right: 220px;
  font-family: var(--font-typewriter);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--stamp-red);
  border: 4px solid var(--stamp-red);
  padding: 4px 16px;
  text-transform: uppercase;
  letter-spacing: 4px;
  transform: rotate(-12deg);
  opacity: 0.85;
  pointer-events: none;
  mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 60%, rgba(0,0,0,0.4) 100%);
  user-select: none;
  z-index: 5;
}

/* Top Photos & Details Layout Grid */
.profile-overview-grid {
  display: grid;
  grid-template-columns: 280px 1fr 210px;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

/* Photos Container */
.photos-wrapper {
  display: flex;
  gap: 10px;
  position: relative;
}

.photo-card {
  background: #fff;
  padding: 6px 6px 20px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 1px solid #bbb;
  position: relative;
}

.photo-card.profile-side {
  width: 110px;
  transform: rotate(-2deg);
}

.photo-card.portrait-front {
  width: 165px;
  transform: rotate(1deg);
  z-index: 2;
}

.photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(100%) contrast(125%) brightness(95%);
  display: block;
}

.photo-label {
  font-family: var(--font-typewriter);
  font-size: 0.65rem;
  text-align: center;
  margin-top: 4px;
  color: var(--ink-gray);
  letter-spacing: 0.5px;
}

/* Black Tape overlay on photo */
.tape-overlay {
  position: absolute;
  top: -10px;
  left: 20px;
  width: 70px;
  height: 20px;
  background: rgba(40, 40, 40, 0.85);
  transform: rotate(-6deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 4;
}

/* Agent Metadata Card */
.agent-metadata-card {
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  line-height: 1.6;
  background: rgba(0,0,0,0.025);
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.15);
  height: 100%;
}

.metadata-row {
  display: flex;
  margin-bottom: 6px;
  border-bottom: 1px dotted rgba(0,0,0,0.15);
  padding-bottom: 4px;
}

.metadata-label {
  width: 110px;
  font-weight: bold;
  color: var(--ink-black);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.metadata-value {
  flex: 1;
  color: var(--ink-gray);
}

/* Fingerprints & Signature Column */
.biometrics-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.classified-verif-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  width: 100%;
  max-width: 200px;
}

.verif-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.25s ease;
}

.verif-item-link:hover {
  transform: scale(1.06);
}

.verif-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-img-graphic {
  width: 155px;
  height: 155px;
  object-fit: cover;
  border: none;
  display: block;
  margin-bottom: 4px;
  mix-blend-mode: multiply;
  filter: contrast(120%);
}

.barcode-img-graphic {
  width: 190px;
  height: 48px;
  object-fit: cover;
  border: none;
  display: block;
  margin-bottom: 4px;
  mix-blend-mode: multiply;
  filter: contrast(120%);
}

.verif-label {
  font-family: var(--font-typewriter);
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-gray);
}

/* Ink Signature Overlay */
.signature-box {
  position: relative;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

.signature-text {
  font-family: var(--font-signature);
  font-size: 2.8rem;
  color: #102444; /* Dark blue ink fountain pen */
  transform: rotate(-6deg);
  display: inline-block;
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0.5px 0.5px 0px rgba(16, 36, 68, 0.4);
}

/* Section Styling */
.dossier-section {
  margin-bottom: 2.2rem;
  position: relative;
}

.section-header {
  font-family: var(--font-typewriter);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink-black);
  padding-bottom: 4px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-num {
  background: var(--ink-black);
  color: var(--dossier-paper);
  padding: 1px 6px;
  font-size: 0.85rem;
}

.section-body {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-gray);
  line-height: 1.6;
}

.section-body p {
  margin-bottom: 0.9rem;
  text-align: justify;
}

/* Redacted Text Styling & Interactive Reveal */
.redacted {
  background-color: var(--ink-black);
  color: var(--ink-black);
  padding: 0 4px;
  border-radius: 1px;
  user-select: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
  display: inline;
}

.redacted:hover, .redacted:focus {
  background-color: #fff176; /* Soft highlighter yellow */
  color: #111;
  user-select: text;
  box-shadow: 0 0 6px rgba(255, 235, 59, 0.6);
}

.redacted::after {
  content: ' [CLASSIFIED]';
  font-family: var(--font-typewriter);
  font-size: 0.65rem;
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--stamp-red);
  color: #fff;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.redacted:hover::after {
  opacity: 1;
}

/* Permanently Redacted Elements (Unrevealable on Hover or Focus) */
.redacted-permanent {
  background-color: var(--ink-black) !important;
  color: var(--ink-black) !important;
  padding: 0 8px;
  border-radius: 1px;
  user-select: none !important;
  cursor: not-allowed !important;
  display: inline-block;
  letter-spacing: 2px;
  pointer-events: none;
}

.redacted-permanent:hover, 
.redacted-permanent:focus, 
.redacted-permanent:active {
  background-color: var(--ink-black) !important;
  color: var(--ink-black) !important;
  box-shadow: none !important;
}

.redacted-permanent::after {
  display: none !important;
}

/* Work History Dossier Cards */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.experience-entry {
  background: rgba(0,0,0,0.02);
  border-left: 3px solid var(--ink-black);
  padding: 10px 14px;
  border-bottom: 1px dotted rgba(0,0,0,0.1);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.exp-role {
  font-family: var(--font-typewriter);
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--ink-black);
  text-transform: uppercase;
}

.exp-date {
  font-family: var(--font-typewriter);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.exp-desc {
  font-size: 0.88rem;
  color: var(--ink-gray);
  line-height: 1.5;
}

/* Capabilities Grid */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.capability-card {
  border: 1px solid rgba(0,0,0,0.2);
  padding: 10px;
  background: #fbf9f4;
}

.capability-card h4 {
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--ink-black);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 2px;
}

.capability-card ul {
  list-style: square inside;
  font-size: 0.82rem;
  color: var(--ink-gray);
}

.capability-card li {
  margin-bottom: 3px;
}

/* Bottom Microfiche Grid */
.microfiche-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  border-top: 2px solid var(--ink-black);
  padding-top: 1.2rem;
  margin-top: 2rem;
}

.microfiche-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: #111;
  padding: 6px;
  border: 1px solid #444;
  width: 260px;
}

.fiche-tile {
  aspect-ratio: 1 / 1;
  background: #222;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #888;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.fiche-tile:hover {
  background: #00f3ff;
  color: #000;
}

.microfiche-info {
  flex: 1;
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  color: var(--ink-gray);
}

/* Document Footer Bar */
.dossier-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ink-black);
  padding-top: 0.8rem;
  margin-top: 2rem;
  font-family: var(--font-typewriter);
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-transform: uppercase;
}

/* Responsive Breakpoints */
@media (max-width: 820px) {
  .profile-overview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .photos-wrapper {
    justify-content: center;
  }

  .stamp-classified {
    top: 120px;
    right: 20px;
    font-size: 1.2rem;
  }

  .dossier-sheet {
    padding: 2rem 1.5rem;
  }

  .agency-header {
    flex-direction: column;
    gap: 1rem;
  }

  .agency-address {
    text-align: left;
  }

  .subject-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .microfiche-section {
    flex-direction: column;
  }

  .microfiche-grid {
    width: 100%;
    grid-template-columns: repeat(7, 1fr);
  }
}
