/* ── VARIÁVEIS ── */
:root {
  --bg: #0a0a0f;
  --white: #f5f2ed;
  --accent: #7b2fff;
  --muted: #555;
  --line: rgba(245, 242, 237, 0.08);

  --font-display: "Dirtyline", sans-serif;
  --font-body: "DM Mono", monospace;
}

/* ── RESET ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── RIBBON ── */
.ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  overflow: hidden;
  border-bottom: 0.5px solid var(--line);
  background: var(--bg);
  padding: 8px 0;
  white-space: nowrap;
}

.ribbon__track {
  display: inline-flex;
  gap: 32px;
  animation: ribbon 20s linear infinite;
}

.ribbon__track span {
  font-family: var(--font-body);
  font-size: clamp(9px, 0.3vw + 7px, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.ribbon__sep {
  color: var(--accent) !important;
}

@keyframes ribbon {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 37px;
  right: 40px;
  z-index: 101;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: clamp(10px, 0.4vw + 8px, 13px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.nav__links a:hover {
  color: var(--accent);
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}


.hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.4;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 64px 64px;
  max-width: min(92vw, 1400px);
}

.hero__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(10px, 0.35vw + 8px, 12px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 84px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero__line {
  display: block;
  white-space: nowrap;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: clamp(11px, 0.4vw + 9px, 14px);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border-bottom: 0.5px solid var(--white);
  padding-bottom: 4px;
  transition:
    color 0.3s,
    border-color 0.3s;
}

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

#about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

#about {
  min-height: 100vh;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 10, 15, 0.85) 0%,
      rgba(10, 10, 15, 0.4) 50%,
      rgba(10, 10, 15, 0.95) 100%
    ),
    url("../assets/images/aboutImage.jpg") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 64px 220px;
}

.about__circle {
  position: absolute;
  bottom: -220px;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 110vw;
  height: 500px;
  border-radius: 50%;
  background: #f5f2ed;
  z-index: 10;
}

.about__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.about__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--line);
}

.about__title {
  font-family: var(--font-display);
  font-size: clamp(72px, 11vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  margin-top:100px;
  white-space: nowrap;
}

.about__arrow {
  width: clamp(70px, 10vw, 130px);
  height: auto;
  flex-shrink: 0;
  display: block;
  margin-top:100px;
}

.about__meta {
  display: flex;
  justify-content: space-between;
  font-size: clamp(11px, 0.4vw + 9px, 14px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 80px;
}

.about__text {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.about__text p {
  font-size: clamp(14px, 0.3vw + 12px, 16px);
  line-height: 1.8;
  color: rgba(245, 242, 237, 0.7);

}

/* ── ABOUT RESPONSIVE ── */
@media (max-width: 1024px) {
  #about {
    padding: 80px 40px 200px;
  }
}

@media (max-width: 768px) {
  #about {
    padding: 60px 24px 160px;
  }
  .about__header {
    align-items: center;
  }
  .about__title {
    font-size: clamp(40px, 9vw, 72px);
    margin-top: 60px;
    white-space: nowrap;
  }
  .about__arrow {
    width: clamp(40px, 8vw, 70px);
    margin-top: 60px;
  }
  .about__meta {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 48px;
  }
  .about__text {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  #about {
    padding: 48px 20px 120px;
  }
  .about__title {
    font-size: clamp(32px, 10vw, 48px);
    margin-top: 40px;
  }
  .about__arrow {
    width: clamp(28px, 9vw, 40px);
    margin-top: 40px;
  }
}

/* ── PROJECTS ── */
#projects {
  background: #f5f2ed;
  color: #0d0d0d;
  padding: 80px 64px;
  position: relative;
}

.projects__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 24px;
  border-bottom: 0.5px solid rgba(13, 13, 13, 0.12);
  margin-bottom: 0;
}

