/* Portf¯lio QA ¯ paleta neutra e foco em acessibilidade */
:root {
  --bg: #f0f4f3;
  --bg-elevated: #ffffff;
  --text: #0c0a09;
  --text-muted: #44403c;
  --border: #d6d3d1;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-glow: rgba(13, 148, 136, 0.45);
  --focus-ring: #0ea5e9;
  --nav-h: 4rem;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 118, 110, 0.12);
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__mesh,
  .hero-photo-wrap::after,
  .news-strip__pulse {
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Nav fixo */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(245, 245, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list a:hover {
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
}

.nav-list a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.nav-list a.is-active {
  color: var(--accent);
  background: rgba(15, 118, 110, 0.12);
}

main {
  padding-top: var(--nav-h);
}

section {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  padding: 4rem 1.25rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Faixa de novidades + carrossel */
section.news-strip {
  padding: 1.35rem 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 48%, #134e4a 100%);
  color: #ecfdf5;
  position: relative;
  overflow: hidden;
}

.news-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
  pointer-events: none;
}

.news-strip__inner {
  position: relative;
  z-index: 1;
}

.news-strip__head {
  margin-bottom: 1rem;
}

.news-strip__title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.news-strip__subtitle {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
  color: #a7f3d0;
}

.news-strip__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.7);
  animation: pulse-ring 2s ease infinite;
  flex-shrink: 0;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(94, 234, 212, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(94, 234, 212, 0);
  }
}

/* Carrossel */
.carousel {
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 1.1rem 0.75rem;
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.carousel__viewport {
  position: relative;
  min-height: 13rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel__slides {
  position: relative;
}

.carousel__slide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

.carousel__thumb-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.carousel__thumb {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.carousel__slide-body {
  min-width: 0;
}

@media (max-width: 520px) {
  .carousel__slide-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.75rem 0.85rem;
    justify-items: stretch;
    text-align: left;
  }

  .carousel__slide-body {
    text-align: left;
  }
}

.carousel__slide {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.carousel__slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.carousel__date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #99f6e4;
  margin-bottom: 0.35rem;
}

.carousel__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 0.5rem;
}

.carousel__slide-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.carousel__text {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.carousel__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #5eead4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.carousel__link:hover {
  color: #ccfbf1;
  border-bottom-color: rgba(204, 251, 241, 0.6);
}

.carousel__link:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 3px;
  border-radius: 4px;
}

.carousel__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.carousel__btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.carousel__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.carousel__btn:focus-visible {
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}

.carousel__dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel__dot.is-active {
  background: #5eead4;
  transform: scale(1.25);
}

.carousel__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.section-title-accent {
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
}

.section-title-accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.5rem;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #2dd4bf);
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, #3f3f46 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 {
    color: var(--text);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 1.5rem;
  font-weight: 700;
  color: var(--text);
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 42ch;
}

/* Hero */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 3.5rem 1.25rem 4rem;
  position: relative;
  background: linear-gradient(165deg, #fafaf9 0%, #e7e5e4 55%, #d6d3d1 100%);
  overflow: hidden;
}

.hero--impact {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.hero__mesh {
  position: absolute;
  inset: -40% -20% auto;
  height: 85%;
  background:
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(13, 148, 136, 0.09), transparent 55%),
    radial-gradient(ellipse 35% 35% at 20% 60%, rgba(14, 165, 233, 0.06), transparent 45%);
  pointer-events: none;
  animation: mesh-drift 18s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-2%, 2%) scale(1.03);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 2.75rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-aside {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    text-align: left;
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-badge--glow {
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.2);
}

.btn-glow {
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-glow:hover {
  box-shadow: 0 6px 28px rgba(13, 148, 136, 0.55);
  transform: translateY(-1px);
}

.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-photo-wrap {
  position: relative;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, var(--accent), #2dd4bf, #0ea5e9);
  box-shadow: var(--shadow-lg);
}

.hero-photo-wrap::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(13, 148, 136, 0.25);
  animation: photo-ring 3.5s ease infinite;
  pointer-events: none;
}

@keyframes photo-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.15;
  }
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-elevated);
  display: block;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-stat--highlight {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
  align-items: center;
}

.hero-stat--cypress {
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.hero-stat__main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.hero-stat__cypress-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.92;
}

.reveal-on-scroll.is-revealed.hero-stat:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.12);
}

.hero-stat__plus {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 2.25rem;
}

.hero-stat__text {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.35;
}

.hero-stat--highlight .hero-stat__line {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.4;
}

.hero-stat--highlight .hero-stat__line strong {
  color: var(--accent-hover);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Cards gen¯ricos */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 8px 32px rgba(28, 25, 23, 0.1);
}

.alt-section {
  background: #e7e5e4;
}

/* Lista de problemas / pr¯ticas */
.two-col-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.callout {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

.callout ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.callout li {
  margin-bottom: 0.35rem;
}

/* Projetos */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card h3 {
  margin-top: 0;
}

.project-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.project-card a:hover {
  border-bottom-color: var(--accent);
}

.project-card a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-hover);
  margin-bottom: 0.75rem;
}

/* Forma¯¯o & certs */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  padding: 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.timeline-meta {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.cert-grid li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cert-grid ul {
  margin: 0;
  padding: 0;
}

.cert-provider {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* AJAX box */
.ajax-meta {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.ajax-meta.is-error {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
}

.ajax-meta strong {
  color: var(--text);
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.stack-pills span {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* Contato */
.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.contact-bar a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-bar a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-bar a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #e7e5e4 0%, #d6d3d1 100%);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.ajax-meta--footer {
  margin-top: 0;
  max-width: 640px;
  text-align: left;
}

.site-footer__copy {
  margin: 0;
}

/* Anima¯¯o entrada */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.65s ease forwards;
}

.fade-in.delay-1 {
  animation-delay: 0.1s;
}

.fade-in.delay-2 {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Revela¯¯o no scroll (controlada por JS) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .carousel__slide {
    transition: none !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Menu mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(245, 245, 244, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.25rem;
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    display: block;
    padding: 0.65rem 0.75rem;
  }
}

/* Fix extra space in cert-grid ul */
.cert-section .cert-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}
