/* =======================
   Base / Layout
   ======================= */
:root {
  --maxw: 64rem;           /* ~1024px */
  --pad-x: 1.75rem;
  --pad-x-lg: 5rem;
  --cyan: #06b6d4;         /* regular link color */
  --title-blue: #1e40af;   /* slightly darker blue for titles */
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  color: var(--text);
  background: #fff;
}

/* Main container + horizontal rules */
.main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.5rem var(--pad-x);
}
@media (min-width: 640px) {
  .main { padding-left: var(--pad-x-lg); padding-right: var(--pad-x-lg); }
}
.rule {
  height: 2px; background: var(--border);
  border: 0; border-radius: 2px; margin: 1rem auto;
}

/* =======================
   Intro grid (3 columns at sm+)
   ======================= */
.intro-grid { display: grid; grid-auto-rows: auto; gap: 1rem; }
@media (min-width: 640px) { .intro-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.profile-col { place-self: center; }
.profile-wrap { padding: 0 1.75rem 0.5rem; }

.image-container {
  width: 200px; height: 250px; overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
}
.profile-image { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.intro-col { place-self: center; grid-column: 1 / -1; }
@media (min-width: 640px) { .intro-col { grid-column: 2 / 4; } }

h1.title { font-weight: 700; font-size: 1.875rem; margin: .25rem 0; }
p.lead { font-size: 1rem; line-height: 1.75; margin: .25rem 0; }

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

/* Icon row */
.icon-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 1rem; justify-items: center; padding: 0 2.5rem;
}
.icon { width: 2rem; height: 2rem; color: #000; }

/* =======================
   Publications
   ======================= */
.section { padding-left: 1.75rem; padding-right: 1.75rem; }
.section h2 { font-weight: 700; font-size: 1.5rem; margin: .5rem 0; }
.section .note { font-size: 1rem; line-height: 1.2; }

/* Row layout: image left, text right (stack on small screens) */
.pub-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .pub-row { flex-direction: row; align-items: flex-start; }
}

.media {
  width: 100%; max-width: 16rem;
  flex-shrink: 0; display: flex; justify-content: center; align-items: center;
}
.media > img, .media > video {
  width: 100%; max-width: 15rem; height: auto; border-radius: 6px;
}

/* Text column */
.pub {
  flex: 1; max-width: 42rem;
  font-size: 1rem;
  line-height: 1.55;
}

/* --- Title / meta / authors / links: compact stack --- */
.pub .title {
  font-weight: 800;
  font-size: 1.0625rem;    /* 17px */
  line-height: 1.25;
  margin: 0;               /* let following blocks control spacing */
}

.pub .meta {
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  margin: .05rem 0 0;
}

.pub .authors { margin: .05rem 0 0; }

.links { margin: .05rem 0 0; }
.links a { color: var(--cyan); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links .dot { margin: 0 .35rem; color: #9ca3af; }

/* TL;DR paragraph */
.pub-summary {
  margin-top: 1.1rem;      /* clear space from links above */
  font-size: .98rem;
  line-height: 1.35;
}

/* Optional extra tightening for entries marked pub-tight */
.pub-tight .title,
.pub-tight .meta,
.pub-tight .authors,
.pub-tight .links {
  margin-top: .05rem;
  margin-bottom: .05rem;
  line-height: 1.3;
}
