@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --color-background: #0f1317;
  --color-surface: #1a1f25;
  --color-subsurface: #262c35;
  --color-foreground: #ffffff;
  --color-subforeground: #ffffff80;
  --color-primary: #3e8ff4;
  --color-secondary: #78b8fe;
  --color-overlay: #00000080;
  --inactive-ring: 0 0 0 0 var(--color-primary);
  --active-ring: 0 0 0 4px var(--color-primary);
  --max-width: 900px;
  --transition-delay: 0.25s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  gap: 0;
  font-family: "Poppins", sans-serif;
  border-radius: 0.25rem;
  outline: none;
  transition: box-shadow var(--transition-delay) ease;
}

*:focus-visible {
  box-shadow: var(--active-ring);
}

*:not(:focus-visible) {
  box-shadow: var(--inactive-ring);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color-background);
  color: var(--color-foreground);
}

a {
  text-decoration: none;
  color: inherit;
}

li {
  list-style-type: none;
}

.header {
  width: 100%;
  background-color: var(--color-surface);
  color: var(--color-foreground);
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  z-index: 5;
  top: 0;
}

.header__content {
  max-width: var(--max-width);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

.header__brand {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.header__icon {
  color: var(--color-foreground);
  font-size: 24px;
}

.header__icon--logo {
  color: var(--color-primary);
}

.header__heading {
  font-size: 24px;
  color: var(--color-foreground);
  font-weight: bold;
}

.header__nav {
  display: none;
}

.header__list {
  justify-content: center;
  align-items: center;
  gap: 2rem;
  display: flex;
}

.header__link {
  font-size: 16px;
  color: var(--color-foreground);
}

.header__hamburger {
  border: none;
  background: none;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  width: 2rem;
}

.header__hamburger:active {
  cursor: pointer;
}

.main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color-background);
  color: var(--color-foreground);
  padding-block: 1rem;
}

.main > * {
  z-index: 1;
}

.canvas {
  width: 100vw;
  height: 100vh;
  position: fixed;
  background: none;
}

.hero,
.work,
.tech-stack,
.projects,
.blog,
.blog-posts {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.hero__content,
.work__content,
.projects__content,
.blog__content {
  max-width: var(--max-width);
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-direction: column;
  align-items: center;
}

.hero__figure,
.work__figure,
.projects__figure,
.blog__figure {
  aspect-ratio: 1 / 1;
  background-color: var(--color-surface);
  border-radius: 100%;
  padding: 1rem;
  height: 180px;
  width: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__icon,
.work__icon,
.projects__icon,
.blog__icon {
  font-size: 96px;
  color: var(--color-foreground);
}

.hero__information,
.work__information,
.projects__information,
.blog__information {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}

.hero__text,
.work__text,
.projects__text,
.blog__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.hero__heading,
.work__heading,
.tech-stack__heading,
.projects__heading,
.blog__heading,
.blog-posts__heading,
.dialog__heading {
  background-image: linear-gradient(to right, var(--color-primary) 0%, var(--color-secondary) 100%);
  background-clip: text;
  color: transparent;
  font-size: 32px;
  text-align: center;
}

.hero__description,
.work__description,
.projects__description,
.blog__description {
  font-size: 16px;
  color: var(--color-foreground);
  text-align: center;
}

.hero__button-group,
.work__button-group,
.projects__button-group,
.blog__button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__button,
.work__button,
.projects__button,
.blog__button,
.dialog__cancel-button {
  display: flex;
  align-items: center;
  border: none;
  justify-content: center;
  background-color: var(--color-foreground);
  color: var(--color-surface);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 16px;
  box-shadow: var(--inactive-ring);
  transition:
    var(--transition-delay) opacity,
    box-shadow var(--transition-delay) ease;
}

.hero__button:focus-visible,
.work__button:focus-visible,
.projects__button:focus-visible,
.blog__button:focus-visible,
.dialog__close-button:focus-visible,
.dialog__cancel-button:focus-visible {
  box-shadow: var(--active-ring);
}

.hero__button:hover,
.work__button:hover,
.projects__button:hover,
.blog__button:hover,
.dialog__close-button:hover,
.dialog__cancel-button:hover {
  cursor: pointer;
}

.hero__button:active,
.work__button:active,
.projects__button:active,
.blog__button:active,
.dialog__close-button:active,
.dialog__cancel-button:active {
  opacity: 0.8;
}

.tech-stack__content,
.blog-posts__content {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.tech-stack__list {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.tech-stack__technology {
  display: flex;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  color: var(--color-foreground);
  background-color: var(--color-surface);
  border-radius: 0.5rem;
  transition:
    var(--transition-delay) background-color,
    var(--transition-delay) color,
    var(--transition-delay) opacity;
}

.tech-stack__technology:hover {
  color: var(--color-background);
  background-color: var(--color-foreground);
  cursor: pointer;
  user-select: none;
}

.tech-stack__technology:active {
  opacity: 0.8;
}

.blog-posts__list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
}

.blog-posts__list-item {
  display: flex;
  flex-direction: column;
}

.blog-posts__link {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  flex-grow: 1;
}

.blog-posts__post {
  background-color: var(--color-surface);
  color: var(--color-foreground);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-delay) opacity;
  height: 100%;
}

.blog-posts__post:active {
  opacity: 0.8;
}

.blog-posts__header {
  font-weight: bold;
  font-size: 24px;
}

.footer {
  width: 100%;
  background-color: var(--color-surface);
  color: var(--color-foreground);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 5;
}

.footer__content {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  justify-content: center;
}

.footer__list {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer__icon {
  font-size: 32px;
  color: var(--color-foreground);
}

.dialog {
  opacity: 0;
  transform: scale(0.8);
  position: fixed;
  top: 50%;
  left: 50%;
  transform-origin: center;
  translate: -50% -50%;
  border: none;
  max-width: 350px;
  z-index: 9999;
  padding: 1rem;
  background: none;
  transition:
    transform var(--transition-delay) ease,
    opacity var(--transition-delay) ease;
  pointer-events: none;
}

.dialog.dialog--show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.dialog::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition:
    background-color var(--transition-delay) ease,
    backdrop-filter var(--transition-delay) ease;
}

.dialog.dialog--show::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1rem);
}

