@charset "utf-8";

/* =========================================================
   GLOBAL
========================================================= */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #222;
  background: #f5f7f9;
  padding-top: 5rem;
  margin: 0;
  text-rendering: optimizeLegibility;
}

main,
.container,
.wrapper {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #111;
}

h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 18px;
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar {
  background-color: #2563eb !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.navbar a,
.navbar-brand,
.nav-link {
  font-size: 16px;
  font-weight: 500;
}

/* =========================================================
   THEME BUTTON
========================================================= */

#themeToggle {
  margin-left: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#themeToggle:hover {
  transform: translateY(-2px) scale(1.05);
}

/* =========================================================
   HERO
========================================================= */

.hero-card {
  background-color: #fff;
  border-radius: 14px;
  padding: 50px;
  margin: 50px auto;
  max-width: 1080px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03),
              0 8px 30px rgba(0,0,0,0.04);
}

.hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 35px;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero-text h1 {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 12px;
}

.bio-title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 14px;
  color: #111;
}

.bio {
  font-size: 16px;
  line-height: 1.9;
  max-width: 780px;
  color: #444;
}

.hero-photo img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* =========================================================
   AFFILIATIONS / LOGOS
========================================================= */

.affiliation {
  display: grid !important;
  grid-template-columns: 90px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 14px !important;
  margin-top: 10px !important;
  margin-bottom: 8px !important;
  color: #444 !important;
  text-decoration: none !important;
}

.affiliation:hover {
  color: #2563eb !important;
  text-decoration: none !important;
}

.affiliation span {
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.aff-logo {
  width: 82px !important;
  height: 34px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  padding: 5px 7px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.aff-logo[src*="cnrs"],
.aff-logo[alt="CNRS"] {
  width: 52px !important;
  height: 42px !important;
}

.institution-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.institution-logos img {
  height: 30px !important;
  width: auto !important;
  max-width: 120px !important;
  object-fit: contain !important;
  background: #ffffff;
  padding: 5px 8px;
  border-radius: 9px;
}

.institution-logos img[alt="CNRS"] {
  height: 42px !important;
}

/* =========================================================
   LINKS
========================================================= */

.links {
  margin-top: 20px;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 32px;
  row-gap: 10px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.links a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}

.links a:hover {
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* =========================================================
   SEARCH BAR
========================================================= */

.publication-search-container {
  margin-bottom: 40px;
}

.publication-search-bar {
  width: 100%;
  max-width: 720px;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid #d9dde3;
  background: #ffffff;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.publication-search-bar:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 4px rgba(21,101,192,0.12);
}

/* =========================================================
   PUBLICATIONS — IMAGE LEFT / TEXT RIGHT
========================================================= */

.publication-year-block {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
}

.publication-row {
  align-items: center !important;
  padding: 8px 0;
}

.pub-cover {
  width: 100% !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: 190px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
}

.publication-text {
  min-width: 0;
}

.publication-text h5 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
}

.publication-text p {
  line-height: 1.55;
}

.qrank-badge {
  background: #1565c0;
  color: white !important;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
  white-space: nowrap;
}

/* =========================================================
   DARK MODE
========================================================= */

body.dark {
  background: #0f172a !important;
  color: #f8fafc !important;
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark .bio-title {
  color: #ffffff !important;
}

body.dark .navbar {
  background: linear-gradient(90deg,#0f172a,#111827) !important;
}

body.dark .navbar-brand,
body.dark .nav-link {
  color: #e5e7eb !important;
}

body.dark .hero-card,
body.dark .card,
body.dark main {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark .bio,
body.dark p,
body.dark li,
body.dark span {
  color: #cbd5e1 !important;
}

body.dark a {
  color: #93c5fd !important;
}

body.dark a:hover {
  color: #bfdbfe !important;
}

body.dark .publication-year-block {
  background: transparent !important;
  box-shadow: none !important;
}

body.dark .publication-row {
  background: #16181d !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 20px !important;
  margin-bottom: 22px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
}

body.dark .publication-text h5 {
  color: #f8fafc !important;
}

body.dark .publication-text p,
body.dark .text-muted {
  color: #cbd5e1 !important;
}

body.dark .publication-text strong {
  color: #f3f4f6 !important;
}

body.dark .d-md-none .w-100 {
  background: #16181d !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 20px !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

  body {
    padding-top: 4rem;
  }

  .hero-card {
    padding: 32px;
    margin: 30px 16px;
  }

  .hero-content {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .bio {
    font-size: 15.5px;
    line-height: 1.8;
  }

  .hero-photo img {
    width: 160px;
    height: 160px;
  }

  .pub-cover {
    max-width: 100% !important;
    max-height: 230px !important;
  }
}
