/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
  /*===== Colores =====*/
  /*Purple 260 - Red 355 - Blue 224 - Pink 340*/
  /* HSL color mode */
  --hue-color: 224;
  --first-color: hsl(var(--hue-color), 89%, 60%);
  --second-color: hsl(var(--hue-color), 56%, 12%);
  /*===== Fuente y tipografia =====*/
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;
  /*===== Margenes =====*/
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
  /*===== z index =====*/
  --z-back: -10;
  --z-fixed: 100;
}
@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: .875rem;
  }
}

/*===== 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;
}

.nav_logo {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space between logo and text */
    font-weight: var(--font-semi);
    color: var(--second-color);
}

.logo-img {
    width: 25px;       /* fits neatly in navbar */
    height: 25px;      /* maintains aspect ratio */
    object-fit: cover; /* ensures no distortion */
}

/*===== CLASS CSS ===== */
.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);
}
@media screen and (max-width: 767px) {
  .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 {
  position: relative;
}
.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_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;
}
.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: column;
}
.home_social-icon {
  width: max-content;
  margin-bottom: var(--mb-2);
  font-size: 1.5rem;
  color: var(--second-color);
}
.home_social-icon:hover {
  color: var(--first-color);
}
.home_img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
}
.home_blob {
  fill: var(--first-color);
}
.home_blob-img {
  width: 360px;
}

.home_container {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: center;
}

.home_img img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transition: 0.3s;
}

.home_img img:hover {
    transform: scale(1.02);
} */

/* ------------ HOME SECTION ------------ */
.home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  column-gap: 2rem;
  row-gap: 3rem;
  padding: 4rem 0;
  position: relative;
}

.home-text {
  z-index: 2;
}

.home-title {
  font-size: var(--big-font-size);
  font-weight: 700;
  margin-bottom: var(--mb-4);
  line-height: 1.2;
}

.home-subtitle {
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-4);
  color: var(--text-color);
  line-height: 1.6;
}

/* ------------ IMAGE ------------ */
.home_img {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home_img img {
  width: 100%;
  max-width: 400px;
  max-height: 400px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transition: 0.3s ease;
}

.home_img img:hover {
  transform: scale(1.02);
}

/* ------------ SOCIAL ICONS (unchanged) ------------ */
.home_social {
  display: flex;
  flex-direction: column;
}

.home_social-icon {
  width: max-content;
  margin-bottom: var(--mb-2);
  font-size: 1.5rem;
  color: var(--second-color);
}

.home_social-icon:hover {
  color: var(--first-color);
}

/* ------------ MOBILE FIXES ------------ */
@media screen and (max-width: 768px) {
  .home {
    text-align: center;
  }

  .home_img img {
    max-width: 300px;      /* smaller on mobile */
  }

  .home-title {
    font-size: 1.8rem;
  }
}

/*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;
}
.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;
}

.about_text h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--first-color);
}

.about_text p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--text-color);
}

.about_text p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* ===== SKILLS =====*/

.service-block {
    background: #ffffff;
    padding: 1.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.service-block h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--first-color);
}

.service-list p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.why-list {
    padding-left: 1.2rem;
}

.why-list li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* ===== CERTIFICATES =====*/
.certificates_container {
  row-gap: 2rem;
  text-align: center;
}
.certificates_subtitle {
  margin-bottom: var(--mb-2);
}
.certificates_text {
  margin-bottom: var(--mb-4);
}
.certificates_data {
  text-decoration: none; 
  /* color: inherit; */
  color: var(--second-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  /* font-weight: var(--font-semi); */
  /* padding: 0.5rem 1rem; */
  padding: 1rem 2rem;
  /* margin-bottom: var(--mb-4); */
  margin-bottom: var(--mb-2);
  border-radius: 0.5rem;
  box-shadow: 0px 4px 25px rgba(14, 36, 49, 0.15);
  border: 1px solid  var(--first-color);
}
.certificates_icon {
  font-size: 2rem;
  margin-right: var(--mb-2);
  color: var(--first-color);
}
.certificates_names {
  display: flex;
  align-items: center;
}
.certificates_bar {
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--first-color);
  height: 0.25rem;
  border-radius: 0.5rem;
  z-index: var(--z-back);
}


/* ===== 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 img:hover {
  transform: scale(1.4);
}

.project_wrapper {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(14, 36, 49, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  max-width: 400px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.project_wrapper:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(14, 36, 49, 0.2);
}

.project_img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project_img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s;
}

.project_img:hover img {
  transform: scale(1.4);
}

.project_details {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  text-align: center;
}

.project_title {
  font-weight: bold;
  font-size: 1.1em;
  text-transform: uppercase;
}

.project_description {
  font-size: 1em;
}

.project_wrapper:hover .project_details {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.8s ease-in-out;
}

/* ===== CONTACT =====*/
.contact_input {
  width: 100%;
  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-top: var(--mb-4);
}
.contact_button {
  display: block;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-left: auto;
  margin-top: var(--mb-4);
}
/* Container Section */
.contact-section {
    margin-bottom: 60px;
    padding: 20px;
}

/* Intro text */
.contact-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

/* Title */
.contact-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #111;
    margin-bottom: 30px;
}

/* Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card Styling */
.contact-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 20px rgba(0,0,0,0.12);
}

/* Icons */
.icon {
    font-size: 38px;
    margin-bottom: 10px;
}

/* Card Title */
.contact-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 10px;
}

/* Paragraphs */
.contact-card p {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

/* ===== 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 (max-width: 320px) {
  .home {
    row-gap: 2rem;
  }
  .home_img {
    width: 200px;
  }
}
@media screen and (min-width: 576px) {
  .home {
    padding: 4rem 0 2rem;
  }
  .home_social {
    padding-top: 0;
    padding-bottom: 2.5rem;
    flex-direction: row;
    align-self: flex-end;
  }
  .home_social-icon {
    margin-bottom: 0;
    margin-right: var(--mb-4);
  }
  .home_img {
    width: 300px;
    bottom: 25%;
  }
  /* .about_container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  } */
  .about_container {
    grid-template-columns: repeat(1, 1fr);
    align-items: center;
    text-align: initial;
  }
  .skills_container {
    grid-template-columns: repeat(1, 1fr);
    align-items: center;
    text-align: initial;
  }
  .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);
  }
  .home {
    padding: 8rem 0 2rem;
  }
  .home_img {
    width: 400px;
    bottom: 10%;
  }
  .about_container {
    padding-top: 2rem;
  }
  .about_img img {
    width: 300px;
  }
  .skills_container {
    padding-top: 2rem;
  }
  .certificates_container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
    align-items: center;
    text-align: initial;
  }
  .work_container {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2rem;
  }
}
@media screen and (min-width: 992px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
  .home {
    padding: 10rem 0 2rem;
  }
  .home_img {
    width: 450px;
  }
}

.error {
  border: 1px solid red;
}
