:root {
  --bg: #0a0f15;
  --bg-soft: #10161f;
  --surface: #141b24;
  --surface-2: #18212d;
  --text: #edf2f8;
  --text-muted: #aeb8c6;
  --text-soft: #7e8a98;
  --line: rgba(226, 234, 244, 0.11);
  --line-strong: rgba(226, 234, 244, 0.2);
  --accent: #8fb7df;
  --accent-strong: #c2dfff;
  --accent-soft: rgba(143, 183, 223, 0.1);
  --success: #a6d9b3;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1120px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    linear-gradient(rgba(255, 255, 255, 0.004) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.004) 1px, transparent 1px),
    radial-gradient(circle at 16% 4%, rgba(143, 183, 223, 0.04), transparent 30rem),
    radial-gradient(circle at 82% 22%, rgba(143, 183, 223, 0.024), transparent 28rem),
    var(--bg);
  background-size: 96px 96px, 96px 96px, auto, auto, auto;
}

body.menu-open {
  overflow: hidden;
}

main {
  padding-top: var(--header-height);
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  color: var(--text-muted);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(143, 183, 223, 0.46);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-strong);
  color: #07111d;
  font-weight: 800;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(10, 15, 21, 0.9);
  backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(10, 15, 21, 0.97);
}

.header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent-strong);
}

.brand-text {
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.section {
  scroll-margin-top: var(--header-height);
  padding-block: clamp(2.7rem, 5.8svh, 4.6rem);
}

.section-screen {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  align-items: center;
}

.section-balanced {
  min-height: min(72svh, calc(100svh - var(--header-height)));
  display: grid;
  align-items: center;
}

.section-muted {
  border-block: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.014);
}

.hero {
  padding-block: clamp(2.9rem, 6svh, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(280px, 0.76fr);
  gap: clamp(2.2rem, 5vw, 3.9rem);
  align-items: center;
}

.hero-copy {
  max-width: 735px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.13;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 700px;
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 4.7vw, 3.65rem);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.72rem, 2.8vw, 2.38rem);
}

h3 {
  margin-bottom: 9px;
  font-size: 1.08rem;
}

.hero-title {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(1.02rem, 1.55vw, 1.2rem);
  font-weight: 720;
}

.hero-description {
  max-width: 660px;
  font-size: 1rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 26px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 780;
  font-size: 0.94rem;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-strong);
  color: #07111d;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #d7eaff;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: rgba(143, 183, 223, 0.5);
  background: rgba(143, 183, 223, 0.14);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.024);
  color: var(--text-soft);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--text);
  border-color: rgba(143, 183, 223, 0.36);
  background: rgba(255, 255, 255, 0.052);
}

.hero-actions {
  margin-top: 28px;
}

.hero-actions .btn {
  min-height: 45px;
  padding: 10px 18px;
}

.btn-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.btn-disabled:hover {
  transform: none;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.032);
}

.quick-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.chip-list li,
.tag-list li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quick-notes span {
  padding: 4px 8px;
  border: 1px solid rgba(226, 234, 244, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.014);
  color: var(--text-soft);
  cursor: default;
  font-size: 0.78rem;
  font-weight: 640;
}

.hero-visual {
  justify-self: end;
  width: 100%;
  max-width: 370px;
}

.profile-panel,
.skill-card,
.project-card,
.formation-panel,
.contact-card,
.interest-card,
.about-cards article {
  border: 1px solid var(--line);
  background: rgba(20, 27, 36, 0.86);
}

.profile-panel {
  padding: 34px;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.profile-main {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.profile-photo-wrap {
  width: 116px;
  height: 116px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.92) contrast(0.96) brightness(0.94);
}

.profile-info {
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(166, 217, 179, 0.24);
  border-radius: 999px;
  background: rgba(166, 217, 179, 0.075);
  color: #ccefd4;
  font-size: 0.74rem;
  font-weight: 780;
}

.status-pill span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(166, 217, 179, 0.1);
}

.profile-name {
  margin: 13px 0 2px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.profile-role {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.profile-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.profile-facts div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.11);
}

.profile-facts dt {
  margin-bottom: 2px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.section-heading {
  align-self: center;
}

.section-heading-wide {
  max-width: 760px;
  margin-bottom: clamp(1.1rem, 3svh, 1.7rem);
}

.section-heading-wide p:last-child,
.text-stack p:last-child,
.contact-text p:last-child,
.formation-main p:last-child {
  margin-bottom: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}

.about-content {
  display: grid;
  gap: clamp(0.9rem, 2svh, 1.2rem);
}

.text-stack {
  max-width: 720px;
}

.text-stack p {
  margin-bottom: 0.85rem;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.about-cards article {
  min-height: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
}

.about-cards span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.about-cards p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.interest-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(20, 27, 36, 0.72);
}

.interest-card p {
  margin-bottom: 13px;
  color: var(--text);
  font-weight: 730;
}

.chip-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Projetos: 1 destaque + 3 cards compactos, todos visíveis. */
.section-projects {
  padding-block: clamp(1.25rem, 2.4svh, 1.8rem);
}

.section-projects .section-heading-wide {
  margin-bottom: clamp(0.8rem, 2svh, 1rem);
}

.section-projects h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 2.55vw, 2.16rem);
}

