@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray: #cfcece;
  --card-dark: #161619;
  --card-border: #242428;
  --blue-accent: #2f5fd8;
  --blue-bright: #3b6ce8;
  --off-white: #d3d3d3;
  --text-body: #3d3d42;
  --text-heading: #111114;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 4px;
}

img,
svg {
  max-width: 100%;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--gray);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html {
  scroll-padding-top: 90px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform .2s ease;
}

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

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 598px;
  padding-top: 140px;
  background: var(--off-white);
  overflow: hidden;
}

/* Diagonal black panel */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 55%;
  background:
    radial-gradient(circle at 25% 36%, rgba(21, 87, 255, .2), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(47, 95, 216, .14), transparent 32%),
    linear-gradient(145deg, #0b0d14 0%, var(--black) 48%, #080b12 100%);
  background-size: 135% 135%, 145% 145%, 100% 100%;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0% 100%);
  z-index: 1;
  animation: heroBackgroundShift 10s ease-in-out infinite alternate;
}

@keyframes heroBackgroundShift {
  0% {
    background-position: 0% 0%, 100% 100%, 0 0;
  }

  100% {
    background-position: 18% 12%, 78% 82%, 0 0;
  }
}

.content{
  right: 38px;
}
.socials{
  right: 38px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px clamp(30px, 8.85vw, 170px);
  transition: padding .3s ease, background-color .3s ease, box-shadow .3s ease;
}

.hero > .logo-placeholder {
  position: absolute;
  top: 40px;
  left: clamp(30px, 8.85vw, 170px);
  z-index: 6;
}

.hero > .logo-placeholder img {
  display: block;
}

.navbar.scrolled {
  top: 18px;
  right: 32px;
  left: auto;
  width: auto;
  padding: 0;
}

.navbar.scrolled .nav-links {
  padding: 10px 12px 10px 24px;
  border-radius: 20px;
  background: #e2e2e2;
  border: 1px solid rgba(0, 0, 0, .16);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
}

.navbar.scrolled .nav-links a {
  color: var(--black);
  text-decoration: none;
}

.navbar.scrolled .btn-contact {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 10px 12px 10px 24px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 20px;
  background: rgba(226, 226, 226, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-links a {
  text-decoration: none;
  color: var(--black);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .2px;
  transition: opacity .2s ease;
}

.nav-links a:hover {
  opacity: .6;
}

.menu-toggle {
  display: none;
}

.logo-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  clip-path: polygon(0 0, 55% 0, 42.9% 100%, 0 100%);
  opacity: .13;
  pointer-events: none;
  z-index: 2;
}

.logo-overlay img {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 1000px;
  max-width: 85%;
  transform: translate(-10%, -50%);
  display: block;
}

.macbook-image {
  position: absolute;
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%);
  width: clamp(470px, 39vw, 750px);
  max-width: 65%;
  z-index: 3;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

.macbook-image:hover {
  transform: translate(-50%, -50%) translateY(-8px) scale(1.075) rotate(-2deg);
}

.macbook-image img {
  width: 100%;
  display: block;
  transform-origin: center bottom;
  filter: drop-shadow(0 30px 42px rgba(0, 0, 0, .22));
  animation:
    notebookReveal 2.2s cubic-bezier(.16, 1, .3, 1) both,
    notebookFloat 6s ease-in-out 2.2s infinite;
}

@keyframes notebookReveal {
  0% {
    opacity: 0;
    filter: blur(14px) drop-shadow(0 45px 52px rgba(0, 0, 0, .1));
    transform: translate3d(150px, 110px, 0) scale(.58) rotate(8deg);
  }

  68% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 38px 48px rgba(0, 0, 0, .27));
    transform: translate3d(-18px, -14px, 0) scale(1.075) rotate(-1.4deg);
  }

  100% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 30px 42px rgba(0, 0, 0, .22));
    transform: translate3d(0, 0, 0) scale(1) rotate(0);
  }
}

@keyframes notebookFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px) rotate(-.7deg) scale(1.012);
  }
}

/* SKILLS */


.skills-banner {
  position: relative;
  isolation: isolate;
  z-index: 6;
  width: 100%;
  max-width: 100%;
  height: 130px;
  margin-top: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(59, 108, 232, .28);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background:
    radial-gradient(circle at 18% 50%, rgba(47, 95, 216, .24), transparent 24%),
    radial-gradient(circle at 82% 50%, rgba(21, 87, 255, .14), transparent 22%),
    linear-gradient(105deg, #080a10 0%, #101522 48%, #08090d 100%);
  box-shadow:
    inset 0 18px 38px rgba(0, 0, 0, .2),
    inset 0 -18px 38px rgba(0, 0, 0, .28);
}

.skills-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}

