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

/* ==================== VARIABLES ==================== */
:root {
  --primary: #f7e9b2;
  --secondary: #f4a928;
  --tertiary: #6fc1f3;
  --accent: #69985a;
  --dark: #000000;
}

/* ==================== GENERAL ==================== */
body {
  font-family: 'JetBrains Mono', monospace;
  background-color: #e9eaea;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%231589ff' fill-opacity='0.35'%3E%3Cpath fill-rule='evenodd' d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

.container {
  max-width: 473px;
  margin: 0 auto;
  padding: 2.2em 1.1em;
  position: relative;
}

/* ==================== PROFILE SECTION ==================== */
.profile-section {
  width: 17.6em;
  height: 24.2em;
  margin: 3.3em auto;
  position: relative;
}

.profile-box {
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  border: 3px solid var(--dark);
  position: relative;
  box-shadow: -11px 11px 0 -3px var(--dark);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-box:hover {
  box-shadow: -4px 4px 0 -3px var(--dark);
  transform: translate(-7px, 7px);
}

.profile-header {
  width: 100%;
  height: 2em;
  border-bottom: 3px solid var(--dark);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 0.5em;
  gap: 0.3em;
}

.window-btn {
  width: 0.9em;
  height: 0.9em;
  border: 2px solid var(--dark);
  border-radius: 50%;
  background: var(--secondary);
}

.profile-photo {
  width: 100%;
  height: calc(100% - 2em);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
}

/* ==================== DECORATIVE ELEMENTS ==================== */
.star {
  position: absolute;
  width: 3.3em;
  height: 3.3em;
  animation: rotate-star 6s linear infinite; 
}

.star-1 {
  top: -1.5em;
  right: -2em;
}

.star-2 {
  bottom: 2em;
  left: -2em;
}

@keyframes rotate-star {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sparkle {
  position: absolute;
  width: 2.6em;
  height: auto;
  z-index: 1;
  pointer-events: none;
  animation: sparkle-float 4s ease-in-out infinite;
}

.sparkle-1 {
  top: 5em;
  left: -2em;
  animation-delay: 0s;
}

.sparkle-2 {
  top: 33%;
  right: 2em;
  width: 2.5em;
  animation-delay: 1.5s;
}

@keyframes sparkle-float {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-8px) rotate(8deg) scale(1.05);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.coffee {
  bottom: 4em;
  right: 3em;
  width: 2.5em;
  animation-delay: 2s;
}

/* ==================== NAME SECTION ==================== */
 .name-section {
  margin: 3.3em auto;
  width: fit-content;
  position: relative;
 }

 .info-box {
  background-color: var(--secondary);
  border: 3px solid var(--dark);
  padding: 1.1em 1.65em;
  position: relative;
  filter: drop-shadow(-6px 6px 0 var(--dark));
  transition: all 0.4s ease;
 }

.info-box h2 {
  font-size: 1.1em;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.5;
}

 .info-box:hover {
  filter: drop-shadow(-2px 2px 0 var(--dark));
  transform: translate(-4px, 4px); 
 }

 .info-box h1 {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--dark);
 }

/* ==================== SKILLS ==================== */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9em;
  justify-content: center;
  margin: 2.2em auto;
  max-width: 22em;
}

.skill-pill {
  background-color: var(--accent);
  border: 2px solid var(--dark);
  padding: 0.55em 1.1em;
  border-radius: 2em;
  font-size: 0.99em;
  font-weight: 600;
  color: var(--dark);
  box-shadow: -3px 3px 0 var(--dark);
  transition: all 0.3s ease;
}

.skill-pill:hover {
  box-shadow: -1px 1px 0 var(--dark);
  transform: translate(-2px, 2px);
}

/* ==================== ABOUT ME ==================== */
.about-box {
  width: 17.5em;
  margin: 3.3em auto;
  background-color: var(--primary);
  border: 3px solid var(--dark);
  padding: 1.65em;
  position: relative;
  filter: drop-shadow(-6px 6px 0 var(--dark));
  transition: all 0.4s ease;
}

.about-box:hover {
  transform: translate(-4px, 4px);
}

.about-box::before,
.about-box::after {
  content: '';
  position: absolute;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  background-color: var(--primary);
  border: 3px solid var(--dark);
  z-index: -1;
}

.about-box::before {
  top: 0.55em;
  left: 0.55em;
}

.about-box::after {
  top: 1.1em;
  left: 1.1em;
  z-index: -2;
}

.about-title {
  font-size: 1.32em;
  font-weight: 700;
  margin-bottom: 1.1em;
  text-align: center;
}

.about-text {
  font-size: 0.95em;
  line-height: 1.5;
  text-align: center;
}

/* ==================== PROJECTS ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2em;
  margin: 3.3em auto;
  max-width: 22em;
}

.project-card {
  background-color: var(--primary);
  border: 3px solid var(--dark);
  box-shadow: -8px 8px 0 -3px var(--dark);
  padding: 1.1em;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  transition: all 0.4s ease;
  position: relative;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: -3px 3px 0 -3px var(--dark);
  transform: translate(-5px, 5px);
}

.project-icon {
  width: 100%;
  height: 7em;
  border: 2px solid var(--dark);
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-img {
  width: 45%;
  height: 45%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.project-title {
  font-size: 0.99em;
  font-weight: 600;
  text-align: center;
}

.project-tag {
  font-size: 0.825em;
  text-align: center;
  opacity: 0.8; 
}

.click-badge {
  background-color: var(--secondary);
  border: 2px solid var(--dark);
  border-radius: 1em;
  padding: 0.33em 0.88em;
  font-size: 0.825em;
  text-align: center;
  margin-top: 0.55em;
  font-weight: 600;
  transition: all 0.3s ease; 
}

.project-card:hover .click-badge {
  background-color: var(--tertiary);
}

/* ==================== SECTION TITLE ==================== */
.section-title {
  font-size: 1.5em;
  font-weight: 700;
  text-align: center;
  margin: 1.5em 0 1em;
  position: relative;
  display: table;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 8px;
  cursor: default;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 6px;
  background-color: var(--accent);
  border: 2px solid var(--dark);
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-title:hover::after {
  width: 100%;
}

/* ==================== SOCIAL LINKS ==================== */
.social-container {
  background-color: var(--primary);
  border: 3px solid var(--dark);
  box-shadow: -9px 9px 0 -3px var(--dark);
  padding: 1.1em;
  display: flex;
  justify-content: space-around;
  gap: 0.55em;
  margin: 2.2em auto;
  max-width: 19.8em;
  transition: all 0.4s ease;
}

.social-container:hover {
  box-shadow: -3px 3px 0 -3px var(--dark);
  transform: translate(-6px, 6px);  
}

.social-btn {
  width: 2.75em;
  height: 2.75em;
  background-color: var(--secondary);
  border: 2px solid var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: -4px 4px 0 -2px var(--dark);
  transition: all 0.3s ease;
  padding: 0.44em;
}

.social-btn:hover {
  box-shadow: -1px 1px 0 -2px var(--dark);
  transform: translate(-3px, 3px);
  background-color: var(--tertiary);
}

.social-btn svg {
  width: 100%;
  height: 100%;
  fill: var(--dark);
}

/* ==================== CONTACT ==================== */
.contact-info {
  margin: 1.65em auto;
  width: fit-content;
  position: relative;
}

.contact-box {
  background-color: var(--accent);
  border: 3px solid var(--dark);
  padding: 0.88em 1.65em;
  filter: drop-shadow(-5px 5px 0 var(--dark));
  transition: all 0.4s ease;
  text-decoration: none;
  color: var(--dark);
  display: block; 
}

.contact-box:hover {
  transform: translate(-3px, 3px);
}

.contact-box h3 {
  font-size: 1.1em;
  font-weight: 600;
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  margin: 4.4em 0 2.2em;
  font-size: 0.99em;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--primary);
  border: 4px solid var(--dark);
  box-shadow: -15px 15px 0 -3px var(--dark);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.7) rotate(-5deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) rotate(0deg);
}

