/* Homepage-only overrides (hero integration)
   This stylesheet is only loaded on index.qmd
   ========================================================= */

/* Ensure navbar overlays the hero without extra padding on the homepage */
body.nav-fixed main,
body.nav-fixed .quarto-container,
body.nav-fixed .page-content {
  padding-top: 0 !important;
}

/* Ensure main content doesn't get hidden behind navbar elsewhere */
main {
  padding-top: calc(var(--navbar-height) + 1rem) !important;
}




/* =========================================================
   Hero Section
   ========================================================= */

/* Mode-dependent overlay opacity/color */
:root {
  --hero-overlay: rgba(255, 255, 255, 0.25);   /* lighter shade for light mode */
  --hero-badge:   rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"], .quarto-dark:root, .quarto-dark {
  --hero-overlay: rgba(0, 0, 0, 0.75);   /* deeper shade for dark mode */
  --hero-badge:   rgba(0, 0, 0, 0.32);
}

/* Background image system for light and dark modes */
.hero-background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
}

.hero-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

/* Hidden by default, shown based on theme */
.dark-only { display: none; }
.light-only { display: block; }

:root[data-theme="dark"] .dark-only,
.quarto-dark .dark-only {
  display: block;
}

:root[data-theme="dark"] .light-only,
.quarto-dark .light-only {
  display: none;
}


.video-overlay { position: absolute; inset: 0; background: var(--hero-overlay); }

.hero-text {
  position: relative; z-index: 1; text-align: left;
  color: var(--text); max-width: 900px; padding: 0 20px;
  transform: translateX(0);
  margin-top: 0;

  /* Glass effect centered on text */
  /* background: rgba(0, 0, 0, 0.2); */

  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
}

 .animation-info {
   display: inline-flex;
   align-items: center;
   margin-bottom: 0.8rem;
   z-index: 10;
   cursor: pointer;
   position: relative;
 }

 .info-content {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   padding: 0.4rem 0.8rem 0.4rem 0.4rem;
   border-radius: 24px;
   border: 1.5px solid var(--brand);
   opacity: 1;
   transition: all 0.3s ease;
   background: transparent;
   backdrop-filter: blur(4px);
 }

 .info-icon {
   width: 20px;
   height: 20px;
   border: 1.5px solid var(--brand);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-family: serif;
   font-style: italic;
   font-weight: bold;
   font-size: 12px;
   color: var(--brand);
   transition: all 0.3s ease;
 }

 .info-label {
   font-size: 0.85rem;
   font-weight: 600;
   color: var(--brand);
   letter-spacing: 0.02em;
 }

 .animation-info:hover .info-content,
 .animation-info.active .info-content {
   opacity: 1;
   border-color: var(--brand);
   background: var(--hero-badge);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
 }

 .animation-info:hover .info-icon,
 .animation-info.active .info-icon {
   border-color: var(--brand);
   color: var(--brand);
 }

 .animation-info:hover .info-label,
 .animation-info.active .info-label {
   color: var(--brand);
 }

 .info-tooltip {
   position: absolute;
   left: 0;
   bottom: calc(100% + 12px);
   background: rgba(0, 0, 0, 0.85);
   color: #fff;
   padding: 0.75rem 1rem;
   border-radius: 8px;
   font-size: 0.9rem;
   width: 280px;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease;
   backdrop-filter: blur(4px);
   border: 1px solid rgba(255, 255, 255, 0.1);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
 }

 .animation-info:hover .info-tooltip,
 .animation-info.active .info-tooltip {
   opacity: 1;
   visibility: visible;
 }

 .info-tooltip a {
   color: var(--accent) !important;
   text-decoration: underline;
   font-weight: 600;
 }

 .info-tooltip a:hover {
   color: var(--brand-hover) !important;
 }

 @media (max-width: 768px) {
   .animation-info {
     margin-bottom: 0.5rem;
   }
   .info-content {
     padding: 0.3rem 0.6rem 0.3rem 0.3rem;
     gap: 0.4rem;
   }
   .info-tooltip {
     width: 200px;
     font-size: 0.8rem;
   }
 }

.hero-logo {
  max-width: 350px; width: 70%; height: auto; margin-bottom: 1rem;
  padding: 10px 20px; background: var(--hero-badge); border-radius: 8px;
}