.section-projects .section-heading-wide p:last-child {
  max-width: 920px;
}

.projects-board {
  display: grid;
  gap: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  min-height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 183, 223, 0.27);
  background: rgba(24, 32, 43, 0.9);
}

.project-card.highlight {
  border-color: rgba(143, 183, 223, 0.28);
  background: rgba(22, 30, 41, 0.92);
}

.project-card.compact {
  display: flex;
  flex-direction: column;
}

.project-media {
  position: relative;
  min-height: 7rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.project-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.project-content,
.project-card.highlight .project-content {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 0.9rem;
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.badge-featured {
  border-color: rgba(143, 183, 223, 0.38);
  background: rgba(143, 183, 223, 0.1);
  color: var(--accent-strong);
}

.project-card h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1rem, 1.18vw, 1.12rem);
}

.project-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section-projects .tag-list {
  gap: 6px;
}

.section-projects .tag-list li {
  padding: 5px 8px;
  font-size: 0.8rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 0.55rem;
}

.section-projects .project-card .btn {
  min-height: 37px;
  padding: 7px 13px;
  font-size: 0.9rem;
}

.empty-state {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(20, 27, 36, 0.72);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  grid-column: span 6;
  padding: clamp(1.05rem, 2vw, 1.35rem);
  border-radius: var(--radius-md);
}

.skill-card:nth-child(n + 3) {
  grid-column: span 4;
}

.skill-note {
  margin-bottom: 14px;
  font-size: 0.93rem;
}

.support-card {
  background: rgba(20, 27, 36, 0.72);
}

/* Seção final combinada: formação, cursos e contato. */
.section-final {
  padding-block: clamp(2.4rem, 5svh, 3.7rem);
}

.final-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: stretch;
}

.final-column {
  min-width: 0;
}

.compact-heading {
  max-width: 620px;
  margin-bottom: clamp(1rem, 2.6svh, 1.35rem);
}

.compact-heading h2,
.contact-text h2 {
  margin-bottom: 10px;
}

.formation-panel {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.formation-main,
.certifications-block {
  padding: clamp(1.05rem, 2vw, 1.35rem);
}

.formation-main {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.timeline-date {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--accent-strong);
  font-size: 0.79rem;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.plain-list {
  padding-left: 20px;
  margin: 0;
  color: var(--text-muted);
}

.plain-list li + li {
  margin-top: 8px;
}

.contact-card {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: clamp(1.15rem, 2.4vw, 1.45rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-actions {
  justify-content: flex-start;
  margin-top: 0;
  max-width: none;
}

.copy-feedback {
  min-height: 24px;
  margin: 0;
  color: var(--success);
  font-weight: 760;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  background: rgba(0, 0, 0, 0.16);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-content p {
  margin-bottom: 0;
}

.footer-content a {
  color: var(--text-muted);
  font-weight: 720;
}

.footer-content a:hover,
.footer-content a:focus-visible {
  color: var(--accent-strong);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-card,
  .skill-card:nth-child(n + 3) {
    grid-column: auto;
  }

  .support-card {
    grid-column: 1 / -1;
  }

  .formation-panel {
    grid-template-columns: 1fr;
  }

  .formation-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 16px;
    left: 16px;
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 22, 31, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    border-radius: 12px;
  }

  .hero-grid,
  .about-layout,
  .final-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-self: start;
  }

  .about-layout,
  .final-layout {
    align-items: start;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .brand-text {
    display: none;
  }

  .section {
    padding-block: clamp(2.35rem, 6svh, 3.3rem);
  }

  h1 {
    font-size: clamp(2.12rem, 12vw, 3.05rem);
  }

  .hero-actions .btn {
    flex: 1 1 calc(50% - 10px);
  }

  .contact-actions .btn {
    width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .profile-panel,
  .project-content,
  .skill-card,
  .formation-main,
  .certifications-block,
  .contact-card,
  .interest-card,
  .about-cards article {
    padding: 20px;
  }

  .profile-main {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 13px;
  }

  .profile-photo-wrap {
    width: 74px;
    height: 74px;
    border-radius: 18px;
  }

  .status-pill {
    font-size: 0.7rem;
  }

  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .profile-main {
    grid-template-columns: 1fr;
  }

  .profile-photo-wrap {
    width: 68px;
    height: 68px;
  }

  .chip-list li,
  .tag-list li {
    font-size: 0.8rem;
  }

  .quick-notes span {
    font-size: 0.76rem;
  }
}

@media (max-width: 650px) {
  .section-projects .project-card p {
    -webkit-line-clamp: 3;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
