/* ══════════════════════════════════════════════
   Clay Reid — Connectomics
   style.css
   ══════════════════════════════════════════════ */

:root {
  --bg:       #0b0e14;
  --surface:  #12161f;
  --border:   #1e2535;
  --accent:   #7eb8d4;   /* blue — EM / general */
  --accent2:  #b8d47e;   /* green — axonal / current work */
  --accent3:  #d4a87e;   /* amber — publications */
  --text:     #d6dce8;
  --muted:    #6b7a94;
  --heading:  #eef1f7;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── Neural canvas background ── */
#neural-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; opacity: 0.13; pointer-events: none;
}

/* ── Layout ── */
.container {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto; padding: 0 2rem;
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
header { padding: 5rem 0 3rem; border-bottom: 1px solid var(--border); }

.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
  opacity: 0; animation: fadeUp 0.6s ease forwards 0.1s;
}

h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 400; color: var(--heading);
  letter-spacing: -0.01em; line-height: 1.1;
  opacity: 0; animation: fadeUp 0.7s ease forwards 0.25s;
}
h1 em { font-style: italic; color: var(--accent); }

.em-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 1.1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  padding: 0.5rem 1.1rem; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  opacity: 0; animation: fadeUp 0.7s ease forwards 0.38s;
}
.em-link:hover { background: var(--accent2); transform: translateX(3px); }

.tagline {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem; color: var(--muted);
  margin-top: 1.4rem; letter-spacing: 0.05em;
  opacity: 0; animation: fadeUp 0.7s ease forwards 0.5s;
}
.tagline span { color: var(--accent2); }

nav {
  display: flex; gap: 2rem; margin-top: 2.2rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.7s ease forwards 0.62s;
}
nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
  position: relative;
}
nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width 0.25s;
}
nav a:hover { color: var(--accent); }
nav a:hover::after { width: 100%; }

/* ══════════════════════════════
   SECTIONS
══════════════════════════════ */
section {
  padding: 4rem 0; border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
section.visible { opacity: 1; transform: translateY(0); }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 2rem;
  display: flex; align-items: center; gap: 1rem;
}
.section-label.muted { color: var(--muted); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

h2 {
  font-size: 2rem; font-weight: 400; color: var(--heading);
  margin-bottom: 1.1rem; line-height: 1.2;
}
h3 { font-size: 1.25rem; font-weight: 600; color: var(--heading); margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* ══════════════════════════════
   AXONAL HERO — paper card + figure
══════════════════════════════ */
.axon-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem; align-items: start; margin-top: 2rem;
}
.axon-figure {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent2); overflow: hidden;
}
.axon-figure img { width: 100%; display: block; }
.axon-fig-caption {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; color: var(--muted);
  letter-spacing: 0.06em; padding: 0.75rem 1rem;
  border-top: 1px solid var(--border); line-height: 1.5;
}

.paper-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 0.8rem;
}
.axon-text h3 { font-size: 1.15rem; margin-bottom: 0.6rem; line-height: 1.3; font-weight: 400; }
.axon-text .authors {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem; color: var(--muted); margin-bottom: 0.9rem; line-height: 1.7;
}
.axon-text p { font-size: 0.95rem; }

a.biorxiv-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1rem;
  font-family: 'DM Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg); background: var(--accent2);
  padding: 0.5rem 1rem; text-decoration: none;
  transition: background 0.2s;
}
a.biorxiv-btn:hover { background: var(--accent); }

