@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

:root {
  --color-primary: hsl(230, 50%, 95%);
  --color-secondary: hsl(230, 50%, 10%);
  --color-tertiary: hsl(290, 80%, 20%);
  --color-accent: hsl(170, 80%, 20%);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: hsl(230, 50%, 10%);
    --color-secondary: hsl(230, 50%, 95%);
    --color-tertiary: hsl(290, 80%, 80%);
    --color-accent: hsl(170, 80%, 80%);
  }
}

body {
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: calc(10px + 0.33vw);
  -webkit-font-smoothing: antialiased;
  color: var(--color-secondary);
  background-color: var(--color-primary);
  transition: background-color 0.3s ease, color 2s ease;
  min-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  padding: 3vh 3vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding-left: 5%;
  padding-right: 5%;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.profile-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.personal-profile_image {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 300px;
  border-bottom-right-radius: 50%;
  /* filter with dynamic color changing */
  filter: drop-shadow(0 0 0.8rem var(--color-secondary));
  margin-bottom: 1rem;
  animation: gradient 15s ease infinite;
  object-fit: cover;
  opacity: 0.95;
  transition: all 0.5s ease;
}

.personal-profile_image:hover {
  filter: drop-shadow(0 0 2rem var(--color-secondary)) brightness(1.1);
  opacity: 1;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.personal-profile__name {
  font-size: 2em;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.personal-profile__work {
  font-size: 1.2em;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.personal-profile__contacts {
  margin-bottom: 0.5rem;
}

.personal-profile__social {
  display: flex;
  grid-gap: 0.5rem;
  justify-content: flex-start;
}

.personal-profile__social a {
  color: var(--color-primary);
  font-size: 0.8rem; /* Reduced social icon size */
  height: 2rem; /* Reduced social icon size */
  width: 2rem; /* Reduced social icon size */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-accent);
  transition: 0.3s;
  text-decoration: none;
  margin: 0;
}

p {
  font-size: 1.6em;
  font-weight: 300;
  line-height: 1.4;
  max-width: 28em;
}

a {
  text-decoration: none;
  white-space: nowrap;
  color: var(--color-secondary);
  position: relative;
  font-weight: 300;
}

p a:after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 66%;
  left: -0.1em;
  right: -0.1em;
  bottom: 0;
  transition: top 200ms cubic-bezier(0, 0.8, 0.13, 1);
  background-color: var(--color-tertiary);
  opacity: 0.5;
}

a:hover:after {
  top: 0%;
}

.personal-profile__contacts p {
  font-size: 1rem; /* Adjusted location font size */
}

@media (min-width: 800px) {
  main {
    padding: 5vh 10vw;
    padding-left: 10%;
    padding-right: 10%;
  }

  .profile-container {
    flex-direction: row;
    gap: 3rem;
  }

  .profile-header {
    margin-bottom: 30px;
  }

  .personal-profile_image {
    margin-bottom: 0;
  }

  .personal-profile__name {
    font-size: 2.5em;
  }

  .personal-profile__contacts {
    margin-bottom: 2rem;
  }

  .personal-profile__social a {
    font-size: 1rem;
    height: 3rem;
    width: 3rem;
  }
}
