:root {
  --blue: #1a9be6;
  --blue-dark: #0f7fc2;
  --bg: #efefef;
  --card: #ffffff;
  --text: #333333;
  --muted: #666666;
  --line: #e2e2e2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 10; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; min-height: 90px; padding-top: 10px; padding-bottom: 10px; }
.logo img { width: 120px; height: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav > ul > li { position: relative; }
.main-nav a { display: block; padding: 8px 14px; color: #222; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-decoration: underline; text-underline-offset: 3px; }
.main-nav li.active > a, .main-nav a.on, .main-nav a:hover { color: var(--blue); }
.caret { font-size: 10px; }
.sub { display: none !important; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.08); min-width: 190px; z-index: 5; flex-direction: column; gap: 0 !important; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex !important; }
.sub a { padding: 10px 16px; text-decoration: none; font-weight: 500; }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #333; margin: 5px 0; }

/* Page title */
.page-title { background: #fff; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-title h1 { margin: 0; padding: 34px 0; font-weight: 300; font-size: 34px; letter-spacing: .02em; }

/* Cards */
main { padding-bottom: 50px; }
.card { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.text-card { padding: 34px 40px; }
.text-card h2 { font-weight: 400; margin-top: 0; }

/* Home */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 30px; padding-top: 50px; margin-bottom: 30px; }
.intro { padding: 40px 34px 30px; }
.underline { font-weight: 300; font-size: 28px; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 2px solid var(--blue); display: inline-block; }
.intro p { color: #444; font-size: 14px; }
.news { background: #111; color: #eee; padding: 26px 34px; margin-top: 0; }
.news-item { padding: 12px 0; border-bottom: 1px solid #333; font-size: 14px; }
.news-item:last-child { border-bottom: 0; }
.news-item strong { color: #fff; }
.news-item span { color: #aaa; }
.news a { color: #6cc4f5; }
.profile { display: flex; flex-direction: column; align-self: start; }
.profile-top { padding: 34px 30px 24px; text-align: center; }
.portrait { margin: 0 auto 18px; width: 170px; height: auto; }
.profile h1 { font-size: 22px; margin: 0 0 16px; font-weight: 700; }
.btn-outline { display: inline-block; border: 1px solid var(--blue); color: var(--blue); padding: 6px 20px; font-size: 12px; font-weight: 500; letter-spacing: .05em; }
.btn-outline:hover { background: var(--blue); color: #fff; text-decoration: none; }
.profile h3 { margin: 22px 0 4px; font-size: 15px; }
.small { font-size: 12px; color: var(--muted); }
.contact { list-style: none; margin: 0; padding: 18px 30px 22px; background: var(--blue); color: #fff; font-size: 13px; }
.contact li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.35); }
.contact li:last-child { border-bottom: 0; }
.contact span { font-weight: 500; }
.contact a { color: #fff; }

/* Research tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; }
.tile { padding: 22px 22px 18px; display: flex; flex-direction: column; }
.tile h2 { font-size: 18px; font-weight: 400; margin: 0 0 14px; }
.tile h2 a { color: var(--text); }
.tile-img img { width: 100%; }
.more { margin-top: 14px; font-size: 13px; font-weight: 500; }
.topic { padding: 34px 40px; }
.topic-img { margin: 0 0 24px; max-width: 420px; }
.video { position: relative; padding-top: 56.25%; margin: 0 0 8px; max-width: 720px; }
.video-link { margin: 0 0 24px; font-size: 13px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.back { font-size: 13px; }

/* Members */
.members { display: grid; gap: 24px; }
.member { display: grid; grid-template-columns: 170px 1fr; gap: 28px; padding: 26px; }
.member.no-photo { grid-template-columns: 1fr; }
.member.no-photo .m-photo { display: none; }
.m-photo img { width: 170px; height: 170px; object-fit: cover; }
.member h2 { margin: 0; font-size: 20px; font-weight: 500; }
.member h3 { margin: 2px 0 12px; font-size: 14px; font-weight: 400; color: var(--blue); }
.member p { margin: 0 0 12px; font-size: 14px; color: #444; }
.member .now { font-style: italic; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 24px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.credit { padding: 0 24px 22px; margin: 0; font-weight: 700; font-size: 14px; }

/* Publications */
.pubs { padding-left: 22px; }
.pubs li { margin-bottom: 14px; font-size: 14px; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 22px 0; font-size: 12px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; padding-top: 24px; }
  .menu-toggle { display: block; }
  .header-inner { align-items: center; flex-wrap: wrap; }
  .main-nav { display: none; width: 100%; }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .sub { position: static; display: flex !important; box-shadow: none; border: 0; padding-left: 14px; }
  .page-title h1 { font-size: 26px; padding: 22px 0; }
  .page-title { margin-bottom: 24px; }
  .text-card, .topic { padding: 24px 20px; }
  .member { grid-template-columns: 1fr; }
  .m-photo img { width: 140px; height: 140px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .intro, .news { padding-left: 20px; padding-right: 20px; }
}
.topic-video { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 0 24px; background: #000; }
