/* ===== CAST Academic Theme ===== */
:root {
  --primary: #2a7e19;
  --primary-dark: #1d5c11;
  --primary-light: #3da82a;
  --secondary: #1565c0;
  --bg: #fff;
  --bg-alt: #f8f9fa;
  --bg-dark: #2c3e2d;
  --text: #333;
  --text-light: #6c757d;
  --text-muted: #999;
  --border: #dee2e6;
  --shadow: 0 2px 15px rgba(0,0,0,.08);
  --radius: 8px;
  --nav-height: 70px;
  --max-width: 1200px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); line-height: 1.7; background: var(--bg);
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.3; }

/* === Navigation === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0,0,0,.08); height: var(--nav-height);
  display: flex; align-items: center;
}
.navbar .container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.25rem; color: var(--primary-dark); }
.navbar-brand img { height: 40px; width: auto; }
.nav-links { display: flex; gap: .3rem; list-style: none; }
.nav-links a {
  display: inline-block; padding: .5rem .9rem; font-size: .9rem; font-weight: 500;
  color: var(--text); border-radius: 6px; transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(42,126,25,.08); color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* === Hero === */
.hero {
  position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; margin-top: var(--nav-height);
  text-align: center; color: #fff; padding: 4rem 1.5rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; text-shadow: 0 2px 12px rgba(0,0,0,.5); color: #fff; }
.hero h1 strong { color: inherit; font-weight: inherit; }
.hero p { font-size: 1.25rem; line-height: 1.6; color: rgba(255,255,255,.95); text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero p strong { color: inherit; }

/* === Sections === */
.section { padding: 4rem 1.5rem; }
.section:nth-child(even) { background: var(--bg-alt); }
.section .container { max-width: var(--max-width); margin: 0 auto; }
.section-title {
  font-size: 2rem; font-weight: 700; margin-bottom: .5rem;
  padding-bottom: .5rem; border-bottom: 3px solid var(--primary);
  display: inline-block;
}
.section-subtitle { color: var(--text-light); font-size: 1.05rem; margin-bottom: 2.5rem; }

/* === About === */
.about-content { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start; }
.about-logo { text-align: center; }
.about-logo img { width: 180px; border-radius: 12px; }
.about-text p { margin-bottom: 1rem; }
.research-areas { margin-top: 1rem; }
.research-areas li { padding: .3rem 0; padding-left: 1.2rem; position: relative; list-style: none; }
.research-areas li::before { content: '▸'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

/* === People / Team === */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.person-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-align: center; padding: 1.5rem 1rem;
  transition: transform .2s, box-shadow .2s;
}
.person-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.person-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 1rem; border: 3px solid var(--primary-light);
}
.person-card h4 { font-size: 1.05rem; margin-bottom: .25rem; }
.person-card .role { color: var(--text-light); font-size: .85rem; }
.person-card .org { color: var(--text-muted); font-size: .8rem; margin-top: .2rem; }
.person-social { margin-top: .75rem; display: flex; gap: .5rem; justify-content: center; }
.person-social a { color: var(--text-light); font-size: 1rem; }
.person-social a:hover { color: var(--primary); }
.group-title { font-size: 1.3rem; color: var(--primary-dark); margin: 2rem 0 1rem; font-weight: 600; }

/* === Projects === */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.project-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.project-card img { width: 100%; height: 200px; object-fit: cover; }
.project-card .card-body { padding: 1.25rem; }
.project-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.project-card p { color: var(--text-light); font-size: .9rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.tag {
  display: inline-block; padding: .2rem .6rem; background: rgba(42,126,25,.1);
  color: var(--primary-dark); border-radius: 4px; font-size: .75rem; font-weight: 500;
}

/* === Publications === */
.pub-list { list-style: none; }
.pub-item {
  padding: 1.25rem 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 1rem; align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; }
.pub-year {
  min-width: 60px; font-weight: 700; color: var(--primary);
  font-size: .9rem; padding-top: .15rem;
}
.pub-content h4 { font-size: 1rem; margin-bottom: .3rem; font-weight: 600; }
.pub-content .pub-authors { color: var(--text-light); font-size: .9rem; margin-bottom: .25rem; }
.pub-content .pub-venue { color: var(--text-muted); font-size: .85rem; font-style: italic; }
.pub-links { margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.pub-links a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 4px;
  font-size: .78rem; color: var(--text-light); transition: all .2s;
}
.pub-links a:hover { border-color: var(--primary); color: var(--primary); }

/* === Contact === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info p { margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.contact-info .icon { color: var(--primary); width: 20px; text-align: center; }
.contact-map { border-radius: var(--radius); overflow: hidden; min-height: 300px; }
.contact-map iframe { width: 100%; height: 100%; border: 0; min-height: 300px; }

/* === Footer === */
.footer {
  background: var(--bg-dark); color: rgba(255,255,255,.7);
  padding: 2rem 1.5rem; text-align: center; font-size: .9rem;
}
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: #fff; }

/* === Single Pages === */
.page-header {
  background: var(--bg-alt); padding: 3rem 1.5rem; margin-top: var(--nav-height);
  border-bottom: 1px solid var(--border);
}
.page-header .container { max-width: var(--max-width); margin: 0 auto; }
.page-header h1 { font-size: 2.2rem; color: var(--text); }
.page-content { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; }
.page-content p, .page-content li { margin-bottom: .75rem; }
.page-content h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.5rem; }
.page-content h3 { margin-top: 1.5rem; margin-bottom: .5rem; font-size: 1.25rem; }
.page-content pre { background: #f4f5f7; padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 1rem 0; }
.page-content code { font-size: .9em; }
.page-content img { border-radius: 6px; margin: 1rem 0; }
.page-meta { color: var(--text-light); font-size: .9rem; margin-top: .5rem; }

/* List pages */
.list-page { margin-top: var(--nav-height); }
.list-page .container { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.5rem; }
.list-page h1 { font-size: 2rem; margin-bottom: 2rem; padding-bottom: .5rem; border-bottom: 3px solid var(--primary); display: inline-block; }
.list-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.list-item p { color: var(--text-light); font-size: .9rem; }
.list-item .meta { color: var(--text-muted); font-size: .85rem; }

/* === Author Profile Page === */
.author-profile {
  display: grid; grid-template-columns: 250px 1fr; gap: 3rem;
  align-items: start; margin-top: var(--nav-height);
  max-width: var(--max-width); margin-left: auto; margin-right: auto; padding: 3rem 1.5rem;
}
.author-sidebar { text-align: center; }
.author-sidebar img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); }
.author-sidebar h2 { margin-top: 1rem; font-size: 1.3rem; }
.author-sidebar .role { color: var(--text-light); font-size: .9rem; }

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .about-content { grid-template-columns: 1fr; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .project-grid { grid-template-columns: 1fr; }
  .author-profile { grid-template-columns: 1fr; text-align: center; }
  .pub-item { flex-direction: column; gap: .3rem; }
}
