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

:root {
  --accent:      #2563eb;
  --accent-hover:#1d4ed8;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-500:    #6b7280;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-900:    #111827;
  --max-width:   960px;
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-serif:  'Lora', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { display: block; max-width: 100%; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.25; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; padding: 3rem 0 6rem; }

/* ── Navigation ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  text-decoration: none;
  white-space: nowrap;
}
.nav-name:hover { text-decoration: none; color: var(--accent); }

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-tabs a {
  display: block;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-tabs a:hover { background: var(--gray-50); color: var(--gray-900); text-decoration: none; }
.nav-tabs a.active { background: var(--gray-100); color: var(--gray-900); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  color: var(--gray-400);
  background: #fff;
  z-index: 50;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-quote {
  font-style: italic;
  color: var(--gray-400);
}

/* ── About Me ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.headshot-wrap {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.8rem;
}
.headshot-wrap img { width: 100%; height: 100%; object-fit: cover; }

.contact-block { margin-top: 1rem; font-size: 0.875rem; color: var(--gray-600); line-height: 1.8; }
.contact-block strong { color: var(--gray-800); }
.contact-block a { color: var(--accent); }

.heading-rule { border: none; border-top: 1px solid var(--gray-200); width: 13.5rem; margin: 0.56rem 0 0.94rem; }

.bio .subtitle:empty { display: none; }

.bio { color: var(--gray-700); }
.bio .subtitle { font-size: 1.1rem; color: var(--gray-500); margin-top: 0.4rem; margin-bottom: 1.5rem; }
.bio p { margin-bottom: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-700);
}

/* ── Section Header ─────────────────────────────────────────── */
.page-header { margin-bottom: 2.5rem; }
.page-header h1 { margin-bottom: 0.4rem; }
.page-header p { color: var(--gray-500); max-width: 600px; }

.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gray-800);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.75rem;
}

/* ── Publications ───────────────────────────────────────────── */
.pub-section { margin-bottom: 3.5rem; }

.pub-list { display: flex; flex-direction: column; gap: 1.75rem; }

.pub-item { display: flex; gap: 1.25rem; align-items: flex-start; }

.pub-cover {
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.7rem;
}
.pub-cover.book    { width: 216px; height: auto; }
.pub-cover.article { width: 144px; height: auto; }
.pub-cover img { width: 100%; height: auto; display: block; }

.pub-info h3 { font-size: 1rem; color: var(--gray-900); margin-bottom: 0.2rem; }
.pub-info .pub-meta { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.35rem; }
.pub-info .pub-meta em { font-style: italic; }
.pub-info .pub-desc { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0.5rem; max-width: 600px; }
.pub-links { display: flex; gap: 1rem; }
.pub-links a { font-size: 0.8rem; font-weight: 500; color: var(--accent); }

/* ── CV ─────────────────────────────────────────────────────── */
.cv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-dark { background: var(--gray-900); color: #fff; }
.btn-dark:hover { background: var(--gray-700); text-decoration: none; color: #fff; }

.pdf-embed {
  width: 100%;
  height: 85vh;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  background: var(--gray-50);
}
.pdf-embed object { width: 100%; height: 100%; }
.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.75rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ── Visualizations ─────────────────────────────────────────── */
.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.25rem;
}

.viz-card {
  display: block;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.viz-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(37,99,235,0.08); text-decoration: none; }
.viz-card:hover h3 { color: var(--accent); }

.viz-card h3 { color: var(--gray-900); margin-bottom: 0.5rem; transition: color 0.15s; }
.viz-card p { font-size: 0.875rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 1rem; }
.viz-card .tags { margin-top: 0; }

.external-icon { float: right; color: var(--gray-300); margin-top: 0.2rem; }
.viz-card:hover .external-icon { color: var(--accent); }

/* ── Photography ────────────────────────────────────────────── */
.photo-section { margin-bottom: 3.5rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-item:hover img { transform: scale(1.05); }

.photo-caption {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-item:hover .photo-caption { opacity: 1; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; }
  .headshot-wrap { margin: 0 auto; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .viz-grid { grid-template-columns: 1fr; }
  .nav-tabs a { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
}

/* ── Coming Soon Overlay ─────────────────────────────────────── */
.coming-soon-wrap {
  position: relative;
}

.coming-soon-wrap .coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 8px;
}

.coming-soon-overlay span {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.18);
  letter-spacing: 0.05em;
  user-select: none;
  pointer-events: none;
  transform: rotate(-15deg);
}
