/* University burgundy, ordinary system fonts, and entirely local assets. */
:root { --tml-red: #a51e37; --tml-ink: #333; --tml-line: #e5e1db; }
* { box-sizing: border-box; }
html { background: #f6f5f2; }
body { margin: 0; background: transparent; color: var(--tml-ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.6; }
#outer { width: min(100%, 1080px); margin: 28px auto; overflow: visible !important; background: #fff; background-image: none; border-top: 3px solid var(--tml-red); }

/* Centered identity, with a deliberately small university logo. */
.masthead { display: flex; flex-direction: column; align-items: center; gap: 19px; padding: 30px 32px 29px; text-align: center; }
.university-logo { display: block; width: 140px; flex-shrink: 0; }
.university-logo img { display: block; width: 100%; height: auto; }
a.site-title, a.site-title:link, a.site-title:visited { display: block; color: var(--tml-red); font-size: 32px; font-weight: 500; line-height: 1.25; text-decoration: none; text-align: center; }
.site-title > span { display: block; color: inherit; text-align: center; }
a.site-title:hover { color: #82182c; text-decoration: none; }
.site-title .site-subtitle { margin-top: 9px; color: #68615a; font-size: 15px; font-weight: normal; line-height: 1.5; }

/* A compact top navigation, with the current section underlined. */
.top-navigation { margin: 0 48px; border-top: 1px solid var(--tml-line); border-bottom: 1px solid var(--tml-line); }
#submenu { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 10px; float: none; width: auto; margin: 0; padding: 0; list-style: none; }
#submenu li { display: block; margin: 0; padding: 0; border: 0; background: none; }
#submenu li a { display: flex; align-items: center; min-height: 49px; padding: 11px 10px 9px; border-bottom: 2px solid transparent; color: #514b45; font-size: 14px; font-weight: normal; line-height: 1.7; text-decoration: none; }
#submenu li a:hover { color: var(--tml-red); background: #faf8f5; }
#submenu a[aria-current] { color: var(--tml-red); border-bottom-color: var(--tml-red); font-weight: bold; }

/* One readable column; legacy course layouts remain inside the main content. */
#mid.site-layout { display: block; width: auto; margin: 0; padding: 32px 48px 36px; float: none; }
#content.content-width { width: 100% !important; max-width: 850px; min-width: 0; float: none; margin: 0 auto; padding: 0; font-size: 16px; overflow-wrap: anywhere; }
#content h1 { margin: 0 0 26px; padding: 0; color: var(--tml-red); font-size: 28px; font-weight: normal; line-height: 1.35; }
#content > h1:first-of-type { text-align: center; }
#content h2 { margin: 24px 0 10px; padding: 0; color: var(--tml-red); font-size: 22px; font-weight: normal; line-height: 1.4; }
#content h3 { margin: 20px 0 8px; padding: 0; font-size: 18px; line-height: 1.5; }
p { margin: 0 0 14px; }
a { color: #8b1830; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--tml-red); outline-offset: 4px; }
img { max-width: 100%; }
#content img { height: auto; }
#content table { max-width: 100%; font-size: inherit; }
#content pre { overflow-x: auto; }
#content ul, #content ol { padding-left: 24px; }
#content ul, #content ol { margin-top: 8px; margin-bottom: 16px; }
#content .bottom-one { margin-bottom: 18px; }
.team-photos { margin: 22px 0 26px; text-align: center; }
.photo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; }
.team-photos figcaption { margin-top: 7px; color: #68615a; font-size: 14px; text-align: center; }
.group-photos { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin: 32px 0 0; }
#content .group-photos img { width: min(100%, 700px); height: auto; }
.group-photos { justify-content: center; }
.group-photos.welcome-photo { margin: 0 0 22px; }
#content .welcome-photo img { width: min(100%, 580px); }
#content .current-team-photos img { width: min(100%, 600px); height: auto; max-width: 100%; object-fit: contain; }

/* Affiliation logos are secondary; legal links remain easy to find. */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 16px; clear: both; margin: 0 48px; padding: 20px 0; border-top: 1px solid var(--tml-line); font-size: 12px; line-height: 1.6; }
.affiliation-logos { display: flex; justify-content: center; align-items: center; gap: 30px; flex-wrap: wrap; width: 100%; }
.affiliation-logos a { display: inline-flex; align-items: center; flex: 0 0 auto; }
.affiliation-logos img { display: block; width: auto; height: 44px; max-width: 100%; }
.footer-links { white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 4px; z-index: 10; padding: 8px; background: white; }
.review-note { padding: 14px 18px; background: #fff8e9; border-left: 3px solid #9d752b; }

@media (max-width: 740px) {
  #outer { margin: 0; }
  .masthead { gap: 17px; padding: 24px 20px; }
  .university-logo { width: 125px; }
  a.site-title, a.site-title:link, a.site-title:visited { font-size: 27px; }
  .site-title .site-subtitle { font-size: 14px; }
  .top-navigation { margin: 0 20px; }
  #submenu { gap: 0 5px; }
  #submenu li a { min-height: 44px; padding: 9px 7px 7px; font-size: 13px; }
  #mid.site-layout { padding: 30px 20px 36px; }
  #content.content-width { font-size: 15px; }
  #content h1 { font-size: 24px; }
  #content h2 { font-size: 20px; }
  #content table { display: block; overflow-x: auto; }
  #content .csc-textpic-imagewrap { max-width: 100%; }
  .site-footer { margin: 0 20px; }
  .affiliation-logos { gap: 16px; }
  .affiliation-logos img { height: 32px; }
  .footer-links { padding-bottom: 8px; }
}
@media (max-width: 480px) {
  #content .group-photos img { width: 100%; }
}

/* Portrait and compact contact details share a calm, aligned profile header. */
#content .profile-summary { display: flex; align-items: flex-start; gap: 24px; margin: 0 0 22px; }
#content .profile-summary .csc-textpic-imagewrap { flex: 0 0 auto; float: none; clear: none; width: auto; max-width: 220px; margin: 0 !important; }
#content .profile-summary .csc-textpic-imagewrap p { margin: 0; }
#content .profile-summary .csc-textpic-imagewrap img { display: block; width: auto; height: auto; max-width: 220px; max-height: 270px; object-fit: contain; }
#content .profile-summary .csc-textpic-text { float: none; clear: none; min-width: 0; margin: 0 !important; padding: 0; font-size: inherit; line-height: 1.2; color: #55504a; }
#content .profile-summary .csc-textpic-text p { font-size: inherit; line-height: inherit; margin: 0; }
.exhibition-photos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; }
#content .exhibition-photos img { display: block; width: auto; height: 150px; max-width: 100%; object-fit: contain; }
@media (max-width: 540px) {
  #content .profile-summary { flex-direction: column; gap: 14px; }
  #content .exhibition-photos img { height: 120px; }
}

/* Legacy line breaks must not enlarge the compact address line boxes. */
#content .profile-summary .csc-textpic-text * { font-size: inherit; line-height: inherit; }
#content .profile-summary .csc-textpic-text br { margin: 0; padding: 0; }
#content p.profile-section { margin-top: 24px; }

/* Semester labels remain navigable headings, styled as compact bold text. */
#content h3.semester-heading { font-size: inherit; font-weight: bold; line-height: 1.4; margin: 14px 0 0; }

/* Exhibition images are grouped in three pairs, with larger readable details. */
#content .exhibition-gallery .exhibition-photos img { height: 220px; }
@media (max-width: 540px) {
  #content .exhibition-gallery .exhibition-photos img { height: 180px; }
}

/* A compact side caption explains the blackboard photo without rotating text. */
.public-debate-photo { display: flex; align-items: center; gap: 18px; max-width: 540px; margin: 0 auto 24px; }
#content .public-debate-photo img { width: 360px; min-width: 0; flex: 0 1 360px; height: auto; }
.public-debate-photo figcaption { flex: 0 0 160px; font-size: 12px; line-height: 1.5; color: #68615a; text-align: left; }
@media (max-width: 540px) {
  .public-debate-photo { flex-direction: column; gap: 10px; }
  #content .public-debate-photo img { flex: none; width: min(100%, 360px); }
  .public-debate-photo figcaption { flex: none; width: min(100%, 360px); }
}

/* Content links use the university red consistently, including visited links. */
#content a, #content a:link, #content a:visited, #content a:hover, #content a:active { color: var(--tml-red) !important; font-weight: normal; text-decoration: underline; }
#content a strong, #content a b { color: inherit !important; font-weight: normal; }

/* Center each portrait-and-address pair, with the address on the right. */
#content .profile-summary { flex-direction: row; justify-content: center; align-items: center; gap: 24px; }
#content .profile-summary .csc-textpic-text { text-align: left; }
#content .profile-summary.profile-summary-large .csc-textpic-imagewrap { max-width: 260px; }
#content .profile-summary.profile-summary-large .csc-textpic-imagewrap img { max-width: 260px; max-height: 320px; }

@media (max-width: 640px) {
  #content .profile-summary { flex-direction: column; gap: 14px; }
  #content .profile-summary .csc-textpic-text { text-align: center; }
}
