/* Universal Styles */
:root {
  --text-color: #2c6d9a;
  --bg-color: #d2d8ea;
  --accent-color: #3886b4;
  --light-text: #ffffff;
  --dark-text: #111111;
  --hover-bg: #2c6d9a20; /* transparent blue hover */
}

@font-face {
  font-family: "Poppins";
  src: url("./Fonts/Poppins-Regular.woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Handwriting";
  src: url("./Fonts/EduNSWACTHandPre-Regular.woff2") format("woff2"),
    url("./Fonts/EduNSWACTHandPre-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins";
}

html {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background: linear-gradient(135deg, #0f1724 0%, #071021 100%);
  padding-bottom: 70px;
  max-width: 100vw;
}

.container {
  max-width: 100vw;
}

svg {
  cursor: pointer;
}

/* Header*/
header {
  position: fixed;
  top: 0;
  left: 0;
  height: 50px;
  width: 100%;
  background: linear-gradient(
    to bottom right,
    var(--accent-color) 9%,
    var(--bg-color) 80%
  );
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  z-index: 999;
}

.logo {
  margin: 20px;
}

.logo a .logo-name {
  height: 40px;
  margin: 10px;
}

.logo a .dp {
  margin-top: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  aspect-ratio: 1/1;
}

header nav {
  width: 40%;
  position: absolute;
  right: 0;
  margin-right: 20px;
}

header nav > ul {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

header nav > ul > li {
  list-style-type: none;
  width: 100%;
}

header nav > ul > li > a {
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-color);
  cursor: pointer;
  transition: 0.1s;
}

header nav > ul > li > a:hover {
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 1000px;
}

.active {
  padding-bottom: 5px;
  border-bottom: 3px solid var(--text-color);
  border-radius: 1000px;
}

.open-sidebar {
  display: none;
}

/*aside*/
aside {
  display: none;
}

/* home */
#home {
  color: var(--bg-color);
  padding: 20px;
}

#home .h1 {
  color: var(--text-color);
  font-size: 6rem;
  letter-spacing: 1rem;
  position: relative;
}

#home .h1::after {
  content: "";
  width: 25%;
  height: 5px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--dark-text) 50%
  );
  position: absolute;
  bottom: 15px;
  left: 0;
}

.name {
  color: var(--bg-color);
  padding: 5px;
  font-size: 2rem;
}

.name span {
  font-family: "Handwriting";
  font-weight: 600;
  font-size: 3rem;
  letter-spacing: 10px;
  color: var(--accent-color);
}

.bio {
  color: var(--bg-color);
  width: 450px;
  font-size: 2.5rem;
  text-transform: capitalize;
  line-height: 1.3;
  letter-spacing: 3px;
}

.pic {
  position: relative;
  top: -500px;
  float: right;
  height: 450px;
  width: 450px;
  border-radius: 50%;
  border: none;
  margin-inline: 50px;
  margin-block: 20px;
  z-index: 5;
  transition: 0.3s;
}

/* about */
#about {
  padding: 10px;
  width: 100%;
}

#about .h1 {
  color: var(--text-color);
  font-size: 6rem;
  letter-spacing: 1rem;
  margin-top: 15px;
  position: relative;
}

#about .h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 30%;
  height: 10px;
  border-radius: 1000px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--bg-color) 40%,
    transparent 60%
  );
}

.about-text {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 15px;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--accent-color);
  border: none;
  border-radius: 40px;
  box-shadow: 0 0 16px var(--text-color);
  position: relative;
  top: -150px;
}

.about-text div {
  border: none;
  border-radius: 20px;
  box-shadow: 10px 10px 10px var(--accent-color);
  text-align: center;
  height: max-content;
  border-radius: 20px;
}

.about-text .professional-background {
  grid-row: span 2;
}

.about-text > div > .heading {
  font-weight: 900;
  font-size: 20px;
  color: var(--text-color);
  text-align: center;
  position: relative;
}

.heading::after {
  content: "";
  position: absolute;
  left: 30%;
  top: 1.8rem;
  height: 3px;
  width: 150px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--bg-color) 40%
  );
}

.lg::after {
  left: 44%;
}

span.intro,
.outro {
  text-align: center;
}

ol > li > strong {
  font-weight: 700;
}

.about-text .conclusion {
  grid-column: span 3;
  height: max-content;
}


/*Skills*/

#skills {
  padding: 20px;
}

#skills .h1 {
  position: relative;
  left: 35%;
  color: var(--text-color);
  font-size: 6rem;
  letter-spacing: 1rem;
}

