@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("InterVariable-Italic.woff2") format("woff2");
}

:root {
  --primary-color: hsl(2, 27%, 48%);
  --text-color: hsl(7, 9%, 19%);
  overscroll-behavior: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  color: var(--text-color);
  background-color: white;
}

.container {
  line-height: 1.5;
}

.wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px;
}

.wrapper.has-space {
  padding-bottom: 80px;
}

@media all and (min-width: 768px) {
  .nav-wrapper {
    position: sticky;
    top: 0;
    background-color: var(--primary-color);
    overscroll-behavior: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    height: 100dvh;
  }
}

header {
  padding: 1.5em;
  text-align: center;
}

header .avatar {
  margin: 2em;
  margin-bottom: 0;
  width: 7.6em;
  display: inline-block;
}

.image.avatar img {
  border-radius: 100%;
  display: block;
  width: 100%;
}

header h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0;
}

.nav-wrapper ul,
.nav-wrapper li {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
}

.nav-wrapper li a {
  display: block;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding-top: 1em;
  padding-bottom: 1em;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-wrapper li a:not(.active):hover {
  background-color: hsl(2, 27%, 42%);
}

.nav-wrapper li a.active {
  background-color: #fff;
  color: var(--primary-color);
}

.nav-wrapper li:not(:first-child) a {
  border-top: 1px solid #fff;
}

footer {
  padding: 1.5em;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  color: hsl(7, 4%, 45%);
}

footer a {
  text-decoration: none;
  transition: opacity linear 0.3s;
}

footer a:hover {
  color: hsl(7, 4%, 20%);
}

footer a img {
  width: 24px;
  display: block;
}

.nav-wrapper footer a {
  color: #fff;
  opacity: 0.65;
}

.nav-wrapper footer a:hover {
  opacity: 1;
}

h2 {
  font-size: 3em;
  line-height: 1.1;
}

h3 {
  font-size: 1.2rem;
}

.topics-grid {
  margin-top: 60px;
}

@media all and (min-width: 768px) {
  .topics-grid .item {
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: 25px;
  }
}

.topics-grid .item p {
  margin-top: 0;
}

.topics-grid .item h3 {
  border-top: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding-top: 5px;
  font-weight: 600;
  margin-top: 7px;
  text-transform: uppercase;
}

.arrow-list h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.arrow-list ul,
.arrow-list ul li {
  display: block;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.arrow-list ul li {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" ><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" /></svg >');
  background-repeat: no-repeat;
  background-position: left 6px;
  background-size: 14px auto;

  padding-left: 22px;
}

@media all and (min-width: 768px) {
  .profile-wrapper {
    display: flex;
    flex-direction: row-reverse;
  }
}

.profile-wrapper img {
  width: 230px;
  display: block;
  transform: translateX(20px);
}

main.expand {
  display: flex;
  flex-direction: column;
}

main.expand section {
  flex: 1 1 auto;
}

main a {
  color: inherit;
}

main a:hover {
  text-decoration: none;
}

main footer {
  margin-top: 0;
  background-color: hsl(2, 27%, 93%);
}

.wrapper:has(.profile-wrapper) {
  padding-bottom: 0;
}

section {
  padding-top: 50px;
  scroll-snap-type: y mandatory;
}

section:not(:last-of-type) {
  border-bottom: 1px solid hsl(7, 9%, 90%);
  padding-bottom: 80px;
}

main section {
  padding-left: 50px;
  padding-right: 50px;
}

@media all and (min-width: 768px) {
  .container {
    display: grid;
    grid-template-columns: minmax(340px, 25%) 1fr;
    min-height: 100dvh;
  }

  .mobile-only {
    display: none;
  }
}

@media all and (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  section,
  main section {
    padding: 0;
  }

  h2 {
    font-size: 2rem;
  }

  .wrapper {
    padding-left: 0;
    padding-right: 0;
  }

  .nav-wrapper {
    position: absolute;
    left: 0;
    width: 100vw;
    min-height: 100dvh;
    display: none;
  }

  .topics-grid .item h3 {
    border-top: 2px solid var(--primary-color);

    display: inline-block;
  }

  .topics-grid .item:not(:last-child) {
    margin-bottom: 40px;
  }

  section:not(:last-of-type) {
    border-bottom: 0;
    padding-bottom: 0;
  }

  section:not(:last-of-type)::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 40px;
    background-color: hsl(7, 9%, 80%);
    margin-left: -20px;
    margin-right: -20px;
  }

  h2 {
    hyphens: auto;
  }

  h2.nohyphen {
    hyphens: none;
  }

  .arrow-list {
    margin-top: 40px;
  }

  .profile-wrapper img.mobile-hidden,
  .mobile-hidden {
    display: none;
  }

  main footer {
    margin-top: 80px;
    margin-left: -20px;
    margin-right: -20px;

    line-height: 1.7;
  }

  header.mobile-only {
    background-color: var(--primary-color);
  }

  #navToggle {
    width: 40px;
    height: 40px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="white"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" /></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px auto;
    border: none;
    cursor: pointer;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10;
    background-color: var(--primary-color);
  }

  body.shownav .nav-wrapper {
    position: fixed;
    left: 0;
    width: 100vw;
    min-height: 100dvh;
    display: block;
    background: #9b5c59;
  }

  body.shownav header.mobile-only {
    display: none;
  }

  footer .wrapper.mobile-only {
    line-height: 2;
  }
}
