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

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;

  /*========== Colors ==========*/
  --title-color: #0B0A0A;
  --text-color: #403A3A;
  --text-color-light: #707070;
  --container-color: #FAFAFA;
  --container-color-alt: #F0EFEF;
  --body-color: #FCFCFC;

  /*========== Font and typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .875rem;
  --smaller-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== Margenes ==========*/
  --mb-1: .5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== BASE ==========*/
*,
::before,
::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/*===== HIDE SCROLLBAR BUT KEEP SCROLL FUNCTIONAL =====*/
body,
html {
  overflow-y: scroll;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge */
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: #FFFFFF;         /* Pure white titles for contrast */
  --text-color: #CCCCCC;          /* Softer gray for readability */
  --container-color: #111111;     /* Very dark gray for containers */
  --container-color-alt: #0A0A0A; /* Almost black */
  --body-color: #000000;          /* Pure black background */
}

.home__container {
  position: relative;
}

/* shared positioning & style */
#download-button,
.change-theme {
  position: absolute;
  top: 12%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  transition: color .3s;
  z-index: 10;
}

/* download icon just left of the image */
#download-button {
  left: 1rem;
}

/* theme toggle just right of the image */
.change-theme {
  right: 1rem;
}

/* hover states */
#download-button:hover,
.change-theme:hover {
  color: var(--primary-color);
}


/*========== Font size variables to scale cv ==========*/
body.scale-cv {
  --h1-font-size: .938rem;
  --h2-font-size: .938rem;
  --h3-font-size: .875rem;
  --normal-font-size: .813rem;
  --small-font-size: .75rem;
  --smaller-font-size: .688rem;
}



/*========== Classes modified to reduce size and print on A4 sheet ==========*/
.scale-cv .change-theme,
.scale-cv .generate-pdf {
  display: none;
}

.scale-cv .bd-container {
  max-width: 595px;
}

.scale-cv .section {
  padding: 1.5rem 0 .80rem;
}

.scale-cv .section-title {
  margin-bottom: .75rem;
}

.scale-cv .resume__left,
.scale-cv .resume__right {
  padding: 0 1rem;
}

.scale-cv .home__img {
  width: 90px;
  height: 90px;
}

.scale-cv .home__container {
  gap: 1.5rem;
}

.scale-cv .home__data {
  gap: .25rem;
}

.scale-cv .home__address,
.scale-cv .social__container {
  gap: .75rem;
}

.home__address {
  display: grid;
  grid-template-columns: repeat(5, auto);
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto;
  padding: 0.3rem;
  font-size: 0.75rem;
}

.contact-row {
  display: contents;
}

.home__information {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.separator {
  color: var(--text-color-light);
  font-size: 0.75rem;
}

.home__icon {
  font-size: 0.9rem;
}

.social__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.social__link:hover {
  color: #0078d7;
}



.scale-cv .home__icon,
.scale-cv .social__icon,
.scale-cv .interests__icon {
  font-size: 1rem;
}

.scale-cv .education__container,
.scale-cv .experience__container,
.scale-cv .certificate__container {
  gap: 1rem;
}

.scale-cv .education__time,
.scale-cv .experience__time {
  padding-right: .5rem;
}

.scale-cv .education__rounder,
.scale-cv .experience__rounder {
  width: 11px;
  height: 11px;
  margin-top: .22rem;
}

.scale-cv .education__line,
.scale-cv .experience__line {
  width: 1px;
  height: 110%;
  transform: translate(5px, 0);
}

.scale-cv .education__data,
.scale-cv .experience__data {
  gap: .25rem;
}

.scale-cv .skills__name {
  margin-bottom: var(--mb-1);
}

.scale-cv .projects__container {
  gap: 0.5rem;
}

.scale-cv .projects__item {
  padding: 0.25rem;
}

.scale-cv .projects__icon {
  font-size: 1rem;
}

.scale-cv .projects__name {
  font-size: 0.65rem;
}

.scale-cv .interests__container {
  column-gap: 2.5rem;
}

body {
  margin: 0 0 var(--header-height) 0;
  padding: 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

h1,
h2,
h3,
ul,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

ul {
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*========== CLASS CSS ==========*/
.section {
  padding: 1.5rem 0;
}

.section-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  text-transform: uppercase;
  letter-spacing: .35rem;
  text-align: center;
  margin-bottom: var(--mb-3);
}

/*========== LAYOUT ==========*/
.bd-container {
  max-width: 968px;
  width: calc(100% - 3rem);
  margin-left: var(--mb-3);
  margin-right: var(--mb-3);
}

.bd-grid {
  display: grid;
  gap: 1.5rem;
}

.l-header {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--body-color);
  box-shadow: 0 -1px 4px rgba(0, 0, 0, .1);
  transition: .3s;
}

/*========== NAV ==========*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media screen and (max-width: 968px) {
  .nav__menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background-color: var(--body-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    border-radius: 1rem 1rem 0 0;
    z-index: var(--z-fixed);
    transition: .3s;
  }
}



.nav__logo,
.nav__toggle {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

.nav__toggle {
  font-size: 1.2rem;
  cursor: pointer;
}

.nav__item {
  text-align: center;
}

.nav__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.nav__link {
  display: flex;
  flex-direction: column;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  font-weight: var(--font-medium);
}

.nav__link:hover {
  color: var(--title-color);
}

.nav__icon {
  font-size: 1.2rem;
  margin-bottom: var(--mb-1);
}

/* Show menu */
.show-menu {
  bottom: var(--header-height);
}

/* Active menu link */
.active-link {
  color: var(--title-color);
}

/*========== HOME ==========*/
.home {
  position: relative;
}

.home__container {
  gap: 3rem;
}

.home__data {
  gap: .5rem;
  text-align: center;
}

.home__img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  justify-self: center;
  margin-bottom: var(--mb-1);
}