#skills .h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 30%;
  height: 5px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--bg-color) 50%
  );
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-box {
  background-color: var(--bg-color);
  border-radius: 10px;
  padding: 20px;
  transition: 0.3s all ease;
  cursor: pointer;
  box-shadow: 0 0 10px var(--text-color);
}

.skill-box:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--accent-color);
}

.skills-container:hover .skill-box:not(:hover) {
  transform: scale(0.8);
  opacity: 0.6;
}

.skill-title {
  color: var(--text-color);
  font-size: 1.5rem;
}

.skill-description {
  color: var(--accent-color);
}

#skills svg {
  float: right;
  fill: var(--accent-color);
  transition: 0.3s;
}

#skills svg:hover {
  transform: scale(2);
}

#projects {
  padding: 20px;
}

#projects .h1 {
  position: relative;
  left: 30%;
  margin-top: 20px;
  color: var(--text-color);
  font-size: 6rem;
  letter-spacing: 1rem;
}

#projects .h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 46%;
  height: 5px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--bg-color) 50%
  );
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background-color: var(--text-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 16px var(--text-color);
  transition: 0.3s all ease;
  cursor: pointer;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--accent-color);
}

.project-card:hover .project-description {
  color: var(--bg-color);
}

.project-card:hover .project-title {
  color: var(--dark-text);
}

.project-title {
  color: var(--bg-color);
  font-size: 1.5rem;
}

.project-description {
  color: var(--dark-text);
  margin-top: 10px;
}

.project-description ul {
  list-style: none;
}

.project-description ul li::before {
  content: "\2022";
  color: blue;
  padding-right: 10px;
}

.explore {
  border: none;
  margin-top: 10px;
  margin-right: 10px;
  color: var(--light-text);
  transition: 0.3s;
  letter-spacing: 2px;
  cursor: pointer;
  float: right;
}

/* contact */

#contact .h1 {
  position: relative;
  left: 15%;
  margin-top: 20px;
  color: var(--text-color);
  font-size: 6rem;
  letter-spacing: 1rem;
}

#contact .h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 55%;
  height: 5px;
  background: linear-gradient(
    to top right,
    var(--text-color),
    var(--accent-color),
    var(--bg-color) 50%
  );
}

.contact {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
}

.contact div button {
  padding: 5px 20px;
  border: none;
  border-radius: 1000px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  position: relative;
  transition: 0.5s;
}

.contact div button::after {
  content: "";
  height: 102%;
  width: 107%;
  position: absolute;
  left: 0;
  background: linear-gradient(
      to top left,
      var(--text-color),
      var(--accent-color),
      var(--bg-color) 2%
    ),
    linear-gradient(
      to bottom right,
      var(--text-color),
      var(--accent-color),
      var(--bg-color) 40%
    );
  background-blend-mode: multiply;
  border-radius: 1000px;
  z-index: -1;
}

.contact div button:hover {
  z-index: 0;
}

.contact div button a svg {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  border: none;
  fill: var(--text-color);
}

.contact div button a {
  text-decoration: none;
}

.contact div button a span {
  transform: translateY(50%);
  font-size: 2rem;
  color: var(--text-color);
}

form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 700px;
  flex-direction: column;
  border: 3px solid var(--bg-color);
  margin: 0 auto;
  padding: 20px;
  border-radius: 20px;
}

form h2 {
  font-weight: 900;
  color: var(--text-color);
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: 5px;
}

form .form-group {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

form .form-group .sender {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-direction: column;
}

form input,
form textarea {
  border-radius: 10px;
  border: none;
  outline: none;
}

form input::placeholder,
form textarea::placeholder {
  /* use same font-family name as the @font-face declaration */
  font-family: "Handwriting";
  color: var(--accent-color);
  letter-spacing: 0.5rem;
}

form input:is(:valid, :active) {
  border: none;
  border-bottom: 1px solid var(--accent-color);
  border-radius: 0;
  background: transparent;
  color: var(--light-text);
  padding: 5px;
}

form textarea:is(:valid, :active) {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--light-text);
}

form input {
  height: 30px;
  width: 300px;
  padding: 20px;
  border-radius: 1000px;
}

form textarea {
  padding: 20px;
}

form .submit-btn {
  padding: 10px 20px;
  border-radius: 1000px;
  background-color: var(--bg-color);
  border: none;
  color: var(--text-color);
  transition: 0.5s;
}

form .submit-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.success {
  color: green;
  margin: 15px 0;
  padding: 10px;
  background: #f0fff0;
  border: 1px solid #a0d8a0;
}

