/* dpd.dev v3 — Minimalist Dark-Only Observatory Aesthetic */

:root {
  --bg: #070a10;
  --surface: rgba(14, 19, 30, 0.72);
  --surface-hover: rgba(20, 27, 42, 0.88);
  --text: #edf2f8;
  --text-muted: #8e9cb2;
  --text-dim: #5c6a80;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(148, 184, 255, 0.28);
  --accent: #7aa7ff;
  --accent-soft: rgba(122, 167, 255, 0.10);
  --emerald: #4ade80;
  --amber: #fbbf24;
  --radius: 12px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 18% -5%, rgba(56, 114, 255, 0.18), transparent 65%),
    radial-gradient(ellipse 60% 45% at 88% 12%, rgba(139, 92, 246, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(16, 185, 129, 0.06), transparent 65%);
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 10, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; opacity: 0.85; }
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.86rem;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 84px 0 56px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.0rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 18px;
}

.grad-text {
  background: linear-gradient(115deg, #eef3fb 12%, #60a5fa 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 0 26px;
}
.hero-lead strong { color: var(--text); font-weight: 500; }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.hero-links a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.hero-links a:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}
.hero-links a.primary-link {
  color: var(--accent);
  border-color: rgba(122, 167, 255, 0.45);
}

/* Topic quick-jump index */
.topic-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.topic-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.topic-pill:hover {
  text-decoration: none;
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.topic-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(122, 167, 255, 0.25);
  border-radius: 6px;
  padding: 3px 7px;
  line-height: 1.2;
}
.topic-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topic-text strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}
.topic-text small {
  color: var(--text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .topic-index {
    grid-template-columns: 1fr;
  }
}

/* Sections */
section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 68px;
}

.sec-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.sec-head h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.sec-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Clean Editorial Project Rows */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.project-row:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.proj-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.proj-name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  margin: 0;
}
.proj-name span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag-green { color: var(--emerald); border-color: rgba(74, 222, 128, 0.28); }
.tag-amber { color: var(--amber); border-color: rgba(251, 191, 36, 0.28); }

.proj-desc {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 0.93rem;
}
.proj-desc strong { color: var(--text); font-weight: 500; }

.proj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.proj-stats b { color: var(--text); font-weight: 600; }

/* Collapsible Figure Drawer */
details.fig-drawer {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
details.fig-drawer summary {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.fig-drawer summary::-webkit-details-marker { display: none; }
details.fig-drawer summary::before {
  content: "+";
  display: inline-block;
  width: 14px;
  font-weight: 700;
}
details.fig-drawer[open] summary::before { content: "−"; }

.fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.fig-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  cursor: zoom-in;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.fig-wrap:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.fig-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.fig-cap {
  background: #0d121d;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 8px 11px;
  border-top: 1px solid var(--border);
}

/* Compact Expandable SETI Survey Ledger */
.ledger {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.ledger-item {
  border-bottom: 1px solid var(--border);
}
.ledger-item:last-child { border-bottom: none; }

.ledger-summary {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr 1.15fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
}
.ledger-summary::-webkit-details-marker { display: none; }
.ledger-summary:hover { background: var(--surface-hover); }

.ledger-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}
.ledger-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.ledger-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ledger-body {
  padding: 4px 20px 20px;
  border-top: 1px dashed var(--border);
  background: rgba(9, 13, 21, 0.55);
}
.ledger-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 12px 0;
}
.ledger-body strong { color: var(--text); font-weight: 500; }

.inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(122, 167, 255, 0.3);
  padding: 6px 12px;
  border-radius: 7px;
  margin-top: 4px;
}
.inline-btn:hover { text-decoration: none; border-color: var(--accent); }

/* Publications */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pub-row {
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.pub-row:hover { border-left-color: var(--accent); }
.pub-title { font-weight: 500; color: var(--text); margin-bottom: 3px; }
.pub-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); }
.pub-meta a { color: var(--accent); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 28px 0 44px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 12, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  background: #ffffff;
}
.lightbox-cap {
  color: #dce5f2;
  font-size: 0.86rem;
  text-align: center;
  max-width: 780px;
}

@media (max-width: 740px) {
  .ledger-summary { grid-template-columns: 1fr auto; }
  .ledger-summary .hide-sm { display: none; }
}
