@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Playfair Display', 'Times New Roman', Times, serif;
}
html {
  scroll-behavior: smooth;
  font-size: 1rem;
}
body {
  display: flex;
  flex-direction: column;
  min-width: 100vw;
  min-height: 100vh;
  background-color: hsl(0, 0%, 90%);
  color: hsl(0, 0%, 50%);
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow-x: hidden;
}
header,
main,
footer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  padding: 20px 40px;
}
header,
footer {
  text-shadow: 1px 2px 3px rgb(0, 0, 0, 0.4);
}
hr {
  width: 100%;
  height: 3px;
  background-color: black;
  margin: 25px 0px;
}
h2,
h4 {
  text-align: center;
}
a {
  text-decoration: none;
}
p {
  line-height: 1.5;
}
button {
  padding: 10px 5px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 550;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s ease-in-out, background-color 0.5s ease-in-out,
    color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}
button:hover {
  transform: scale(0.96);
  box-shadow: none;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid hsl(0, 0%, 50%);
  position: sticky;
  top: 0;
  z-index: 100;
  opacity: 0.9;
  animation: slideInFromTop 1s ease-in;
  overflow: hidden;
}
header #logo-div {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  padding: 10px;
}
.logo-img-container {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
}
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
header h1 {
  font-style: italic;
}
header .toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}
header .toggle-btn .bar {
  height: 3px;
  width: 100%;
  background-color: hsl(0, 0%, 100%);
  border-radius: 10px;
}
header nav ul {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  list-style: none;
  font-weight: 550;
  font-size: 1.1rem;
}
header nav ul li a {
  text-decoration: none;
  color: hsl(0, 0%, 100%);
  transition: color 0.5s ease-in-out, border-bottom 0.5s ease-in-out,
    transform 0.5s ease-in-out;
}
header nav ul li a:hover {
  color: hsl(0, 0%, 70%);
  border-bottom: 2px solid hsl(0, 0%, 70%);
  transform: scale(0.98);
}
header nav ul li a:active {
  color: hsl(0, 0%, 0%);
}
.resume-btn {
  background-color: transparent;
  padding: none;
  box-shadow: none;
  color: tomato;
  font-size: 1.2rem;
  text-decoration: underline;
}
main {
  flex: 1;
  border-right: 4px solid hsl(0, 0%, 50%);
  border-radius: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: slideInFromLeft 1s ease-in;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 20px;
  width: 100%;
  background: radial-gradient(circle at 50% 50%, cadetblue, white);
}
.about-div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding: 20px;
  gap: 20px;
  max-width: 50%;
}
.about-div p {
  font-size: 1.3rem;
}
.gradient-text {
  display: inline-block;
  color: transparent;
  background-image: linear-gradient(to left, black, #9956f5, #19125a);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-btn {
  background: linear-gradient(to left, black, #9956f5, #19125a);
  color: white;
  font-size: 1.1rem;
  width: 200px;
  box-shadow: 4px 2px 7px rgba(0, 0, 0, 0.6);
}
.hero-contact-icons-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  flex: 1;
}
.hero-img-div {
  display: flex;
  align-items: center;
  width: 350px;
  height: 350px;
  border-radius: 15px;
  overflow: hidden;
}
.contact-icons img {
  width: 30px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.8);
  padding: 3px 6px;
  border-radius: 10px;
  transition: opacity 0.5s ease-in-out, box-shadow 0.5s ease-in-out,
    transform 0.5s ease-in-out;
}
.contact-icons img:hover {
  opacity: 0.7;
  box-shadow: none;
  transform: scale(0.98);
  transform: rotateZ(90deg);
}
.skills-container {
  min-width: 100%;
  text-align: center;
}
#skills-div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  text-align: center;
}
.skills-div-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid hsl(0, 0%, 50%);
  border-left: 3px solid hsl(0, 0%, 50%);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 5px;
  transition: transform 0.5s ease-in-out;
}
.skills-div-item:hover {
  transform: scale(0.97);
}
.skills-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 100%;
}
.projects-div {
  min-width: 100%;
  text-align: center;
  margin: 40px 0px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  overflow: hidden;
  padding: 10px;
  text-align: center;
}
.projects-grid-item {
  overflow: hidden;
  text-align: center;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  text-align: center;
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}
.projects-grid-item:hover {
  transform: scale(0.97);
  box-shadow: none;
}
.project-img-container {
  overflow: hidden;
  min-width: 100%;
  min-height: 200px;
  width: 300px;
  height: 200px;
}
.projects-btns-div {
  min-width: 100%;
  display: flex;
  justify-content: center;
  gap: 15px;
}
.projects-btn {
  width: 30%;
  text-align: center;
}
.code-review-btn {
  background-color: hsl(0, 0%, 20%);
  color: hsl(161, 76%, 90%);
}
.code-review-btn a {
  color: hsl(161, 76%, 90%);
}
.code-review-btn:hover {
  background-color: hsl(0, 0%, 10%);
  color: hsl(161, 76%, 100%);
}
.code-review-btn a:hover {
  background-color: hsl(0, 0%, 10%);
  color: hsl(161, 76%, 100%);
}
.see-it-live-btn {
  background-color: hsl(0, 0%, 50%);
  color: hsl(0, 0%, 10%);
}
.see-it-live-btn a {
  color: hsl(0, 0%, 10%);
}
.see-it-live-btn:hover {
  background-color: hsl(0, 0%, 60%);
  color: hsl(0, 0%, 0%);
}
.see-it-live-btn a:hover {
  background-color: hsl(0, 0%, 60%);
  color: hsl(0, 0%, 0%);
}
.contact-div {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 100%;
}
.contact-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 5px;
  border-radius: 10px;
}
.contact-icon {
  transition: transform 0.5s ease-in-out;
}
.contact-icon:hover {
  transform: scale(0.96);
}
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid hsl(0, 0%, 50%);
  border-radius: 20px 20px 0px 0px;
  padding: 20px;
  font-size: 0.9rem;
  font-weight: 550;
  text-align: center;
  animation: slideInFromBottom 1s ease-in;
}

