/* ================================================================
   Main Stylesheet — Research Working Group
   Inspired by the al-folio Jekyll theme (alshedivat/al-folio)
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Variables / Theme Tokens
   ---------------------------------------------------------------- */
:root {
  --color-bg:          #ffffff;
  --color-surface:     #f8f9fa;
  --color-border:      #e9ecef;
  --color-text:        #212529;
  --color-muted:       #6c757d;
  --color-primary:     #2b6dda;
  --color-primary-dk:  #1a4ea0;
  --color-accent:      #e63946;
  --color-nav-bg:      #ffffff;
  --color-footer-bg:   #f8f9fa;

  --font-sans:   'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --font-serif:  'Source Serif 4', Georgia, 'Times New Roman', serif;

  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
}

p { font-family: var(--font-serif); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color .15s;
}
a:hover { color: var(--color-primary-dk); text-decoration: underline; }

/* ----------------------------------------------------------------
   Navbar
   ---------------------------------------------------------------- */
#main-nav {
  background: var(--color-nav-bg) !important;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
  z-index: 1030;
}

#main-nav .navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.01em;
}
#main-nav .navbar-brand:hover { color: var(--color-primary); text-decoration: none; }

.navbar-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

#main-nav .nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-muted);
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  letter-spacing: .01em;
}
#main-nav .nav-link:hover,
#main-nav .nav-link:focus {
  color: var(--color-primary);
  background: rgba(43, 109, 218, .07);
}
#main-nav .nav-link.active {
  color: var(--color-primary);
  font-weight: 700;
}

/* ----------------------------------------------------------------
   Section headings
   ---------------------------------------------------------------- */
.section-title, .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.section-divider, .title-divider {
  border: 0;
  border-top: 2px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.page-subtitle {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

/* ----------------------------------------------------------------
   About / Home page
   ---------------------------------------------------------------- */
.group-name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.affiliation {
  font-size: 1rem;
  font-family: var(--font-serif);
}

.bio-content p {
  font-family: var(--font-serif);
  font-size: 1rem;
}

.profile-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--color-border);
}

/* Social icons */
.social-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: .95rem;
  border: 1px solid var(--color-border);
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none !important;
}
.social-icon:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ----------------------------------------------------------------
   News
   ---------------------------------------------------------------- */
.news-list { border-top: 1px solid var(--color-border); }

.news-item {
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-serif);
  font-size: .95rem;
}

.news-date {
  font-family: var(--font-sans);
  font-size: .8rem;
  min-width: 90px;
  padding-top: .15rem;
}

.news-text { flex: 1; }

/* ----------------------------------------------------------------
   Publication cards (home page featured)
   ---------------------------------------------------------------- */
.pub-card { border-radius: var(--radius-md) !important; overflow: hidden; }

.pub-preview {
  height: 160px;
  object-fit: cover;
}

.pub-title {
  font-size: .9rem;
  line-height: 1.4;
}

.pub-authors, .pub-venue { font-family: var(--font-serif); }

/* Publication list (publications page) */
.pub-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.pub-entry:last-child { border-bottom: 0 !important; }

.pub-entry .pub-title { font-family: var(--font-sans); font-size: .95rem; }

/* Extra-small button variant */
.btn-xs {
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------
   Research page
   ---------------------------------------------------------------- */
.research-card {
  border-radius: var(--radius-md) !important;
  transition: transform .2s, box-shadow .2s;
}
.research-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
}

.research-icon { opacity: .85; }

.project-item { border-radius: var(--radius-md); }

.project-title { font-size: 1rem; }

/* ----------------------------------------------------------------
   Team page
   ---------------------------------------------------------------- */
.member-card {
  border-radius: var(--radius-md) !important;
  transition: transform .2s, box-shadow .2s;
}
.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
}

.member-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border: 3px solid var(--color-border);
}

.member-name { font-size: .9rem; font-weight: 700; }
.member-role { font-size: .8rem; }
.member-interests { font-size: .75rem; font-family: var(--font-serif); }

.member-links { display: flex; gap: .5rem; }

.member-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: .8rem;
  border: 1px solid var(--color-border);
  transition: background .15s, color .15s;
  text-decoration: none !important;
}
.member-link:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ----------------------------------------------------------------
   Gallery page
   ---------------------------------------------------------------- */
.gallery-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.gallery-thumb:hover { opacity: .85; transform: scale(1.02); }

.gallery-placeholder {
  width: 100%;
  height: 160px;
}

.gallery-caption {
  font-size: .75rem;
  font-family: var(--font-serif);
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.site-footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.footer-text {
  font-family: var(--font-serif);
  font-size: .875rem;
  color: var(--color-text);
  margin: 0;
}

.site-footer a { color: var(--color-primary); }

/* ----------------------------------------------------------------
   Responsive tweaks
   ---------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .profile-img { width: 130px; height: 130px; }
  .group-name  { font-size: 1.4rem; }
  .pub-thumb   { width: 70px; height: 56px; }
}
