/* Ambient background */
body {
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(10, 122, 95, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(18, 21, 26, 0.04), transparent 50%);
  background-attachment: fixed;
}

/* Hide Quarto title block when custom hero is present */
body:has(.hero) #title-block-header {
  display: none;
}

/* Center primary nav links (Home, Projetos, Blog, Sobre) */
@media (min-width: 992px) {
  .navbar .navbar-container {
    position: relative;
  }

  .navbar-brand-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    z-index: 2;
  }

  #navbarCollapse {
    position: static;
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
  }

  #navbarCollapse > .navbar-nav.me-auto {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    margin-right: 0 !important;
    z-index: 1;
  }

  #navbarCollapse > .navbar-nav.ms-auto,
  #navbarCollapse > .quarto-navbar-tools {
    position: relative;
    z-index: 2;
  }
}

/* Links with animated underline */
main a:not(.btn):not(.quarto-grid-item a):not(.listing-title) {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1.5px;
  transition: background-size 0.25s ease;
}

main a:not(.btn):not(.quarto-grid-item a):not(.listing-title):hover {
  background-size: 100% 1.5px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  max-width: 42rem;
  animation: hero-in 0.7s ease both;
}

.hero-brand {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #12151a;
  margin: 0 0 0.75rem;
}

.hero-brand p {
  margin: 0;
}

.hero-role {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0a7a5f;
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}

.hero-role p {
  margin: 0;
}

.hero-lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #3a4048;
  margin: 0 0 1.75rem;
}

.hero-lead p {
  margin: 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-cta p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-cta .hero-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #12151a !important;
  font-size: 1.35rem;
  background-image: none !important;
  border-radius: 2px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hero-cta .hero-social:hover {
  color: #0a7a5f !important;
  transform: translateY(-2px);
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section blocks on home */
.home-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(18, 21, 26, 0.1);
  animation: hero-in 0.7s ease 0.15s both;
}

.home-section h2 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

/* Featured projects — typographic list, not cards */
.featured-list {
  margin: 0 0 1.25rem;
}

.featured-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(18, 21, 26, 0.08);
  transition: padding-left 0.2s ease;
}

.featured-item:first-child {
  border-top: 1px solid rgba(18, 21, 26, 0.08);
}

.featured-item:hover {
  padding-left: 0.35rem;
}

.featured-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-bottom: 0.35rem;
}

.featured-list .project-name,
.featured-list .project-name a {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #12151a;
  text-decoration: none;
  background-image: none !important;
}

.featured-list .project-name a:hover,
.featured-list a.project-name:hover {
  color: #0a7a5f;
}

.featured-item p {
  font-size: 0.95rem;
  color: #5a6169;
  margin: 0;
  line-height: 1.5;
}

.featured-list .project-stack {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: #0a7a5f;
}

/* Project grid listing — editorial, borderless */
#projects-listing .quarto-grid-item,
.quarto-grid-item {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 1.25rem 0 !important;
  border-bottom: 1px solid rgba(18, 21, 26, 0.1) !important;
  transition: transform 0.2s ease;
}

#projects-listing .quarto-grid-item:hover,
.quarto-grid-item:hover {
  transform: translateY(-2px);
}

/* Garante que o topo da imagem de capa (header/título) apareça no card */
#projects-listing .thumbnail-image,
#projects-listing .card-img,
.quarto-grid-item .thumbnail-image,
.quarto-grid-item .card-img {
  object-fit: cover !important;
  object-position: top center !important;
  border-radius: 4px;
}

#projects-listing .listing-title,
.quarto-grid-item .listing-title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#projects-listing .listing-categories .category,
.listing-category {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  background: rgba(10, 122, 95, 0.1) !important;
  color: #0a7a5f !important;
  border: none !important;
  border-radius: 2px !important;
}

/* About page tweaks */
.about-entity .about-link {
  color: #0a7a5f;
}

.about-contents h2 {
  font-family: "Syne", sans-serif;
  margin-top: 2rem;
}

/* Skills list */
.skills-group {
  margin-bottom: 1rem;
}

.skills-group dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: #0a7a5f;
  margin-bottom: 0.2rem;
}

.skills-group dd {
  margin-left: 0;
  color: #3a4048;
}

/* Education */
.edu-item {
  margin-bottom: 1.25rem;
}

.edu-item strong {
  font-family: "Syne", sans-serif;
  display: block;
}

.edu-item .edu-meta {
  font-size: 0.9rem;
  color: #5a6169;
}

/* Blog listing polish */
.quarto-listing .listing-title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
}

.quarto-listing .listing-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: #5a6169;
}