.error {
  color: red;
  margin: 15px 0;
  padding: 10px;
  background: #fff0f0;
  border: 1px solid #ffb0b0;
}

/*footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--accent-color) 9%,
    var(--bg-color) 80%
  );
  z-index: 999;
  color: var(--text-color);
  font-weight: 500;
}

.footer-name {
  font-family: "Handwriting";
  color: var(--bg-color);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 5px;
}

/* Media Queries */
@media screen and (max-width: 768px) {
  header nav {
    width: 60%;
  }

  .open-sidebar {
    display: none;
  }

  
  #home {
    margin-top: 20px;
  }

  #home .h1,
  #about .h1,
  #skills .h1,
  #projects .h1,
  #contact .h1 {
    font-size: 4rem;
    letter-spacing: 0.6rem;
  }

  #skills .h1,
  #projects .h1,
  #contact .h1 {
    width: max-content;
  }

  #home .h1::after,
  #about .h1::after,
  #skills .h1::after,
  #projects .h1::after,
  #contact .h1::after {
    bottom: 0;
  }

  .name {
    padding: 1px;
    font-size: 1.5;
    letter-spacing: 0.25rem;
  }

  .name span {
    width: 20px;
    height: 100px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 5px;
  }

  .bio {
    width: 270px;
    font-size: 1.4rem;
  }

  .pic {
    height: 250px;
    width: 250px;
    position: absolute;
    top: 100px;
    right: 0;
    margin: 10px;
    z-index: -1;
  }

  .about-text {
    top: 0;
    gap: 1.25rem;
    margin: 20px;
    width: 90vw;
  }

  .heading::after {
    left: 20%;
    width: 120px;
  }

  .lg::after {
    left: 40%;
  }

  .skills-container,
  .projects-container {
    margin: 10px;
    padding: 10px;
  }

  .projects-container {
    grid-template-columns: repeat(2, auto);
  }

  .contact {
    grid-template-columns: repeat(3, auto);
  }

  .contact div button {
    padding: 10px;
  }

  .contact div button a svg {
    height: 32px;
    width: 32px;
  }

  .contact div button a span {
    font-size: 1.5rem;
  }

  form {
    width: 90vw;
    padding: 10px;
  }

  form input {
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  /* header */

  header,
  footer {
    width: 100vw;
  }

  header nav {
    display: none;
  }

  .open-sidebar {
    display: block;
    margin-inline: 20px;
    cursor: pointer;
    fill: var(--dark-text);
  }

  .open-sidebar:is(:hover, :active) {
    transform: scale(1.4);
    color: var(--hover-bg);
    background-color: var(--bg-color);
  }

  /* aside */
  aside {
    display: none;
    height: 60vh;
    width: 50px;
    background-color: #d2d8ea;
    border: 1px solid #d2d8ea;
    right: 10vw;
    position: fixed;
    top: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    gap: 10px;
    border-radius: 20px;
    z-index: 100;
    transition: 0.3s;
    box-shadow: 0 0 10px #d2d8ea;
  }

  aside .svg-group {
    width: 100%;
    height: 30%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-direction: column;
    gap: 10px;
  }

  aside .svg-group svg {
    transition: 0.5s;
  }

  aside .svg-group .full-sidebar {
    transform: rotate(180deg);
  }

  aside .svg-group svg:is(:hover, :active) {
    background-color: var(--accent-color);
    fill: var(--light-text);
    transform: scale(1.5);
    border-radius: 20px;
  }

  aside .svg-group .full-sidebar {
    transform: rotate(180deg);
  }

  aside .svg-group .full-sidebar:is(:hover, :active) {
    background-color: var(--accent-color);
    fill: var(--light-text);
    transform: scale(1.5) rotate(180deg);
  }

  aside .svg-group .half-sidebar {
    display: none;
  }

  hr {
    height: 10px;
    width: 100%;
    background-color: #ffffff08;
  }

  aside .nav-box {
    width: 100%;
    height: 70%;
  }

  aside .nav-box ul {
    width: 100%;
    display: grid;
    align-self: center;
    justify-content: center;
    grid-template-rows: auto;
    gap: 10px;
  }

  aside .nav-box ul li {
    width: 100%;
    list-style-type: none;
  }

  aside .nav-box ul li a {
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid var(--hover-bg);
    padding-inline: 5px;
    transition: 0.5s;
  }

  aside .nav-box ul li a:is(:hover, :active) {
    animation: grow 2s linear;
    border-bottom: none;
    border-inline: 1px solid;
    background-color: var(--accent-color);
  }

  aside .nav-box ul li a:is(:hover, :active) svg {
    fill: var(--dark-text);
  }

  aside .nav-box ul li a svg {
    fill: var(--accent-color);
    height: 28px;
    width: 28px;
  }

  aside nav ul li a span {
    display: none;
  }

  .full-sidebar-svgGroup {
    width: 100%;
    height: 15%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: row;
    gap: 20px;
  }

  .full-sidebar-svgGroup svg {
    transition: 0.5s;
    cursor: pointer;
  }

  .full-sidebar-svgGroup svg:is(:hover, :active) {
    background-color: var(--accent-color);
    fill: var(--light-text);
    transform: scale(1.3);
    border-radius: 20px;
  }

  .full-sidebar-navBox {
    height: 100%;
    width: 100%;
  }

  .full-sidebar-navBoxUl {
    height: 110%;
    display: grid;
    align-self: center;
    justify-content: center;
    grid-template-rows: auto;
    gap: 20px;
    position: relative;
    top: 0;
  }

  .full-sidebar-navLink {
    width: 100%;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
    border-bottom: 3px solid var(--dark-text);
    transition: 0.5s;
  }

  .full-sidebar-navLink:is(:hover, :active) {
    transform: scale(1.1);
    background-color: var(--hover-bg);
    color: var(--light-text);
    border-bottom: none;
    border-inline: 1px solid;
    border-radius: 1000px;
  }

  .full-sidebar-navIcon {
    height: 32px;
    width: 32px;
  }

  .full-sidebar-navText {
    letter-spacing: 5px;
  }

}