.projects__eyebrow {
  display: block;
  font-size: clamp(10px, 0.4vw + 8px, 13px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}

.projects__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 140px);
  line-height: 0.88;
  color: #0d0d0d;
}

.projects__stroke {
  -webkit-text-stroke: 1.5px #0d0d0d;
  color: transparent;
}

.projects__meta {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(14px, 0.4vw + 11px, 17px);
  color: #888;
  text-align: right;
  line-height: 1.6;
}

/* ── PROJECTS BODY (lista + stage fixo) ── */
.projects__body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "list stage";
  gap: 0 64px;
  align-items: start;
}

.projects__list {
  grid-area: list;
}

.projects__stage {
  grid-area: stage;
  position: sticky;
  top: 96px;
  align-self: start;
}

.projects__stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f2ed;
  border: 1px solid rgba(13, 13, 13, 0.15);
}

.projects__stage-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.projects__stage-media.is-visible {
  opacity: 1;
}

/* ── PROJECT ITEM ── */
.project-item {
  padding: 28px 0;
  border-bottom: 0.5px solid rgba(13, 13, 13, 0.12);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-item.is-active {
  padding-left: 12px;
}
.project-item.is-active::before {
  left: 0;
}
.project-item.is-active .project-item__num,
.project-item.is-active .project-item__title,
.project-item.is-active .project-item__sub,
.project-item.is-active .project-item__link,
.project-item.is-active .project-item__tags span,
.project-item.is-active .project-item__year,
.project-item.is-active .project-item__arrow {
  color: #fff;
}
.project-item.is-active .project-item__tags span {
  border-color: rgba(255, 255, 255, 0.25);
}
.project-item.is-active .project-item__link {
  border-color: rgba(255, 255, 255, 0.4);
}
.project-item.is-active .project-item__title {
  letter-spacing: 0.06em;
}
.project-item.is-active .project-item__arrow {
  transform: translate(4px, -4px);
}

.project-item__row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: start;
  gap: 32px;
}

.project-item__body {
  min-width: 0;
}

.project-item__right {
  min-width: 44px;
}

/* fill de tinta no hover */
.project-item::before {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  bottom: 0;
  width: 100%;
  background: #0d0d0d;
  transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 0;
}

.project-item:hover {
  padding-left: 12px;
}
.project-item:hover::before {
  left: 0;
}
.project-item > * {
  position: relative;
  z-index: 1;
}

.project-item__num {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(11px, 0.35vw + 9px, 14px);
  letter-spacing: 0.15em;
  color: #888;
  transition: color 0.3s;
  align-self: start;
  padding-top: 4px;
}

.project-item__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 80px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: #0d0d0d;
  transition:
    color 0.3s,
    letter-spacing 0.4s;
}

.project-item__sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(16px, 0.5vw + 13px, 20px);
  color: #666;
  margin-top: 4px;
  transition: color 0.3s;
}

.project-item__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.project-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: clamp(11px, 0.35vw + 9px, 14px);
  letter-spacing: 0.05em;
  color: #0d0d0d;
  text-decoration: none;
  border-bottom: 0.5px solid rgba(13, 13, 13, 0.4);
  padding-bottom: 2px;
  transition:
    color 0.3s,
    border-color 0.3s;
}