.skills-slider {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow: hidden;
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.track {
  display: flex;
  align-items: center;
  gap: clamp(52px, 5.2vw, 100px);
  width: max-content;
  animation: scroll 18s linear infinite;
}

.track img {
  width: clamp(58px, 4.2vw, 80px);
  opacity: .88;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .38));
  transition: transform .35s ease, opacity .35s ease, filter .35s ease;
}

.track img:hover {
  transform: translateY(-8px) scale(1.12);
  opacity: 1;
  filter:
    drop-shadow(0 0 12px rgba(59, 108, 232, .9))
    drop-shadow(0 10px 18px rgba(0, 0, 0, .45));
}

@keyframes scroll {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}


.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  border: none;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.nav-links .btn-contact,
.navbar.scrolled .nav-links .btn-contact {
  color: var(--white);
  text-decoration: none;
}

.btn-contact::after {
  content: "↗";
  font-size: 1rem;
  line-height: 1;
  transition: transform .25s ease;
}

.nav-links .btn-contact:hover {
  opacity: 1;
  background: #202020;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
  transform: translateY(-2px);
}

.btn-contact:hover::after {
  transform: translate(2px, -2px);
}

.content {
  position: relative;
  z-index: 5;
  width: min(45vw, 640px);
  max-width: 640px;
  padding-left: clamp(40px, 10.4vw, 200px);
  margin-top: 17vh;
}

.eyebrow-index {
  color: var(--white);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 6px;
  padding: 0 0 0 10px;

}

.name {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(2.6rem, 3.35vw, 4rem);
  line-height: 1.05;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.role {
  color: #1557ff;
  font-weight: 700;
  font-size: clamp(1rem, 1.15vw, 1.375rem);
  margin-bottom: 32px;
  padding: 10px 0 0 10px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 13px;
  margin-bottom: 40px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding-left: 20px;
}

.hero-button img {
  width: 20px;
  height: 20px;
}

.cv-button {
  min-height: 46px;
  padding: 12px 20px;
  border-color: rgba(83, 129, 255, .7);
  border-radius: 7px;
  background: linear-gradient(135deg, #1557ff, #063be0);
  color: var(--white);
  box-shadow:
    0 8px 22px rgba(0, 67, 255, .42),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.cv-button img {
  filter: brightness(0) invert(1);
}

.cv-button:hover {
  background: linear-gradient(135deg, #2b6bff, #0a43ee);
  box-shadow:
    0 12px 28px rgba(0, 67, 255, .55),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: translateY(-2px);
}

.socials {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 14px;
  padding-left: clamp(52px, 10.95vw, 210px);
  margin-top: 12px;
}

.social-icon {
  width: 50px;
  height: 50px;
  background: var(--white);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 20px;
}

@media (max-width:900px) {
  .hero {
    padding-top: 150px;
  }

  .hero::before {
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 65%, 0 100%);
  }

  .navbar {
    align-items: center;
    padding: 110px 30px 30px;
  }

  .hero > .logo-placeholder {
    top: 30px;
    left: 30px;
  }

  .navbar.scrolled {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    padding: 0;
  }

  .navbar.scrolled .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px 9px 18px;
    border-radius: 16px;
  }

  .navbar.scrolled .nav-links a,
  .navbar.scrolled .btn-contact {
    font-size: 14px;
  }

  .navbar.scrolled .btn-contact {
    min-height: 42px;
    padding: 10px 14px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 24px;
  }

  .content {
    padding-left: 30px;
    margin-top: 8vh;
  }

  .socials {
    padding-left: 30px;
  }

  .name {
    font-size: 42px;
  }

  .logo-overlay {
    display: none;
  }
}



/* ---------- tela sobre ---------- */



.section {
  display: grid;
  grid-template-columns: minmax(440px, .94fr) minmax(0, 1.25fr);
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- LEFT PANEL ---------- */
.left {
  position: relative;
  background-color: var(--black);
  isolation: isolate;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(32px, 3vw, 56px);
  overflow: hidden;
}

.logo-mark {
  position: absolute;
  z-index: 0;
  opacity: 0.5;
  background-image: url('img/fundo-background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.logo-mark.top-left {
  top: -40px;
  left: -30px;
  width: 280px;
}

.logo-mark.bottom-right {
  bottom: -60px;
  right: -40px;
  width: 280px;
  opacity: 0.35;
}

.stats-row {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.eu-image {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-bottom: 18px;
}

.eu-image img {
  width: 100%;
  height: clamp(320px, 34vw, 460px);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.04);
  display: block;
  opacity: 1;
}

@media (max-width: 880px) {
  .eu-image img {
    height: 240px;
    border-radius: 14px;
  }
}

.stat-card {
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px 22px;
  flex: 1;
  min-width: 0;
}

.stat-card .icon {
  color: #1557ff;
  margin-bottom: 14px;
}

.stat-card .icon svg,
.stat-card .icon img {
  width: 28px;
  height: 28px;
  filter: none;
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--blue-bright);
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 10px;
}

.stat-value .plus {
  font-weight: 600;
  font-size: 1.2rem;
}

.stat-label {
  color: #e8e8ea;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-sub {
  color: #5b6b8c;
  font-size: 0.72rem;
  margin-top: 2px;
}

.status-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #33333a;
  border-radius: 999px;
  padding: 9px 18px;
  width: fit-content;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc73;
  box-shadow: 0 0 8px #3ddc73;
}

.status-badge span {
  color: #d6d6d9;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---------- RIGHT PANEL ---------- */
.right {
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(70px, 7vw, 100px) clamp(52px, 10.4vw, 200px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-accent);
  display: inline-block;
}

.about-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 2.2vw, 2.6rem);
  line-height: 1.2;
  color: var(--text-heading);
  max-width: 640px;
  margin-bottom: 28px;
}

.about-title .highlight {
  color: var(--blue-accent);
}

.body-text {
  color: var(--text-body);
  font-size: clamp(.94rem, 1vw, 1.05rem);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 22px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  width: fit-content;
  text-decoration: none;
  cursor: pointer;
}



.cta-row:hover .cta-icon {
  transform: translate(3px, -3px);
}

.cta-icon img {
  width: 60px;
  height: 60px;
  filter: none;
}

.cta-text .cta-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-heading);
}

