/* =========================================
   BEN BOUCHER // ARCHIVE STYLES v2.1
   ========================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --text: #f0f0f0;
  --border: #222222;
  --accent: #00e5ff;
  --focus: #00ff41;
  --dim: #666666;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  text-transform: uppercase;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle CRT Scanline Texture */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 9999; /* Stays BEHIND the lightbox */
  pointer-events: none;
}

.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* --- HEADER NAV (FLIPPED) --- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 15px 30px;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
}

nav a {
  color: var(--dim);
  text-decoration: none;
  margin-right: 25px; /* Margin swapped since it's on the left now */
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover, nav a.active {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.sys-info {
  display: flex;
  gap: 30px;
  text-align: right; /* Aligned to the right */
}

.sys-info div {
  display: flex;
  flex-direction: column;
}

.data-label {
  color: var(--dim);
  font-size: 0.65rem;
  letter-spacing: 1px;
}

/* --- MAIN CONTAINERS --- */
.archive-container {
  padding: 40px 30px;
  flex-grow: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* --- CENTERED HOMEPAGE --- */
.home-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-grow: 1;
  padding: 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 6px;
  margin-bottom: 40px;
}

.hero-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 30px;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--accent);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

/* --- PHOTO GRID (GALLERY) --- */
.category-header {
  margin: 60px 0 30px 0;
  font-size: 1.5rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-header::before {
  content: '■';
  color: var(--accent);
  font-size: 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.record-item {
  position: relative;
  background: #050505;
  cursor: pointer;
  padding: 10px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.record-item::before, .record-item::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  z-index: 5;
}

.record-item::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.record-item::after { bottom: 0; right: 0; border-left: none; border-top: none; }

.record-item:hover { background: #0a0a0a; }
.record-item:hover::before, .record-item:hover::after { border-color: var(--focus); }

.record-image {
  width: 100%;
  aspect-ratio: 3 / 2; 
  object-fit: cover;
  display: block;
  filter: grayscale(100%) brightness(0.8);
  transition: all 0.5s ease;
}

.record-item:hover .record-image {
  filter: grayscale(0%) brightness(1.1);
}

.record-meta {
  margin-top: 12px;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
}

/* --- DOSSIER (ABOUT) --- */
.dossier-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.dossier-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover; /* Automatically crops if not perfectly sized */
  border: 1px solid var(--border);
  display: block;
  filter: grayscale(100%) contrast(1.1);
}

.dossier-text {
  margin-top: 30px;
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.8;
  word-break: break-all;
  border-left: 1px solid var(--accent);
  padding-left: 15px;
}

.data-block {
  margin-bottom: 30px;
}

.data-block h3 {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.data-list { list-style: none; border-left: 1px solid var(--border); padding-left: 15px;}
.data-list li { margin-bottom: 15px; display: flex; flex-direction: column; }
.data-list span.key { color: var(--dim); font-size: 0.75rem; margin-bottom: 4px; }
.data-list span.val { color: var(--text); font-size: 1rem; }

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.98);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Increased to sit OVER the CRT scanline effect */
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 95vw;
  max-height: 95vh;
  border: 1px solid var(--border);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: var(--text);
  font-size: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 30px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--dim);
  letter-spacing: 1px;
}

/* --- RESPONSIVE MOBILE FIXES --- */
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .top-bar { flex-direction: column-reverse; gap: 20px; align-items: center; padding: 20px; }
  .sys-info { display: none; }
  nav a { margin: 0 15px; }
  .dossier-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-links { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto;}
  .btn { text-align: center; }
  .archive-container { padding: 20px 15px; }
}