.dialog--full {
  width: 100%;
}

.dialog__close-button {
  border: none;
  background: none;
  position: absolute;
  top: 2rem;
  right: 2rem;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  width: 2rem;
}

.dialog__icon {
  color: var(--color-foreground);
  font-size: 1.5rem;
}

.dialog__nav {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-surface);
  color: var(--color-foreground);
  border-radius: 1rem;
}

.dialog__list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.dialog__link {
  font-size: 20px;
  color: var(--color-foreground);
}

.dialog__form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--color-surface);
  color: var(--color-foreground);
  border-radius: 1rem;
}

.dialog__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dialog__description {
  text-align: center;
}

.dialog__form-field-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog__form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dialog__form-label {
  color: var(--color-foreground);
  font-size: 16px;
}

.dialog__input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dialog__input-icon {
  position: absolute;
  left: 1rem;
  z-index: 2;
  font-size: 16px;
}

.dialog__input {
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
  background-color: var(--color-subsurface);
  font-size: 16px;
  color: var(--color-subforeground);
  padding-block: 0.5rem;
  padding-left: 3rem;
  padding-right: 1rem;
}

.dialog__button-group {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.dialog__confirm-button {
  display: flex;
  align-items: center;
  border: none;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-foreground);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 16px;
  box-shadow: var(--inactive-ring);
  transition:
    var(--transition-delay) opacity,
    box-shadow var(--transition-delay) ease;
}

.dialog__confirm-button:focus-visible {
  box-shadow: var(--active-ring);
}

.dialog__confirm-button:hover {
  cursor: pointer;
}

.dialog__confirm-button:active {
  opacity: 0.8;
}

@media only screen and (min-width: 480px) {
  .blog-posts__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-posts__post {
    padding: 1.5rem;
  }
}

@media only screen and (min-width: 640px) {
  .header {
    padding: 1rem 3rem;
  }

  .main {
    padding-block: 1.5rem;
  }

  .hero,
  .work,
  .tech-stack,
  .projects,
  .blog {
    padding: 3rem;
  }

  .hero__content,
  .work__content,
  .projects__content,
  .blog__content {
    gap: 3rem;
  }

  .header__nav {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .header__hamburger {
    display: none;
  }

  .hero__content,
  .projects__content {
    flex-direction: row-reverse;
  }

  .work__content,
  .blog__content {
    flex-direction: row;
  }

  .hero__figure,
  .work__figure,
  .projects__figure,
  .blog__figure {
    aspect-ratio: 1 / 1;
    background-color: var(--color-surface);
    border-radius: 9999px;
    padding: 1rem;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero__heading,
  .hero__description,
  .projects__heading,
  .projects__description {
    text-align: right;
  }

  .work__heading,
  .work__description,
  .blog__heading,
  .blog__description {
    text-align: left;
  }

  .hero__button-group,
  .projects__button-group {
    justify-content: flex-end;
  }

  .work__button-group,
  .blog__button-group {
    justify-content: flex-start;
  }
}

@media only screen and (min-width: 1024px) {
  .header {
    padding: 1rem 4rem;
  }

  .main {
    padding-bottom: 2rem;
  }

  .hero,
  .work,
  .tech-stack,
  .projects,
  .blog {
    padding: 4rem;
  }

  .hero__content,
  .work__content,
  .projects__content,
  .blog__content {
    gap: 4rem;
  }

  .blog-posts__list {
    grid-template-columns: repeat(3, 1fr);
  }
}
