/* AEGIS Lab website – shared styles */
:root {
  --ink: #14313A;
  --teal: #1C4F5C;
  --teal-mid: #2B7A8A;
  --accent: #3AA6B9;
  --line: #D6E3E6;
  --line-strong: #C3D3D8;
  --bg-soft: #F3F7F8;
  --head: 'Barlow Semi Condensed', system-ui, sans-serif;
  --body: 'Be Vietnam Pro', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: #FFFFFF; }
img { max-width: 100%; }
a { color: var(--teal); }
a:hover { color: var(--ink); }

.container { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Language switching ---------- */
html[data-lang="en"] [data-l="vi"],
html[data-lang="vi"] [data-l="en"] { display: none; }

/* Nav labels keep the width of the longer language so the bar never jumps */
.stack { display: inline-grid; justify-items: center; }
.stack > [data-l] { grid-area: 1 / 1; }
html[data-lang="en"] .stack > [data-l="vi"],
html[data-lang="vi"] .stack > [data-l="en"] { display: block; visibility: hidden; }

/* ---------- Header ---------- */
.site-header { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.site-header .container {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.nav a {
  font-family: var(--head); font-weight: 600; font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); text-decoration: none; padding: 12px; min-height: 44px; display: flex; align-items: center;
}
.nav a:hover { color: var(--teal); }
.nav a[aria-current="page"] { color: #FFFFFF; background: var(--teal); }
.lang-switch { display: flex; margin-left: 8px; border: 1px solid var(--teal); }
.lang-switch button {
  font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: 0.08em;
  min-width: 48px; min-height: 44px; border: 0; background: #FFFFFF; color: var(--teal); cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--teal); color: #FFFFFF; }

/* ---------- Shared headings ---------- */
.page { padding-top: 64px; padding-bottom: 96px; }
.page-title {
  margin: 0 0 40px; font-family: var(--head); font-weight: 600; font-size: 44px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- About ---------- */
.cover-wrap { min-height: calc(100vh - 81px); display: flex; flex-direction: column; }
.hero {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; padding-top: 88px;
  min-height: 640px;
  background: url('../img/hero-satellite.jpg') center / cover no-repeat;
}
.hero-band { background: rgba(28, 79, 92, 0.88); color: #FFFFFF; }
.hero-band .container { padding-top: 40px; padding-bottom: 44px; text-align: center; }
.hero h1 {
  margin: 0; font-family: var(--head); font-weight: 600; font-size: clamp(56px, 9vw, 112px); line-height: 0.95;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hero .full-name {
  margin: 18px auto 0; max-width: 900px; font-family: var(--head); font-weight: 500; font-size: 26px; line-height: 1.3;
  letter-spacing: 0.04em; color: #EAF4F6;
}
.hero-foot { background: rgba(20, 49, 58, 0.86); color: #FFFFFF; }
.hero-foot .container {
  padding-top: 22px; padding-bottom: 22px; text-align: center; display: flex; flex-direction: column; gap: 4px;
  font-size: 17px; line-height: 1.5;
}
.hero-foot strong { font-weight: 600; letter-spacing: 0.04em; }

.intro { background: var(--bg-soft); min-height: 100vh; display: flex; align-items: center; }
.intro .container {
  width: 100%; padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 40px 72px;
}
.intro-logo { flex: 1 1 280px; min-width: 0; }
.intro-logo img { width: 100%; max-width: 380px; height: auto; display: block; }
.intro-logo .bar { width: 72px; height: 4px; background: var(--accent); margin-top: 24px; }
.intro-text { flex: 2 1 560px; min-width: 0; }
.intro-text p { margin: 0; font-size: 23px; line-height: 1.7; }
.mail-link {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font-size: 19px; font-weight: 600; color: var(--teal);
}

/* ---------- People ---------- */
.person {
  display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; padding: 32px 0;
  border-top: 1px solid var(--line-strong);
}
.person.leader { border-top: 4px solid var(--teal); }
.person img { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; display: block; flex: 0 0 220px; }
.person.leader img { width: 280px; height: 280px; flex-basis: 280px; }
.person-info { flex: 1 1 480px; min-width: 0; }
.person-info h3 { margin: 0; font-family: var(--head); font-weight: 600; font-size: 34px; line-height: 1.1; }
.person.leader .person-info h3 { font-size: 40px; }
.person-info .role { margin: 6px 0 0; font-size: 18px; line-height: 1.5; }
.person-info ul {
  margin: 24px 0 0; padding-left: 22px; font-size: 17px; line-height: 1.6; display: flex; flex-direction: column; gap: 10px;
}
.people-ra { background: var(--bg-soft); border-top: 1px solid var(--line); }
.people-ra .page { padding-top: 72px; }
.section-title {
  margin: 0 0 32px; font-family: var(--head); font-weight: 600; font-size: 44px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- Research ---------- */
.topics { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 64px; }
.topic { display: flex; flex-direction: column; gap: 20px; }
.topic h3 {
  margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong);
  font-family: var(--head); font-weight: 600; font-size: 30px; line-height: 1.15;
}
.topic img { display: block; width: 100%; }
.panel { background: var(--bg-soft); border: 1px solid var(--line); object-fit: contain; padding: 10px; }
.grid-aq {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, 410px); gap: 20px;
}
.grid-aq .main { grid-column: span 3; grid-row: span 2; height: 100%; }
.grid-aq .side { grid-column: span 2; height: 100%; }
.grid-aq .photo { object-fit: cover; object-position: 50% 60%; }
.flood-photo { height: 280px; object-fit: cover; object-position: 50% 55%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2 img { height: 460px; }

/* ---------- Publications ---------- */
.pub-list { margin: 0; padding: 0 0 0 28px; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.65; }
.pub-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub-empty { color: #4A6670; font-size: 18px; }

/* ---------- Contact ---------- */
.contact-grid { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.contact-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.contact-info h3 {
  margin: 0 0 6px; font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal);
}
.contact-info .email { font-size: 22px; font-weight: 600; color: var(--ink); }
.contact-info p { margin: 0; font-size: 19px; line-height: 1.6; }
.contact-map { flex: 1 1 460px; min-width: 0; }
.contact-map iframe { width: 100%; height: 340px; border: 1px solid var(--line-strong); display: block; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .brand img { height: 44px; }
  .lang-switch { margin-left: 0; }
  .nav a { font-size: 14px; padding: 10px 8px; }
  .hero { min-height: 520px; padding-top: 56px; }
  .hero .full-name { font-size: 20px; }
  .intro-text p { font-size: 19px; }
  .page-title, .section-title { font-size: 34px; }
  .person img, .person.leader img { width: 180px; height: 180px; flex-basis: 180px; }
  .grid-aq { grid-template-columns: 1fr; grid-template-rows: none; }
  .grid-aq .main, .grid-aq .side { grid-column: auto; grid-row: auto; height: auto; }
  .grid-aq .photo { height: 280px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 img { height: auto; }
  .flood-photo { height: 200px; }
}
