/* ==============================================
   GIVA – Graphics, Images, Visualization and Analytics
   Main Stylesheet
   ============================================== */

:root {
  --nav-bg:       #0a2c57;
  --nav-text:     #ffffff;
  --nav-active:   #1a73e8;
  --primary:      #1a73e8;
  --primary-dark: #0d5bb5;
  --text:         #1f2937;
  --text-muted:   #6b7280;
  --bg:           #ffffff;
  --bg-light:     #f3f4f6;
  --bg-hero:      #e1f3ff;
  --border:       #e5e7eb;
  --radius:       6px;
  --shadow:       0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.12);
  --max-w:        1100px;
  --nav-h:        60px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }

/* ---- Layout ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
main { min-height: calc(100vh - var(--nav-h) - 120px); }

/* ---- Navbar ---- */
.site-header {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  box-shadow: var(--shadow);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--nav-text);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.navbar-brand:hover { color: var(--nav-text); text-decoration: none; opacity: 0.85; }
.navbar-nav { display: flex; list-style: none; gap: 0.1rem; }
.nav-link {
  padding: 0.4rem 0.85rem;
  color: var(--nav-text);
  border-radius: var(--radius);
  font-size: 0.925rem;
  opacity: 0.85;
  transition: background 0.15s, opacity 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; opacity: 1; }
.nav-link.active { color: var(--nav-active); font-weight: 600; opacity: 1; }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* ---- Hero ---- */
.hero {
  background: var(--bg-hero);
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-logo { max-height: 160px; margin: 0 auto 2rem; }
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--nav-bg);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.hero .prose { margin-top: 1.5rem; }

/* ---- Generic page ---- */
.page { padding: 3rem 2rem; }
.page-header { margin-bottom: 2.5rem; }
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--nav-bg);
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

/* ---- Prose (rich content) ---- */
.prose h1, .prose h2, .prose h3 { margin: 1.5rem 0 0.75rem; line-height: 1.3; color: var(--nav-bg); }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0.75rem 0 1rem 1.75rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote {
  border-left: 4px solid var(--border);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 1rem 0;
}
.prose pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.prose code {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.875em;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose a { text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }

/* ---- Post list ---- */
.post-meta { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.4rem; }
.post-list { list-style: none; }
.post-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.post-item:last-child { border-bottom: none; }
.post-item h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--primary); text-decoration: none; }
.post-excerpt { color: var(--text-muted); }
.tag {
  display: inline-block;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.5em;
  font-size: 0.8em;
  color: var(--text-muted);
}
.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ---- People list ---- */
.people-section { margin-bottom: 3rem; }
.people-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nav-bg);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1.25rem;
}
.person-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.person-card a { text-decoration: none; display: block; }
.person-avatar, .person-avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}
.person-avatar { object-fit: cover; }
.person-avatar-placeholder {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}
.person-name { font-weight: 600; color: var(--text); font-size: 0.9rem; line-height: 1.3; }
.person-role { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; }

/* ---- Person profile ---- */
.person-profile { padding: 3rem 2rem; }
.person-profile-header {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.person-profile-avatar, .person-profile-avatar-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  flex-shrink: 0;
}
.person-profile-avatar { object-fit: cover; }
.person-profile-avatar-placeholder {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
}
.person-profile-info h1 { font-size: 1.8rem; color: var(--nav-bg); margin-bottom: 0.3rem; }
.person-profile-role { color: var(--text-muted); margin-bottom: 0.4rem; }
.person-social { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.person-social a {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}
.person-social a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.person-profile-bio { max-width: 800px; }
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.75rem 0 0.6rem;
}
.interests-list { display: flex; gap: 0.5rem; flex-wrap: wrap; list-style: none; margin: 0 0 1.25rem; }
.interests-list li {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.8rem;
  font-size: 0.875rem;
}
.education-item { margin-bottom: 0.5rem; font-size: 0.925rem; }

/* ---- Contact ---- */
.contact-page { padding: 3rem 2rem; }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-info-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nav-bg);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}
.contact-label {
  font-weight: 600;
  min-width: 90px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 0.15rem;
  flex-shrink: 0;
}
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  height: 380px;
  border: 1px solid var(--border);
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ---- Publications ---- */
.pub-list { list-style: none; }
.pub-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.pub-item:last-child { border-bottom: none; }
.pub-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.pub-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.35rem; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--primary); text-decoration: none; }
.pub-authors { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.3rem; }
.pub-venue { color: var(--text-muted); font-size: 0.9rem; font-style: italic; margin-bottom: 0.75rem; }
.pub-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pub-link {
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid var(--primary);
  color: var(--primary);
  transition: background 0.15s;
}
.pub-link:hover { background: var(--primary); color: #fff; text-decoration: none; }
.pub-abstract {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.abstract-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ---- Callout shortcode ---- */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  background: var(--bg-light);
  margin: 1.25rem 0;
}
.callout-note { border-color: var(--primary); }
.callout-warning { border-color: #f59e0b; background: #fffbeb; }
.callout-info { border-color: #06b6d4; background: #ecfeff; }

/* ---- Footer ---- */
.site-footer {
  background: var(--nav-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 4rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.9); text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .contact-layout { grid-template-columns: 1fr; }
  .person-profile-header { flex-direction: column; align-items: center; text-align: center; }
  .person-social { justify-content: center; }

  /* Hamburger menu */
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
  }
  .nav-toggle-label:hover { background: rgba(255, 255, 255, 0.1); }
  .nav-toggle-label span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nav-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
  }
  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.0rem 1.25rem 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-toggle:checked ~ .navbar-nav { display: flex; }
  .nav-link { padding: 0.4rem 0.5rem; opacity: 1;}
}