.cta-text .cta-sub {
  color: var(--blue-accent);
  font-size: 0.85rem;
  margin-top: 2px;
}

.cta-underline {
  height: 2px;
  width: 52px;
  background: var(--blue-accent);
  margin-top: 8px;
}

@media (max-width: 880px) {
  .section {
    grid-template-columns: 1fr;
  }

  .left {
    min-height: 520px;
    padding: 32px;
  }

  .right {
    padding: 48px 32px;
  }

  .about-title {
    font-size: 2rem;
  }

  .stats-row {
    flex-wrap: wrap;
  }
}

.projects-section {
  position: relative;
  padding: 130px clamp(24px, 8vw, 150px);
  background:
    radial-gradient(circle at 85% 10%, rgba(47, 95, 216, .18), transparent 28%),
    var(--black);
  color: var(--white);
}

.projects-intro {
  max-width: 1700px;
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  align-items: end;
  gap: 80px;
}

.projects-intro h2,
.footer-message h2 {
  max-width: 700px;
  font-size: clamp(1.5rem, 5vw, 4.0rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.projects-intro h2 span,
.footer-message h2 span {
  color: var(--blue-bright);
}

.projects-intro > p {
  color: #9c9ca5;
  font-size: 0.8rem;
  line-height: 1.8;
  padding-bottom:8px;
}

.projects-grid {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 108, 232, .65);
}

.project-media {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #202024;
}

.project-media img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  display: block;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}

.project-card:hover .project-media img {
  transform: scale(1.035);
}

.project-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 32px;
}

.project-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.project-heading h3 {
  font-size: 1.7rem;
  line-height: 1.2;
}

.project-type {
  padding: 7px 11px;
  border: 1px solid #37373d;
  border-radius: 999px;
  color: #92929c;
  font-size: .66rem;
  letter-spacing: .08em;
  font-weight: 600;
}

.project-info p {
  margin-top: 6px;
  color: var(--blue-bright);
  font-size: .8rem;
  line-height: 1.4;
}

.project-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  font-size: 1.4rem;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}

.project-arrow:hover {
  transform: rotate(-35deg);
  background: var(--blue-bright);
  color: var(--white);
}

.projects-cta {
  max-width: 1700px;
  margin: 70px auto 0;
  padding-top: 32px;
  border-top: 1px solid #29292d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.projects-cta p {
  color: #85858e;
}

.projects-cta a {
  color: var(--white);
  text-decoration: none;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 600;
}

.projects-cta a span {
  margin-left: 12px;
  color: var(--blue-bright);
}

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 110px clamp(24px, 8vw, 150px) 34px;
  background: var(--off-white);
  color: var(--text-heading);
}

.footer-main {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr .5fr;
  gap: 80px;
}