.modal-header {
  background-color: var(--secondary);
  border-bottom: 3px solid var(--dark);
  padding: 1.5em;
  position: relative;  
}

.modal-close {
  position: absolute;
  top: 1em;
  right: 1em;
  width: 2.5em;
  height: 2.5em;
  border: 3px solid var(--dark);
  border-radius: 50%;
  background-color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: -4px 4px 0 -2px var(--dark);
}

.modal-close:hover {
  background-color: var(--tertiary);
  transform: rotate(90deg);
  box-shadow: -2px 2px 0 -2px var(--dark);
}

.modal-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5em;
}

.modal-subtitle {
  font-size: 0.9em;
  color: var(--dark);
  opacity: 0.8;
}

.modal-body {
padding: 2em;
}

.modal-body h3 {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 1em;
  color: var(--dark);
}

.modal-body p {
  line-height: 1.6;
  margin-bottom: 1em;
  color: var(--dark);
}

.modal-link {
  display: inline-block;
  background-color: var(--secondary);
  border: 3px solid var(--dark);
  padding: 0.8em 1.5em;
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  box-shadow: -4px 4px 0 -2px var(--dark);
  transition: all 0.3s ease;
  margin-top: 1em;
}

.modal-link:hover {
  box-shadow: -2px 2px 0 -2px var(--dark);
  transform: translate(-2px, 2px);
}

.modal-tags {
  line-height: 1.6;
  margin-bottom: 1em;
  color: var(--dark);  
}

.modal-tag {
  background-color: var(--accent);
  border: 2px solid var(--dark);
  padding: 0.4em 0.8em;
  border-radius: 1em;
  font-size: 0.8em;
  font-weight: 600; 
}

/* ==================== ICONS RESPONSIVOS NO MOBILE ==================== */
@media (max-width: 600px) {
  .project-icon {
    height: auto;
    padding: 1em;
  }

  .project-img {
    width: 60%;
    height: auto;
    object-fit: contain;
  }
}

/* ==================== FIX MOBILE ==================== */
@media (hover: none) and (pointer: coarse) {
.profile-box:hover,
.info-box:hover,
.skill-pill:hover,
.about-box:hover,
.project-card:hover,
.social-container:hover,
.social-btn:hover,
.contact-box:hover {
  box-shadow: inherit; /* Mantém sombra original */
  transform: none; /* Remove movimento */
}
  
.project-card:active {
box-shadow: -3px 3px 0 -3px var(--dark);
transform: translate(-5px, 5px);
}
  
.social-btn:active {
  box-shadow: -1px 1px 0 -2px var(--dark);
  transform: translate(-3px, 3px);
  background-color: var(--tertiary);
  }
}

/* ==================== OPTIMIZATION ==================== */
.profile-box,
.info-box,
.skill-pill,
.about-box,
.project-card,
.social-container,
.social-btn,
.contact-box {
  will-change: transform; /* Prepara GPU para animações */
  backface-visibility: hidden; /* Evita flickering */
  -webkit-backface-visibility: hidden;
}

.profile-box:not(:hover),
.info-box:not(:hover),
.skill-pill:not(:hover),
.about-box:not(:hover),
.project-card:not(:hover),
.social-container:not(:hover),
.social-btn:not(:hover),
.contact-box:not(:hover) {
  will-change: auto;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 12em;
  }
}

/* ==================== CURSOR ==================== */
a, button, .modal-close, .skill-pill {
    cursor: pointer;
}
