/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/*===== VARIABLES =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
  --hue-color: 224;
  --first-color: hsl(var(--hue-color), 89%, 60%);
  --second-color: hsl(var(--hue-color), 56%, 12%);
  --body-font: 'Poppins', sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;
  --smaller-font-size: 0.75rem;
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
  --z-back: -10;
  --z-fixed: 100;
}

/*===== BASE =====*/
*,
::before,
::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--second-color);
}

h1,
h2,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*===== CLASSES =====*/
.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
}

.section-title::after {
  position: absolute;
  content: '';
  width: 64px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

.section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  display: grid;
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(146, 161, 176, 0.15);
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}

.nav__menu {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 80%;
  height: 100%;
  padding: 2rem;
  background-color: var(--second-color);
  transition: 0.5s;
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  position: relative;
  color: #fff;
}

.nav__link:hover::after {
  position: absolute;
  content: '';
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}

.nav__logo {
  color: var(--second-color);
}

.nav__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 1rem;
  vertical-align: middle;
  background: none;
  box-shadow: none;
}

.nav__toggle {
  color: var(--second-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Active menu */
.active-link::after {
  position: absolute;
  content: '';
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}

/* Show menu */
.show {
  right: 0;
}

/*===== HOME =====*/
.home {
  position: relative;
  row-gap: 5rem;
  padding: 4rem 0 5rem;
}

.home__data {
  align-self: center;
  margin-bottom: 2rem;
}

.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
}

.home__title-color {
  color: var(--first-color);
}

.home__social {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1.2rem;
  margin-top: 2rem;
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
}

.home__blob {
  fill: var(--first-color);
}

.home__blob-img {
  width: 360px;
}

/* BUTTONS */
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: 0.5rem;
  transition: 0.3s;
  margin-top: 1rem;
}

.button:hover {
  box-shadow: 0px 10px 36px rgba(0, 0, 0, 0.15);
}

/* ===== ABOUT =====*/
.about__container {
  row-gap: 2rem;
  text-align: center;
}

.about__subtitle {
  margin-bottom: var(--mb-2);
}

.about__img {
  justify-self: center;
}

.about__img img {
  width: 200px;
  border-radius: 0.5rem;
}

/* ===== SKILLS =====*/
.skills__container {
  row-gap: 2rem;
  text-align: center;
}

.skills__subtitle {
  margin-bottom: var(--mb-2);
}

.skills__text {
  margin-bottom: var(--mb-4);
}

.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-weight: var(--font-semi);
  padding: 0.5rem 1rem;
  margin-bottom: var(--mb-4);
  border-radius: 0.5rem;
  box-shadow: 0px 4px 25px rgba(14, 36, 49, 0.15);
}

.skills__icon {
  font-size: 2rem;
  margin-right: var(--mb-2);
  color: var(--first-color);
}

.skills__names {
  display: flex;
  align-items: center;
}

.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--first-color);
  height: 0.25rem;
  border-radius: 0.5rem;
  z-index: var(--z-back);
}

.skills__html {
  width: 95%;
}

.skills__css {
  width: 90%;
}

.skills__js {
  width: 90%;
}

.skills__ux {
  width: 90%;
}

.skills__img {
  border-radius: 0.5rem;
}

/* ===== WORK =====*/
.work__container {
  row-gap: 2rem;
}

.work__img {
  box-shadow: 0px 4px 25px rgba(14, 36, 49, 0.15);
  border-radius: 0.5rem;
  overflow: hidden;
}

.work__img img {
  transition: 1s;
}

.work__img:hover img {
  transform: scale(1.1);
}

/* ===== CONTACT =====*/
.contact__form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact__input {
  width: 100%;
  max-width: 320px;
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--second-color);
  outline: none;
  margin-bottom: var(--mb-4);
}

.contact__button {
  display: block;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-left: auto;
}

.contact__social-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #333;
  background-color: #f3f3f3;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact__social-btn i {
  font-size: 1.2rem;
}

.contact__social-btn:hover {
  background-color: #0a66c2;
  color: white;
}

.contact__social-btn:hover i {
  color: white;
}

/* ===== FOOTER =====*/
.footer {
  background-color: var(--second-color);
  color: #fff;
  text-align: center;
  font-weight: var(--font-semi);
  padding: 2rem 0;
}

.footer__title {
  font-size: 2rem;
  margin-bottom: var(--mb-4);
}

.footer__social {
  margin-bottom: var(--mb-4);
}

.footer__icon {
  font-size: 1.5rem;
  color: #fff;
  margin: 0 var(--mb-2);
}

.footer__copy {
  font-size: var(--smaller-font-size);
}

/* ===== MEDIA QUERIES =====*/
@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: 0.875rem;
  }
}

