:root {
  --text: #040316;
  --background: #fff9d1;
  --primary: #ccf5ff;
  --secondary: #87ceeb;
  --accent: #5cb3ff;
}

* {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  background-color: var(--background);
  scroll-behavior: smooth;
  font-size: 62.5%; /* 62.5% x default = 10px */
}

/* 1200px / 16px = 75em */
@media (max-width: 75em) {
  html {
    font-size: 60%;
  }
}

/* 980px / 16px = 61.25em */
@media (max-width: 61.25em) {
  html {
    font-size: 58%;
  }
}

/* 460px / 16px = 28.75em */
@media (max-width: 28.75em) {
  html {
    font-size: 55%;
  }
}

body {
  font-family: sans-serif;
  color: var(--text);
  font-size: 1.8rem; /* 18px */
  font-weight: 400;
  line-height: 1.4;
}

h1,
h2 {
  font-weight: 700;
  text-align: center;
}

h1 {
  font-size: 6rem;
}

h2 {
  font-size: 3rem;
}

ul {
  list-style: none;
}

li a {
  text-decoration: none;
  color: var(--text);
}

/* nav */

.nav {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--secondary);
  box-shadow: 0 2px 0 var(--accent);
  z-index: 10;
}

.nav-list {
  display: flex;
  margin-right: 2rem;
}

.nav-list a {
  display: block;
  font-size: 2.2rem;
  padding: 2rem;
}

@media (max-width: 28.75em) {
  .nav {
    justify-content: center;
  }

  .nav-list {
    margin: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-list a {
    display: block;
    font-size: 1.8rem;
    padding: 1rem;
  }
}

.nav-list a:hover {
  background: var(--primary);
}

/* Welcome section */

.welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-image: linear-gradient(73deg, #70aef1 21%, #1b52b0 100%);
}

/* About */

.about-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100vh;
  background-image: linear-gradient(180deg, #adad9a 38%, #e7ebd7 100%);
}

.about-section p {
  padding: 20px;
  width: 80%;
  text-align: justify;
}

/* Skills Section */
.skill-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 70vh;
  background-image: linear-gradient(
    180deg,
    #e7ebd7 70%,
    var(--background) 100%
  );
}

.skill-section p {
  padding: 20px;
}

/* Contact section */

.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 50vh;
  padding: 0 2rem;
}

.contact-heading > h2 {
  font-size: 6rem;
}

@media (max-width: 28.75em) {
  .contact-heading > h2 {
    font-size: 4rem;
  }
}

.contact-heading > p {
  font-style: italic;
}

.contact-body {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  max-width: 980px;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 2rem;
  transition: transform 0.3s ease-out;
}

.github-link:hover {
  transform: translateX(10px);
}

.linkedin-link:hover {
  transform: translateX(-10px);
}

/* Footer */

.footer {
  background: var(--secondary);
  border-top: 2px solid var(--accent);
}

footer {
  text-align: center;
  padding: 20px;
}

.return-top {
  font-size: 1.6rem;
  background: var(--primary);
  border: 0;
  line-height: 2.5;
  padding: 0 20px;
  margin-bottom: 20px;
  text-align: center;
  border-radius: 10px;
  transition: transform 0.3s ease-out;
}

.return-top:hover {
  transform: scale(1.1);
}

.return-top a {
  text-decoration: none;
  color: var(--text);
}

@media (max-width: 28.75em) {
  footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Link */

.linked-page:link,
.linked-page:visited {
  color: var(--text);
  text-decoration: dotted underline;
}

.linked-page:hover,
.linked-page:active {
  background-color: var(--accent);
  text-decoration: none;
}
