/* GLOBAL STYLES */

:root {
  --black: #1d1d1d;
  --grey: #6b6b6b;
  --body: #f2f2f2;
  --footer: #e7e7e7;
  --accent-color: #3547b7;
  --title-weight: 600;
  --text-weight: 500;
}

.dark-theme {
  --black: #fdfdfd;
  --grey: #b8b8b8;
  --body: #171a1e;
  --footer: #0d0f12;
  --accent-color: #87e2d5;
  --title-weight: 500;
  --text-weight: 400;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui;
  background-color: var(--body);
  color: var(--black);
}

h1,
h2,
h3 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  font-size: 1.25rem;
  font-weight: var(--text-weight);
  opacity: 0.70;
  line-height: 1.5;
  text-wrap: pretty;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  opacity: 0.8;
}

a:focus,
button:focus {
  outline-offset: 0.5rem;
}

button {
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
}

ul {
  list-style-type: none;
}

select {
  font-family: inherit;
  color: inherit;
}

.container {
  max-width: 87.5rem;
  margin: auto;
}

/*=============================== 
PROJECTS
================================*/

.page-hero-projects {
  background-color: var(--footer);
  padding: 3.75rem 2.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeIn .4s linear;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
}

.page-hero-projects .container {
  width: 50%;
  position: relative;
  z-index: 1;
}

.back-button {
  display: inline-block;
  padding: 0.8rem 0;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: opacity .3s;
}

.back-button:hover {
  opacity: .85;
}

.back-button svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: var(--black);
  vertical-align: middle;
  transition: transform .4s;
}

.back-button:hover svg {
  transform: translateX(-0.25rem);
}

.page-title {
  font-size: 1.875rem;
  font-weight: var(--title-weight);
}

.page-content-projects {
  padding: 3.75rem 2.5rem;
  animation: fadeIn .4s linear;
}

.page-content-projects .container {
  width: 50%;
}

.label {
  display: block;
  font-size: 1.125rem;
  line-height: 1.4;
  opacity: 0.8;
  margin-bottom: 1.25rem;
}

.container-select {
  margin-bottom: 1.875rem;
  width: 15rem;
  position: relative;
  overflow: hidden;
}

.container-select svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0.25rem;
  width: 1.875rem;
  height: 1.875rem;
  fill: var(--grey);
  pointer-events: none;
}

.select {
  background-color: var(--body);
  border: 2px solid var(--grey);
  border-radius: 1rem;
  padding: 0.75rem 0.625rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--grey);
  cursor: pointer;
  width: 100%;

  /* All */
  appearance: none;
  /* Chrome y Safari */
  -webkit-appearance: none;
  /* Firefox */
  -moz-appearance: none;
}

.select:focus {
  outline: none;
  border: 2px solid var(--black);
}

.projects-list {
  margin-top: 3.75rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 1rem;
  column-gap: 0.5rem;
}

.project-image {
  width: 100%;
  height: auto;
  transition: filter 0.2s ease;
}

.project-image:hover {
  filter: contrast(80%);
}

/*=============================== 
FOOTER
================================*/

.footer {
  background-color: var(--footer);
  padding: 3.75rem 2.5rem;
  text-align: center;
  position: relative;
}

.footer-copy {
  font-size: 1.5rem;
  opacity: 0.80;
}

.socials-list {
  margin-top: 2rem;
  display: grid;
  text-align: center;
  gap: 1.5rem;
}

.socials-list a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-color);
  padding: 0.5rem;
  border-radius: 1rem;
}

.socials-list svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--accent-color);
  vertical-align: middle;
}

/*=============================== 
RESPONSIVE DESIGN
================================*/

/* 820 px */
@media screen and (max-width: 51.25rem) {
  a:hover {
    opacity: 1;
  }

  .page-hero-projects .container {
    width: 100%;
  }

  .page-content-projects .container {
    width: 100%;
  }

  .page-hero-projects,
  .page-content-projects {
    padding: 3.75rem 1.25rem;
  }

  .footer {
    padding: 3.75rem 1.25rem;
  }

  .footer-copy {
    font-size: 1.125rem;
    text-align: initial;
  }

  .socials-list {
    text-align: initial;
  }
}

/* 576 px */
@media screen and (max-width: 36rem) {
  p {
    font-size: 1.125rem;
  }

  .label {
    font-size: 1.125rem;
  }

  .container-select {
    width: 100%;
  }

  .projects-list {
    grid-template-columns: 1fr 1fr;
  }

  .project-image:hover {
    filter: contrast(100%);
  }

  .page-hero-projects,
  .page-content-projects {
    padding: 3.75rem 1rem;
  }

  .footer {
    padding: 3.75rem 1rem;
  }
}

/* 356 px */
@media screen and (max-width: 22.25rem) {
  html {
    font-size: 90%;
  }
}