/* ============================================================
   MUNSHI — Cryptography & Security Theme
   Dark navy · Orange · Terminal polish
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  --accent       : #f97316;
  --accent-dim   : rgba(249,115,22,0.12);
  --accent-glow  : rgba(249,115,22,0.28);
  --bg           : #080d1a;
  --surface      : #0d1627;
  --surface-2    : #111e35;
  --border       : #1a2744;
  --text         : #c8d6e5;
  --text-bright  : #e2e8f0;
  --text-muted   : #64748b;
  --green        : #10b981;
  --global-bg-color                  : #080d1a !important;
  --global-text-color                : #c8d6e5 !important;
  --global-text-color-light          : #64748b !important;
  --global-link-color                : #f97316 !important;
  --global-link-color-hover          : #fdba74 !important;
  --global-link-color-visited        : #fed7aa !important;
  --global-masthead-link-color       : #94a3b8 !important;
  --global-masthead-link-color-hover : #f97316 !important;
  --global-footer-bg-color           : #050912 !important;
  --global-border-color              : #1a2744 !important;
  --global-dark-border-color         : #243356 !important;
  --global-code-background-color     : #0d1627 !important;
  --global-code-text-color           : #f97316 !important;
  --global-base-color                : #f97316 !important;
  --global-thead-color               : #0d1627 !important;
}

/* ── Base ──────────────────────────────────────────────────────── */
html, body {
  font-family: 'Inter', -apple-system, sans-serif !important;
  background-color: #080d1a !important;
  color: #c8d6e5 !important;
  -webkit-font-smoothing: antialiased;
}