@media screen and (max-width: 320px) {
  .home {
    row-gap: 2rem;
  }
  .home__img {
    width: 200px;
  }
}

@media screen and (min-width: 576px) {
  .home {
    padding: 4rem 0 2rem;
  }
 
  .home__img {
    width: 300px;
    bottom: 25%;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }
  .skills__container {
    grid-template-columns: 0.7fr;
    justify-content: center;
    column-gap: 1rem;
  }
  .work__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    padding-top: 2rem;
  }
  .contact__form {
    width: 360px;
    padding-top: 2rem;
  }
  .contact__container {
    justify-items: center;
  }
}

@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  .section {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
  .section-title {
    margin-bottom: var(--mb-6);
  }
  .section-title::after {
    width: 80px;
    top: 3rem;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__list {
    display: flex;
    padding-top: 0;
  }
  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }
  .nav__toggle {
    display: none;
  }
  .nav__link {
    color: var(--second-color);
  }
  .nav__menu {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background-color: transparent;
  }
  .home {
    padding: 8rem 0 2rem;
  }
  .home__img {
    width: 400px;
    bottom: 10%;
  }
  .about__container {
    padding-top: 2rem;
  }
  .about__img img {
    width: 300px;
  }
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    align-items: center;
    text-align: initial;
  }
  .work__container {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2rem;
  }
  .home.bd-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }
  .home__data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .home__title {
    margin-bottom: 1rem;
  }
  .role-container {
    margin-bottom: 1.5rem;
    align-self: flex-start;
  }
  .home__social {
    flex-direction: row;
    align-items: center;
    margin-top: 1.5rem;
  }
  .perfil-img-wrapper {
    order: 2;
    margin-top: 0;
    flex-shrink: 0;
  }
  .home__title {
    order: 1;
    flex: 1;
  }
  .button {
    order: 1;
  }
  .home__social {
    order: 1;
  }
}

