:root {
  --paper: #f2efe9;
  --ink: #1a1a1a;
  --accent: #ff4d4d;
  --font-head: "Archivo Black", sans-serif;
  --font-serif: "Playfair Display", serif;
  --font-type: "Special Elite", cursive;
  --font-modern: "Space Grotesk", sans-serif;
}

[data-mode="dark"] {
  --paper: #121212;
  --ink: #e6e6e6;
  --accent: #00ff94;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-modern);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

.noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.halftone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: radial-gradient(var(--ink) 1px, transparent 0);
  background-size: 5px 5px;
  opacity: 0.04;
}

.top-nav {
  position: sticky;
  top: 0;
  height: 40px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  z-index: 1000;
  font-family: var(--font-type);
  font-size: 11px;
}

.file-viewer {
  display: flex;
  min-height: calc(100vh - 40px);
}

.page-list {
  width: 220px;
  padding: 60px 30px;
  border-right: 2px solid var(--ink);
  background: rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 40px;
  height: calc(100vh - 40px);
}

.nav-links {
  display: block;
}

.nav-link,
.nav-links a {
  cursor: pointer;
  font-family: var(--font-type);
  margin-bottom: 15px;
  transition: 0.3s;
}

.nav-link {
  background: none;
  border: 0;
  color: var(--ink);
  display: block;
  font-size: 1rem;
  padding: 0;
  text-align: left;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.nav-link.active {
  color: var(--accent);
  font-weight: bold;
  font-size: 1.4rem;
}

.report-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3vh 2vh 1vh;
  gap: 20px;
  overflow-y: auto;
  position: relative;
  min-height: 90vh;
}

.zine-container {
  width: 100%;
  max-width: 1000px;
  min-height: 85vh;
  background: var(--paper);
  border: 4px solid var(--ink);
  position: relative;
  box-shadow: 12px 12px 0 var(--ink);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  margin-bottom: 20px;
}

.report-area::-webkit-scrollbar {
  width: 6px;
}

.report-area::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.info_div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0;
}

.column {
  padding: 35px;
  position: relative;
}

.column h2.sidebar-title {
  font-family: var(--font-modern);
  font-size: 16px;
  letter-spacing: 3px;
  margin-bottom: 25px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
}

.left-col {
  border-right: 4px solid var(--ink);
}

.link-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.detail-panel-body {
  display: grid;
  gap: 24px;
}

.detail-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  margin-top: 15px;
}

.detail-media-frame {
  margin: 8px 0 0;
  border: 10px solid var(--ink);
  padding: 4px;
  background: var(--ink);
  width: 250px;
  height: 250px;
  max-width: 100%;
  transform: rotate(-1.5deg);
}

.detail-media-frame-project {
  width: min(100%, 340px);
  height: 280px;
}

.detail-media-surface {
  background: var(--accent);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-media-surface-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-media-surface-icon {
  color: var(--paper);
  font-family: var(--font-head);
  font-size: 44px;
  flex-direction: column;
  gap: 16px;
}

.detail-media-surface-icon i {
  width: 56px;
  height: 56px;
}

.detail-media-surface-project {
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #ff6a3d, #1a1a1a 72%);
  color: var(--paper);
  align-items: stretch;
  justify-content: flex-start;
}

.project-preview-chrome {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
}

.project-preview-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.project-preview-body {
  display: grid;
  gap: 18px;
  padding: 14px 18px 18px;
  height: 100%;
}

.project-preview-hero {
  display: grid;
  gap: 8px;
}

.project-preview-hero strong {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 1px;
}

.project-preview-hero em {
  font-family: var(--font-type);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 2px;
}

.project-preview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  flex: 1;
}

.project-preview-grid div {
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.project-preview-grid div:first-child {
  grid-row: span 2;
}

.detail-stats {
  font-family: var(--font-type);
  font-size: 13px;
  line-height: 1.8;
}

.detail-note {
  padding: 15px;
  border: 2px dashed var(--ink);
  font-family: var(--font-type);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.03);
}

.detail-note-label {
  background: var(--accent);
  color: white;
  padding: 2px 5px;
  font-weight: bold;
  margin-right: 6px;
}

.detail-cta-row {
  display: flex;
}

.detail-cta-row-project {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.detail-cta {
  width: min(260px, 100%);
}

.detail-cta-disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.06);
}

.detail-status-tag {
  border: 3px double var(--accent);
  width: 100%;
  text-align: center;
  color: var(--accent);
  display: inline-block;
  padding: 5px 12px;
  font-family: var(--font-head);
  transform: rotate(-18deg);
  background: rgba(255, 77, 77, 0.06);
  pointer-events: none;
}

.detail-seal-row {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 3;
  min-width: 120px;
}

.home-briefing {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.home-briefing-copy {
  font-family: var(--font-type);
  line-height: 1.6;
}

.home-briefing-note {
  padding: 14px;
  border: 2px dashed var(--ink);
  background: rgba(0, 0, 0, 0.03);
  font-family: var(--font-type);
  font-size: 12px;
  line-height: 1.6;
}

.home-action {
  width: 100%;
  background: var(--paper);
}

.home-action.is-active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--accent);
}

.selector-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.selector-toggle {
  display: none;
  background: var(--ink);
  border: 2px solid var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--font-type);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 6px 10px;
}

.detail-nav {
  align-content: start;
}

.selector-card {
  width: 100%;
  align-items: center;
  background: var(--paper);
}

.selector-card.is-active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--accent);
}

.selector-card-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.selector-meta {
  font-size: 11px;
  letter-spacing: 1px;
}

#report-page {
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

#report-page.page-out {
  transform: translateY(15px) scale(0.98);
  opacity: 0;
}

#report-page.page-in {
  transform: translateY(-10px) scale(1.02);
  opacity: 0;
}

@media (max-width: 900px) {
  .file-viewer {
    flex-direction: column;
  }
  .page-list {
    width: 100%;
    height: auto;
    position: sticky;
    top: 40px;
    padding: 15px 20px;
    border-right: none;
    border-bottom: 2px solid var(--ink);
    z-index: 100;
    background: var(--paper);
  }
  .page-list h3 {
    display: none;
  }

  .info_div {
    flex-direction: column;
  }

  .nav-links {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    margin-bottom: 0;
  }
  .zine-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .left-col {
    border-right: none;
    border-bottom: 4px solid var(--ink);
  }

  .selector-col {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
  }

  .selector-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .detail-selector.is-collapsed .detail-nav {
    display: none;
  }

  .detail-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 4px;
    margin-top: 0;
    overflow: visible;
  }

  .detail-nav::-webkit-scrollbar {
    display: none;
  }

  .selector-card {
    min-width: 0;
    width: 100%;
    margin-bottom: 0;
  }

  .detail-media-frame-project {
    width: 100%;
    max-width: 100%;
    height: 300px;
  }

  .detail-cta-row-project {
    flex-direction: column;
  }
}

.tape {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 35px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  border: 1px dashed rgba(0, 0, 0, 0.1);
  text-align: center;
  line-height: 35px;
  font-family: var(--font-type);
}

.staple {
  width: 35px;
  height: 6px;
  background: #999;
  border-radius: 2px;
  position: absolute;
  top: 15px;
  left: 15px;
  transform: rotate(-45deg);
  opacity: 0.5;
}

.card {
  border: 2px solid var(--ink);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-type);
  transition: 0.2s;
}

.card:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 var(--accent);
}

footer {
  font-family: var(--font-type);
  font-size: 10px;
  opacity: 0.6;
  text-align: center;
}

.theme-btn {
  background: none;
  border: 1px solid var(--paper);
  color: inherit;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 10px;
}
