/* Eric B. Winsberg — Academic site: shared styles */
/* Minimalist academic: Lora (body), Inter (headers), paper-white, ink-black, navy accents */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
  --paper: #fcfaf7;
  --ink: #1a1a1a;
  --navy: #002147;
  --navy-muted: rgba(0, 33, 71, 0.85);
  --border: #e5e2dd;
  --muted: #5c5c5c;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
nav,
.nav-title,
.site-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-top: 0; margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.6rem); margin-top: 2rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
h3 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ----- Navigation ----- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.site-title a {
  color: var(--ink);
}

.site-title a:hover {
  color: var(--navy);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--navy);
  text-decoration: none;
}

/* ----- Layout ----- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.page-title {
  margin-bottom: 1.5rem;
}

/* ----- Home: hero + photo ----- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .hero {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
}

.photo-placeholder {
  aspect-ratio: 1;
  background: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* ----- News ----- */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.news-list li:first-child {
  padding-top: 0;
}

.news-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* ----- Research: books ----- */
.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-list li {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.book-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.book-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.book-meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.book-desc {
  font-size: 0.95rem;
  color: var(--ink);
}

/* ----- Publications ----- */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-list li:first-child {
  padding-top: 0;
}

.pub-year {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

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

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

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

.pub-venue {
  font-size: 0.95rem;
  color: var(--muted);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ----- Media grid ----- */
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 480px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 720px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.media-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
}

.media-card:hover {
  box-shadow: 0 4px 12px rgba(0, 33, 71, 0.08);
}

.media-type {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.media-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.media-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ----- CV page ----- */
.cv-section {
  margin-bottom: 2rem;
}

.cv-section h2 {
  margin-top: 2.5rem;
}

.cv-section h2:first-child {
  margin-top: 0;
}

.cv-item {
  margin-bottom: 1rem;
}

.cv-item-title {
  font-weight: 600;
}

.cv-item-meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.cv-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0 0;
}

.cv-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

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

/* ----- Contact ----- */
.contact-grid {
  display: grid;
  gap: 2rem;
}

.affiliation {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.affiliation:last-of-type {
  border-bottom: none;
}

.affiliation h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.contact-details {
  margin-top: 1.5rem;
}

.contact-details dl {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.contact-details dt {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.contact-details dd {
  margin: 0 0 0.5rem 0;
}

.contact-details dd:last-child {
  margin-bottom: 0;
}

/* ----- Utility ----- */
.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
