/* GOOGLE FONTS */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500&display=swap");

/* VARIABLES CSS */
:root {
  --header-height: 3rem;
  --font-medium: 500;
}

/* Colores */
:root {
  --first-color: #5361ff;
  --white-color: #fafaff;
  --dark-color: #2a3b47;
  --text-color: #697477;
}

/* Fuente y tipografia */
:root {
  --body-font: "Montserrat", sans-serif;
  --big-font-size: 6.25rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
}
@media screen and (min-width: 768px) {
  :root {
    --big-font-size: 10.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
  }
}

/* Margenes */
:root {
  --mb-1: 0.5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
}

/* z index */
:root {
  --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);
  font-weight: var(--font-medium);
  color: #fff;
  line-height: 1.6;
  background-image: linear-gradient(270deg, rgb(27 20 41), rgb(20 15 35));
}

h1,
h2,
p {
  margin: 0;
}

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

a {
  text-decoration: none;
  color: var(--text-color);
}

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

.purple {
  color: #c770c7;
}

/* LASS CSS */
.section {
  padding: 3rem 0;
}

.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--white-color);
  margin: var(--mb-4) 0;
  text-align: center;
}

.section-title::after {
  position: absolute;
  content: "";
  width: 32px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

/* Layout */
.bd-grid {
  max-width: 1024px;
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: calc(100% - 2rem);
  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: rgba(33, 32, 56, 0.8470588235294118);
  box-shadow: 0 10px 10px 0 rgba(9, 5, 29, 0.171);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

/* Nav */

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

.nav-list i {
  font-size: 1.3rem;
  margin-right: 4px;
  text-align: center;
}

.nav-list a {
  font-size: 1rem;
  font-weight: 600;
}

.center {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-item {
  margin-bottom: var(--mb-4);
}

.nav-link {
  position: relative;
  color: var(--dark-color);
}

.nav-logo {
  font-size: 2rem;
  font-weight: 600;
  color: var(--white-color);
  font-family: Dancing Script;
}

.nav-toggle {
  color: var(--white-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* show menu */
.show {
  right: 0 !important;
}

/* Active menu */
.active::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}

/* Home */
.home {
  background-color: var(--first-color);
  overflow: hidden;
  background-image: url(./assets/home-bg.jpg);
  background-size: cover;
}

.home-container {
  height: calc(100vh - var(--header-height));
  row-gap: 5rem;
}

.home-title {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  font-size: var(--big-font-size);
  color: var(--white-color);
  line-height: 0.8;
}

.home-subtitle {
  color: var(--white-color);
  font-size: 1.8rem;
  margin-left: 0.8rem;
  margin-top: 16px;
}

.home-title {
  text-shadow: 0 20px 25px rgba(0, 0, 0, 0.4);
}

.home-scroll {
  align-self: flex-end;
  padding-bottom: var(--mb-4);
}

.home-scroll-link {
  writing-mode: vertical-lr;
  transform: rotate(-180deg);
  color: var(--white-color);
}

.home-img {
  width: 295px;
}

/* About Section */

.about-container {
  justify-items: center;
  row-gap: 2rem;
  padding: 20px;
}

.about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-img {
  overflow: hidden;
  max-width: 400px;
  height: auto;
}

.about-subtitle {
  font-size: var(--h2-font-size);
  color: var(--first-color);
}

.about-profession {
  display: block;
  margin-bottom: var(--mb-4);
}

.about-social-icon {
  font-size: 1.4rem;
  margin: 0 var(--mb-1);
  color: var(--white-color);
}

.about-social-icon:hover {
  color: #c770c7;
}

/* Skill */
.skills-container {
  row-gap: 2rem;
}

.skills-subtitle {
  color: var(--first-color);
  margin-bottom: var(--mb-3);
}

.skills-name {
  display: inline-block;
  font-size: var(--small-font-size);
  margin-right: var(--mb-2);
  margin-bottom: var(--mb-3);
  padding: 0.25rem 0.5rem;
  background-image: linear-gradient(270deg, rgb(27 20 41), rgb(20 15 35));
  border: 1.7px solid rgba(200, 137, 230, 0.637) !important;
  border-radius: 0.25rem;
  color: var(--white-color);
}

.skills-img img {
  border-radius: 0.5rem;
}

.skill-content {
  width: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.skill-content i,
.skill-content img {
  width: 58px;
  height: 58px;
}

.skills-box a {
  color: var(--white-color);
}

.skills-box i {
  font-size: 3.6rem;
}

.skills-box svg {
  width: 55px;
  height: 55px;
}

.skills-new {
  display: flex;
  margin-top: 1rem;
}

.skill-info,
.tool-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Portfolio */
/* .portfolio {
  background-color: var(--white-color);
} */

.portfolio-container {
  justify-items: center;
  row-gap: 2rem;
}

.portfolio-img {
  position: relative;
  overflow: hidden;
  height: 80%;
}

.portfolio-img img {
  border-radius: 0.5rem;
  border: 3px solid #c770c7;
  width: 100%;
  height: 100%;
}

.portfolio-img:hover .portfolio-link {
  bottom: 0;
  margin: 0;
}

.portfolio-link-name {
  font-size: 1.2rem;
  padding: 0.8rem 1.2rem;
  color: var(--white-color);
  background-color: #c770c7;
  border-radius: 0.5rem;
}

.portfolio-link {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(15px);
  transition: 0.3s;
}

/* Contact */
.contact-container {
  row-gap: 2rem;
}

.contact-subtitle {
  font-size: var(--normal-font-size);
  color: var(--first-color);
}

.contact-text {
  display: inline-block;
  margin-bottom: var(--mb-2);
}

.contact-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
}

.contact-input {
  width: 100%;
  padding: 0.8rem;
  outline: none;
  border: 1.5px solid #c770c7;
  border-radius: 0.5rem;
  color: #fff;
  margin-top: 1rem;
  background-color: #352651;
}

.contact-input::placeholder {
  color: #fff;
  opacity: 1;
}

.contact-button {
  display: block;
  background-color: #c770c7;
  color: var(--white-color);
  padding: 0.75rem 2.5rem;
  margin-left: auto;
  border-radius: 0.5rem;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-top: 12px;
}

/* Footer section */
.footer {
  height: 60vh;
}

.footer-container {
  row-gap: 2rem;
}

.footer-title {
  font-size: var(--normal-font-size);
  color: var(--white-color);
  margin-bottom: var(--mb-2);
}

.footer-link {
  padding: 0.25rem 0;
}

.footer-link:hover {
  color: #c770c7;
}

.footer-social {
  font-size: 1.4rem;
  margin-right: var(--mb-1);
}

.footer-social:hover {
  color: #c770c7;
}

.footer-container a {
  color: var(--white-color);
}

/* Media Queries */
@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: 100vh;
    padding: 2rem;
    background-image: linear-gradient(270deg, rgb(27 20 41), rgb(20 15 35));
    transition: 0.5s;
    backdrop-filter: blur(15px);
  }

  .nav-list a {
    color: var(--white-color);
  }

  .footer-container ul {
    display: flex;
  }

  .footer-container li {
    margin-right: 1rem;
  }
}

/* MEDIA QUERIES */
/* For small devices */
@media screen and (max-width: 491px) {
  .home-img {
    width: 358px;
  }

  .home-subtitle {
    color: var(--white-color);
    font-size: 1.8rem;
    margin-left: 0.6rem;
  }

  .skills-box {
    text-align: center;
  }

  .home-container {
    row-gap: 4rem;
  }

  .home-title {
    margin-top: 2rem;
  }
}

/* Loader */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1000;
  background-image: linear-gradient(270deg, rgb(27 20 41), rgb(20 15 35));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.loader-container img {
  width: 8rem;
}

.loader-container.fade-out {
  top: 110%;
  opacity: 0;
}

@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }

  .section {
    padding-top: 4rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .section-title::after {
    width: 64px;
    top: 3rem;
  }

  .nav {
    height: calc(var(--header-height) + 1rem);
  }

  .nav-list {
    display: flex;
  }

  .nav-item {
    margin-left: var(--mb-4);
    margin-bottom: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav-link {
    color: var(--white-color);
  }

  .nav-link:hover {
    color: var(--white-color);
  }

  .active::after {
    background-color: var(--first-color);
  }

  .home-container {
    grid-template-columns: 1.2fr 1fr;
    row-gap: 0;
    margin-top: 100px;
    align-items: center;
  }

  .home-img {
    width: 524px;
    right: 10%;
    top: 5rem;
  }

  .about-container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
    padding: 4rem 0;
  }

  .skills-container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: 2rem;
  }

  .contact-container {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }
  .contact-form {
    width: 380px;
  }

  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
  }
}

@media screen and (min-width: 1024px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
}

/* For tall screens on mobiles y desktop*/
@media screen and (max-height: 721px) {
  .home-img {
    width: 500px;
  }

  .home-container {
    row-gap: 1rem;
  }

  .home-title {
    margin-top: 2rem;
  }
}
