:root {
  --bg: #f4f9f6;
  --surface: #ffffff;
  --surface-2: #f7fcf9;
  --line: #d4e4db;
  --text: #143126;
  --text-soft: #3d5d4e;
  --primary: #3f9d70;
  --primary-2: #63b68d;
  --focus: rgba(63, 157, 112, 0.35);
  --shadow: 0 12px 28px rgba(13, 47, 33, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 99;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px;
  margin-left: -4px;
  cursor: pointer;
  color: var(--text);
}

.menu-toggle svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  pointer-events: none;
}

.top-nav-links {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 14px 0 6px;
}

.top-nav-links.open {
  display: flex;
}

.top-nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.top-nav-links a:hover,
.top-nav-links a:focus-visible {
  background: rgba(63, 157, 112, 0.12);
}

.nav-language {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.language-label {
  font-weight: 700;
  font-size: 0.88rem;
}

@media (min-width: 760px) {
  .language-label {
    display: none;
  }
}

.language-select {
  min-height: 38px;
  border: 1px solid #b8cfbf;
  border-radius: 10px;
  padding: 0 10px 0 8px;
  background: #fff;
  color: #1a3d2d;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
}

.language-select:hover {
  border-color: var(--primary);
}

.hero {
  position: relative;
  min-height: 72vh;
  display: block;
  padding: 20px 14px 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf4ee 0%, #f4f9f6 45%, #e8f2eb 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: url("./assets/hero-dog-new.jpeg?v=2");
  background-repeat: no-repeat;
  background-position: center 36%;
  background-size: cover;
  opacity: 0.45;
  filter: saturate(1.12) contrast(1.12) brightness(0.98);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.56), transparent 44%),
    linear-gradient(180deg, rgba(247, 252, 249, 0.28), rgba(240, 249, 244, 0.76));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 8px 4px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.hero-main {
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 16px;
  margin-top: -40px;
  text-align: center;
}

.hero-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7be0b7;
  font-weight: 800;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 102, 91, 0.4);
  border: 1px solid rgba(123, 224, 183, 0.36);
}

.hero-title {
  margin: 14px 0 10px;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2rem, 10vw, 3.8rem);
  line-height: 1.08;
  word-break: keep-all;
  overflow-wrap: normal;
  display: block;
  color: #143126;
}

.hero-avatar {
  width: clamp(190px, 42vw, 280px);
  height: clamp(190px, 42vw, 280px);
  display: block;
  margin: 0 auto;
  border-radius: 50% !important;
  object-fit: cover !important;
  overflow: hidden;
  object-position: center 28%;
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(20, 49, 38, 0.28);
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.05rem, 4.3vw, 1.55rem);
  color: #274b3a;
  font-weight: 700;
}

.social {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8fb9a3;
  background: rgba(255, 255, 255, 0.86);
  color: #214634;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #3f9d70;
}

.hero-profile-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  max-width: 380px;
  justify-self: center;
}

.hero-card-text {
  margin: 10px auto 0;
  max-width: 52ch;
  color: #3d5d4e;
  font-weight: 700;
  line-height: 1.5;
}

.container {
  width: min(1200px, calc(100% - 20px));
  margin: 14px auto 28px;
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel h2 {
  margin: 0 0 10px;
  text-align: center;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
}

.panel > p {
  margin: 0;
  text-align: center;
  line-height: 1.74;
  color: var(--text-soft);
}

.two-col,
.experience-list,
.project-grid,
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card,
.cert-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f0f8f3;
  padding: 14px;
  text-decoration: none;
}

.card h3 {
  margin: 0 0 8px;
  text-align: center;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 1.2rem;
}

.meta {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 700;
  color: #28503d;
}

.card p,
.card li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.68;
}

.experience-item p + p {
  margin-top: 8px;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.cert-grid-subtitle {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.cert-media {
  width: min(100%, 320px);
  height: 190px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #e7f2ea;
}

.cert-media iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  transform: translate(-1px, -1px);
  border: 0;
  pointer-events: none;
}

.cert-caption {
  padding: 12px 6px 2px;
  text-align: center;
}

.cert-caption h4 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: var(--text);
}

.cert-caption p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}

.project-card {
  text-align: center;
}

.project-card p {
  margin-bottom: 12px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e5f4ec;
  color: #24563d;
  border: 1px solid #b7dcc8;
  font-size: 0.82rem;
  font-weight: 800;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.project-link-secondary {
  color: #1e553b;
  background: #ffffff;
  border-color: #9fcdb5;
}

.project-link:hover,
.project-link:focus-visible {
  filter: brightness(1.06);
}

#contato p {
  margin: 0 0 8px;
  text-align: center;
}

.contact-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: #1f6b49;
}

.flag-line {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.flag-br {
  background: linear-gradient(120deg, #1aa53a 0%, #5ccf3a 52%, #e4dd24 100%);
  color: #13220f;
}

.flag-sp {
  background: linear-gradient(120deg, #4c4f54 0%, #b8bbc0 54%, #dc5c67 100%);
}

.flag-sjc {
  background: linear-gradient(120deg, #2f64c6 0%, #3b90f2 100%);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.hero-title-split {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.02em;
}

.hero-title-split .letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(-14px);
  animation: letterIn 0.8s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.hero-title-split .space {
  width: 0.32em;
}

@media (max-width: 520px) {
  .hero-content {
    padding-inline: 2px;
  }

  .hero-title {
    font-size: clamp(1.85rem, 11vw, 2.75rem);
    line-height: 1.08;
  }

  .hero-avatar {
    width: clamp(210px, 62vw, 300px);
    height: clamp(210px, 62vw, 300px);
  }

  .hero-main,
  .hero-profile-card {
    text-align: center;
  }

  .hero-main {
    margin-top: -30px;
  }

  .social {
    justify-content: center;
  }

  .cert-item {
    padding: 10px;
  }

  .cert-media {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .cert-media iframe {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .cert-caption {
    padding: 10px 4px 2px;
  }

  .cert-caption h4 {
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .cert-caption p {
    font-size: 0.92rem;
  }
}

@media (min-width: 760px) and (max-width: 1024px) {
  .top-nav-links {
    gap: 0px;
  }
  .top-nav-links a {
    font-size: 0.8rem;
    padding: 6px 4px;
  }
  .top-nav {
    padding: 10px 8px;
  }
  .top-nav::before, .nav-language {
    width: 80px !important;
  }
}

@keyframes letterIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

@media (min-width: 760px) {
  .top-nav {
    padding: 12px 20px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  .top-nav::before {
    content: "";
    width: 150px;
    order: 0;
    flex-shrink: 1;
  }

  .menu-toggle {
    display: none;
  }

  .top-nav-links {
    display: flex;
    flex-direction: row;
    padding: 0;
    width: auto;
    flex: 1;
    justify-content: center;
    overflow-x: visible;
    order: 1;
  }

  .nav-language {
    width: 150px;
    flex-shrink: 0;
    justify-content: flex-end;
    order: 2;
  }

  .hero {
    min-height: 80vh;
    padding: 18px 24px 36px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 18px;
  }

  .hero-main {
    padding: 24px 24px 22px;
  }

  .hero-profile-card {
    width: 100%;
    max-width: 390px;
    padding: 18px;
  }

  .container {
    width: min(1200px, calc(100% - 36px));
    gap: 14px;
  }

  .panel {
    padding: 18px;
  }

  .two-col,
  .project-grid,
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
