/* ==========================================================================
   Chunjiang Zhu — Academic Personal Website
   Clean editorial academic styling (zero build step, easy to maintain)
   ========================================================================== */

:root {
  /* Palette: Warm editorial paper + ODU-inspired maritime navy & slate teal */
  --bg: #f9f8f5;
  --surface: #ffffff;
  --surface-subtle: #f3f1ec;
  --border: #e5e1d8;
  --border-strong: #d5cfc3;

  --ink: #17212b;
  --ink-secondary: #4a5766;
  --ink-muted: #6c7886;

  --brand: #0e2a47;
  --brand-soft: #e9eff5;
  --accent: #1b6580;
  --accent-hover: #10495e;
  --accent-soft: #e8f3f7;

  /* Venue badge tints */
  --badge-conf-bg: #ebf2f8;
  --badge-conf-ink: #17466b;
  --badge-jour-bg: #edf5f0;
  --badge-jour-ink: #1d593a;
  --badge-pre-bg: #f4eff8;
  --badge-pre-ink: #5a357a;

  /* Notice banner */
  --notice-bg: #fdf8ec;
  --notice-border: #e6cb8e;
  --notice-ink: #6b4b12;

  /* Typography */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & elevation */
  --max-width: 1000px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, 0.04), 0 1px 3px rgba(14, 42, 71, 0.03);
  --shadow-md: 0 6px 20px rgba(14, 42, 71, 0.07);
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.66;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--brand);
  background: var(--surface-subtle);
  text-decoration: none;
}

.site-nav a.nav-cv {
  margin-left: 4px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 5px 12px;
}

.site-nav a.nav-cv:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* ==========================================================================
   Hero / Profile
   ========================================================================== */

.hero {
  padding: 46px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-main,
.profile-sidebar,
.profile-sidebar-stack,
.pub-year-list,
.pub-item {
  min-width: 0;
}

.portrait-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #1a1a1a;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 4.35;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  border-color: var(--brand);
  color: var(--brand);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.contact-card-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.845rem;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.contact-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent);
}

.hero-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  color: var(--accent);
}

.hero-name {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.hero-affiliation {
  margin: 0 0 20px;
  font-size: 1.04rem;
  color: var(--ink-secondary);
}

.hero-affiliation a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
}

.hero-affiliation a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--ink);
}

.bio-text p {
  margin: 0;
}

.erdos-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  margin-left: 2px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.interests-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.interests-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand);
}

.interests-desc {
  margin: 0 0 12px;
  font-size: 0.94rem;
  color: var(--ink);
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topic-tag {
  display: inline-block;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  color: var(--notice-ink);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.notice-banner svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 42px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--brand);
}

.section-subtitle {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.count-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   News Timeline
   ========================================================================== */

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.news-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  white-space: nowrap;
}

.news-body {
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.58;
}

.news-archive {
  margin-top: 14px;
}

.news-archive summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.news-archive summary::-webkit-details-marker {
  display: none;
}

.news-archive summary:hover {
  background: var(--surface-subtle);
  border-color: var(--brand);
}

.news-archive .chevron {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.news-archive[open] .chevron {
  transform: rotate(90deg);
}

.archive-card {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 20px;
  box-shadow: var(--shadow-sm);
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-list li {
  position: relative;
  padding: 10px 0 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.915rem;
  color: var(--ink-secondary);
  line-height: 1.58;
}

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

.archive-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* ==========================================================================
   Publications
   ========================================================================== */

.pub-note {
  margin: -10px 0 18px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.pub-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: var(--surface-subtle);
  color: var(--brand);
}

.filter-btn.is-active {
  background: var(--brand);
  color: #ffffff;
}

.filter-btn .filter-count {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  opacity: 0.78;
  margin-left: 4px;
}

.search-wrap {
  position: relative;
  flex: 1 1 230px;
  max-width: 310px;
}

.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  pointer-events: none;
}

.pub-search {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 12px 7px 34px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pub-search:focus {
  background: var(--surface);
  border-color: var(--accent);
}

.pub-status {
  margin: -12px 0 18px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  display: none;
}

.pub-status.is-visible {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clear-filter-btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.pub-year-group {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.pub-year-group:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.pub-year-label {
  position: sticky;
  top: 78px;
  align-self: start;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.3;
}

.pub-year-label.is-preprint {
  font-size: 1.02rem;
  color: var(--badge-pre-ink);
}

.pub-year-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pub-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 3px 10px rgba(14, 42, 71, 0.05);
}

.pub-title {
  margin: 0 0 5px;
  font-size: 0.99rem;
  font-weight: 620;
  line-height: 1.42;
  color: var(--ink);
}

.alpha-mark {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 4px;
}

.pub-authors {
  margin: 0 0 8px;
  font-size: 0.89rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.author-self {
  font-weight: 600;
  color: var(--ink);
}

.pub-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.pub-venue-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.venue-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.venue-badge.is-conference {
  background: var(--badge-conf-bg);
  color: var(--badge-conf-ink);
}

.venue-badge.is-journal {
  background: var(--badge-jour-bg);
  color: var(--badge-jour-ink);
}

.venue-badge.is-preprint {
  background: var(--badge-pre-bg);
  color: var(--badge-pre-ink);
}

.pub-venue-full {
  font-size: 0.86rem;
  font-style: italic;
  color: var(--ink-muted);
}

.pub-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 550;
  color: var(--brand);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
}

.pub-link:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  text-decoration: none;
}

.pub-empty {
  display: none;
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
}

.pub-empty.is-visible {
  display: block;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   Students
   ========================================================================== */

.student-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.subgroup-title {
  margin: 0 0 11px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 12px;
}

.student-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.student-card.is-current {
  border-left: 3px solid var(--accent);
}

.student-name {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
}

.student-name a {
  color: var(--brand);
}

.student-name a:hover {
  color: var(--accent);
}

.student-meta {
  font-size: 0.845rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Teaching
   ========================================================================== */

.teaching-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaching-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.teaching-inst-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.teaching-inst {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--brand);
}

.teaching-role {
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.course-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  font-size: 0.92rem;
}

.course-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--surface-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  justify-self: start;
}

.course-name {
  color: var(--ink);
  font-weight: 500;
}

.course-role-note {
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.course-term {
  font-size: 0.84rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ==========================================================================
   Professional Services
   ========================================================================== */

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.service-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

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

.service-label {
  font-weight: 620;
  font-size: 0.9rem;
  color: var(--brand);
}

.service-values {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.62;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
  color: var(--ink-muted);
  font-size: 0.87rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-hobbies {
  color: var(--ink-secondary);
}

.footer-hobbies strong {
  color: var(--brand);
  font-weight: 600;
}

.back-to-top {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .profile-sidebar {
    display: grid;
    grid-template-columns: 175px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .profile-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .pub-year-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .pub-year-label {
    position: static;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 4px;
  }

  .site-nav a {
    font-size: 0.85rem;
    padding: 4px 9px;
  }

  .pub-meta {
    flex-wrap: wrap;
  }

  .profile-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .portrait-frame {
    max-width: 220px;
  }

  .news-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 13px 16px;
  }

  .news-date {
    justify-self: start;
  }

  .course-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .course-term {
    white-space: normal;
  }

  .pub-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap {
    max-width: none;
  }

  .student-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  body {
    background: #ffffff;
    font-size: 11pt;
  }

  .site-header,
  .pub-controls,
  .profile-actions,
  .back-to-top {
    display: none !important;
  }

  .pub-item,
  .news-card,
  .teaching-card,
  .service-card,
  .student-card,
  .contact-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
