/* ==========================================================================
   Shared stylesheet for thh00.github.io and every site under it
   (e.g. /seminars). Change colors/fonts here and all pages follow.
   ========================================================================== */

:root {
  --accent: #840132;        /* AUB Berytus Red */
  --accent-dark: #5e0024;
  --accent-tint: #f7eaef;
  --ink: #1d1b1c;
  --muted: #625b5e;
  --border: #e8e2e4;
  --bg: #fcfbfa;
  --surface: #ffffff;
  --radius: 10px;
  --wrap: 960px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

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

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.25;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
}
.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Second-level nav (seminar site, course pages) */
.sub-nav {
  background: var(--accent-tint);
  border-bottom: 1px solid var(--border);
}
.sub-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 0.92rem;
}
.sub-nav-title {
  font-weight: 600;
  color: var(--accent-dark);
  margin-right: 6px;
}
.sub-nav a { color: var(--ink); text-decoration: none; }
.sub-nav a:hover, .sub-nav a.active { color: var(--accent); }
.sub-nav a.active { font-weight: 600; }

/* ---------- Main content ---------- */

main.wrap { padding-top: 40px; padding-bottom: 72px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: 2.1rem; margin: 0 0 0.6em; }
h2 {
  font-size: 1.5rem;
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
main > h1:first-child, main > h2:first-child { margin-top: 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

code {
  font-size: 0.9em;
  background: var(--accent-tint);
  color: var(--accent-dark);
  padding: 1px 6px;
  border-radius: 4px;
}
pre code { background: none; padding: 0; }
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
}

blockquote {
  margin: 1.2em 0;
  padding: 0.2em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

/* Tables (publications, course schedules) */
.table-scroll { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
  font-size: 0.95rem;
  background: var(--surface);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

/* Responsive video embeds */
iframe[src*="youtube.com"] {
  max-width: 100%;
  border: 0;
  border-radius: 8px;
}

/* ---------- Reusable components ---------- */

/* Intro / profile block */
.profile {
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 8px 0 28px;
}
.profile-photo {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}
.profile h1 { margin-bottom: 0.2em; }
.profile-role { margin: 0 0 10px; color: var(--muted); }
.profile-contact { margin: 0; font-size: 0.95rem; }
.profile-links { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.95rem; }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; }
.profile-links img { height: 16px !important; width: auto; margin: 0 !important; }
.affiliation-logo { width: 230px; margin: 4px 0 6px; }

.lab-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
}
.lab-banner h2 { margin: 0 0 0.4em; border: 0; padding: 0; font-size: 1.3rem; }
.lab-banner p { margin: 0; }

.people-link {
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 8px 0 0;
}
.people-link a:first-child { font-weight: 600; }

/* People cards */
.people {
  display: grid;
  gap: 16px;
  margin: 1em 0;
}
.person {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.person img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.person h3 { margin: 0 0 2px; }
.person-meta { margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); }
.person p:last-child { margin-bottom: 0; }

/* Photo galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 1em 0 2em;
}
.gallery figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery figcaption {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Call-out box */
.callout {
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 4px 22px 14px;
  margin: 2em 0;
}
.callout h2 { border: 0; margin-top: 0.9em; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 22px;
  padding-bottom: 32px;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 28px; }
  h1 { font-size: 1.7rem; }
  .profile { flex-direction: column; align-items: flex-start; }
  .profile-photo { width: 130px; height: 130px; }
  .person { flex-direction: column; }
  .person img { width: 90px; height: 90px; }
  .site-nav { gap: 4px 16px; }
}
