/* =========================================================
   Intelligent Robotics Lab – shared stylesheet
   Reproduces the look of the former WordPress (Academix) site.
   ========================================================= */

:root {
  --red: #D30015;
  --red-dark: #b70012;
  --red-overlay: rgba(211, 0, 21, 0.7);
  --soft: #EDF2F6;        /* card / breadcrumb background */
  --footer: #e6ebef;
  --line: #E9EBED;
  --text: #000;
  --muted: #666;
  --container: 1140px;
  --gutter: 15px;
  --header-h: 110px;
  --font-head: "Montserrat", Arial, sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.788;
}

img { max-width: 100%; display: block; }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

p { margin: 0 0 10px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------
   Header / navigation
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand img { height: 70px; width: auto; }

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: stretch;
  justify-content: space-between;
  padding-top: 21px;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.43;
  padding: 6px 12px;
  border-radius: 3px;
}
.btn:hover { background: var(--red-dark); color: #fff; text-decoration: none; }

.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 15px 15px 13px;
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 20px;
  color: #000;
  border-bottom: 4px solid transparent;
}
.main-nav li:last-child a { padding-right: 0; }
.main-nav a:hover { border-bottom-color: var(--red); text-decoration: none; color: #000; }
.main-nav a.active { border-bottom: 4px solid var(--red); }
.main-nav li:last-child a.active,
.main-nav li:last-child a:hover { padding-right: 15px; margin-right: -15px; }

/* Mobile menu (CSS only) */
.nav-toggle,
.nav-toggle-label { display: none; }

@media (max-width: 991px) {
  :root { --header-h: 70px; }
  .brand img { height: 46px; }
  .header-right { padding-top: 0; justify-content: center; }
  .header-right .btn { display: none; }

  .nav-toggle-label {
    display: block;
    cursor: pointer;
    padding: 10px;
    margin-right: -10px;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    position: relative;
    content: "";
  }
  .nav-toggle-label span::before { position: absolute; top: -7px; }
  .nav-toggle-label span::after  { position: absolute; top: 7px; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a,
  .main-nav li:last-child a { padding: 10px var(--gutter); border-bottom: 1px solid var(--line); margin: 0; }
  .main-nav a.active,
  .main-nav li:last-child a.active,
  .main-nav li:last-child a:hover { color: var(--red); border-bottom: 1px solid var(--line); padding-right: var(--gutter); margin: 0; }
}

/* ---------------------------------------------------------
   Home hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  background: url("img/hero.jpg") center 30% / cover no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-text {
  max-width: 635px;
  margin: 0 var(--gutter);
  padding: 30px 60px 40px;
  background: rgba(176, 0, 18, 0.85);
  border-radius: 4px 4px 0 0;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
.hero-text p { margin: 0; }

/* ---------------------------------------------------------
   Inner page header (photo banner + title + breadcrumb)
   --------------------------------------------------------- */
.page-header {
  position: relative;
  height: 230px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.page-title {
  display: inline-block;
  margin: 0 var(--gutter);
  padding: 10px 25px;
  background: var(--red-overlay);
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  text-transform: uppercase;
  border-radius: 4px 4px 0 0;
  text-align: center;
}

.breadcrumb {
  background: var(--soft);
  text-align: center;
  padding: 8px 15px;
  font-size: 14px;
}
.breadcrumb .sep { padding: 0 5px; }

/* ---------------------------------------------------------
   Generic sections
   --------------------------------------------------------- */
.section { padding: 50px 0; }
.section-tight { padding-top: 15px; padding-bottom: 30px; }

.divider {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter) 0;
}
.divider::before {
  content: "";
  display: block;
  width: 5%;
  min-width: 40px;
  height: 2px;
  margin: 10px auto 25px;
  background: var(--red);
}
.divider::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--line);
  margin-bottom: 15px;
}

