/* #region header */

#header {
  margin-top: 120px;
}

#header-container {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#header-headline {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
}

#header-titles {
  font-family: var(--mono-space);
  font-size: 1rem;
  color: var(--color-accent-dark);
  order: -1;
  margin-bottom: 16px;
}

#header-titles::before {
  content: "> ";
}

#header-headline h1 {
  font-size: clamp(3.157rem, 2.204rem + 3.812vw, 5.063rem);
}

#header-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

#header-cta {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

@media (max-width: 400px) {
  #header-cta {
    flex-direction: column;
  }
}

/* #endregion header */

/* #region projects */

#projects h2::before {
  content: "01.";
}

#cards-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 5vh;
}

.project-card {
  background-color: var(--color-primary-light);
  display: grid;
  grid-template-columns: 4fr 5fr;
  border-left: 6px solid var(--color-accent-dark);
  overflow: hidden;
  transform: translateY(0px);

  transition: box-shadow 0.3s, transform 0.3s;
}

.project-card:hover {
  box-shadow: var(--color-primary-dark) 2px 6px 20px -4px;
  transform: translateY(-6px);
}

.project-card:nth-child(even) {
  grid-template-columns: 5fr 4fr;
  border-left: none;
  border-right: 6px solid var(--color-accent-dark);
}

.card-content {
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.card-content::before {
  position: absolute;
  left: calc(20% - 250px);
  bottom: calc(-15% - 150px);
  font-size: 600px;
  font-weight: 700;
  text-align: center;
  font-family: var(--mono-space);
  pointer-events: none;
  color: var(--color-primary-dark);
  opacity: 0.35;
  z-index: -1;
}

.project-card:nth-child(1) .card-content::before {
  content: "01";
}

.project-card:nth-child(2) .card-content::before {
  content: "02";
}

.project-card:nth-child(3) .card-content::before {
  content: "03";
}

.card-cta {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  align-items: center;
}

.card-cta a:nth-child(1) {
  margin-right: auto;
}

.card-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100%;
  width: auto;
  filter: brightness(0.66);
  transition: filter 0.15s;
}

.project-card:hover .card-image {
  filter: brightness(0.9);
}

.project-card:nth-child(1) .card-image {
  background-image: url("../images/thumbnail-1.webp");
  background-position-x: 70%;
}

.project-card:nth-child(2) .card-image {
  background-image: url("../images/thumbnail-2.webp");
}

.project-card:nth-child(3) .card-image {
  background-image: url("../images/thumbnail-3.webp");
  background-position-x: 60%;
}

.project-card:nth-child(even) .card-image {
  order: -1;
}

.card-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.tag {
  font-family: var(--mono-space);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  padding: 2px 10px;
  background-color: var(--color-primary);
}

.tag::before {
  content: "# ";
}

@media (max-width: 800px) {
  .project-card,
  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
    border-left: 6px solid var(--color-accent-dark);
    border-right: none;
  }

  .card-image {
    display: none;
  }
}

/* #endregion projects */

/* #region about */

#about h2::before {
  content: "02.";
}

#introduction {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 16px;
  margin-top: 32px;
}

#introduction .column-left {
  margin-block: auto;
}

#introduction .column-right {
  display: grid;
  place-items: center;
}

#profile-avatar {
  background-image: url("../images/avatar.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 256px;
  width: 256px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}

#about-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px 16px;
  margin-top: 64px;
}

.about-card {
  flex: 1;
  min-width: 400px;
  padding: 20px;
  background-color: var(--color-primary-light);
  border-radius: 6px 6px 0 0;
  border-bottom: 6px solid var(--color-accent-dark);
}

.about-card h4 {
  text-align: center;
}

.about-card-content {
  max-width: 65ch;
  margin-top: 32px;
  margin-inline: auto;
}

@media (max-width: 784px) {
  #introduction {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  #introduction .column-left {
    order: 2;
  }

  .about-card {
    min-width: 100%;
  }
}

/* #endregion about */

/* #region skills */

#skills h2::before {
  content: "03.";
}

#skills-interface {
  position: relative;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

#details {
  width: 320px;
  padding: 16px;
  background-color: var(--color-primary-light);
  border-left: 6px solid var(--color-accent-dark);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#details-icon {
  margin-inline: auto;
  margin-bottom: 16px;
  width: 128px;
  height: 128px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

#details-container {
  opacity: 1;
}