@media screen and (max-width: 767px) {
  .home.bd-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem 2.5rem 1rem;
    background: none;
  }
  .home__data {
    flex: 1 1 0;
    text-align: left;
    justify-self: flex-start;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .home__img {
    flex: 0 0 auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .home__img img {
    width: 120px;
    max-width: 32vw;
    min-width: 80px;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  }
  .home__social {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 1.2rem;
  }
  .home__data {
    align-items: center;
  }
  .home__title {
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
  }
  .button {
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    margin-bottom: 0.7rem;
  }
  .perfil-img-wrapper {
    margin-top: 1.5rem; /* Creates space between buttons and image on mobile */
  }
}

@media screen and (min-width: 992px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
  .home {
    padding: 10rem 0 2rem;
  }
  .home__img {
    width: 450px;
  }
}
/* CONTACT SOCIAL BUTTONS */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eaeaea;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 20px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.social-icon:hover {
  transform: scale(1.1);
  color: white;
}

/* Brand hover colors */
.social-icon.linkedin:hover {
  background-color: #0a66c2;
}

.social-icon.github:hover {
  background-color: #24292e;
}

.social-icon.researchgate:hover {
  background-color: #00d0af;
}


/* Brand-specific colors */
.social-button.linkedin:hover {
  background-color: #0a66c2;
  color: white;
}

.social-button.github:hover {
  background-color: #24292e;
  color: white;
}

.social-button.researchgate:hover {
  background-color: #00d0af;
  color: white;
}
/*to make the contact button centered */
.contact__button {
  margin: 1rem auto 0 auto;
  display: block;
}
/* === HOME SOCIAL ICONS === */
.home__social {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1.2rem;
  margin-top: 2rem;
}

@media screen and (min-width: 576px) {
  .home__social {
    flex-direction: row;  /* row on larger screens */
  }
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eaeaea;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 20px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.social-icon:hover {
  transform: scale(1.1);
  color: white;
}

/* Brand-specific hover colors */
.social-icon.linkedin:hover {
  background-color: #0a66c2;
}

.social-icon.github:hover {
  background-color: #24292e;
}

.social-icon.researchgate:hover {
  background-color: #00d0af;
}

.role-container {
  height: 3em; /* Fixed height for both "Full Stack Developer" and "Auto entrepreneur" */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.role-fade {
  transition: opacity 0.5s;
  opacity: 1;
  display: inline-block;
  text-align: center;
  line-height: 1.2;
}

.role-fade.fade-out {
  opacity: 0;
}

.role-accent {
  color: #007bff; /* Use your theme's accent color or adjust as needed */
  font-weight: 700;
  font-size: 1.2em;
  letter-spacing: 1px;
}

.home.bd-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1rem 3rem 1rem;
}

.home__img img {
  max-width: 90vw;
  width: 220px;
  height: auto;
  border-radius: 50%;
  background: none;
  box-shadow: none;
}

@media screen and (max-width: 480px) {
  .home__title {
    font-size: 1.3rem;
  }
  .home__img img {
    width: 140px;
  }
  .home__social {
    gap: 0.7rem;
  }
}

@media screen and (min-width: 576px) {
  .home.bd-grid {
    padding: 3rem 2rem 4rem 2rem;
  }
  .home__img img {
    width: 180px;
  }
}

@media screen and (min-width: 768px) {
  .home.bd-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .home__data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .home__social {
    flex-direction: row;
    align-items: center;
    margin-top: 1.5rem;
  }
  .home__img img {
    width: 260px;
  }
}

@media screen and (min-width: 992px) {
  .home.bd-grid {
    padding: 8rem 0 4rem 0;
    gap: 4rem;
  }
  .home__img img {
    width: 340px;
  }
}

.home__social {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1.2rem;
  margin-top: 2rem;
}

@media screen and (max-width: 767px) {
  .home__social {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 1.2rem;
  }
  .home__data {
    align-items: center;
  }
}

.perfil-img-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.perfil-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  object-fit: cover;
}

/* On desktop, keep the image in its normal place (if you want it above or beside) */
/* On mobile, move the image under the buttons */
@media screen and (max-width: 767px) {
  .home__data {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .perfil-img-wrapper {
    order: 2;
    margin-top: 1.5rem;
    width: 100%;
  }
  .button, .home__social {
    order: 1;
  }
}

/* ===== HOME DECORATION ===== */
.home__decoration {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  pointer-events: none;
  z-index: -1;
}

.floating-shapes {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--first-color), #667eea);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  right: 20%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 60%;
  animation-delay: 1.5s;
}

.shape-3 {
  width: 40px;
  height: 40px;
  top: 30%;
  right: 70%;
  animation-delay: 3s;
}

.shape-4 {
  width: 50px;
  height: 50px;
  top: 70%;
  right: 30%;
  animation-delay: 4.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.tech-icons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 200px;
  height: 200px;
}

.tech-icons i {
  font-size: 2.5rem;
  color: var(--first-color);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
  text-align: center;
}

.tech-icons i:nth-child(1) { animation-delay: 0s; }
.tech-icons i:nth-child(2) { animation-delay: 0.5s; }
.tech-icons i:nth-child(3) { animation-delay: 1s; }
.tech-icons i:nth-child(4) { animation-delay: 1.5s; }
.tech-icons i:nth-child(5) { animation-delay: 2s; }
.tech-icons i:nth-child(6) { animation-delay: 2.5s; }

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@media screen and (max-width: 767px) {
  .home__decoration {
    display: none;
  }
}

/* Removed home__actions - back to single container approach */

.role-container {
  height: 3em; /* Fixed height for both "Full Stack Developer" and "Auto entrepreneur" */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.button-container {
  margin-bottom: 1rem;
}

/* Animated Gradient Role Text */
.animated-gradient {
    background: linear-gradient(90deg, #ff6a00, #ee0979, #00c3ff, #43e97b 99%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: gradientMove 3s ease-in-out infinite;
    font-weight: 700;
    font-size: 1.5rem;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(.4,2,.6,1), opacity 0.5s;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.fade-out {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}
.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1.05);
}

@media (max-width: 600px) {
  .home__title {
    font-size: 1.3rem;
    line-height: 1.3;
    text-align: center;
  }
  .animated-gradient {
    font-size: 1rem;
    display: inline;
    word-break: break-word;
    padding: 0;
    margin: 0;
  }
}

.role-animated-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0 0.5rem 0;
  min-height: 2.2rem;
}
@media (max-width: 600px) {
  .role-animated-container {
    margin: 0.3rem 0 0.3rem 0;
    min-height: 1.5rem;
  }
}

.role-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.4em 1.2em;
  margin-left: 0.7em;
  border-radius: 1.5em;
  background: rgba(255,255,255,0.22);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 1.35rem;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,0.07);
  backdrop-filter: blur(2px);
  min-width: 10.5em;
  width: 11em;
  max-width: 11em;
  min-height: 3.2em;
  height: 3.2em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  transition: background 0.3s, box-shadow 0.3s;
  white-space: normal;
  flex-direction: column;
}
@media (max-width: 600px) {
  .role-badge {
    font-size: 1.1rem;
    padding: 0.28em 0.7em;
    margin-left: 0.5em;
    margin-top: 0.3em;
    min-width: 8.5em;
    width: 9.2em;
    max-width: 9.2em;
    min-height: 2.7em;
    height: 2.7em;
  }
}

.role-placeholder {
  visibility: hidden;
  position: absolute;
  white-space: nowrap;
}