.project-item__tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.project-item__tags span {
  font-size: clamp(9px, 0.3vw + 7px, 12px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 0.5px solid rgba(13, 13, 13, 0.15);
  color: #888;
  transition:
    border-color 0.3s,
    color 0.3s;
}

.project-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.project-item__year {
  font-size: clamp(11px, 0.35vw + 9px, 14px);
  letter-spacing: 0.1em;
  color: #888;
  transition: color 0.3s;
}

.project-item__arrow {
  font-size: clamp(22px, 0.8vw + 18px, 28px);
  color: #888;
  transition:
    color 0.3s,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* hover — texto vira branco */
.project-item:hover .project-item__num,
.project-item:hover .project-item__title,
.project-item:hover .project-item__sub,
.project-item:hover .project-item__link,
.project-item:hover .project-item__tags span,
.project-item:hover .project-item__year,
.project-item:hover .project-item__arrow {
  color: #fff;
}

.project-item:hover .project-item__tags span {
  border-color: rgba(255, 255, 255, 0.25);
}

.project-item:hover .project-item__link {
  border-color: rgba(255, 255, 255, 0.4);
}
.project-item:hover .project-item__title {
  letter-spacing: 0.06em;
}
.project-item:hover .project-item__arrow {
  transform: translate(4px, -4px);
}

/* ── MELT TRANSITION ── */
.melt-transition {
  position: relative;
  height: 340px;
  overflow-x: hidden;
  background: #05020a;
}

.melt__gooey {
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: calc(100% + 10px);
  filter: url(#melt-gooey);
}

.melt__ceiling {
  position: absolute;
  top: 0;
  left: -5%;
  width: 110%;
  height: 90px;
  background: linear-gradient(180deg, #f5f2ed 0%, #eeebe5 100%);
  transform-origin: center top;
}

.melt__drip {
  position: absolute;
  top: 0;
  border-radius: 50% 50% 45% 45%;
  transform: scaleY(0);
  transform-origin: top center;
}

.melt__drip--1 { left: 3%;  width: 10%; height: 150px; background: radial-gradient(ellipse at 40% 25%, #fff, #f5f2ed 50%, #e0ddd8); }
.melt__drip--2 { left: 15%; width: 13%; height: 260px; background: radial-gradient(ellipse at 38% 20%, #fff, #f5f2ed 48%, #dedad5); }
.melt__drip--3 { left: 34%; width: 8%;  height: 110px; background: radial-gradient(ellipse at 42% 28%, #fff, #f5f2ed 45%, #e2dfd9); }
.melt__drip--4 { left: 48%; width: 12%; height: 210px; background: radial-gradient(ellipse at 36% 22%, #fff, #f5f2ed 50%, #dbd8d2); }
.melt__drip--5 { left: 68%; width: 9%;  height: 290px; background: radial-gradient(ellipse at 41% 26%, #fff, #f5f2ed 44%, #e0ddd7); }
.melt__drip--6 { left: 87%; width: 11%; height: 180px; background: radial-gradient(ellipse at 43% 27%, #fff, #f5f2ed 43%, #e3e0da); }
.melt__drip--7 { left: 24%; width: 8%;  height: 220px; background: radial-gradient(ellipse at 39% 24%, #fff, #f5f2ed 47%, #dedad4); }
.melt__drip--8 { left: 58%; width: 9%;  height: 150px; background: radial-gradient(ellipse at 44% 23%, #fff, #f5f2ed 46%, #e1ded8); }
.melt__drip--9 { left: 40%; width: 7%;  height: 190px; background: radial-gradient(ellipse at 37% 21%, #fff, #f5f2ed 49%, #dcd9d3); }
.melt__drip--10 { left: 77%; width: 8%; height: 160px; background: radial-gradient(ellipse at 45% 25%, #fff, #f5f2ed 46%, #e2dfda); }

/* ── SKILLS ── */
#skills {
  background: #05020a;
  min-height: 100vh;
  padding: 80px 64px;
  position: relative;
  overflow: visible;
  color: var(--white);
  display: flex;
  flex-direction: column;
}

.skills__header {
  margin-bottom: 48px;
  width: 100%;
}

.skills__title-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.skills__line {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--line);
  overflow: visible;
}

.skills__line--1 {
  border-top: 0.5px solid var(--line);
  justify-content: space-between;
  gap: 16px;
}

.skills__line--2 {
  justify-content: right;
 
}

.skills__line--3 {
  justify-content: flex-start;
  gap: 24px;
  position:relative;
}


.skills__leveling-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
 
}



/* tamanhos */
.skills__word--leveling  { font-size: clamp(48px, 6vw, 130px); line-height: 1; }
.skills__word--up        { font-size: clamp(20px, 3.5vw, 100px); color: var(--white); }
.skills__word--interfaces{ font-size: clamp(48px, 7vw, 140px); text-align: right; line-height: 1; }
.skills__word--one       { font-size: clamp(20px, 3.5vw, 100px); color: var(--white); }
.skills__word--build     { font-size: clamp(48px, 6vw, 130px); line-height: 1; }
.skills__word--at        { font-size: clamp(20px, 3.5vw, 100px); color: var(--white); }


.skills__star--big   {
  position:absolute;
  z-index:10px;
  left:30px;
  top:100px;
  width: clamp(100px, 15vw, 200px);
  height: clamp(100px, 15vw, 200px);
  transform: rotate(10deg);
  animation: star-blink 2.8s ease-in-out infinite;
}
.skills__star--small {
  width: clamp(50px, 5vw, 80px);
  height: clamp(50px, 5vw, 80px);
  margin-left:100px;
  animation: star-blink 2.2s ease-in-out 0.7s infinite;
}
.skills__star--small2{
  width: clamp(60px, 10vw, 60px);
  height: clamp(60px, 10vw, 60px);
  margin-right:100px;
  animation: star-blink 3.1s ease-in-out 1.4s infinite;
}

/* raio */
.skills__lightning {
  width: clamp(300px, 20vw, 500px);
  height: auto;
  flex-shrink: 0;
  position:absolute;
  right:0px;
  

}

.skills__word {
  font-family: var(--font-display);
  white-space: nowrap;
}

.skills__line--1 {
  border-top: 0.5px solid var(--line);
}

/* linha separadora */
.skills__header-line {
  width: 100%;
  height: 0.5px;
  background: var(--line);
  margin-top: 24px;
}

/* layout */
.skills__layout {
  display: grid;
  grid-template-columns: 1fr clamp(380px, 30vw, 640px) 1fr;
  gap: 32px;
  align-items: center;
  flex: 1;
  min-height: 500px;
  width: 100%;
}

.skills__col {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.skills__block-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 0.6vw + 16px, 26px);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--white);
}

.skills__block p {
  font-size: clamp(12px, 0.4vw + 9px, 15px);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

.skills__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.skills__tools span {
  font-size: clamp(9px, 0.3vw + 7px, 12px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 0.5px solid var(--line);
  color: var(--muted);
}

/* avatar */
.skills__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

#avatarCanvas {
  width: 100%;
  height: clamp(500px, 45vw, 760px);
  display: block;
}

/* ── LETTER GLITCH ── */
.letter-glitch {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000000;
  overflow: hidden;
}

.letter-glitch__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.letter-glitch__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.letter-glitch__vignette--outer {
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 1) 100%);
}

.letter-glitch__vignette--center {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
}

/* fade de entrada — evita o corte abrupto entre a seção anterior e o glitch */
.contact__glitch-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    #05020a 0%,
    transparent 380px,
    transparent calc(100% - 200px),
    #05020a 100%
  );
}

/* ── CONTACT ── */
#contact {
  background: #05020a;
  min-height: 100vh;
  padding: 80px 64px 100px;
  position: relative;
  overflow: hidden;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 64px;
}

/* cantos HUD */
#contact::before,
#contact::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.3;
}
#contact::before {
  top: 28px;
  left: 28px;
  border-width: 1px 0 0 1px;
}
#contact::after {
  bottom: 28px;
  right: 28px;
  border-width: 0 1px 1px 0;
}

/* fundo animado */
.contact__glitch-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
}

/* header */
.contact__header {
  position: relative;
  z-index: 1;
}

.contact__ghost {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 340px);
  color: var(--accent);
  opacity: 0.025;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  pointer-events: none;
  letter-spacing: -0.02em;
  z-index: 0;
}

.contact__press {
  font-size: clamp(9px, 0.3vw + 7px, 12px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  animation: blink 2.2s ease-in-out infinite;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.contact__stroke {  
  color: #fff;
  display: block;
  position: relative;
  animation: glitch-skew 2.5s steps(1) infinite;
}

.contact__stroke::before,
.contact__stroke::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.contact__stroke::before {
  -webkit-text-stroke: 1.5px #ff2f6e;
  color: #ff2f6e;
  animation: glitch-1 2s steps(1) infinite;
}

.contact__stroke::after {
  -webkit-text-stroke: 1.5px #00e5ff;
  color: #00e5ff;
  animation: glitch-2 3s steps(1) infinite;
}

@keyframes glitch-skew {
  0%, 80%, 100% { transform: none; filter: none; }
  81% { transform: skewX(-14deg) translateX(-5px); filter: brightness(1.4); }
  82% { transform: skewX(9deg)  translateX(5px);  filter: brightness(0.7); }
  83% { transform: none; filter: none; }
  88% { transform: translateX(-3px) skewX(5deg); filter: brightness(1.2); }
  89% { transform: translateX(3px); }
  90% { transform: none; filter: none; }
  95% { transform: skewX(-6deg); filter: brightness(1.15); }
  96% { transform: none; filter: none; }
}

@keyframes glitch-1 {
  0%, 76%, 100% { opacity: 0; clip-path: none; transform: none; }
  77% { opacity: 1; clip-path: inset(8%  0 75% 0); transform: translateX(-12px); }
  78% { opacity: 1; clip-path: inset(45% 0 40% 0); transform: translateX(12px);  }
  79% { opacity: 1; clip-path: inset(20% 0 60% 0); transform: translateX(-7px);  }
  80% { opacity: 1; clip-path: inset(65% 0 15% 0); transform: translateX(9px);   }
  81% { opacity: 1; clip-path: inset(30% 0 55% 0); transform: translateX(-9px);  }
  82% { opacity: 0; }
  88% { opacity: 1; clip-path: inset(15% 0 72% 0); transform: translateX(-6px);  }
  89% { opacity: 1; clip-path: inset(58% 0 32% 0); transform: translateX(6px);   }
  90% { opacity: 0; }
}

@keyframes glitch-2 {
  0%, 72%, 100% { opacity: 0; clip-path: none; transform: none; }
  73% { opacity: 1; clip-path: inset(55% 0 25% 0); transform: translateX(12px);  }
  75% { opacity: 1; clip-path: inset(10% 0 70% 0); transform: translateX(-12px); }
  77% { opacity: 1; clip-path: inset(70% 0 10% 0); transform: translateX(9px);   }
  79% { opacity: 1; clip-path: inset(35% 0 48% 0); transform: translateX(-7px);  }
  81% { opacity: 0; }
  86% { opacity: 1; clip-path: inset(80% 0  8% 0); transform: translateX(7px);   }
  87% { opacity: 1; clip-path: inset(25% 0 60% 0); transform: translateX(-5px);  }
  88% { opacity: 0; }
}

.contact__accent {
  color: var(--accent);
  display: block;
}

/* grid caótico */
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* cards */
.ccard {
  padding: 28px;
  border: 0.5px solid var(--line);
  background: #0d0d0d;
  text-decoration: none;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: rotate(var(--rot, 0deg));
  min-height: 200px;
}

.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ccard-accent, var(--accent));
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 0;
}

.ccard:hover {
  border-color: var(--ccard-accent, var(--accent));
  transform: rotate(0deg) translateY(-4px);
  z-index: 10;
}

.ccard:hover::before {
  transform: translateY(0);
}
.ccard > * {
  position: relative;
  z-index: 1;
}

/* posicionamento caótico */
.ccard--linkedin {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  --rot: -0.4deg;
  --ccard-accent: #0077b5;
  min-height: 280px;
}
.ccard--email {
  grid-column: 2 / 3;
  grid-row: 1;
  --rot: 0.5deg;
  --ccard-accent: #7b2fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}
.ccard--ig {
  grid-column: 2 / 3;
  grid-row: 2;
  --rot: -0.3deg;
  --ccard-accent: #ff2f6e;
}

/* internos do card */
.ccard__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ccard__num {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(11px, 0.35vw + 9px, 14px);
  color: var(--muted);
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.ccard__tag {
  font-size: clamp(8px, 0.3vw + 6px, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 0.5px solid var(--line);
  color: var(--muted);
  transition:
    border-color 0.3s,
    color 0.3s;
}

.ccard:hover .ccard__num,
.ccard:hover .ccard__tag {
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.ccard--email.is-copied .ccard__tag {
  color: #fff;
  border-color: var(--ccard-accent);
}

.ccard__platform {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 64px);
  line-height: 0.9;
  letter-spacing: 0.04em;
  transition: letter-spacing 0.4s;
  margin-top: auto;
}

.ccard:hover .ccard__platform {
  letter-spacing: 0.08em;
}

.ccard__sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(13px, 0.4vw + 10px, 16px);
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
  transition: color 0.3s;
}

.ccard:hover .ccard__sub {
  color: rgba(255, 255, 255, 0.55);
}

.ccard__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 0.5px solid var(--line);
  transition: border-color 0.3s;
}

.ccard:hover .ccard__footer {
  border-color: rgba(255, 255, 255, 0.12);
}

.ccard__quest {
  font-size: clamp(8px, 0.3vw + 6px, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.ccard:hover .ccard__quest {
  color: rgba(255, 255, 255, 0.45);
}

.ccard__arrow {
  font-size: clamp(18px, 0.6vw + 14px, 24px);
  color: var(--muted);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.3s;
}

.ccard:hover .ccard__arrow {
  transform: translate(4px, -4px);
  color: #fff;
}

/* status bar */
.contact__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 0.5px solid var(--line);
  position: relative;
  z-index: 1;
}

.contact__hp {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(9px, 0.3vw + 7px, 12px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hp__bar {
  display: flex;
  gap: 3px;
}

.hp__block {
  width: 12px;
  height: 8px;
  background: var(--accent);
}

.hp__block--empty {
  background: var(--muted);
  opacity: 0.2;
}

.contact__avail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(9px, 0.3vw + 7px, 12px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.avail__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--bg);
  border-top: 0.5px solid var(--line);
  padding: 24px 64px;
  text-align: center;
}

.site-footer p {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 768px) {
  .site-footer {
    padding: 20px 24px 90px;
  }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -20; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes star-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  40%       { opacity: 0.15; transform: scale(0.85); }
  60%       { opacity: 0.9; transform: scale(1.08); }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.5);
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — todos os ajustes abaixo só afetam dispositivos móveis.
   Estilos desktop não foram tocados.
════════════════════════════════════════════════════════════ */

/* ── NAV — vira barra fixa na parte inferior ── */
@media (max-width: 768px) {
  .nav {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(10, 10, 15, 0.96);
    border-top: 0.5px solid var(--line);
    border-bottom: none;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .nav__links {
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 6px;
    gap: 16px;
  }
  .nav__links a {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
}

/* ── HERO ── */
@media (max-width: 768px) {
  .hero__content {
    padding: 0 24px 100px;
  }
}

@media (max-width: 480px) {
  .hero__content {
    padding: 0 20px 100px;
  }
  .hero__title {
    font-size: clamp(28px, 8vw, 80px);
  }
  .hero__eyebrow {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
}

/* ── ABOUT ── */
@media (max-width: 480px) {
  .about__title {
    font-size: clamp(48px, 13vw, 72px);
  }
}

/* ── PROJECTS ── */
@media (max-width: 900px) {
  .projects__body {
    grid-template-columns: 1fr;
    grid-template-areas: "stage" "list";
    gap: 16px;
  }
  .projects__stage {
    position: sticky;
    top: 40px;
    z-index: 5;
  }
  .projects__stage-frame {
    aspect-ratio: auto;
    height: 168px;
    box-shadow: 0 8px 16px rgba(13, 13, 13, 0.15);
  }
}

@media (max-width: 768px) {
  #projects {
    padding: 60px 24px;
  }
  .projects__header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .projects__meta {
    text-align: left;
  }
  .project-item {
    padding: 20px 0;
  }
  .project-item__row {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  #projects {
    padding: 48px 20px;
  }
  .project-item__row {
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
  }
  .project-item__tags {
    display: none;
  }
}

/* ── MELT TRANSITION ── */
@media (max-width: 768px) {
  .melt-transition {
    height: 245px;
  }
  /* menos gotas no mobile para não ficar poluído */
  .melt__drip--2,
  .melt__drip--3,
  .melt__drip--8,
  .melt__drip--9,
  .melt__drip--10 {
    display: none;
  }
  /* larguras/alturas próprias no mobile — os valores do desktop ficavam finos e espremidos */
  .melt__drip--1 { width: 19%; height: 135px; }
  .melt__drip--7 { width: 16%; height: 120px; }
  .melt__drip--4 { width: 21%; height: 175px; }
  .melt__drip--5 { width: 17%; height: 115px; }
  .melt__drip--6 { width: 13%; height: 145px; }
  /* blur proporcional ao tamanho menor das gotas no mobile, senão fica borrado ou pontudo */
  .melt__gooey {
    filter: url(#melt-gooey-mobile);
  }
}

/* ── SKILLS ── */
@media (max-width: 768px) {
  #skills {
    padding: 28px 24px 60px;
    overflow: hidden;
  }

  /* tamanhos reduzidos para mobile */
  .skills__word--leveling   { font-size: clamp(32px, 9.5vw, 100px); }
  .skills__word--up         { font-size: clamp(18px, 5vw, 80px); }
  .skills__word--interfaces { font-size: clamp(24px, 8vw, 108px); }
  .skills__word--one        { font-size: clamp(13px, 4vw, 80px); }
  .skills__word--build      { font-size: clamp(24px, 7.5vw, 100px); }
  .skills__word--at         { font-size: clamp(13px, 4vw, 80px); }

  /* estrela grande — posição absoluta confunde o layout mobile */
  .skills__star--big {
    display: none;
  }
  .skills__star--small {
    width: 32px;
    height: 32px;
    margin-left: 10px;
  }
  .skills__star--small2 {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  /* raio mantém a sobreposição com o INTERFACES, igual no desktop, só que menor */
  .skills__lightning {
    width: clamp(90px, 30vw, 160px);
  }

  .skills__line--3 {
    gap: 16px;
  }

  /* layout vira coluna única */
  .skills__layout {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 40px;
  }

  /* avatar aparece primeiro */
  .skills__avatar {
    order: -1;
  }

  /* conectores SVG são desenhados com base no layout desktop — oculta */
  .skills__layout svg {
    display: none;
  }
}

/* ── CONTACT ── */
@media (max-width: 768px) {
  #contact {
    padding: 60px 24px 100px;
    gap: 40px;
  }
  .contact__ghost {
    font-size: clamp(60px, 18vw, 120px);
  }
  .contact__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .ccard--email {
    grid-column: 1;
    grid-row: auto;
    min-height: 180px;
  }
  .ccard--ig {
    grid-column: 1;
    grid-row: auto;
  }
  .ccard--linkedin {
    grid-column: 1;
    grid-row: auto;
  }
  /* remove rotações nos cards — ficam tortos em coluna única */
  .ccard {
    --rot: 0deg;
  }
  .ccard:hover {
    transform: translateY(-4px);
  }
  .contact__status {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
