* {
  all: unset;
  box-sizing: border-box;
  pointer-events: auto;
}

head, script {
  display: none;
}

main, article, aside, h1, h2, h3, h4, h5, h6, nav, p, footer, div {
  display: block;
}

a:hover, button:hover {
  cursor: pointer;
}

body {
  width: 100%;
  height: 100%;
}

:root {
  --primary-text: #fff;
  --primary: #6f2da8;
  --secondary: #595959;
  --highlight: #121212;
  --surface: #e7e7e7;
  --foreground: #212121;
}

@media (prefers-color-scheme: dark) {
  :root {
    --highlight: #ffffff;
    --surface: #212121;
    --foreground: #e7e7e7;
  }
}
body {
  background: var(--surface);
  color: var(--foreground);
}

main > section > hgroup h1 {
  color: var(--primary);
}
main > section > hgroup button {
  background: var(--primary);
  color: var(--primary-text);
}

.contrast {
  color: var(--secondary);
}

header nav ul:nth-child(1) {
  color: var(--highlight);
}
header nav ul:nth-child(2) {
  color: var(--primary);
}
header nav ul:nth-child(2) a:hover {
  color: var(--highlight);
}

h3 {
  color: var(--primary);
}

@font-face {
  font-family: "ClashGrotesk-Regular";
  src: url("../assets/ClashGrotesk_Complete/Fonts/WEB/fonts/ClashGrotesk-Regular.woff2") format("woff2"), url("../assets/ClashGrotesk_Complete/Fonts/WEB/fonts/ClashGrotesk-Regular.woff") format("woff"), url("../assets/ClashGrotesk_Complete/Fonts/WEB/fonts/ClashGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Nippo-Regular";
  src: url("../assets/Nippo_Complete/Fonts/WEB/fonts/Nippo-Regular.woff2") format("woff2"), url("../assets/Nippo_Complete/Fonts/WEB/fonts/Nippo-Regular.woff") format("woff"), url("../assets/Nippo_Complete/Fonts/WEB/fonts/Nippo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
:root {
  font-family: Nippo-Regular;
}

.clash {
  font-family: ClashGrotesk-Regular;
}

header nav {
  display: grid;
  padding: 1em;
}
header nav ul:nth-child(1) {
  font-size: 1.5em;
  grid-column: 1/5;
  grid-row: 1;
}
header nav ul:nth-child(2) {
  font-size: 1.25em;
  margin-left: auto;
  grid-column: 4/5;
  grid-row: 1;
}

section:nth-child(1) {
  max-width: min(80%, 1023px);
  margin: auto;
  display: grid;
  padding: 0 2em;
}

main > section > hgroup {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5.5em;
}
main > section > hgroup h1 {
  font-size: 2em;
}
main > section > hgroup button {
  margin: 2em;
  padding: 1em;
  border-radius: 0.4em;
}

main > section > img {
  display: none;
}

@media screen and (min-width: 1023px) {
  main > section hgroup {
    grid-column: 1/2;
    grid-row: 1;
    padding-top: 2em;
  }
  main > section img {
    width: 100%;
    height: 100%;
    display: block;
    grid-column: 2/2;
    grid-row: 1;
    display: grid;
    align-items: center;
    justify-items: center;
    margin: auto 0;
  }
  section:nth-child(1) {
    grid-template-columns: 1fr 1fr;
  }
  #projects {
    gap: 1em;
    grid-template-columns: 1fr 1fr 1fr;
  }
  #projects > article:nth-child(1) {
    grid-column: 1/4;
    grid-row: 1;
  }
}
section:nth-child(2) h3 {
  font-size: 1.5em;
  text-align: center;
  padding-top: 3em;
}
section:nth-child(2) .icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#projects {
  display: grid;
  max-width: min(80%, 1023px);
  margin: auto;
  text-align: center;
  overflow: hidden;
}
#projects h3 {
  font-size: 1.5em;
  text-align: center;
  padding-top: 3em;
}
#projects h6 {
  text-align: center;
}
#projects img {
  max-width: 80%;
  max-width: 80%;
  margin: auto;
}
#projects a {
  margin: 0;
  padding: 0;
}

#about, #services {
  margin: auto;
  display: flex;
  max-width: min(80%, 1023px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1em;
}
#about h3, #services h3 {
  font-size: 1.5em;
  text-align: center;
  padding-top: 3em;
}
#about li, #services li {
  display: block;
}
#about img, #services img {
  max-width: 20em;
  max-width: 20em;
}

footer {
  font-size: 0.7em;
  display: flex;
  justify-content: center;
  align-items: center;
}
footer nav {
  display: grid;
  padding: 45em 0 3em 0;
}
footer a {
  text-transform: capitalize;
}

#rust:hover {
  filter: invert(49%) sepia(86%) saturate(894%) hue-rotate(352deg) brightness(94%) contrast(91%);
}

#flask:hover {
  filter: invert(29%) sepia(0%) saturate(0%) hue-rotate(44deg) brightness(95%) contrast(86%);
}

main > section > div > a > img {
  filter: invert(19%) sepia(84%) saturate(0%) hue-rotate(226deg) brightness(97%) contrast(93%);
  height: 2.9em;
  width: 2.9em;
}

main > section > div > a > img:hover {
  filter: grayscale(0);
  filter: saturate(2);
}

.icons {
  text-align: center;
}

a {
  padding: 0.2em;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]:before,
[data-tooltip]:after {
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  -webkit-font-smoothing: antialiased;
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transition: 0.6s ease-in-out 0.4s;
}

[data-tooltip]:before {
  content: "";
  height: 0;
  width: 0;
  top: calc(100% - 9px);
  border-style: solid;
  border-width: 10px;
  border-color: transparent transparent #333 transparent;
}

[data-tooltip]:after {
  content: attr(data-tooltip);
  white-space: nowrap;
  background: #333;
  padding: 0.5rem 1rem 0.5rem 1rem;
  font-size: 0.9rem;
  box-sizing: border-box;
  top: calc(100% + 11px);
  color: #fff;
  border-radius: 2px;
  text-shadow: 0px 1px 1px #000;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  opacity: 1;
  visibility: visible;
  transition: 0.4s ease-in-out 0.3s;
}