.hero-text h1 {
  font-size: 80px !important;
  font-weight: 800; margin-bottom: -1rem;
  color: var(--brand);

  /* backdrop-filter: blur(5px); */
  /* -webkit-backdrop-filter: blur(5px); */
}

.hero-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; margin-bottom: 0.6rem;
  color: var(--brand);
  border: none;
  text-decoration: none;

  /* backdrop-filter: blur(2px); */
  /* -webkit-backdrop-filter: blur(2px); */
}

.hero-text h2::after,
.hero-text h2::before {
  display: none;
}

.hero-text p { font-size: 25.0px !important; line-height: 1.3; margin-bottom: 1.6rem;

  /* backdrop-filter: blur(2px); */
  /* -webkit-backdrop-filter: blur(2px); */
}


/* Responsive typography for mobile devices */
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 48px !important;
  }

  .hero-text h2 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }

  .hero-text p {
    font-size: 18px !important;
  }

  .hero-text {
    max-width: 100%;
    padding: 0 15px;
    transform: translateX(0);
  }

  /* Stack buttons vertically on tablet and mobile */
  .hero-text .btn-learn-more,
  .hero-text .btn-github {
    display: block;
    margin: 0.5rem auto;
    margin-left: 0;
    margin-right: 0;
    width: fit-content;
  }

  .hero-text .btn-github {
    margin-left: 0;
    margin-top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 36px !important;
  }

  .hero-text h2 {
    font-size: clamp(1rem, 5vw, 1.4rem);
  }

  .hero-text p {
    font-size: 16px !important;
  }

  .hero-text {
    transform: translateX(0);
  }

  /* Ensure buttons remain stacked on small mobile screens */
  .hero-text .btn-learn-more,
  .hero-text .btn-github {
    display: block;
    margin: 0.5rem auto;
    margin-left: 0;
    margin-right: 0;
    width: fit-content;
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
  }

  .hero-text .btn-github {
    margin-left: 0;
    margin-top: 0.75rem;
  }
}

/* Large screens - make text even more impactful */
@media (min-width: 1400px) {
  .hero-text h1 {
    font-size: 90px !important;
  }

  .hero-text h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .hero-text p {
    font-size: 28px !important;
  }

  .hero-text {
    transform: translateX(0);
  }

  .hero-logo {
    max-width: 420px;
    width: 80%;
  }
}

/* If you want the navbar to stop overlapping once you scroll
    beyond the hero, you can set a spacer on the first content section */
#why-temoa,
#latest-publications,
#latest-blog-posts {
  padding-left: 2rem;
  padding-right: 2rem;
}


/* =========================================================
   Cards
   ========================================================= */
.temoa-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;
  align-items: start;
}

.temoa-card {
  background-color: var(--bg);
  color: var(--text) !important;
  border-radius: 10px;
  border: 0px solid var(--border);
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); */
  margin: 1rem; padding: 1.25rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.temoa-card h4 { color: var(--brand) !important; margin-top: 0.5rem; }

.temoa-card p {
  width: 90%; /* Make the paragraph take up the full width of its parent */
  /* max-width: 700px; Optional: limit the max width for better readability */
  margin-top: 0.5rem;
  line-height: 1.5;
  text-align: center; /* Center the text within the paragraph */

}

/* .temoa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  border-color: var(--brand);
} */

.temoa-grid-visual {
  display: block;
  margin-left: auto;
  margin-right: auto;
  /* max-width: 700px; */
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
 }

.temoa-icon { font-size: 3.4rem; color: var(--brand); margin-bottom: 0.5rem; }
@media (max-width: 600px) { .temoa-icon { font-size: 2.8rem; } }



/* Equal-height grid rows */
.pubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  align-items: stretch; /* equalize item height in row */
}

/* Card fills its grid cell and stacks vertically */
.pubs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;           /* fill grid track */
  padding: 1.25rem;
}

.pubs-card .pub-logo {
  width: 260px;
  height: 340px;
  margin-bottom: 0.75rem;
  border-radius: 0px;
  background: var(--surface);
  border: 0px solid var(--border);
  overflow: hidden;
  line-height: 0;
}
.pubs-card .pub-logo--bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pubs-card .pubs-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;      /* consistent spacing */
  width: 90%;
  max-width: 36rem;
  flex: 1 1 auto;   /* take remaining height so button can sit at bottom */
}