/* Dot-grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(249,115,22,0.07) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Ambient orange glow from top */
body::after {
  content: '';
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(249,115,22,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#main, .page, .initial-content, .page__content, .archive, .layout--single {
  background-color: #080d1a !important;
  color: #c8d6e5 !important;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  color: #e2e8f0 !important;
  letter-spacing: -0.02em;
}
p, li, td, th, label { color: #c8d6e5 !important; }

a {
  color: #f97316 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, text-shadow 0.2s ease !important;
}
a:hover { color: #fdba74 !important; text-shadow: 0 0 8px rgba(249,115,22,0.35) !important; }
a:visited { color: #fed7aa !important; }
hr { border: none !important; border-top: 1px solid #1a2744 !important; }

/* ── Scroll Reveal ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── Masthead ──────────────────────────────────────────────────── */
.masthead {
  background: rgba(8,13,26,0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #1a2744 !important;
  box-shadow: 0 1px 0 rgba(249,115,22,0.06) !important;
  position: relative; z-index: 100;
}
.site-title {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important; font-size: 1rem !important;
  color: #f97316 !important;
  text-shadow: 0 0 14px rgba(249,115,22,0.4) !important;
}
.site-title:hover {
  color: #fdba74 !important;
  text-shadow: 0 0 22px rgba(249,115,22,0.6) !important;
}
.greedy-nav { background: transparent !important; }
.greedy-nav a, .greedy-nav .nav__item a {
  font-size: 0.875rem !important; font-weight: 500 !important;
  color: #94a3b8 !important; padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important; transition: all 0.2s ease !important;
}
.greedy-nav a:hover, .greedy-nav .nav__item a:hover {
  color: #f97316 !important; background: rgba(249,115,22,0.08) !important; text-shadow: none !important;
}
.greedy-nav button, .greedy-nav__toggle { background: transparent !important; color: #94a3b8 !important; }

/* ── Sidebar — visual only, never touch layout ─────────────────── */
.sidebar, .sidebar__right { background: transparent !important; }

/* Push avatar down — desktop only (mobile uses table-cell layout) */
@media screen and (min-width: 1024px) {
  .author__avatar {
    margin-top: 2rem !important;
    margin-bottom: 1.25rem !important;
  }
}

/* Avatar: just the orange border + glow, nothing else */
.author__avatar img {
  border: 3px solid #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15), 0 0 18px rgba(249,115,22,0.2) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.author__avatar img:hover {
  box-shadow: 0 0 0 3px rgba(249,115,22,0.3), 0 0 28px rgba(249,115,22,0.35) !important;
  transform: scale(1.03) !important;
}

/* Author info card — pull left to avoid image overlap */
.author__content {
  background: #0d1627 !important;
  border: 1px solid #1a2744 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.author__name {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: #e2e8f0 !important;
}
.author__bio { font-size: 0.83rem !important; color: #64748b !important; line-height: 1.6 !important; }

/* Social links */
.author__urls {
  background: #0d1627 !important;
  border: 1px solid #1a2744 !important;
  border-radius: 10px !important;
}
.author__urls li a {
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  transition: all 0.2s ease !important;
}
.author__urls li a:hover {
  color: #f97316 !important;
  background: rgba(249,115,22,0.07) !important;
  text-shadow: none !important;
}

/* Desktop sticky location/employer items */
.author__desktop { background: #0d1627 !important; border: 1px solid #1a2744 !important; border-radius: 12px !important; }

/* Follow button */
.btn--inverse { background: transparent !important; border: 1px solid #1a2744 !important; color: #94a3b8 !important; font-size: 0.8rem !important; border-radius: 6px !important; transition: all 0.2s ease !important; }
.btn--inverse:hover { border-color: #f97316 !important; color: #f97316 !important; box-shadow: 0 0 10px rgba(249,115,22,0.15) !important; }

/* ── Page Title ────────────────────────────────────────────────── */
.page__title {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 1.85rem !important; font-weight: 700 !important;
  color: #e2e8f0 !important;
  border-bottom: 1px solid #1a2744 !important;
  padding-bottom: 0.75rem !important; margin-bottom: 1.5rem !important;
  letter-spacing: -0.03em !important;
}
.page__title::before {
  content: '> ';
  font-family: 'JetBrains Mono', monospace;
  color: #f97316; font-size: 0.85em;
  text-shadow: 0 0 10px rgba(249,115,22,0.4);
}

/* ── Hero intro (about) ────────────────────────────────────────── */
.hero-intro { margin-bottom: 1.25rem; }
.hero-intro .lead { font-size: 1.05rem !important; color: #e2e8f0 !important; line-height: 1.8 !important; margin-bottom: 0.9rem !important; }
.hero-intro p { font-size: 0.97rem !important; line-height: 1.8 !important; color: #c8d6e5 !important; margin-bottom: 0.75rem !important; }

/* ── Research Interest Tags ────────────────────────────────────── */
.research-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tag {
  display: inline-block; padding: 0.28rem 0.8rem; border-radius: 99px;
  font-size: 0.78rem; font-weight: 500; font-family: 'Inter', sans-serif;
  color: #f97316 !important; border: 1px solid rgba(249,115,22,0.35);
  background: rgba(249,115,22,0.06); transition: all 0.2s ease; cursor: default;
}
.tag:hover { background: rgba(249,115,22,0.14); border-color: #f97316; box-shadow: 0 0 10px rgba(249,115,22,0.18); transform: translateY(-1px); }

/* ── Section Heading ───────────────────────────────────────────── */
.section-heading {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 1.1rem !important; font-weight: 600 !important;
  color: #e2e8f0 !important; margin-bottom: 1.25rem !important;
  display: flex; align-items: center; gap: 0.5rem;
}
.section-heading .mono { font-family: 'JetBrains Mono', monospace; color: #f97316; font-size: 0.9em; text-shadow: 0 0 8px rgba(249,115,22,0.3); }

/* ── News Timeline ─────────────────────────────────────────────── */
.news-section { margin-top: 0.5rem; }
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 1px; background: linear-gradient(to bottom, #f97316, transparent); opacity: 0.35;
}
.timeline-item { position: relative; padding-bottom: 1.2rem; padding-left: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -1.55rem; top: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.55);
}
.timeline-date { font-family: 'JetBrains Mono', monospace; font-size: 0.73rem; color: #f97316; margin-bottom: 0.2rem; letter-spacing: 0.03em; }
.timeline-content { font-size: 0.875rem; color: #c8d6e5; line-height: 1.65; }
.timeline-content a { color: #f97316 !important; text-decoration: underline !important; text-underline-offset: 3px !important; text-decoration-color: rgba(249,115,22,0.4) !important; }
.timeline-content a:hover { text-decoration-color: #f97316 !important; text-shadow: none !important; }
.timeline-content strong { color: #e2e8f0 !important; font-weight: 600; }

/* ── Cards ─────────────────────────────────────────────────────── */
.archive__item {
  background: #0d1627 !important; border: 1px solid #1a2744 !important;
  border-bottom: 1px solid #1a2744 !important; border-radius: 12px !important;
  padding: 1.4rem 1.5rem !important; margin-bottom: 1rem !important;
  transition: all 0.25s ease !important; position: relative !important; overflow: hidden !important;
}
.archive__item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #f97316, #fb923c); opacity: 0; transition: opacity 0.25s ease;
}
.archive__item:hover::before { opacity: 1 !important; }
.archive__item:hover {
  border-color: rgba(249,115,22,0.3) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(249,115,22,0.08) !important;
  transform: translateY(-2px) !important;
}
.archive__item-title, div.archive__item h2.archive__item-title {
  font-family: 'Space Grotesk', sans-serif !important; font-size: 1.05rem !important;
  font-weight: 600 !important; color: #f97316 !important; -webkit-text-fill-color: #f97316 !important; margin-bottom: 0.4rem !important;
}
.archive__item-excerpt { font-size: 0.87rem !important; color: #94a3b8 !important; line-height: 1.7 !important; }
.archive__item strong[style], div.archive__item p strong[style] {
  color: #10b981 !important; -webkit-text-fill-color: #10b981 !important;
  font-family: 'JetBrains Mono', monospace !important; font-size: 0.85em !important;
}

/* ── Tables ────────────────────────────────────────────────────── */
table { background: #0d1627 !important; border: 1px solid #1a2744 !important; border-radius: 10px !important; overflow: hidden !important; font-size: 0.875rem !important; }
thead { background: #111e35 !important; }
thead th { color: #f97316 !important; font-weight: 600 !important; border-bottom: 1px solid #1a2744 !important; padding: 0.65rem 1rem !important; }
tbody td { border-top: 1px solid #1a2744 !important; padding: 0.6rem 1rem !important; color: #c8d6e5 !important; }
tbody tr:hover { background: rgba(249,115,22,0.03) !important; }

/* ── Code ──────────────────────────────────────────────────────── */
pre, pre.highlight { background: #060b18 !important; border: 1px solid #1a2744 !important; border-radius: 10px !important; box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important; color: #f97316 !important; }
code { font-family: 'JetBrains Mono', monospace !important; font-size: 0.83em !important; background: rgba(249,115,22,0.07) !important; color: #f97316 !important; padding: 0.15em 0.4em !important; border-radius: 4px !important; border: 1px solid rgba(249,115,22,0.12) !important; }

/* ── Footer ────────────────────────────────────────────────────── */
.page__footer { background: #050912 !important; border-top: 1px solid #1a2744 !important; color: #475569 !important; font-size: 0.8rem !important; position: relative; z-index: 1; }
.page__footer a { color: #f97316 !important; }
.page__footer a:hover { color: #fdba74 !important; }
.page__footer-copyright { color: #475569 !important; }

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #080d1a; }
::-webkit-scrollbar-thumb { background: #1a2744; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #f97316; box-shadow: 0 0 6px rgba(249,115,22,0.5); }

/* ── Selection ─────────────────────────────────────────────────── */
::selection { background: rgba(249,115,22,0.2); color: #e2e8f0; }

/* ── Page Load ─────────────────────────────────────────────────── */
body { animation: fadeIn 0.4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Misc ──────────────────────────────────────────────────────── */
.breadcrumbs, .page__meta { color: #475569 !important; font-size: 0.8rem !important; }
.notice, .notice--info, .notice--warning, .notice--success, .notice--danger { background: #0d1627 !important; border-left-color: #f97316 !important; color: #c8d6e5 !important; }
.page__content > p { font-size: 0.97rem !important; line-height: 1.8 !important; color: #c8d6e5 !important; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page__title { font-size: 1.4rem !important; }
  .archive__item { padding: 1rem !important; }
  .masthead { backdrop-filter: none !important; }
  .research-tags { gap: 0.4rem; }
}
