/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers.
 */

body {
  margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */

main {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */

small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */

img {
  border-style: none;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

button,
input { /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

button,
select { /* 1 */
  text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
  vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */

textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */

details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */

template {
  display: none;
}

/**
 * Add the correct display in IE 10.
 */

[hidden] {
  display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
    scroll-behavior: smooth;
    list-style: none;
}

header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(.8rem);
    color: white;
    padding: 0.6rem 1.6rem;
    border-radius: 3rem;
    z-index: 1000;
}

.logo {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    text-wrap: nowrap;
    transition: 0.3s ease-in-out;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

li a {
    position: relative;
    color: white;
    font-weight: 300;
}

li a::before {
    position: absolute;
    content: '';
    width: 0;
    left: 0;
    height: .4rem;
    top: 1.6rem;
    border-radius: 1rem;
    transition: 0.3s ease-in-out;
    background: linear-gradient(to right, rgb(0,157,255), rgb(255,0,255));
}

li a:hover::before {
    width: 100%;
}

.visit-btn {
    padding: .8rem 1.6rem;
    border-radius: 3rem;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    text-wrap: nowrap;
    transition: 0.3s ease;
    background: linear-gradient(to right, rgb(0,157,255), rgb(255,0,255));
}

.visit-btn:hover {
    background: linear-gradient(to right, rgb(255,0,255), rgb(0,157,255));
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    transform: scale(1.05);
}

#menu-icon {
    font-size: 2rem;
    display: none;
}

section {
  min-height: 100vh;
  padding: 8rem 12%;
  width: 100%;
  position: relative;
}

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

.about .about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10rem;
}

.about img {
  width: 30vw;
  border-radius: 50%;
}

.info-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 1.6rem;
}

.info-box h3 {
  font-size: 1.8rem;
  font-weight: 500;
  opacity: 0.8;
}

.info-box h1 {
  font-size: 4rem;
  font-weight: 600;
  margin: 1rem 0;
}

.info-box span {
  background: linear-gradient(to right, rgb(255,0,255), rgb(0,157,255));
  background-clip: text;
  color: transparent;
  font-size: 2rem;
}

.info-box .text {
  min-width: 280px;
}

.info-box .text span {
  position: relative;
}

.info-box .text span::before {
  content: "Web Developer";
  animation: words 20s infinite;
  color: linear-gradient(to right, rgb(255,0,255), rgb(0,157,255));
}

.info-box .text span::after {
  content: "";
  background-color: white;
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid black;
  top: 0;
  right: -10px;
  animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
  to {
    border: 2px solid linear-gradient(to right, rgb(255,0,255), rgb(0,157,255));
  }
}

@keyframes words {
  0%,
  20% {
    content: "Web Developer";
  }
  21%,
  40% {
    content: "Systems Engineer";
  }
  41%,
  60% {
    content: "Software Engineer";
  }
  61%,
  80% {
    content: "Frontend Developer";
  }
  81%,
  100% {
    content: "Website Programmer";
  }
}

@keyframes typing {
  10%,
  15%,
  30%,
  35%,
  50%,
  55%,
  70%,
  75%,
  90%,
  95% {
    width: 0;
  }

  5%,
  20%,
  25%,
  40%,
  45%,
  60%,
  65%,
  80%,
  85% {
    width: calc(100% + 8px);
  }
}

.btn-group {
  display: flex;
  gap: 1rem;
}

.btn {
  border-radius: 3rem;
  padding: 0.6rem 1.6rem;
  border: 2px solid black;
  cursor: pointer;
  font-weight: 500;
  text-wrap: nowrap;
  transition: 0.2s ease-in-out;
  color: black;
}

.btn:hover {
  background: black;
  color: white;
}

.socials {
  display: flex;
  gap: 2rem;
}

.socials i {
  font-size: 2.4rem;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.socials i:hover {
  transform: scale(1.1);
}

.section-title {
  text-align: center;
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.experiencie-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
}

.experiencie img {
  width: 24vw;
  border-radius: 3rem;
}

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

.grid-card {
  border: 2px solid black;
  border-radius: 3rem;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: left;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.grid-card:hover {
  background-color: black;
  color: white;
}

.grid-card i {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.grid-card span {
  font-size: 1.6rem;
  font-weight: 500;
  background: linear-gradient(to right, rgb(255,0,255), rgb(0,157,255));
  background-clip: text;
  color: transparent;
  margin-bottom: .4rem;
}

.grid-card h3 {
  margin-bottom: .4rem;
}

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background-color: rgb(219, 219, 219);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, rgb(255,0,255), rgb(0,157,255));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.6rem;
  border: 2px solid black;
  border-radius: 3rem;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.project-card:hover {
  background-color: black;
  color: white;
  transform: translateY(-10px)scale(1.02);
}

.project-card img {
  width: 20vw;
  border-radius: 1rem;
}

.project-card:hover .btn {
  border: 2px solid white;
  color: white;
}

.project-card:hover .btn:hover {
  border: 2px solid white;
  color: black;
  background-color: white;
}

.project-card h3 {
  font-size: 2rem;
  font-weight: 500;
}

/*.input-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  margin-top: 5rem;
}

.input-box input {
  border-radius: 3rem;
  border: 2px solid black;
  padding: 2rem 8rem;
  font-size: 3rem;
}

.input-box input::placeholder {
  font-size: 3rem;
}

.input {
  position: relative;
}

.input i {
  position: absolute;
  font-size: 4rem;
  top: 50%;
  left: 10px;
  transform: translate(50%, -50%);
}*/

form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  text-align: center;
}

/*form .input-box {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}*/

form .input-box {
  display: flex;
  flex-direction: column;
  width: 100%;
}

form .input-box input,
form textarea {
  width: 100%;
  padding: 2rem;
  font-size: 1.6rem;
  margin: 1.4rem 0 !important;
  resize: none;
  border-radius: 3rem;
  border: 2px solid black;
}

form .input-box input {
  width: 100%;
  box-sizing: border-box;
}

form .input-box input.error, form textarea.error {
  border: 3px solid #bb2929;
}

.alert {
  transition: transform 0.3s ease, max-height 0.4s ease, opacity 0.4s ease, padding 0.3s ease, margin 0.3s ease;
  background-color: #f44336;
  color: white;
  font-size: 1.4rem;
  border-radius: 3rem;
}

/*form .input-box input + .alert {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transform: scaleY(0);
  transform-origin: top;
}

form .input-box input.error + .alert {
  transform: scaleY(1);
  opacity: 1;
  padding: 1.4rem;
  max-height: 200px;
}*/

.alert {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transform: scaleY(0);
  transform-origin: top;
}

.error.alert {
  transform: scaleY(1);
  opacity: 1;
  padding: 1.4rem;
  max-height: 200px;
}

form .btn {
  margin-top: 1rem;
  background-color: white;
}

body .iti--allow-dropdown .iti__flag-container {
  left: 12px!important;
  top: 45px !important;
}

.iti__country-list {
  font-size: 1.4rem;
}

.iti__selected-flag {
  height: 50%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none; 
}

footer {
  bottom: 0;
  left: 0;
  height: 10rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

footer ul {
  display: flex;
  align-items: center;
  gap: 3rem;
}

footer ul li a {
  color: black;
  font-weight: 600;
}

.copyright {
  font-weight: 300;
  margin-top: 2rem;
}

@media(max-width: 1280px) 
{
  header {
    padding: 1rem 2rem;
    gap: 2rem;
  }

  .about .about-container {
    gap: 3rem;
  }

  .info-box h1 {
    margin: 10px 0;
  }

  .experiencie-info {
    flex-direction: column;
    gap: 3.6rem;
  }

  .grid-card {
    padding: 2rem;
  }

  .grid-card i {
    margin-bottom: .4rem;
  }
  
  form .input-box input,
  form textarea {
    padding: 1.4rem;
    font-size: 1.4rem;
    margin: 1rem 0;
  }

  .alert {
    font-size: 1.4rem;
  }

  form .btn {
    margin-top: 0rem;
  }

  body .iti--allow-dropdown .iti__flag-container {
    top: 38px !important;
  }


  /*.input-box input {
    padding: 2rem 5rem;
    font-size: 2.4rem;
  }

  .input-box .section-title {
    margin-bottom: 2rem;
  }

  .input input::placeholder {
    font-size: 2.4rem;
  }

  .input-box i {
    font-size: 2.4rem;
  }*/

}

@media(max-width: 768px) 
{
  header {
    gap: 1.2rem;
    padding: 1.2rem;
  }

  header .logo {
    font-size: 1rem;
  }

  header .visit-btn {
    display: none;
  }

  .about-container {
    flex-direction: column;
  }

  .info-box h1 {
    font-size: 3rem;
  }

  form {
    flex-direction: column;
  }

  form {
    gap: .4rem;
  }

  form .input-box input,
  form textarea {
    padding: 1.4rem;
    font-size: 1.4rem;
    margin: .8rem 0;
  }

  form .btn {
    margin-top: 1rem;
  }

  /*.input-box input {
    padding: 1rem 2rem;
    font-size: 1.8rem;
  }

  .input-box input::placeholder {
    font-size: 1.6rem;
  }

  .input-box i {
    display: none;
  }*/

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

  .grid-card {
    padding: 2.4rem;
  }

  .experiencie-info img {
    width: 70vw;
  }
}

@media(max-width: 600px) 
{
  section {
    padding: 4rem 12%;
  }

  header #menu-icon {
    display: block;
    cursor: pointer;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    text-align: center;
    border-radius: 3rem;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px); /* Sube un poquito */
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .nav-links li {
    padding: 1rem;
  }

  .nav-links.active {
    opacity: 1;
    transform: translateY(0); /* Posición original */
    pointer-events: auto;
  }

  header {
    padding: 1rem 5rem;
    gap: 9rem;
  }

  header .logo {
    font-size: 1rem;
  }

  .about-container img {
    width: 60vw;
  }

  .info-box span {
    font-size: 1.6rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .section-title {
    font-size: 3rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /*.input-box input {
    padding: 0.6rem 3rem;
    width: 90%;
    font-size: 1.4rem;
  }

  .input-box input::placeholder {
    font-size: 1.4rem;
  }*/

  form .input-box input,
  form textarea {
    padding: 1.4rem;
    font-size: 1.2rem;
    margin: .8rem 0;
  }

  form .btn {
    margin-top: 1rem;
  }

  footer ul {
    gap: 1rem;
  }
}