/* ---------------------------------------------------------
   Image cards (research lines on home, projects page)
   --------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--soft);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card > img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
}

.card-body { padding: 20px 25px 30px; flex: 1; }

.card h2,
.card h3 {
  font-size: 14px;
  line-height: 1.4;
  margin: 5px 0 10px;
}

.card p { font-size: 14px; margin-bottom: 0; }

.card-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
}

.card-link {
  display: inline-block;
  margin-top: 15px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   About / location boxes
   --------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-box {
  background: var(--soft);
  border-radius: 4px;
  padding: 30px 25px 20px;
}
.info-box h2 { font-size: 16px; line-height: 1.4; margin-bottom: 5px; }
.info-box iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
  margin-top: 20px;
}

/* ---------------------------------------------------------
   Stats band
   --------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 30px 10px;
  border-radius: 6px;
  background: url("img/stats_bg.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
}
.stats .num { display: block; font-size: 27px; line-height: 1.2; }
.stats .label { display: block; font-size: 14px; margin-top: 10px; }

/* ---------------------------------------------------------
   Team
   --------------------------------------------------------- */
.lead {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 50px;
}

.lead-info h2 { font-size: 26px; line-height: 1.3; margin-bottom: 20px; }
.lead-info .position {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.lead-info .bio { margin-top: 30px; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: start;
}

.member {
  background: var(--soft);
  border-radius: 4px;
  overflow: hidden;
  padding-bottom: 20px;
}

.member > img {
  width: 100%;
  aspect-ratio: 270 / 222;
  object-fit: cover;
}
.member.featured > img { aspect-ratio: 1 / 1; }

.member-body { padding: 20px 25px 0; }

.member h3 { font-size: 16px; line-height: 1.4; }

.member-role {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  line-height: 1.3;
}

.member-email {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: italic;
}
.member-email strong { color: #000; font-weight: 600; }

.member-links {
  list-style: none;
  display: flex;
  gap: 5px;
  margin: 25px 0 0;
  padding: 0 0 0 20px;
}
.member-links a {
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.23);
}
.member-links a:hover { box-shadow: 0 0 8px rgba(0, 0, 0, 0.45); }
.member-links img { width: 37px; height: 37px; border-radius: 4px; }

.former-members { margin-top: 60px; }
.former-members > h2 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 30px;
}
.former-members > h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin: 15px auto 0;
  background: var(--red);
}

/* ---------------------------------------------------------
   Publications
   --------------------------------------------------------- */
.disclaimer { padding: 0 10px; margin-bottom: 30px; }

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--soft);
}
.tab-nav a {
  display: inline-block;
  margin-bottom: 15px;
  padding: 4px 15px;
  font-family: var(--font-head);
  font-weight: 700;
  color: #000;
}
.tab-nav a:hover,
.tab-nav a.active { background: var(--red); color: #fff; text-decoration: none; }

.tab-panel > h2 {
  font-size: 24px;
  text-align: center;
  margin: 40px 0 25px;
}

/* When JS is available only the selected year is shown (tabs). */
.tab-panel { scroll-margin-top: calc(var(--header-h) + 20px); }
.js-tabs .tab-panel { display: none; }
.js-tabs .tab-panel.active { display: block; }

.paper,
.project {
  background: var(--soft);
  border-radius: 4px;
  padding: 22px 25px 20px;
  margin-bottom: 20px;
}

.paper-title {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.paper-authors { color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.paper-venue { margin: 0; word-break: break-word; }

.paper-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 0;
  padding: 0;
}

.pl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--red);
  border-radius: 3px;
  background: #fff;
  color: var(--red);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}
