* {
  box-sizing: border-box;
}

body {
  --link-color: #f24031;
}
body.dark {
  --bg-color: #040316;
  --surface-color: #0f0d38;
  --text-color: #fff;
}
body.light {
  --bg-color: #e8e8e8;
  --surface-color: #fdfdfd;
  --text-color: #212121;
}
body {
  margin: 0;
  font-family: "Rubik", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 175%;
}


a {
  font-weight: bold;
  color: var(--text-color);
  text-decoration: underline var(--link-color) solid 0.2rem;
  transition: opacity 120ms ease;
}
a:hover {
  opacity: 0.75;
}
.cta a {
  padding: 0.5rem 2rem;
  border-radius: 100rem;
  background-color: var(--bg-color);
}
.branding a, a.solid {
  text-decoration: none;
}
a.solid {
  background: linear-gradient(270deg, #E1002E, #FF7434);
}


.icon-sun {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
}
.icon-moon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E");
}
button .check {
  display: block;
  width: 18px;
  height: 18px;
  background-color: var(--surface-color);
  border-radius: 100rem;
  transition: transform 480ms ease;
}
#theme-toggle.dark .check {
  transform: translateX(28px);
}
.icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}
.icon span {
  width: 12px;
  height: 12px;
  position: absolute;
  z-index: 6;
  top: 3px;
  left: 3px;
  color: var(--text-color);
  -webkit-mask: var(--icon) no-repeat;
  mask: var(--icon) no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background-color: currentcolor;
  opacity: 0;
  transform: rotate(-90deg);
  transition: opacity 480ms ease, transform 480ms ease;
}
#theme-toggle.dark .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}
#theme-toggle.light .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}
#theme-toggle {
  position: relative;
  width: 48px;
  padding: 0;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 1px solid var(--text-color);
  border-radius: 100rem;
  cursor: pointer;
}


.nav-elements, .footer-elements, section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1rem;
}
section {
  margin: 4rem auto;
  scroll-margin-top: calc(60px + 1rem);
}
section h2 {
  font-size: 2rem;
}


nav {
  background-color: var(--bg-color);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
}
.nav-elements {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.nav-elements li {
  list-style: none;
}
.nav-elements .links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}
nav .branding a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
nav a, nav .links {
  padding: 1rem 0;
}



section.landing {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin: 0 auto;
  flex-wrap: wrap;
}
section.landing > div {
  flex: 1 0 0;
}
section.landing .image-container {
  display: flex;
  justify-content: center;
}
section.landing .image-container img {
  width: 100%;
  max-width: 440px;
}
section.landing h1, section.landing p {
  margin: 0 0 1.25rem;
}
section.landing h1 {
  font-size: 2rem;
  line-height: 125%;
}
section.landing .cta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
}


.tiny-bio {
  max-width: 824px;
  margin: 0 auto;
}
.row {
  display: flex;
  flex-direction: row;
  gap: 4rem;
  align-items: center;
}
.row div {
  flex: 4 0 0;
}
.row .tiny-heading {
  flex: 2 0 0
}
.tiny-heading h2 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
}


.skills-list {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 4rem;
  text-align: center;
}
.skill h4 {
  margin: 0;
}
.skill span {
  opacity: 0.5;
}


.projects .project:nth-child(even) {
  flex-direction: row-reverse;
}
.project {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: center;
  margin: 4rem 0 8rem;
}
.project div {
  flex: 1 0 0;
}
.project-images img {
  border-radius: 1rem;
  width: 100%;
}
.tech-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
}
.tech-list li {
  list-style: none;
  padding: 0.25rem 1rem;
  background-color: var(--surface-color);
  border-radius: 0.25rem;
}


.resume-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 1rem;
}
.resume-container div {
  flex: 1 0 0;
}
#resume {
  background-color: #fff;
  color: #000;
  padding: 2rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}
#resume h2 {
  line-height: 125%;
}
#resume h3, #resume h4 {
  margin: 1.5rem 0 0.25rem;
}
#resume span {
  display: block;
}
.resume-container .note {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}
.resume-container .note div {
  flex: 2 0 0;
} .resume-container .note hr {
  flex: 1 0 0;
  border: 1px solid var(--text-color);
  border-radius: 0.25rem;
}


footer {
  margin: 8rem 0 0 0;
  padding: 1rem 0;
}
.footer-elements {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.5rem;
}
.footer-elements li {
  list-style: none;
}


@media(max-width: 948px) {
  section.landing {
    margin: 2rem 0;
  }
  section.landing .text-container {
    flex: 3 0 0;
  }
  section.landing .image-container {
    flex: 2 0 0;
  }

  .row .tiny-heading {
    flex: 1 0 0;
  }

  #projects .project {
    flex-direction: column;
    gap: 0;
  }
}

@media(max-width: 768px) {
  section.landing {
    flex-direction: column-reverse;
  }
  section.landing .text-container {
    max-width: 480px;
  }
  .tiny-bio .row {
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0 0 0;
  }
  .project {
    margin: 2rem 0 4rem;
  }
  .resume-container, .footer-elements {
    flex-direction: column;
  }
  #notes {
    display: none;
  }
}

@media(max-width: 428px) {
  body {
    font-size: 85%;
  }
  section.landing h1, section h2 {
    font-size: 150%;
  }
  nav .branding {
    display: none;
  }
  .nav-elements {
    margin: 0;
    width: 100%;
  }
  .nav-elements .links {
    width: 100%;
    justify-content: space-between;
  }
  .skills-list {
    gap: 1rem;
    grid-template-columns: auto auto;
  }
}