.home__title {
  font-size: var(--h3-font-size);
}

.home__profession {
  font-size: calc(var(--normal-font-size) * 0.85);
  margin-bottom: var(--mb-1);
}


.home__address {
  gap: 1rem;
}

.home__information {
  display: flex;
  align-items: center;
  font-size: var(--small-font-size);
}

.home__icon {
  font-size: 1.2rem;
  margin-right: .25rem;
}

.home__button-movil {
  display: inline-block;
  border: 2px solid var(--text-color);
  color: var(--title-color);
  padding: 1rem 2rem;
  border-radius: .25rem;
  transition: .3s;
  font-weight: var(--font-medium);
  margin-top: var(--mb-3);
}

.home__button-movil:hover {
  background-color: var(--text-color);
  color: var(--container-color);
}

/*========== SOCIAL ==========*/
.social__container {
  grid-template-columns: max-content;
  gap: 1rem;
}

.social__link {
  display: inline-flex;
  align-items: center;
  font-size: var(--small-font-size);
  color: var(--text-color);
}

.social__link:hover {
  color: var(--title-color);
}

.social__icon {
  font-size: 1.2rem;
  margin-right: .25rem;
}

/*========== HEADER ACCENT ==========*/
.header-accent {
  padding: 1.5rem 0 0.5rem;
  display: flex;
  justify-content: center;
}

.accent-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.accent-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-color);
  animation: pulse 2s ease-in-out infinite;
}

.accent-dots .dot:nth-child(2) {
  animation-delay: 0.3s;
  width: 10px;
  height: 10px;
}

.accent-dots .dot:nth-child(3) {
  animation-delay: 0.6s;
}

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

/*========== PROFILE ==========*/
.profile__description {
  text-align: left;
  padding: 0 1rem;
  line-height: 1.6;
  border-left: 3px solid var(--text-color-light);
  padding-left: 1rem;
}

/*========== EDUCATION AND EXPERIENCE ==========*/
.education__content,
.experience__content {
  display: flex;
}

.education__time,
.experience__time {
  padding-right: 1rem;
  min-width: 16px;
}

.education__rounder,
.experience__rounder {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--text-color-light);
  border-radius: 50%;
  margin-top: .25rem;
  flex-shrink: 0;
}

.education__line,
.experience__line {
  display: block;
  width: 2px;
  height: 100%;
  background-color: var(--text-color-light);
  transform: translate(7px, 0);
}

.education__data,
.experience__data {
  gap: .5rem;
}

.education__title,
.experience__title {
  font-size: var(--h3-font-size);
}

.education__studies,
.experience__company {
  font-size: var(--small-font-size);
  color: var(--title-color);
}

.education__year {
  font-size: var(--smaller-font-size);
}

