/* ===== CSS Custom Properties ===== */
:root {
  --primary: #003366;
  --primary-light: #004a8f;
  --accent: #BE830E;
  --accent-light: #d4a43a;
  --text: #2d2d2d;
  --text-light: #555;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-hero: #003366;
  --border: #e0e4e8;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 6px;
  --max-width: 1100px;
}

/* ===== Base Styles ===== */
*, *::before, *::after { box-sizing: border-box; }

body, html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Lato", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lato", sans-serif;
  color: var(--primary);
  line-height: 1.3;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-top: 0;
  margin-bottom: 32px;
}

/* ===== Navbar ===== */
#myNavbar {
  background: var(--primary) !important;
  padding: 0 16px;
}

#myNavbar .w3-bar-item {
  color: #fff !important;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 14px 18px;
  transition: background 0.2s;
}

#myNavbar .w3-bar-item:hover {
  background: var(--primary-light) !important;
}

#myNavbar .nav-active {
  border-bottom: 3px solid var(--accent);
}

#myNavbar.scrolled {
  background: var(--primary) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

#navDemo {
  background: var(--primary) !important;
}
#navDemo .w3-bar-item {
  color: #fff !important;
}
#navDemo .w3-bar-item:hover {
  background: var(--primary-light) !important;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #00264d 100%);
  color: #fff;
  padding: 80px 0 60px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: center;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-text {
  text-align: left;
}

.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.hero .hero-title {
  font-size: 1.15rem;
  color: var(--accent-light);
  font-weight: 600;
  margin: 0 0 4px;
}

.hero .hero-institution {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin: 0 0 16px;
}

.hero .hero-tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  margin: 0 0 28px;
}

.hero-links {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-links a {
  color: #fff;
  background: rgba(255,255,255,0.12);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  text-decoration: none;
}

.hero-links a:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
}

/* ===== Cards ===== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

.card .card-tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--primary);
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 12px;
  margin-top: 10px;
  font-weight: 600;
}

/* ===== Research Theme Cards ===== */
.theme-card {
  border-top: 3px solid var(--accent);
}

.theme-card h3 {
  font-size: 1rem;
}

/* ===== Student Cards ===== */
.student-card {
  padding: 20px;
  text-align: center;
}

.student-card .student-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.student-card .student-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.student-card .student-topic {
  font-size: 0.85rem;
  color: var(--text);
  margin: 6px 0 4px;
  font-style: italic;
}

.student-card .student-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  padding: 32px 0;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Publication List ===== */
.pub-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-item .pub-title {
  font-weight: 600;
  color: var(--primary);
}

.pub-item .pub-title a {
  color: var(--primary);
}

.pub-item .pub-title a:hover {
  color: var(--accent);
}

.pub-item .pub-venue {
  font-size: 0.9rem;
  color: var(--text-light);
}

.pub-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== CTA Box ===== */
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, #00264d 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-top: 32px;
}

.cta-box h3 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.cta-box p {
  color: rgba(255,255,255,0.8);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.cta-box a.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 28px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
  margin: 0 6px;
}

.cta-box a.cta-btn:hover {
  background: var(--accent-light);
  text-decoration: none;
}

/* ===== Buttons ===== */
.btn-outline {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 28px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ===== Page Header (for subpages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #00264d 100%);
  color: #fff;
  padding: 70px 0 36px;
  text-align: center;
}

.page-header h1 {
  color: #fff;
  font-size: 2rem;
  margin: 0 0 8px;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255,255,255,0.85);
}

.site-footer a:hover {
  color: var(--accent-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

/* ===== Lists (for subpages) ===== */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.styled-list li:last-child {
  border-bottom: none;
}

.list-group-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

/* ===== Bio Section ===== */
.bio-text {
  max-width: 800px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

.bio-text p {
  margin-bottom: 16px;
}

/* ===== Funding Table ===== */
.funding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.funding-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.funding-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.funding-table tr:last-child td {
  border-bottom: none;
}

.funding-table .funding-amount {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 70px 16px 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-inner { flex-direction: column; gap: 24px; }
  .hero-text { text-align: center; }
  .hero-links { justify-content: center; }
  .hero-photo img { width: 140px; height: 140px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .stats-bar { gap: 24px; }
  .stat-item .stat-number { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .section { padding: 32px 0; }
  .funding-table { font-size: 0.85rem; }
  .funding-table td, .funding-table th { padding: 8px 10px; }
}

/* ===== Full Publication Page Styles ===== */
.pub-section h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.pub-section ol {
  padding-left: 24px;
}

.pub-section ol li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
  font-size: 0.93rem;
}

.pub-section ol li:last-child {
  border-bottom: none;
}

.pub-section ol li i a {
  color: var(--primary);
}

.pub-section ol li i a:hover {
  color: var(--accent);
}