.pl:hover { background: var(--red); color: #fff; text-decoration: none; }

.pl::before {
  content: "";
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

/* Icons: external link, PDF, Scholar cap, BibTeX quotes, globe */
.pl       { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M9 2h5v5M14 2L7 9M12 10v4H2V4h4'/%3E%3C/svg%3E"); }
.pl-pdf   { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath fill='none' stroke='black' stroke-width='1.2' d='M1 .6h6.5L11.4 4.5V13.4H1z M7.4.6v4h4'/%3E%3Ctext x='2.1' y='11.6' font-size='4.2' font-family='Arial' font-weight='bold'%3EPDF%3C/text%3E%3C/svg%3E"); }
.pl-scholar { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1L0 6l8 5 6-3.75V12h2V6z'/%3E%3Cpath d='M3 9.5V12c0 1.5 2.2 3 5 3s5-1.5 5-3V9.5L8 12.6z'/%3E%3C/svg%3E"); }
.pl-bib   { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 3C3 3 1 5 1 7.5V13h5V8H3.2C3.5 6.3 4.4 5 6 5zM14.5 3C12 3 10 5 10 7.5V13h5V8h-2.8c.3-1.7 1.2-3 2.8-3z'/%3E%3C/svg%3E"); }
.pl-web   { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='black' stroke-width='1.4'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M1.5 8h13M8 1.5c-3.5 4-3.5 9 0 13M8 1.5c3.5 4 3.5 9 0 13'/%3E%3C/g%3E%3C/svg%3E"); }

.pl-page { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' d='M3 1.5h7l3 3v10H3z M5.5 7h5M5.5 9.5h5M5.5 12h3'/%3E%3C/svg%3E"); }
.pl-gh    { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E"); }
.pl-back  { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M10 2L4 8l6 6'/%3E%3C/svg%3E"); }

/* Disabled link (e.g. paper website not published yet) */
.pl[aria-disabled="true"],
.pl[aria-disabled="true"]:hover {
  border-color: #c5ccd3;
  background: transparent;
  color: #9aa3ab;
  cursor: not-allowed;
}

/* ---------------------------------------------------------
   Projects
   --------------------------------------------------------- */
.tab-intro { text-align: center; margin: -10px 0 25px; color: var(--muted); }

.project-ids { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.project-tag,
.project-grant {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 3px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
}
.project-tag { background: var(--red); color: #fff; }
.project-grant { background: #fff; color: #333; border: 1px solid #c5ccd3; }

.project-title { font-size: 16px; line-height: 1.4; margin-bottom: 6px; }
.project-meta { color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.project-desc { margin: 0; }

/* Project page */
.project-intro {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  background: var(--soft);
  border-radius: 4px;
  padding: 30px;
}
.project-logo {
  width: 160px;
  max-height: 160px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 10px;
}
.project-intro h2 { font-size: 22px; line-height: 1.3; margin-bottom: 15px; }

.project-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  margin: 0;
}
.project-facts dt { font-family: var(--font-head); font-weight: 700; }
.project-facts dd { margin: 0; }

.project-section { margin-top: 45px; }
.project-section > h2 { font-size: 22px; margin-bottom: 15px; }
.project-section > h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  margin-top: 10px;
  background: var(--red);
}
.project-section h3 { font-size: 16px; margin: 25px 0 10px; }
.project-section .card-grid { margin-top: 10px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.link-list { padding-left: 20px; }
.link-list li { margin-bottom: 6px; }

.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.pub-list .pub-year {
  display: inline-block;
  min-width: 44px;
  margin-right: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--red);
}
.pub-list a { margin-left: 6px; font-weight: 600; }

.project-funding {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 50px 0 30px;
  padding: 20px 25px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.project-funding img { height: 48px; width: auto; flex-shrink: 0; }
.project-funding p { margin: 0; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  background: var(--footer);
  padding: 20px 0;
  margin-top: 30px;
  font-size: 12px;
  line-height: 25px;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .lead { grid-template-columns: 300px 1fr; align-items: start; }
  .lead-info h2 { margin-top: 10px; }
}

@media (max-width: 767px) {
  .hero { height: 70vh; min-height: 420px; }
  .hero-text { padding: 20px 25px 25px; }
  .page-header { height: 180px; }
  .page-title { font-size: 22px; line-height: 32px; }
  .section { padding: 35px 0; }

  .card-grid,
  .card-grid.cols-3,
  .info-grid,
  .member-grid,
  .lead { grid-template-columns: 1fr; }

  .card,
  .member { max-width: 450px; width: 100%; margin: 0 auto; }
  .lead .member { max-width: 350px; }

  .stats { grid-template-columns: 1fr; gap: 20px; }

  .card-grid.cols-2 { grid-template-columns: 1fr; }
  .project-intro { flex-direction: column; padding: 20px; }
  .project-facts { grid-template-columns: 1fr; gap: 0; }
  .project-facts dd { margin-bottom: 10px; }
  .project-funding { flex-direction: column; align-items: flex-start; }

  .paper { padding: 18px 18px 16px; }
}

/* Accessible hidden text (e.g. the home page <h1>) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
