/* ============================================
   Barney Hartman-Glaser — Academic Webpage
   Light & clean design, blue accent
   ============================================ */

:root {
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --blue-dark: #1e40af;
  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --accent-gold: #d97706;
  --radius: 8px;
  --max-width: 900px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; }

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--blue-dark);
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ---- Navigation ---- */

nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 1.5rem;
}

nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

nav .nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

nav .nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

nav .nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---- Hero ---- */

.hero {
  padding: 5rem 0 3rem;
  border-bottom: none;
}

.hero h1 {
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.hero .role-secondary {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 600px;
  line-height: 1.6;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.hero-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ---- What's New ---- */

.whats-new {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
}

.whats-new h2 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-item {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 80px;
}

.news-text {
  font-size: 0.95rem;
}

/* ---- Research Narrative ---- */

/* ---- Impact Highlights ---- */

.highlight-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.highlight-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.highlight-card .paper-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.highlight-card .paper-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.highlight-card .paper-description {
  font-size: 0.95rem;
  line-height: 1.65;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fef3c7;
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ---- Publications ---- */

.pub-category {
  margin-bottom: 2.5rem;
}

.pub-category h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}

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

.pub-entry {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.pub-entry:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: var(--blue);
}

.pub-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.pub-title a {
  color: var(--text);
}

.pub-title a:hover {
  color: var(--blue);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pub-venue em {
  font-style: italic;
  color: var(--text);
}

.pub-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.pub-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pub-status {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 500;
}

.pub-abstract {
  margin-top: 0.5rem;
}

.pub-abstract summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0;
  user-select: none;
}

.pub-abstract summary:hover {
  color: var(--blue-dark);
}

.pub-abstract summary::marker {
  color: var(--blue);
}

.pub-abstract p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 0.5rem;
  padding-left: 0.25rem;
  border-left: 2px solid var(--border);
  padding: 0.5rem 0.75rem;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---- Service ---- */

.service-list {
  list-style: none;
  padding: 0;
}

.service-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-role {
  font-weight: 600;
}

/* ---- Teaching ---- */

.placeholder-note {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---- Footer ---- */

footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  text-align: center;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

footer .footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

footer .footer-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---- Scroll animations ---- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }

  .hero { padding: 3rem 0 2rem; }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }

  nav .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .whats-new {
    padding: 1.25rem;
  }

  .news-item {
    flex-direction: column;
    gap: 0.1rem;
  }

  section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.65rem; }

  .hero-links {
    flex-direction: column;
  }

  .hero-links a {
    justify-content: center;
  }
}
