/* ==========================================================================
   site.css – Shared styles for the redesigned multi-page site
   Built on top of default.css / layout.css
   ========================================================================== */

/* -------------------------------------------------------------------------
   Language toggle
   ------------------------------------------------------------------------- */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-left: 18px;
  vertical-align: middle;
}
.lang-btn {
  display: inline-block;
  padding: 3px 9px;
  font: 11px/16px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 3px;
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
}
.lang-btn:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.lang-btn.active {
  color: #fff;
  background: #11ABB0;
  border-color: #11ABB0;
}

/* -------------------------------------------------------------------------
   Dual-identity landing cards
   ------------------------------------------------------------------------- */
.dual-section {
  background: #1a1a1a;
  padding: 80px 0 90px;
}
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}
.dual-card {
  position: relative;
  background: #232323;
  border-radius: 16px;
  padding: 48px 40px 56px;
  text-align: center;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.dual-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.dual-card .card-icon {
  font-size: 52px;
  color: #11ABB0;
  margin-bottom: 18px;
  display: block;
}
.dual-card h2 {
  font: 28px/1.2 'opensans-bold', sans-serif;
  color: #fff;
  margin-bottom: 14px;
}
.dual-card p {
  font: 15px/26px 'opensans-regular', sans-serif;
  color: #999;
  margin-bottom: 28px;
}
.dual-card .card-btn {
  display: inline-block;
  padding: 12px 32px;
  font: 13px/18px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  background: #11ABB0;
  border-radius: 4px;
  transition: background .25s ease;
  text-decoration: none;
}
.dual-card .card-btn:hover { background: #0d8a8e; color: #fff; }
.dual-card .card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.accent-teal  { background: #11ABB0; }
.accent-orange { background: #F06000; }

/* -------------------------------------------------------------------------
   Section intro (used on academic.html, music.html)
   ------------------------------------------------------------------------- */
.section-intro {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-intro h2 {
  font: 32px/1.3 'opensans-bold', sans-serif;
  color: #313131;
  margin-bottom: 12px;
}
.section-intro p {
  font: 16px/28px 'opensans-regular', sans-serif;
  color: #7A7A7A;
}

/* -------------------------------------------------------------------------
   About row (two-column with profile pic)
   ------------------------------------------------------------------------- */
.about-row {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px;
}
.about-row .profile-col {
  flex: 0 0 180px;
}
.about-row .profile-col img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
}
.about-row .bio-col {
  flex: 1;
}

/* -------------------------------------------------------------------------
   Timeline items (education)
   ------------------------------------------------------------------------- */
.timeline-item {
  position: relative;
  padding-left: 28px;
  margin-bottom: 36px;
  border-left: 2px solid #E0E0E0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: #11ABB0;
  border-radius: 50%;
}
.timeline-item h3 {
  font: 20px/26px 'opensans-bold', sans-serif;
  color: #313131;
  margin-bottom: 4px;
}
.timeline-item .info {
  font: 14px/22px 'librebaskerville-italic', serif;
  color: #6E7881;
  margin-bottom: 6px;
}
.timeline-item p {
  font: 14px/24px 'opensans-regular', sans-serif;
  color: #838C95;
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Papers & Talks list
   ------------------------------------------------------------------------- */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 20px 0;
  border-bottom: 1px solid #ECECEC;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list h4 {
  font: 17px/24px 'opensans-bold', sans-serif;
  color: #313131;
  margin-bottom: 4px;
}
.pub-list .pub-meta {
  font: 14px/22px 'librebaskerville-italic', serif;
  color: #6E7881;
}
.pub-list .pub-meta a { color: #11ABB0; }
.pub-list .pub-meta a:hover { color: #313131; }
.pub-year {
  display: inline-block;
  background: #11ABB0;
  color: #fff;
  font: 11px/16px 'opensans-bold', sans-serif;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

/* -------------------------------------------------------------------------
   Video grid (used in music page)
   ------------------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}
.video-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  display: block;
}
.video-card .vc-body {
  padding: 16px 20px 20px;
}
.video-card h3 {
  font: 16px/22px 'opensans-bold', sans-serif;
  color: #313131;
  margin-bottom: 4px;
}
.video-card .vc-meta {
  font: 13px/20px 'opensans-regular', sans-serif;
  color: #999;
  margin-bottom: 8px;
}
.video-card .taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.video-card .tag {
  font-size: 11px;
  background: #f0f0f0;
  color: #666;
  padding: 3px 10px;
  border-radius: 99px;
}

/* -------------------------------------------------------------------------
   Apps / Projects section
   ------------------------------------------------------------------------- */
.apps-section {
  background: #f7f7f7;
  padding: 72px 0 80px;
}
.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.app-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  text-align: center;
  transition: transform .25s ease;
}
.app-card:hover { transform: translateY(-4px); }
.app-card .app-icon {
  font-size: 42px;
  color: #11ABB0;
  margin-bottom: 14px;
}
.app-card h3 {
  font: 18px/24px 'opensans-bold', sans-serif;
  color: #313131;
  margin-bottom: 8px;
}
.app-card p {
  font: 14px/24px 'opensans-regular', sans-serif;
  color: #838C95;
  margin-bottom: 20px;
}
.app-card .card-btn {
  display: inline-block;
  padding: 10px 28px;
  font: 12px/18px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  background: #313131;
  border-radius: 4px;
  transition: background .25s ease;
  text-decoration: none;
}
.app-card .card-btn:hover { background: #11ABB0; color: #fff; }

/* -------------------------------------------------------------------------
   Ensure education/teaching sections match papers/talks styling
   ------------------------------------------------------------------------- */
#education, #teaching {
  background: #fff;
  padding-top: 90px;
  padding-bottom: 72px;
  overflow: hidden;
}
#education + #teaching { padding-top: 0; }

#education a, #education a:visited,
#teaching a, #teaching a:visited { color: #11ABB0; }
#education a:hover, #education a:focus,
#teaching a:hover, #teaching a:focus { color: #313131; }

#education h1, #teaching h1 {
  font: 18px/24px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#education h1 span, #teaching h1 span {
  border-bottom: 3px solid #11ABB0;
  padding-bottom: 6px;
  display: inline-block;
  line-height: 1.4;
}
#education h3, #teaching h3 {
  font: 25px/30px 'opensans-bold', sans-serif;
}
#education .header-col, #teaching .header-col { padding-top: 9px; }
#education .main-col, #teaching .main-col { padding-right: 10%; }
#education .info, #teaching .info {
  font: 16px/24px 'librebaskerville-italic', serif;
  color: #6E7881;
  margin-bottom: 18px;
  margin-top: 9px;
}
#education .info span, #teaching .info span {
  margin-right: 5px;
  margin-left: 5px;
}
#education .date, #teaching .date {
  font: 15px/24px 'opensans-regular', sans-serif;
  margin-top: 6px;
}

/* -------------------------------------------------------------------------
   Page section backgrounds
   ------------------------------------------------------------------------- */
.section-white { background: #fff; padding: 72px 0 80px; }
.section-light { background: #f7f7f7; padding: 72px 0 80px; }
.section-dark  { background: #2B2B2B; padding: 72px 0 80px; }

.section-white + .section-white { padding-top: 0; }

/* -------------------------------------------------------------------------
   Shared page header (sub-pages)
   ------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  height: 420px;
  min-height: 320px;
  width: 100%;
  background: #161415 url(../images/header-background.jpg) no-repeat top center;
  background-size: cover;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.page-hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}
.page-hero h1 {
  font: 64px/1.1 'opensans-bold', sans-serif;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
  margin-bottom: 8px;
}
.page-hero h2 {
  font: 20px/1.4 'librebaskerville-regular', serif;
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Consistent nav across all pages
   ------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font: 12px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  transition: background .3s ease;
}
.site-nav.opaque { background: #333; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.site-nav li { height: 48px; display: flex; align-items: center; }
.site-nav a {
  display: block;
  padding: 8px 13px;
  color: #fff;
  text-decoration: none;
  transition: color .2s ease;
}
.site-nav a:hover { color: #11ABB0; }
.site-nav .current a { color: #F06000; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  position: fixed;
  top: 0;
  right: 30px;
  z-index: 200;
  background: #CC5200;
  border: none;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 0 auto;
  position: relative;
  transition: all .3s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }

/* -------------------------------------------------------------------------
   Footer (shared)
   ------------------------------------------------------------------------- */
.site-footer {
  background: #0f0f0f;
  padding: 48px 0;
  text-align: center;
  color: #555;
  font-size: 13px;
}
.site-footer a { color: #888; transition: color .2s ease; }
.site-footer a:hover { color: #11ABB0; }
.site-footer .social-links {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 22px;
}
.site-footer .footer-copy { color: #555; margin: 0; }
.site-footer .go-top {
  display: inline-block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  background: #525252;
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  margin-bottom: 20px;
  transition: background .2s ease;
}
.site-footer .go-top:hover { background: #11ABB0; }

/* -------------------------------------------------------------------------
   Contact strip (bottom of pages)
   ------------------------------------------------------------------------- */
.contact-strip {
  background: #2B2B2B;
  padding: 48px 0;
  text-align: center;
}
.contact-strip h3 {
  font: 22px/30px 'opensans-bold', sans-serif;
  color: #fff;
  margin-bottom: 8px;
}
.contact-strip p {
  font: 15px/26px 'opensans-regular', sans-serif;
  color: #999;
  margin-bottom: 0;
}
.contact-strip a { color: #11ABB0; }
.contact-strip a:hover { color: #fff; }

/* Tautology formula rendered by MathJax */
.app-icon-formula {
  font-size: 26px;   /* MathJax usa em relativi a questo */
  color: #11ABB0;    /* MathJax SVG usa currentColor, quindi eredita */
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}
/* Assicura che l'SVG generato da MathJax erediti il colore */
.app-icon-formula svg { fill: currentColor; }

/* -------------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------------- */
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

/* Section heading with accent line */
.sh {
  font: 18px/24px 'opensans-bold', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #313131;
  margin-bottom: 36px;
  padding-bottom: 10px;
  border-bottom: 3px solid #11ABB0;
  display: inline-block;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media only screen and (max-width: 767px) {
  .dual-grid,
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .dual-card { padding: 36px 28px 42px; }
  .dual-card h2 { font-size: 24px; }

  .page-hero { height: 320px; min-height: 260px; }
  .page-hero h1 { font-size: 38px; }
  .page-hero h2 { font-size: 16px; }

  .about-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-row .profile-col { flex: none; }

  .video-grid { grid-template-columns: 1fr; }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .site-nav ul {
    display: none;
    flex-direction: column;
    background: #1f2024;
    padding: 20px;
    position: fixed;
    top: 48px;
    right: 30px;
    border-radius: 0 0 8px 8px;
  }
  .site-nav ul.open { display: flex; }
  .site-nav li { height: auto; }
  .site-nav a { padding: 10px 16px; }

  .section-white,
  .section-light,
  .section-dark { padding: 48px 0 56px; }

  /* Lang switch – bigger tap target on mobile */
  .lang-switch { margin-left: 10px; }
  .lang-btn {
    padding: 6px 14px;
    font-size: 12px;
    line-height: 20px;
  }

  /* h2 banner noticeably smaller than h1 on tablets */
  header .banner-text h2 {
    font: 17px/1.35em 'librebaskerville-regular', serif !important;
    white-space: nowrap;
  }
}

@media only screen and (max-width: 480px) {
  .page-hero h1 { font-size: 30px; }
  .dual-card h2 { font-size: 20px; }

  /* Lang switch */
  .lang-btn {
    padding: 7px 16px;
    font-size: 13px;
  }

  /* h2 banner well below the 40px h1 on phones */
  header .banner-text h2 {
    font: 14px/1.35em 'librebaskerville-regular', serif !important;
    white-space: nowrap;
  }
}