.footer-message h2 {
  max-width: 900px;
  font-size: clamp(2.5rem, 5vw, 5rem);
}

.footer-email {
  width: fit-content;
  margin-top: 50px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 2px solid var(--text-heading);
  color: var(--text-heading);
  text-decoration: none;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 600;
}

.footer-email:hover {
  color: var(--blue-accent);
  border-color: var(--blue-accent);
}

.footer-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  padding-top: 42px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-column p {
  margin-bottom: 9px;
  color: #77777e;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer-column a {
  width: fit-content;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 600;
}

.footer-column a:hover {
  color: var(--blue-accent);
}

.footer-bottom {
  max-width: 1700px;
  margin: 90px auto 0;
  padding-top: 28px;
  border-top: 1px solid #b4b4b4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-logo img {
  display: block;
  width: 64px;
  filter: invert(1);
}

.footer-bottom p,
.back-to-top {
  color: #66666d;
  font-size: .78rem;
}

.back-to-top {
  justify-self: end;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 600;
}

.back-to-top span {
  margin-left: 8px;
}

@media (max-width: 900px) {
  .projects-section {
    padding-top: 90px;
    padding-bottom: 90px;
  }

  .projects-intro,
  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .projects-intro {
    margin-bottom: 42px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    min-height: clamp(260px, 60vw, 430px);
  }

  .footer-main {
    gap: 50px;
  }

  .footer-navigation {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .projects-section,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .project-card {
    border-radius: 20px;
  }

  .project-media {
    min-height: 240px;
  }

  .project-body {
    padding: 22px;
  }

  .project-heading h3 {
    font-size: 1.35rem;
  }

  .projects-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    padding-top: 80px;
  }

  .footer-email {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .footer-bottom {
    margin-top: 65px;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .back-to-top {
    justify-self: start;
  }
}

/* ---------- RESPONSIVIDADE GLOBAL ---------- */
@media (max-width: 1366px) {
  .right {
    padding-right: clamp(48px, 7vw, 96px);
    padding-left: clamp(48px, 7vw, 96px);
  }

  .project-body {
    padding: 24px;
  }
}

@media (max-width: 1200px) {
  .hero {
    min-height: 680px;
  }

  .content {
    margin-top: 13vh;
  }

  .navbar:not(.scrolled) .nav-links {
    padding: 9px 10px 9px 18px;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 16px;
    background: #e2e2e2;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  }

  .navbar:not(.scrolled) .nav-links a {
    color: var(--black);
  }

  .navbar:not(.scrolled) .nav-links .btn-contact {
    color: var(--white);
  }

  .section {
    grid-template-columns: minmax(400px, .9fr) minmax(0, 1.1fr);
  }

  .right {
    padding: 70px 58px;
  }

  .stat-card {
    padding: 18px 16px;
  }

  .projects-intro {
    gap: 48px;
  }
}

@media (max-width: 1024px) {
  .section {
    grid-template-columns: 1fr;
  }

  .left,
  .right {
    min-height: auto;
  }

  .left {
    padding: 64px clamp(32px, 7vw, 72px);
  }

  .right {
    padding: 80px clamp(32px, 7vw, 72px);
  }

  .eu-image {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
  }

  .logo-mark {
    display: none;
  }

  .eu-image img {
    height: clamp(340px, 55vw, 520px);
  }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    height: auto;
    min-height: 820px;
  }

  .hero::before {
    height: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 68%, 0 84%);
  }

  .content {
    width: min(620px, calc(100% - 60px));
    max-width: none;
    right: auto;
    padding-left: 30px;
    margin-top: 7vh;
  }

  .macbook-image {
    top: auto;
    bottom: 8px;
    left: 68%;
    width: min(620px, 82vw);
    max-width: none;
    transform: translateX(-50%);
  }

  .macbook-image:hover {
    transform: translateX(-50%) scale(1.025) rotate(-.6deg);
  }

  .skills-banner {
    height: 110px;
  }

  .track {
    animation-duration: 16s;
  }

  .projects-intro > p {
    max-width: 620px;
  }

  .project-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 790px;
    padding-top: 132px;
  }

  .navbar,
  .navbar.scrolled {
    top: 20px;
    right: 16px;
    left: auto;
    width: auto;
    padding: 0;
  }

  .menu-toggle {
    position: fixed;
    top: 20px;
    right: 16px;
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: var(--black);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transition: transform .25s ease, opacity .2s ease;
  }

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

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

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

  .navbar .nav-links,
  .navbar.scrolled .nav-links,
  .navbar:not(.scrolled) .nav-links {
    position: fixed;
    top: 78px;
    right: 16px;
    width: min(280px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 18px;
    background: #e2e2e2;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  .navbar.menu-open .nav-links {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .navbar .nav-links a,
  .navbar.scrolled .nav-links a,
  .navbar:not(.scrolled) .nav-links a {
    width: 100%;
    padding: 12px 14px;
    color: var(--black);
    font-size: 14px;
  }

  .navbar .nav-links .btn-contact,
  .navbar.scrolled .nav-links .btn-contact,
  .navbar:not(.scrolled) .nav-links .btn-contact {
    min-height: 44px;
    margin-top: 4px;
    padding: 10px 14px;
    color: var(--white);
  }

  .hero > .logo-placeholder {
    top: 24px;
    left: 20px;
    width: 66px;
  }

  .content {
    width: calc(100% - 32px);
    padding-left: 16px;
    margin-top: 5vh;
  }

  .eyebrow-index {
    font-size: 18px;
  }

  .name {
    font-size: clamp(2.25rem, 11vw, 3rem);
    overflow-wrap: anywhere;
  }

  .role {
    max-width: 330px;
    padding-left: 0;
    font-size: .98rem;
    line-height: 1.5;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
  }

  .hero-button {
    padding: 12px 15px;
    font-size: 13px;
  }

  .socials {
    right: auto;
    gap: 10px;
    padding-left: 16px;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  .macbook-image {
    left: 50vw;
    bottom: 24px;
    width: min(400px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    transform: translateX(-50%);
  }

  .macbook-image:hover {
    transform: translateX(-50%) scale(1.02) rotate(-.4deg);
  }

  .skills-banner {
    height: 92px;
  }

  .track {
    gap: 42px;
  }

  .track img {
    width: 52px;
  }

  .left {
    padding: 48px 20px;
  }

  .right {
    padding: 60px 20px;
  }

  .eu-image img {
    height: clamp(280px, 105vw, 400px);
  }

  .stats-row {
    gap: 8px;
  }

  .stat-card {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .stat-card .icon {
    margin-bottom: 8px;
  }

  .stat-value {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .stat-label {
    font-size: .72rem;
  }

  .stat-sub {
    font-size: .62rem;
  }

  .status-badge {
    max-width: 100%;
    padding: 8px 12px;
    text-align: center;
  }

  .about-title {
    font-size: clamp(1.75rem, 8vw, 2.15rem);
  }

  .body-text {
    font-size: .92rem;
  }

  .projects-intro h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .project-body {
    gap: 14px;
  }

  .project-heading {
    gap: 8px;
  }

  .project-arrow {
    width: 44px;
    height: 44px;
  }

  .footer-navigation {
    gap: 28px;
  }

  .footer-message h2 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }
}

@media (max-width: 380px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

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

  .stat-value {
    justify-content: center;
  }

  .footer-navigation {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .hero {
    min-height: 650px;
  }

  .content {
    margin-top: 7vh;
  }
}

/*
 * Browser zoom below 50% exposes a very large CSS viewport. Keep the two
 * full-bleed sections on a desktop-sized stage so their capped elements do
 * not drift apart or leave several screens of empty space.
 */
@media (min-width: 1921px) {
  .hero {
    height: min(100vh, 1080px);
    min-height: 760px;
  }

  .hero::before {
    width: calc(50% + 96px);
    clip-path: polygon(0 0, 100% 0, calc(100% - 230px) 100%, 0 100%);
  }

  .hero > .logo-placeholder,
  .content,
  .socials {
    transform: translateX(calc((100vw - 1920px) / 2));
  }

  .content {
    margin-top: 184px;
  }

  .logo-overlay {
    clip-path: polygon(0 0, calc(50% + 96px) 0, calc(50% - 136px) 100%, 0 100%);
  }

  .logo-overlay img {
    left: calc(50% - 768px);
  }

  .macbook-image {
    left: calc(50% + 480px);
  }

  .navbar {
    padding-right: calc((100vw - 1920px) / 2 + 170px);
    padding-left: calc((100vw - 1920px) / 2 + 170px);
  }

  .navbar.scrolled {
    right: calc((100vw - 1920px) / 2 + 32px);
  }

  .track {
    width: 200%;
    gap: 0;
    justify-content: space-around;
  }

  .track img {
    flex: 0 0 auto;
  }

  .about-section {
    background: linear-gradient(
      90deg,
      var(--black) 0,
      var(--black) 50%,
      var(--off-white) 50%,
      var(--off-white) 100%
    );
  }

  .section {
    width: 100%;
    max-width: 1920px;
    min-height: min(100vh, 1080px);
    margin-inline: auto;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