/* ── Three motifs ── */
.motif-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 2rem;
}
.motif {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 2px solid var(--accent2);
  padding: 1.2rem 1.3rem; transition: background 0.2s;
}
.motif:hover { background: #161b28; }
.motif-loc {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 0.5rem;
}
.motif h4 { font-size: 1rem; color: var(--heading); margin-bottom: 0.4rem; font-weight: 600; }
.motif p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ══════════════════════════════
   PAPER FIGURES
══════════════════════════════ */
.paper-figure {
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
}
.paper-figure img { width: 100%; display: block; }
.paper-fig-cap {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem; color: var(--muted);
  letter-spacing: 0.04em; line-height: 1.6;
  padding: 0.9rem 1.1rem; border-top: 1px solid var(--border);
}
.paper-fig-cap strong { color: var(--accent2); }

/* ══════════════════════════════
   PREPRINTS / PUBLICATIONS
══════════════════════════════ */
.paper-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.paper {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent3);
  padding: 1.2rem 1.4rem; transition: background 0.2s;
}
.paper:hover { background: #161b28; }
.paper-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent3); margin-bottom: 0.4rem;
}
.paper h3 { font-size: 1rem; font-weight: 400; color: var(--heading); margin-bottom: 0.3rem; line-height: 1.3; }
.paper .authors { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--muted); margin-bottom: 0.5rem; }
.paper p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.paper a.paper-link {
  display: inline-block; margin-top: 0.6rem;
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent3); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
  transition: color 0.2s;
}
.paper a.paper-link:hover { color: var(--accent); }

/* ══════════════════════════════
   PAST WORK / EM CARD
══════════════════════════════ */
.em-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  padding: 1.6rem 1.8rem;
  display: flex; gap: 2rem; align-items: flex-start;
  transition: background 0.2s; margin-top: 1.5rem;
}
.em-card:hover { background: #161b28; }
.em-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
  padding: 0.4rem 0.7rem; white-space: nowrap;
  flex-shrink: 0; margin-top: 0.2rem;
}
.em-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); font-weight: 400; }
.em-card p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.8rem; }
.em-card a {
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(126,184,212,0.4);
  transition: border-color 0.2s;
}
.em-card a:hover { border-color: var(--accent); }

/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
.contact-row { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.contact-item {
  font-family: 'DM Mono', monospace; font-size: 0.78rem;
  color: var(--muted); display: flex; flex-direction: column; gap: 0.3rem;
}
.contact-item span:first-child {
  color: var(--accent); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.contact-item a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.contact-item a:hover { color: var(--accent); }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  padding: 2.5rem 0; font-family: 'DM Mono', monospace;
  font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em;
  display: flex; justify-content: space-between; align-items: center;
}
.dot {
  width: 6px; height: 6px; background: var(--accent2);
  border-radius: 50%; display: inline-block; margin-right: 0.5rem;
  animation: pulse 2.4s ease-in-out infinite;
}

/* ══════════════════════════════
   EM CONNECTOMICS PAGE
══════════════════════════════ */
.back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding: 2rem 0 0; transition: color 0.2s;
}
.back:hover { color: var(--accent); }
.back::before { content: '←'; font-size: 0.9rem; }

.portal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 2rem; margin-top: 2rem;
  display: flex; gap: 2rem; align-items: flex-start;
}
.portal-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem; color: var(--accent);
  letter-spacing: 0.1em; white-space: nowrap;
  padding-top: 0.2rem; flex-shrink: 0;
}
.portal-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.portal-card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.8rem; }
a.btn {
  display: inline-block;
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  padding: 0.55rem 1.2rem; text-decoration: none;
  transition: background 0.2s;
}
a.btn:hover { background: var(--accent2); }

.pub-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.pub {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent3);
  padding: 1.2rem 1.4rem; transition: background 0.2s;
}
.pub:hover { background: #161b28; }
.pub-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent3); margin-bottom: 0.4rem;
}
.pub h3 { font-size: 1rem; font-weight: 400; color: var(--heading); margin-bottom: 0.3rem; line-height: 1.3; }
.pub .authors { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--muted); margin-bottom: 0.5rem; }
.pub p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.pub a {
  display: inline-block; margin-top: 0.6rem;
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent3); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
  transition: color 0.2s;
}
.pub a:hover { color: var(--accent); }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 660px) {
  .axon-hero         { grid-template-columns: 1fr; }
  .motif-row         { grid-template-columns: 1fr; }
  .em-card           { flex-direction: column; gap: 0.8rem; }
  .portal-card       { flex-direction: column; gap: 1rem; }
  nav                { gap: 1.2rem; }
}
