:root {
  --primary-color: #95938f;
  --secondary-color: #edefef;
  --color-dark-grey: #2f2f36;
  --background-color: #0a1816;
  --text-color: #edefef;
  --font-family: "Arial, sans-serif";
  --font-size-header: clamp(1.2rem, 0.45rem + 2.4vw, 1.8rem);
  --font-size-title: clamp(2rem, 1.375rem + 2vw, 2.5rem);
  --font-size-subtitle: clamp();
}
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  /* outline: 1px solid red; */
}

body {
  font-family: "Arial", sans-serif;
  /* line-height: 1.6; */
  background-color: var(--background-color);
  min-height: 100vh;
  color: var(--primary-color);
}

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

h2 {
  font-size: var(--font-size-header);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
}

section {
  scroll-margin-top: calc(30vh - 50px);
}

.hidden {
  display: none;
}

/* ######################## */
/* ####### About Me ####### */
/* ######################## */
.section-about-me {
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}
.section-about-me p {
  font-size: 1.2rem;
  text-align: center;
  padding: 1rem;
  width: 70%;
}

/* ######################## */
/* ####### Learn #######  */
/* ######################## */
.section-skills {
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.section-learn p {
  width: 50%;
  height: auto;
  border-radius: 100%;
}

/* ######################## */
/* ####### Projects #######   */
/* ######################## */
.section-projects {
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* ######################## */
/* ####### contact ####### */
/* ######################## */
.section-contact {
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* ######################## */
/* ####### card ####### */
/* ######################## */
/* From Uiverse.io by gharsh11032000 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  background-color: var(--secondary-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
  box-shadow: 0 0 0 5px #ffffff80;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card img {
  width: 100%;
  fill: cover;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

.card__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  background-color: var(--background-color);
  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card__content {
  transform: rotateX(0deg);
}

.card__title {
  margin: 0;
  font-size: 24px;
  color: var(--text-color);
  font-weight: 700;
}

.card:hover img {
  scale: 0;
}

.card__description {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.4;
}

.card__subtitle {
  font-size: 16px;
}

.card__tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow: hidden;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 15px;
}

.card__tag {
  list-style: none;
  padding: 4px 8px;
  background-color: var(--primary-color);
  color: var(--text-color);
  border-radius: 4px;
  font-size: 12px;
  color: var(--background-color);
  justify-content: center;
  align-items: center;
}

.card__buttons {
  display: flex;
  gap: 10px;
}

.card__button {
  text-decoration: none;
  padding: 8px 16px;
  background-color: var(--background-color);
  border: 1px solid var(--primary-color);
  color: var(--text-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.card__button:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}

/* ######################## */
/* ####### Inputs ######### */
/* ######################## */
.wrap-inputs {
  padding-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.field-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-field {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 1rem;
}

.input-field::placeholder {
  color: var(--text-color);
  opacity: 0.7;
}

footer {
  background-color: var(--background-color);
  color: var(--text-color);
  text-align: center;
  padding: 1rem;
  position: relative;
  bottom: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .section-about-me p,
  .section-skills p,
  .section-projects p,
  .section-contact p {
    width: 90%;
  }
  .card__content {
    padding: 10px;
  }

  .card__description {
    overflow-x: hidden;
    height: 60px;
  }

  .wrap-inputs {
    grid-template-columns: 1fr;
  }

  section {
    scroll-margin-top: calc(
      50vh - 50px
    ); /* 50px es la mitad de la altura estimada del contenido */
  }
}