#details-container.animating {
  animation-name: fade-in;
  animation-duration: 0.75s;
  animation-fill-mode: forwards;
  animation-iteration-count: 1;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#details-paragraph {
  font-weight: 400;
  font-size: 0.9rem;
}

#details-experience {
  font-weight: 400;
}

.skill-card {
  border-radius: 16px;
  transition: background-color 0.1s;
  cursor: pointer;
}

.skill-card.selected {
  pointer-events: none;
}

.skill-card:hover,
.skill-card.selected {
  background-color: hsla(0deg, 0%, 0%, 15%);
}

.skill-card figure {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 128px;
  height: 160px;
  padding: 12px;
}

.skill-icon {
  pointer-events: none;
  margin-top: 10%;
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
}

.skill-name {
  pointer-events: none;
  text-align: center;
  transition: color 0.1s;
}

.skill-card:hover .skill-name,
.skill-card.selected .skill-name {
  color: var(--color-accent-dark);
}

#skill-list {
  background-color: var(--color-primary-light);
  padding: 16px;
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
}

#skill-list::-webkit-scrollbar {
  width: auto;
}

#skill-list::-webkit-scrollbar-thumb {
  background-color: var(--color-accent-dark);
}

@media (max-width: 1000px) {
  #skills-interface {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  #details {
    width: 100%;
    min-height: calc(500px - 60vw);
  }

  #details-icon {
    display: none;
  }
}

@media (max-width: 512px) {
  #skill-list {
    flex-wrap: nowrap;
    overflow-x: scroll;
  }
}
/* #endregion skills */

/* #region contact */

#contact {
  min-height: unset;
}

#contact h2::before {
  content: "04.";
}

#contact-layout {
  display: grid;
  grid-template-columns: 360px auto;
  gap: 64px 20px;
}

#contact h4 {
  margin-top: 48px;
}

#contact-layout .column-right {
  max-width: 600px;
  margin-left: auto;
}

#contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}

#contact-form #label-message {
  grid-column: 1/3;
}

input:not(#contact-button),
textarea {
  display: block;
  width: 100%;
  border: none;
  padding: 8px;
  background-color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-accent-dark);
  margin-bottom: 2px;
}

textarea {
  display: block;
  width: 100%;
  resize: none;
  height: 240px;
  margin-bottom: 0px;
}

input:not(#contact-button):focus,
textarea:focus {
  outline: none;
  border-bottom: 4px solid var(--color-accent-light);
  margin-bottom: 0px;
}

#contact-button {
  margin-top: 24px;
  grid-column: 1/3;
}

@media (max-width: 928px) {
  #contact-layout .column-right {
    margin-left: unset;
  }

  #contact-form {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
  }

  #contact-form #label-message {
    grid-column: 1/2;
  }

  #contact-button {
    grid-column: 1/2;
  }
}

@media (max-width: 742px) {
  #contact-layout {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto);
  }

  #contact-form {
    grid-template-columns: repeat(2, 1fr);
  }

  #contact-form #label-message {
    grid-column: 1/3;
  }

  #contact-button {
    grid-column: 1/3;
  }
}

@media (max-width: 480px) {
  #contact-form {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
  }

  #contact-form #label-message {
    grid-column: 1/2;
  }

  #contact-button {
    grid-column: 1/2;
  }
}

/* #endregion contact */

/* #region dialog */

#form-feedback {
  display: none;
  border: 0;
  margin: auto;
  background-color: transparent;
  z-index: 1000;
  width: 100%;
  height: 100%;
}

#form-feedback[open] {
  display: grid;
  animation-name: pop-up;
  animation-duration: 0.33s;
  animation-iteration-count: 1;
}

#form-feedback[open]::backdrop {
  backdrop-filter: brightness(0.5);
}

#dialog-container {
  place-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 480px;
  padding: 24px 16px;
  border-radius: 8px;
  text-align: center;
  background-color: var(--color-primary-light);
}

#dialog-container h4 {
  font-size: clamp(1.333rem, 1.25rem + 0.333vw, 1.5rem);
  margin-bottom: 1rem;
  color: var(--color-accent-dark);
}

#dialog-container button {
  width: 100%;
}

@keyframes pop-up {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* #endregion dialog */

/* .animate-logo,
.animate-nav-item,
.animate-h1,
.animate-h2,
.animate-highlight,
.animate-cta,
article,
.project-card,
.skill-card {
  opacity: 0;
} */
