/* ============================================
   BLACKSITE // THREAT INTELLIGENCE DIVISION
   Stylesheet v2.4.1 — CLASSIFICATION: INTERNAL
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-base: #0a0d0a;
  --bg-deep: #050705;
  --bg-panel: #0f1310;
  --bg-panel-2: #131811;
  --bg-elevated: #1a1f1a;

  --line: #1f2820;
  --line-bright: #2d3a2e;
  --line-active: #4a5f48;

  --text-primary: #d4d9c8;
  --text-secondary: #8a9485;
  --text-dim: #5a6356;
  --text-faint: #3a4138;

  --amber: #d4a047;
  --amber-bright: #ffc764;
  --amber-dim: #8a6a2f;

  --olive: #6b7d4a;
  --olive-bright: #94a86a;

  --signal-red: #c44d3d;
  --signal-red-bright: #e8634f;
  --signal-green: #7ba659;
  --signal-blue: #4a7894;

  --classified: #b8423a;
  --secret: #c47835;
  --topsecret: #a83838;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, 'Helvetica Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;

  /* Tactical grid background */
  background-image:
    linear-gradient(rgba(74, 95, 72, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 95, 72, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(107, 125, 74, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212, 160, 71, 0.05) 0%, transparent 50%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 3px,
    transparent 4px
  );
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 9998;
  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.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

::selection {
  background: var(--amber);
  color: var(--bg-base);
}

/* ============================================
   TOP STATUS BAR
   ============================================ */
.status-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  gap: 24px;
  flex-wrap: wrap;
}

.status-left, .status-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.status-item {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-dim);
}

.status-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 6px var(--signal-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-item .dot.red {
  background: var(--signal-red);
  box-shadow: 0 0 6px var(--signal-red);
}

.status-item .dot.amber {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

.status-item .val {
  color: var(--amber);
  font-weight: 600;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   HEADER / NAV
   ============================================ */
.header {
  padding: 32px 48px 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 48px;
  width: 120px;
  height: 2px;
  background: var(--amber);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--amber);
  font-size: 18px;
  position: relative;
  transform: rotate(45deg);
}

.brand-logo span {
  transform: rotate(-45deg);
}

.brand-logo::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--amber-dim);
  opacity: 0.5;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-left: 48px;
}

.nav {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}

.nav a::before {
  content: '[';
  color: var(--text-faint);
  margin-right: 4px;
  transition: color 0.15s ease;
}

.nav a::after {
  content: ']';
  color: var(--text-faint);
  margin-left: 4px;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--amber);
  background: rgba(212, 160, 71, 0.06);
}

.nav a:hover::before,
.nav a:hover::after {
  color: var(--amber);
}

.nav a.active {
  color: var(--amber);
  background: rgba(212, 160, 71, 0.08);
  border-color: var(--amber-dim);
}

.nav a.active::before,
.nav a.active::after {
  color: var(--amber);
}

/* ============================================
   NAV DROPDOWN (Dökümanlar)
   ============================================ */
.nav-item.has-submenu {
  position: relative;
}

.nav .nav-trigger {
  cursor: pointer;
  user-select: none;
}

.nav .caret {
  font-size: 9px;
  margin-left: 6px;
  opacity: 0.6;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.has-submenu.open .caret,
.has-submenu .nav-trigger:hover .caret {
  opacity: 1;
}

.has-submenu.open .caret {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 280px;
  background: var(--bg-deep);
  border: 1px solid var(--line-bright);
  padding: 6px;
  z-index: 200;
  display: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.has-submenu.open .submenu {
  display: block;
  animation: submenu-in 0.18s ease;
}

@keyframes submenu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: none;
  border-left: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
}

.submenu a::before,
.submenu a::after {
  content: none !important;
  margin: 0 !important;
}

.submenu a:hover {
  border-left-color: var(--amber);
  color: var(--amber);
  background: rgba(212, 160, 71, 0.06);
}

.submenu a .sm-key {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  min-width: 26px;
}

.submenu a:hover .sm-key {
  color: var(--amber);
}

.submenu-sep {
  display: block;
  height: 1px;
  background: var(--line);
  margin: 6px 8px;
}

@media (max-width: 900px) {
  .submenu {
    position: static;
    min-width: 100%;
    margin-top: 4px;
    box-shadow: none;
  }
}

/* ============================================
   COMMON UTILS
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--amber);
}

.section-label .count {
  color: var(--amber);
  margin-left: auto;
  letter-spacing: 0.15em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.classification-banner {
  background: var(--classified);
  color: #f5e8d0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  font-weight: 700;
  padding: 4px 0;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.classification-banner::before,
.classification-banner::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  width: 60px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(0, 0, 0, 0.3) 4px,
    rgba(0, 0, 0, 0.3) 8px
  );
}

.classification-banner::before { left: 0; }
.classification-banner::after { right: 0; }

/* Corner brackets utility */
.bracketed {
  position: relative;
}

.bracketed::before,
.bracketed::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--amber);
  border-style: solid;
}

.bracketed::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.bracketed::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

/* ============================================
   PAGE HEAD (kategori sayfaları için)
   ============================================ */
