:root {
  --mao-primary: #243746;
  --mao-accent: #1f7a8c;
  --mao-accent-soft: #dceff2;
  --mao-bg-soft: #f6f8fa;
  --mao-card-border: #d9e1e8;
  --mao-text-soft: #5f6b76;
  --mao-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --mao-radius: 18px;
}

/* Hero */

.hero {
  padding: 2.5rem 0 1.5rem 0;
}

.hero-text h1 {
  margin-bottom: 0.6rem;
  font-size: 2.2rem;
  line-height: 1.15;
}

.hero-text p {
  max-width: 850px;
  font-size: 1.05rem;
  color: var(--mao-text-soft);
}

.hero-buttons {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Card grids */

.card-grid,
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem 0;
}

.info-card,
.person-card {
  background: white;
  border: 1px solid var(--mao-card-border);
  border-radius: var(--mao-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--mao-shadow);
}

.info-card h3,
.person-card h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.info-card p,
.person-card p {
  margin-bottom: 0.6rem;
}

.person-role {
  color: var(--mao-accent);
  font-weight: 600;
  margin-top: -0.2rem;
}

/* Headings */

.md-typeset h1 {
  font-weight: 750;
  letter-spacing: -0.02em;
}

.md-typeset h2 {
  margin-top: 2rem;
  font-weight: 700;
}

/* Links */

.md-typeset a {
  font-weight: 500;
}

/* Buttons */

.md-button {
  border-radius: 999px;
}

/* Softer content blocks */

.md-typeset table:not([class]) {
  border-radius: 12px;
  overflow: hidden;
}

/* Optional subtle page width feeling */

.md-content__inner {
  padding-bottom: 3rem;
}

/* Make lists breathe a bit */

.md-typeset ul li,
.md-typeset ol li {
  margin-bottom: 0.2rem;
}

/* Mobile refinement */

@media screen and (max-width: 768px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 1rem;
  }
}

/* Logo navbar */

.md-header__button.md-logo img {
  height: 36px;
}

.md-header__title {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.md-header {
  background-color: #0e1a2b;
}

.md-tabs {
  background-color: #0e1a2b;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.person-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.person-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  display: block;
}

.person-role {
  color: #6b7280;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  text-decoration: none;
  font-size: 0.85rem;
  color: #111827;
}

.badge:hover {
  background: #e5e7eb;
}

/* === ICON BADGES (NEW) === */

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mao-bg-soft);
  border: 1px solid var(--mao-card-border);
  transition: all 0.2s ease;
}

.icon-badge img {
  width: 18px;
  height: 18px;
  display: block;
}

/* Hover elegante MAO-style */
.icon-badge:hover {
  background: var(--mao-accent-soft);
  transform: translateY(-2px);
  border-color: var(--mao-accent);
}

/* Brand-aware hover */
.icon-badge.scholar:hover {
  background: #e8f0fe;
}

.icon-badge.github:hover {
  background: #eef1f4;
  border-color: var(--mao-card-border);
}

.icon-badge.linkedin:hover {
  background: #e6f0fa;
}

.icon-badge.orcid:hover {
  background: #e8f5e9;
}

.icon-badge.email:hover {
  background: #fef3f2;
}

/* Publications */

.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 1.25rem 0;
}

.pub-search {
  flex: 1 1 280px;
  min-width: 240px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--mao-card-border);
  border-radius: 999px;
  background: white;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-filter-button {
  border: 1px solid var(--mao-card-border);
  background: white;
  color: var(--mao-primary);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.pub-filter-button:hover,
.pub-filter-button.is-active {
  background: var(--mao-accent-soft);
  border-color: var(--mao-accent);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0 1.5rem 0;
}

.pub-item {
  background: white;
  border: 1px solid var(--mao-card-border);
  border-radius: var(--mao-radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--mao-shadow);
}

.pub-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pub-authors {
  color: var(--mao-text-soft);
  margin-bottom: 0.25rem;
}

.pub-venue {
  margin-bottom: 0.35rem;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.pub-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mao-accent-soft);
  color: var(--mao-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.pub-links a {
  font-weight: 600;
}

.sep {
  color: var(--mao-text-soft);
  margin: 0 0.2rem;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.4rem;
}

.pub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mao-bg-soft);
  border: 1px solid var(--mao-card-border);
  transition: all 0.2s ease;
  overflow: hidden;
  flex: 0 0 34px;
}

.pub-icon:hover {
  background: var(--mao-accent-soft);
  border-color: var(--mao-accent);
  transform: translateY(-2px);
}

.pub-icon img {
  display: block;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
}

.pub-icon.doi img {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.pub-icon.bibtex:hover {
  background: #f3eefc;
}

.pub-icon.doi:hover {
  background: #eef6ff;
}

.md-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  text-align: center;
}

.md-copyright a {
  text-decoration: none;
}

.footer-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 0.5rem;
}

.footer-icons img {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.footer-icons a:hover img {
  opacity: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.project-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* LOGO STANDARDIZZATO */
.project-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* TESTO */
.project-info {
  line-height: 1.2;
}

.project-dates {
  font-size: 0.85rem;
  opacity: 0.7;
}

.project-desc {
  font-size: 0.9rem;
  opacity: 0.85;
}

.video-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.video-item {
  text-align: center;
}

.video-item video {
  width: 220px;
  border-radius: 8px;
}

.video-item p {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  opacity: 0.7;
}
