html {
  scroll-behavior: smooth;
  scroll-padding-top: 48px;
}

:root {
  --white: hsl(0, 0%, 98%);
  --white-secondary: hsl(0, 0%, 95%);
  --black: hsl(0, 0%, 5%);
  --black-secondary: hsl(0, 0%, 10%);
  --primary: #1a2233;
  --secondary: #4f8cff;
  --ternary: #e0eaf7;
  --btn-live: hsl(0, 100%, 50%);
  --btn-live-hover: hsl(0, 100%, 45%);
  --btn-code: black;
  --btn-code-hover: hsl(0, 0%, 15%);
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter Tight", Arial, sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: 16px;
  background: var(--white-secondary);
  color: var(--black-secondary);
}

/* Scroll up button */
.scroll-up {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.scroll-up:hover {
  background-color: var(--ternary);
}

@media (max-width: 945px) {
  .scroll-up {
    display: none;
  }
}


/* Navbar */
.home {
  background: var(--white);
  padding: 0px 20px;
  margin-bottom: 40px;
}

.home p {
  font-size: 1.2rem;
  font-weight: 400;
}

nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  list-style-type: none;
  padding: 12px 20px;
  text-align: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--black-secondary);
  transition: all 0.3s;
}

.nav-links a:hover {
  color: var(--secondary);
}

@media (max-width: 480px) {
  .home {
    padding: 0px 10px;
    margin-bottom: 20px;
  }

  .home p {
    font-size: 1.4rem;
    margin: 0px;
  }

  nav {
    flex-direction: column;
    padding: 8px 0px;
  }

  .nav-links {
    padding: 0;
    font-size: 1.2rem;
  }
}

@media (min-width: 1921px) {
  .home {
    padding: 20px 10px;
    margin-bottom: 20px;
  }

  .home p {
    font-size: 2.6rem;
  }

  .nav-links {
    padding: 0;
    font-size: 1.8rem;
  }
}


/* Hero section */
.hero {
  width: 70%;
  height: 520px;
  margin: 0px auto 40px;
  padding: 16px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--white-secondary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}

.hero-header {
  text-align: center;
  line-height: 0.92rem;
}

.header-primary {
  font-size: 4rem;
}

.header-secondary {
  font-size: 2.5rem;
}

.hero-description {
  font-size: 1.2rem;
}

.hero-about {
  font-size: 1.2rem;
}

.hero-about>a {
  background-color: var(--white);
  color: var(--black);
  text-decoration: none;
  padding: 10px 20px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  transition: all 0.1s ease;
}

.hero-about>a:hover {
  background-color: var(--white-secondary);
}

@media (max-width: 480px) {
  .hero {
    height: 460px;
    width: 88%;
    margin: 0px auto 20px;
  }

  .hero-header {
    line-height: 0.92rem;
  }

  .header-primary {
    font-size: 2rem;
  }

  .header-secondary {
    font-size: 1.6rem;
  }

  .hero-description {
    font-size: 1.2rem;
  }

  .hero-about {
    font-size: 1.2rem;
  }
}

@media (min-width: 481px) and (max-width: 945px) {
  .hero {
    height: 500px;
    width: 85%;
    margin: 0px auto 20px;
  }

  .hero-header {
    line-height: 0.92rem;
  }

  .header-primary {
    font-size: 2.8rem;
  }

  .header-secondary {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1.2rem;
  }

  .hero-about {
    font-size: 1.2rem;
  }
}

@media (min-width: 1921px) {
  .header-primary {
    font-size: 3.6rem;
  }

  .header-secondary {
    font-size: 2.4rem;
  }

  .hero-description {
    font-size: 1.6rem;
  }

  .hero-about {
    font-size: 1.6rem;
  }
}


/* Projects */
.container {
  width: 70%;
  margin: 0 auto;
  padding: 16px;
  background: var(--white);
  border-radius: 16px;
}

.container>section {
  margin-bottom: 40px;
}

.container>section>h2 {
  color: var(--primary);
  border-left: 4px solid var(--secondary);
  padding-left: 12px;
}

.projects-list {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
}

.project {
  min-height: 200px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  background: var(--ternary);
  border-radius: 8px;
  padding: 20px 20px;
  transition: all 0.5s ease;
}

.project-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-title {
  margin: 0;
}

.project-live {
  font-size: 0.9rem;
  text-decoration: none;
  background-color: var(--btn-live);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--white-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  transition: all 0.4s ease;
}

.project-live:hover {
  background-color: var(--btn-live-hover);
}

.project-icon {
  filter: invert(100%);
  height: 20px;
}

.project-code {
  font-size: 0.9rem;
  text-decoration: none;
  background-color: var(--black);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--white-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.project-code:hover {
  background-color: var(--btn-code-hover);
}

.project-image {
  width: 100%;
}

@media (max-width: 480px) {
  .container {
    width: 88%;
  }

  .projects-list {
    display: grid;
    grid-template-columns: auto;
  }

  .project {
    padding: 16px 16px;
  }

  .project-title {
    margin: 0;
  }
}

@media (min-width: 481px) and (max-width: 640px) {
  .container {
    width: 85%;
  }

  .projects-list {
    display: grid;
    grid-template-columns: auto;
  }

  .project {
    padding: 12px 12px;
  }
}

@media (min-width: 641px) and (max-width: 945px) {
  .container {
    width: 86%;
  }

  .projects-list {
    display: grid;
    grid-template-columns: auto;
  }
}

@media (min-width: 946px) and (max-width: 1024px) {
  .projects-list {
    display: grid;
    grid-template-columns: auto;
  }
}

@media (min-width: 1921px) {
  .container {
    font-size: 1.6rem;
  }

  .project-icon {
    filter: invert(100%);
    height: 28px;
  }

  .project-live {
    font-size: 1.4rem;
  }

  .project-code {
    font-size: 1.4rem;
  }
}

/* About */
.about-resume {
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--black-secondary);
  background-color: var(--white-secondary);
  text-decoration: none;
  transition: all 0.4s ease;
}

.about-resume:hover {
  background-color: var(--ternary);
}


/* Footer */
footer {
  text-align: center;
  color: #888;
  font-size: 0.95rem;
  padding: 16px 0;
}

.footer {
  width: 70%;
  margin: 0 auto;
  padding: 16px 0;
}