.page-head {
  padding: 64px 48px 48px;
  border-bottom: 1px solid var(--line);
  max-width: 1400px;
  margin: 0 auto;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 60px);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 16px;
}

.page-head h1 .num {
  color: var(--amber);
  font-size: 0.45em;
  vertical-align: top;
  margin-right: 16px;
}

.page-head .lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* ============================================
   FILTER BAR (kategori sayfaları için)
   ============================================ */
.filter-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar .filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 4px;
}

.filters {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--text-secondary);
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

.filter-btn:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
}

.filter-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-base);
  font-weight: 600;
}

/* ============================================
   DOSSIER SECTION + GRID + CARD (paylaşılan)
   ============================================ */
.dossier-section {
  padding: 64px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.section-title .num {
  color: var(--amber);
  margin-right: 16px;
  font-size: 22px;
  vertical-align: top;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.dossier {
  background: var(--bg-panel);
  padding: 28px;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.2s ease;
  min-height: 320px;
}

.dossier:hover {
  background: var(--bg-panel-2);
}

.dossier:hover .dossier-id {
  color: var(--amber);
}

.dossier:hover .dossier-title {
  color: var(--amber-bright);
}

.dossier-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dossier-id {
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.dossier-class {
  padding: 2px 8px;
  border: 1px solid currentColor;
  font-weight: 700;
}

.dossier-class.unclassified { color: var(--signal-green); }
.dossier-class.confidential { color: var(--amber); }
.dossier-class.secret { color: var(--secret); }
.dossier-class.topsecret { color: var(--topsecret); }

.dossier-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--olive-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dossier-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: color 0.2s ease;
  flex: 1;
}

.dossier-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.dossier-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dossier-foot .arrow {
  color: var(--amber);
  font-size: 14px;
}

.empty-state {
  grid-column: 1 / -1;
  background: var(--bg-panel);
  padding: 64px 32px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.empty-state .es-icon {
  color: var(--amber-dim);
  font-size: 24px;
  margin-bottom: 16px;
}

@media (max-width: 1000px) {
  .dossier-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 28px; }
}

@media (max-width: 600px) {
  .dossier-section, .page-head { padding-left: 24px; padding-right: 24px; }
  .filter-bar { padding: 16px 24px; }
  .dossier-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   GÖREVLER (mission timeline / cards)
   ============================================ */
.missions-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px;
}

.mission-board {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  margin-bottom: 48px;
  padding: 24px;
  border: 1px solid var(--line-bright);
  background: var(--bg-panel);
}

.mission-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  line-height: 1.8;
  text-transform: uppercase;
}

.mission-summary b {
  color: var(--amber);
  font-weight: 600;
}

.mission-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mission-stat {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 12px;
  font-family: var(--font-mono);
}

.mission-stat .lbl {
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mission-stat .val {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--amber);
  line-height: 1;
}

.mission-timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px dashed var(--line-bright);
}

.mission-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  padding: 26px 30px 24px;
  margin-bottom: 24px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.mission-card:hover {
  border-color: var(--amber-dim);
  background: var(--bg-panel-2);
}

.mission-card::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--bg-base);
  border: 2px solid var(--amber);
  border-radius: 50%;
  z-index: 2;
}

.mission-card.mission-active::before {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(212, 160, 71, 0.15);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.mission-card.mission-active {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 1px rgba(212, 160, 71, 0.1) inset;
}

.m-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.m-id { color: var(--text-dim); }

.m-status {
  padding: 4px 10px;
  border: 1px solid currentColor;
  font-weight: 700;
  font-size: 10px;
}

.m-status.status-active {
  color: var(--amber);
  background: rgba(212, 160, 71, 0.08);
}

.m-status.status-completed {
  color: var(--olive-bright);
}

.m-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.15;
}

.mission-active .m-title { color: var(--amber-bright); }

.m-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 14px;
  align-items: baseline;
}

.m-meta .m-org {
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.m-meta .m-sep { color: var(--text-faint); }

.m-meta .m-role {
  color: var(--text-secondary);
}

.m-period {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.m-period .m-loc {
  color: var(--olive-bright);
}

.m-objectives {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-objectives li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.m-objectives li::before {
  content: '─';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

@media (max-width: 900px) {
  .missions-section { padding: 32px 24px; }
  .mission-board { grid-template-columns: 1fr; }
  .mission-timeline { padding-left: 24px; }
  .mission-card { padding: 22px 20px; }
  .mission-card::before { left: -30px; top: 24px; width: 10px; height: 10px; }
  .m-title { font-size: 22px; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: 80px;
  padding: 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer p, .footer a {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.8;
  text-decoration: none;
  display: block;
}

.footer a:hover {
  color: var(--amber);
}

.footer-bottom {
  max-width: 1400px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .container { padding: 32px 24px; }
  .header { padding: 24px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .nav { flex-wrap: wrap; }
  .status-bar-inner { padding: 8px 16px; font-size: 10px; }
  .status-left, .status-right { gap: 12px; }
  .footer { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .brand-name { font-size: 22px; }
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .status-item:nth-child(n+3) { display: none; }
}