@media screen and (max-width: 500px) {


  #home .h1,
  #about .h1,
  #skills .h1,
  #projects .h1,
  #contact .h1 {
    font-size: 2.5rem;
    letter-spacing: 0.4rem;
  }

  #home .h1::after,
  #about .h1::after,
  #skills .h1::after,
  #projects .h1::after,
  #contact .h1::after {
    bottom: 0;
    width: 90%;
  }

  #about {
    display: none;
  }

  #projects .h1::after,
  #contact .h1::after {
    display: none;
  }

  #projects .h1,
  #contact .h1 {
    text-align: center;
    left: 0;
    
  }

  .bio .desktop {
    display: none;
  }

  .bio .mobile {
    position: relative;
    top: 10px;
  }

  .bio .mobile::before {
    content: "";
    height: 110%;
    width: 110%;
    position: absolute;
    z-index: -2;
  }

  .bio .mobile::after {
    content: "";
    color: var(--bg-color);
    background: linear-gradient(135deg, #0f1724 0%, #071021 100%);
    letter-spacing: 3px;
    width: 50%;
    margin-left: 2%;
    border-radius: 20px;
    padding: 5px;
    text-transform: capitalize;
    transition: 0.3s;
    animation: typing 10s linear infinite;
  }

  .pic {
    height: 150px;
    width: 150px;
    margin: 10px;
    top: 110px;
    z-index: -1;
  }

  .about-text {
    display: none;
  }

  #projects,
  #skills {
    padding: 5px;
  }

  
  #skills .h1::after {
    width: 50%;
  }

  .skills-container{
    grid-template-columns: auto-fit;
  }

  .skill-title {
    font-size: 1rem;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .project-card {
    font-size: 0.8rem;
  }

  .project-title {
    font-size: 1rem;
    font-weight: 700;
  }

  .btn-group .source-code {
    font-size: 0.7rem;
  }

  .contact div button a svg {
    height: 16px;
    width: 16px;
  }

  .contact div button a span {
    font-size: 0.8rem;
  }

  form .form-group {
    flex-direction: column;
  }

  @keyframes typing {
    0% {
      content: "Web Developer";
      background: linear-gradient(
        to bottom right,
        var(--dark-text),
        var(--accent-color)
      );
      color: var(--bg-color);
    }
    20% {
      content: "Graphic Designer";
      background: linear-gradient(
        to top right,
        var(--accent-color),
        var(--dark-text)
      );
    }
    40% {
      content: "Tech Enthusiast";
      background: linear-gradient(
        to top left,
        var(--hover-bg),
        var(--bg-color)
      );
      color: var(--bg-color);
    }
    80% {
      content: "Content Creator";
      background: linear-gradient(
        to bottom left,
        var(--bg-color),
        var(--hover-bg)
      );
      color: var(--bg-color);
    }
    100% {
      content: "Gamer";
      background: linear-gradient(90deg, var(--light-text), var(--text-color));
      color: var(--dark-text);
    }
  }
}
 