/* 1) Remove stray margins so titles/paras don't add variable offset */
.pubs-card .card-title,
.pubs-card .card-text {
  margin: 0;                 /* reset */
  padding: 0;                /* reset */
  width: 90%;
  max-width: 36rem;
  line-height: 1.5;
  color: var(--text) !important;
}

.pubs-card .card-title {
  color: var(--brand) !important;
  font-weight: 600;      /* optional: match your previous weight */
  margin: 0;             /* ensure no drift */
}

/* Add controlled spacing using gap on the card instead of element margins */
.pubs-card {
  gap: 0.5rem;               /* consistent spacing between blocks */
}

/* 2) Pin the button to the bottom for perfect baseline alignment */
.pubs-card .btn {
  margin-top: auto;          /* consume remaining space */
}

/* Optional: ensure no extra margins sneak in from Bootstrap/etc */
.pubs-card h4 { margin: 0; }
.pubs-card p  { margin: 0; }


/* =========================
   Blog posts
   ========================= */

/* Grid for blog posts: keep same layout as pubs but with its own class */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* Blog card wrapper: inherit look from pubs-card but as its own class */
.blog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 1.25rem;
  gap: 0.5rem; /* controlled spacing between blocks */
  color: var(--bg);
}

/* Thumbnail container mirrors .pub-logo proportions for visual rhythm */
.blog-card .blog-thumb {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 16 / 9;  /* enforce 16:9 */
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 0 solid var(--border);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image should show in full without being zoomed in or distorted */
.blog-card .blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Content stack mirrors .pubs-stack */
.blog-card .blog-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 90%;
  max-width: 36rem;
  flex: 1 1 auto; /* push button to bottom */
}

/* Title and meta, consistent with pubs */
.blog-card .card-title,
.blog-card .card-text {
  margin: 0;
  padding: 0;
  width: 90%;
  max-width: 36rem;
  line-height: 1.5;
}

.blog-card .card-title {
  color: var(--brand) !important;
  font-weight: 600;
}

.blog-card .card-text {
  color: var(--text) !important;
  opacity: 0.9;
}

/* Pin CTA to bottom for baseline alignment */
.blog-card .btn {
  margin-top: auto;
}
/* Responsive tweak (parity with pubs) */
@media (max-width: 360px) {
  .blog-card .blog-thumb {
    width: 100%;
    height: 240px;
  }
}


/* Override Quarto's default grid listing image scaling */
#listing-latest-blog-posts-listing .thumbnail-image {
  object-fit: contain !important;
  background: transparent !important; /* let card background show through */
}

/* Ensure blog cards have visible borders in both modes and a slight margin */
#listing-latest-blog-posts-listing .quarto-grid-item.card {
  background: transparent !important;
  border: none !important;
  box-shadow: none;
  padding: 0.75rem; /* slight margin before border and thumbnail */
}

#listing-latest-blog-posts-listing .card-img-top {
  margin-bottom: 0;
}

/* =========================================================
   Buttons
   ========================================================= */

/* “Learn more” CTA */
.btn-learn-more {
  display: inline-block; padding: 0.75rem 1.6rem;
  font-size: 1.05rem; font-weight: 600;
  color: #ffffff;
  background-color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 48px;
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.btn-learn-more:hover {
  /* transform: translateY(-1px); */
  color: #ffffff;
  border: 2px solid #ffffff;
}


/* GitHub CTA button */
.btn-github {
  display: inline-block; padding: 0.75rem 1.6rem;
  font-size: 1.05rem; font-weight: 600;
  color: #ffffff;
  background-color: #24292f; /* GitHub dark color */
  border: 2px solid #24292f;
  border-radius: 48px;
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
  margin-left: 1rem; /* Add some spacing between the two buttons */
}
.btn-github:hover {
  /* transform: translateY(-1px); */
  color: #ffffff;
  border: 2px solid #ffffff;
}

/* =========================================================
   Tutorials Section
   ========================================================= */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

.tutorial-card {
  background-color: var(--bg);
  border-radius: 10px;
  border: 0px solid var(--border);
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tutorial-video {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin-bottom: 1rem;
  border-radius: 0px;
  overflow: hidden;
}

.tutorial-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.tutorial-content {
  width: 90%;
}

.tutorial-content h4 {
  color: var(--brand) !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.tutorial-content p {
  line-height: 1.5;
  text-align: center;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

