/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cabin', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
}

a { color: #1a5fb4; text-decoration: none; }
a:hover { text-decoration: underline; }

ul { margin-left: 1.4em; }
li { margin-bottom: 0.25em; }

/* ── Header / Nav ── */
.header {
  border-bottom: 1px solid #ddd;
  background: #fafafa;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 100%;
}

.site-title {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.site-title:hover { text-decoration: none; color: #333; }

nav {
  display: flex;
  gap: 36px;
}

nav a {
  color: #333;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

nav a:hover,
nav a.active {
  border-bottom-color: #333;
  text-decoration: none;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  position: relative;
  transition: 0.3s;
}
.hamburger span::before,
.hamburger span::after {
  content: '';
  position: absolute;
}
.hamburger span::before { top: -7px; }
.hamburger span::after  { top: 7px; }

/* ── Main Content ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 30px 60px;
}

/* ── Home: two-column layout ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.sidebar h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 3px;
}
.sidebar h3:first-child { margin-top: 0; }

.sidebar p { margin-bottom: 2px; font-size: 15px; }

.sidebar ul {
  margin-bottom: 6px;
  font-size: 15px;
}

.sidebar li { margin-bottom: 1px; }

.btn-cv {
  display: inline-block;
  background: #333;
  color: #fff;
  padding: 6px 20px;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  transition: background 0.2s;
}
.btn-cv:hover { background: #444; text-decoration: none; }

.main-col .photo {
  max-width: 100%;
  width: 100%;
  display: block;
  margin-bottom: 20px;
}

.main-col h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.main-col p {
  font-size: 15px;
  margin-bottom: 6px;
}

/* Recent media section */
.media-preview {
  margin-top: 30px;
}

.media-preview h3 {
  text-align: left;
  font-size: 15px;
  margin-bottom: 16px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.media-grid iframe {
  width: 100%;
  border-radius: 8px;
}

/* ── Research page ── */
.research-section {
  margin-bottom: 28px;
}

.research-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.paper {
  margin-bottom: 14px;
  padding-bottom: 12px;
  line-height: 1.3;
}

.paper h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.paper h3 a {
  color: #1a5fb4;
  font-weight: 700;
}

.paper h3 a:hover {
  text-decoration: underline;
}

.paper .authors {
  font-size: 15px;
  color: #555;
  margin-bottom: 2px;
}

.paper .venue {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 1px;
}

.paper-toggles {
  margin-top: 4px;
}

.toggle-btn {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #777;
  margin-right: 14px;
}

.toggle-btn::before {
  content: '\25B8 ';
  color: #bbb;
  font-weight: normal;
}

.toggle-btn.active::before {
  content: '\25BE ';
}

.toggle-panel {
  margin-top: 2px;
  margin-bottom: 4px;
}

.toggle-panel .toggle-content {
  font-size: 15px;
  color: #666;
}

.toggle-panel .abstract {
  font-size: 15px;
  color: #444;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* ── Media page ── */
.media-item {
  margin-bottom: 34px;
}

.media-item h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.media-item .media-source {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.media-item .media-source a {
  color: #2a08f7;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  max-width: 660px;
  margin-bottom: 10px;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: 8px;
}

.audio-wrap {
  max-width: 660px;
  margin-bottom: 10px;
}
.audio-wrap iframe {
  width: 100%;
  border: none;
  border-radius: 10px;
}

/* ── Resources page ── */
.resources-section {
  margin-bottom: 36px;
}

.resources-section h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}

.resources-section p {
  font-size: 15px;
  margin-bottom: 10px;
}

.resources-section ul {
  font-size: 15px;
  margin-bottom: 14px;
}

/* ── Data page ── */
.data-section p,
.data-content p {
  font-size: 15px;
  max-width: 800px;
  margin-bottom: 14px;
  line-height: 1.7;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid #eee;
  text-align: center;
  padding: 20px 30px;
  font-size: 12px;
  color: #999;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .header { flex-wrap: wrap; gap: 10px; padding: 16px 20px; position: relative; }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  nav.open { display: flex; }
  nav a { padding: 10px 0; border-bottom: 1px solid #eee; font-size: 14px; }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-grid .sidebar { order: 2; }
  .home-grid .main-col { order: 1; }

  .main-col .photo { max-width: 80%; }
}
