/* =======================
   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, .cyan { color: var(--cyan); text-decoration: none; }
a.cyan:hover, .cyan:hover { text-decoration: underline; }
.title-blue-text { color: var(--title-blue); font-weight: 700; }

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

/* =======================
   Section shell
   ======================= */
.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; }
.sub-heading { font-weight: 700; font-size: 1.1rem; margin: 1.5rem 0 .25rem; }
.sub-heading:first-of-type { margin-top: .5rem; }

/* =======================
   Publications / Experience rows
   ======================= */
.pub-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  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;
}

.pub {
  flex: 1; max-width: 42rem;
  font-size: 1rem;
  line-height: 1.55;
}
.pub.pub-full { max-width: 100%; }

.pub .title {
  font-weight: 800;
  font-size: 1.0625rem;    /* 17px */
  line-height: 1.3;
  margin: 0;
}

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

.pub .authors { margin: .2rem 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; }

.pub-summary { margin-top: 1.1rem; font-size: .98rem; line-height: 1.35; }

.pub-bullets { margin: .5rem 0 0; padding-left: 1.15rem; }
.pub-bullets li { margin-bottom: .3rem; font-size: .95rem; color: var(--text); }

/* =======================
   Education / Teaching rows
   ======================= */
.edu-row { margin-top: 1.1rem; }
.edu-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; }
.edu-head h3 { font-size: 1.0625rem; font-weight: 800; margin: 0; }
.edu-date { color: var(--muted); font-style: italic; font-size: .95rem; white-space: nowrap; }
.edu-role { margin: .2rem 0 0; font-size: .97rem; }

/* =======================
   Awards
   ======================= */
.award-row { display: flex; gap: .9rem; margin-top: .7rem; align-items: baseline; }
.award-year { font-weight: 700; color: var(--title-blue); flex-shrink: 0; width: 2.75rem; }
.award-row p { margin: 0; font-size: .97rem; }

/* =======================
   Two-column (Teaching / Media & Skills)
   ======================= */
.two-col-grid { display: grid; gap: 2.5rem; }
@media (min-width: 640px) {
  .two-col-grid { grid-template-columns: 1fr 1fr; }
}

/* =======================
   Skills
   ======================= */
.skills-block { margin-top: 1.2rem; }
.skills-block h4 { font-size: .95rem; font-weight: 700; margin: 0 0 .2rem; }
.skills-block p { margin: 0; font-size: .95rem; color: var(--text); }

/* =======================
   Contact
   ======================= */
.email-cta { font-size: 1.25rem; font-weight: 700; }

/* Fold for the longer publication list */
.more-pubs { margin-top: .75rem; }
.more-pubs > summary {
  cursor: pointer;
  font-weight: 600;
  padding: .4rem 0;
  list-style-position: inside;
}
.more-pubs > summary:hover { text-decoration: underline; }
.more-pubs[open] > summary { margin-bottom: .25rem; }
.more-pubs .when-open { display: none; }
.more-pubs[open] .when-open { display: inline; }
.more-pubs[open] .when-closed { display: none; }
