*, *::before, *::after {
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
  
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
  
}

.fade-out {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.fade-in {
  opacity: 1;
  transition: opacity 1s ease-out;
}

html {
  scrollbar-gutter: stable;
  background-color: hsl(220, 38%, 19%);
}

body {
  margin: 0;
  font-family: sans-serif;
  color: white;
  text-align: center;
  font-size: 1.8rem; 
}

main {
  padding-top: 12rem;
}

#links .section-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem;
  max-width: 60rem;
  width: 100%;
  justify-items: center;
}

.section-content.fade-out {
  opacity: 0;
}

.section-content.fade-in {
  opacity: 1;
}

main section {
  position: absolute;
  opacity: 0;
  visibility: hidden;
}

main section.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  width: 100%;
}

section {
  transition: opacity 0.25s ease;
}

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow-x: hidden;
  height: 12rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background-color: hsl(229, 47%, 11%);
}

nav .profile-image {
  display: none;
  position: absolute;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  animation: fadeIn 0.8s ease;
  pointer-events: none;
  width: 12rem;
  height: 12  rem;
  left: 0;
}

.profile-image.fade-in {
  opacity: 1;
}

.nav-ul {
  position: absolute;
  flex: 1;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  left: 10rem;
  right: 10rem;
  top: 0;
  bottom: 0; 
  margin: auto;
}

.nav-ul li.active {
  text-decoration-style: solid;
  text-decoration-line: underline;
}

nav li {
  display: inline;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 1s ease, transform 1s ease;
}

nav li.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.nav-reset {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
}

li {
  list-style-type: none;
  text-align: center;
}

.lang-switch {
  position: absolute;
  right: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.lang-switch.fade-in {
  opacity: 1;
}

.lang-btn {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.lang-btn img {
  border-radius: 50%;
  transition: transform 0.15s ease, box-shadow 0.15 ease;
  width: 5rem;
  height: 5rem;
}

.lang-btn:hover img {
  transform: scale(1.1);
}

.flag-img {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lang-switch.fade-in .flag-img {
  transform: scale(1);
}

.audio-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.audio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.audio-title {
  text-align: center;
  font-weight: 600;
}

audio {
  width: 100%;
}

.list-ul {
  display: inline-block;
}

.list-ul li {
  text-align: left;
}

#about-me {
  padding: 0 4rem;
}

#links {
  min-height: calc(100vh - 12rem);
  display: grid;
  place-items: center;
}

.socialmedia-button {
    background: hsl(212, 22%, 48%);
    border: 0.5rem solid hsl(225, 31%, 30%);
    border-radius: 10%;
    cursor: pointer;
}

.socialmedia-button:hover {
  transform: scale(1.04);
  background: hsl(199, 30%, 60%);
  border: 0.5rem solid hsl(195, 32%, 66%);
}

.socialmedia-image {
    margin-left: auto;
    margin-right: auto;
    width: 10rem;
    height: 10rem;
}

#copy-gmail.active {
  background-color: green;
}

@media only screen and (max-width: 600px) {
  html {
    font-size: 6px;
  }
}

@media only screen and (min-width: 600px) {
  html {
    font-size: 7px;
  }
}

@media only screen and (min-width: 768px) {
  html {
    font-size: 8px;
  }
}

@media only screen and (min-width: 992px) {
  html {
    font-size: 10px;
  }
}

@media only screen and (min-width: 1200px) {
  html {
    font-size: 11px;
  }
  nav .profile-image {
    display: flex;
    visibility: visible;
  }
}

@media only screen and (min-width: 1920px) {
  html {
    font-size: 16px;
  } 
}