/*========== SKILLS AND LANGUAGES ==========*/
.skills__content,
.languages__content {
  grid-template-columns: repeat(2, 1fr);
}

/* Default styles for all devices */
.languages.section {
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  margin-bottom: 1rem;
  text-align: center;
  /* Center title on small devices */
}

.languages__container {
  margin-bottom: 0;
  padding-bottom: 0;
}

.languages__content {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0 auto;
  /* Center on small devices */
  max-width: max-content;
  /* Only take needed width */
}

.languages__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.languages__circle {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: currentColor;
  border-radius: 50%;
}

/* For large devices (992px and above) */
@media (min-width: 992px) {
  .section-title {
    text-align: left;
    /* Align title to left */
  }

  .languages__content {
    margin: 0;
    /* Remove auto margin */
    margin-right: auto;
    /* Push content to the left */
    justify-content: start;
    /* Align items to start */
  }
}

.skills__name {
  display: flex;
  align-items: center;
  margin-bottom: var(--mb-3);
}

.languages__name {
  display: flex;
  align-items: center;
  margin-bottom: var(--mb-3);
}

.skills__circle,
.languages__circle {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: var(--text-color);
  border-radius: 50%;
  margin-right: .75rem;
}

/*========== CERTIFICATES ==========*/
.certificate__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
}

/*========== REFERENCES ==========*/
.references__content {
  gap: .25rem;
}

.references__subtitle {
  color: var(--text-color-light);
}

.references__subtitle,
.references__contact {
  font-size: var(--smaller-font-size);
}

.references__title {
  font-size: var(--h3-font-size);
}

/*========== PROJECTS ==========*/
.projects__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: var(--mb-1);
}

.projects__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  transition: transform 0.3s;
  text-decoration: none;
  color: var(--text-color);
}

.projects__item:hover {
  transform: translateY(-3px);
}

.projects__icon {
  font-size: 1.25rem;
  color: var(--title-color);
}

.projects__name {
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  text-align: center;
  color: var(--title-color);
}

/*========== INTERESTS ==========*/
.interests__container {
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--mb-2);
}

.interests__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.interests__icon {
  font-size: 1.5rem;
  color: var(--text-color-light);
  margin-bottom: .25rem;
}

/* Scroll top */
.scrolltop {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .3rem;
  background-color: var(--container-color-alt);
  border-radius: .4rem;
  z-index: var(--z-tooltip);
  transition: .4s;
  visibility: hidden;
}

.scrolltop__icon {
  font-size: 1.2rem;
  color: var(--text-color);
}

.show-scroll {
  visibility: visible;
  bottom: 5rem;
}

/*========== SOCIAL SECTION ==========*/
.social__container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto;
}


/* General stacked layout container */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.upper-group,
.lower-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Home container stacked */
.home__container {
  display: flex;
  flex-direction: column;
  align-items.center;
  gap: 1.5rem;
  text-align: center;
}

/* Skills section */
.skills__content {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.skills__data {
  margin: 0 auto;
}

/* Languages section */
.languages__content {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}


/* Large screens (968px and above) */
@media screen and (min-width: 968px) {
  body {
    margin: 3rem 0;
  }

  .bd-container {
    margin-left: auto;
    margin-right: auto;
  }

  .l-header,
  .scrolltop {
    display: none;
  }

  .resume {
    display: grid;
    grid-template-columns: 0.4fr 1.2fr;
    background-color: var(--container-color);
    box-shadow: 0 0 8px rgba(13, 12, 12, 0.15);
    column-gap: 0;
  }

  .resume__left {
    background-color: var(--container-color-alt);
  }

  .resume__left,
  .resume__right {
    padding: 0 1.5rem;
  }

  .generate-pdf {
    display: inline-block;
  }

  .section-title,
  .profile__description {
    text-align: initial;
  }

  .header-accent {
    padding: 2rem 0 1rem;
  }

  .home__container {
    gap: 1.5rem;
  }

  .home__button-movil {
    display: none;
  }

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

  .languages__content {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 3.5rem;
  }

  .projects__container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .projects__item {
    padding: 0.75rem;
  }

  .projects__icon {
    font-size: 1.5rem;
  }

  .interests__container {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    column-gap: 2rem;
    padding-left: 1rem;
  }
}