#dark-mode-input {
  visibility: hidden;
}
#dark-mode-label {
  width: 40px;
  height: 20px;
  background-color: hsl(20, 6%, 10%);
  border-radius: 20px;
  position: absolute;
  cursor: pointer;
}
#circle {
  width: 17px;
  height: 17px;
  background-color: hsl(20, 6%, 90%);
  border-radius: 50%;
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  animation: toggleOff 600ms linear forwards;
}
#dark-mode-input:checked + #dark-mode-label {
  background-color: hsl(20, 6%, 90%);
}
#dark-mode-input:checked + #dark-mode-label #circle {
  background-color: hsl(20, 6%, 10%);
}
#dark-mode-input:checked + #dark-mode-label #circle {
  animation: toggleOn 600ms linear forwards;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  position: fixed;
  z-index: 10000;
  top: 120px;
  left: 1000px;
  opacity: 0;
  min-width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  transition: opacity 0.7s ease-in-out, left 0.7s ease-in-out,
    display 0.7s ease-in-out;
}
.mobile-nav li {
  min-width: 50%;
  text-align: left;
}
.show-mobile-nav {
  display: flex;
  left: 0px;
  opacity: 1;
}

@keyframes toggleOn {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(20px);
  }
}
@keyframes toggleOff {
  0% {
    transform: translateX(20px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideInFromBottom {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateX(0);
  }
}

@media screen and (max-width: 710px) {
  .hero {
    flex-direction: column;
  }
  .about-div {
    min-width: 100%;
  }
  hr {
    margin: 10px 0;
  }
  header .toggle-btn {
    display: flex;
  }
  nav {
    position: relative;
  }
  .desktop-nav {
    display: none;
  }
}
@media screen and (max-width: 650px) {
  main {
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 470px) {
  .my-name {
    display: none;
  }
  .home,
  .grid-item {
    min-width: 100%;
  }
}
