html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
}
header {
  margin: 0;
  padding: 0;
  background-color: blueviolet;
  position: sticky;
  top: 0px;
  overflow: hidden;
  z-index: 1;
}
header nav {
  display: flex;
  justify-content: center;
  align-items: center;
}
header nav span ul {
  background-color: #db5856;
  border-radius: 4px;
  padding: 5px;
}
.contact {
  background-color: #db5856;
  border-radius: 4px;
  padding: 3px;
  text-decoration: none;
  font-size: large;
  border: 1px solid #db5856;
}
.contact:hover {
  background-color: rgb(38, 37, 37);
  border: 1px solid #db5856;
  border-radius: 4px;
  padding: 3px;
  text-decoration: none;
  font-size: large;
  transition: 1s;
}
.cv {
  border: 1px solid #db5856;
  border-radius: 4px;
  padding: 3px;
  text-decoration: none;
  font-size: large;

  text-align: center;
}
.cv:hover {
  background-color: #db5856;
  border-radius: 4px;
  padding: 3px;
  text-decoration: none;
  font-size: large;
  transition: 1s;
}
header nav span ul:hover {
  background-color: rgb(104, 24, 24);
  border-radius: 4px;
  transition: 1s;
}
ul {
  list-style: none;
  padding: 5px;
  margin: 10px;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}
header nav a {
  text-decoration: none;
}

header nav ul:hover {
  transition: 50ms;
  background-color: orange;
  border-radius: 4px;
}
#home {
  background-color: rgb(38, 37, 37);
  height: 100vh;
}
#about {
  background-color: rgb(38, 37, 37);
  height: 100vh;
}
#skills {
  background-color: rgb(38, 37, 37);
  height: 100vh;
}
#contact {
  background-color: rgb(38, 37, 37);
  height: 100vh;
}
main section div {
  display: flex;
  flex-direction: row;
  color: white;
  gap: 30px;
  width: 80vw;
  margin: auto;
  padding-top: 10vh;
 
}
.contact-info {
  margin: 0%;
  display: block;
  width: 100%;
}
main section div div {
  width: 50%;
  padding: 10px;
  gap: 20px;
  font-size: 1.1rem;
  line-height: 1.5;
}
a {
  color: white;
}
main section div img {
  width: 30vw;
  height: fit-content;
}
img.img2 {
  position: relative;
  top: -100px;
  object-fit: cover;
  object-position: center top;
}
main section {
  margin: auto;
}
main section div div h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}
.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.name {
  display: block;
  font-size: 3.5rem;
  color: blueviolet;
  font-weight: 700;
  letter-spacing: 1px;
}
.sdiv {
  display: inline-block;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.last {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
footer {
  background-color: blueviolet;
  height: 10vh;
}
i {
  margin: 1vw 4vw;
  color: white;
}
i:hover {
  color: #db5856;
  transition: 1s;
  cursor: pointer;
}
.icons {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: xx-large;
}
footer p {
  text-align: center;
  color: white;
  margin: 0%;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  
}
input {
  display: block;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #db5856;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.75rem;
  transition: 0.3s;
  margin: 0;
  width: 100%;
}
input:focus {
  outline: none;
  border-color: blueviolet;
  box-shadow: 0 0 5px rgba(138, 43, 226, 0.3);
}
textarea {
  display: block;
  width: 99%;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #db5856;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  transition: 0.3s;
}
textarea:focus {
  outline: none;
  border-color: blueviolet;
  box-shadow: 0 0 5px rgba(138, 43, 226, 0.3);
}
button {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid #db5856;
  border-radius: 4px;
  background-color: #db5856;
  color: white;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: 0.3s;
}
button:hover {
  background-color: rgb(38, 37, 37);
  border: 1px solid #db5856;
  border-radius: 4px;

  text-decoration: none;
  transition: 1s;
}
.contact-box {
  display: flex;
  justify-content: center;
  flex-direction: column;
  background-color: #db5856;
  border: 1px;
  border-radius: 20px;
  height: 35vw;
  margin: auto 1rem;
}
.contact-info {
  margin: 0%;
  display: block;
}
.contact-info i:hover {
  color: white;
}
.contact-info i {
  color: white;
  margin: 5px;
  font-size: x-large;
}
.piechart {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-image: conic-gradient(pink 70deg, lightblue 0 235deg, orange 0);
}
.html {
  background-color: pink;
  width: 30px;
  height: 30px;
  border-radius: 10%;
}
.css {
  background-color: lightblue;
  width: 30px;
  height: 30px;
  border-radius: 10%;
}
.js {
  background-color: orange;
  width: 30px;
  height: 30px;
  border-radius: 10%;
}
.pi {
  display: inline-block;
}
.chart {
  display: block;
}
.abt {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.block {
  display: block;
  width: 100%;
}
.sec-img {
  position: relative;
  z-index: 0;
  transform: scaleX(-1);
  right: 20%;
}
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #db5856;
  color: white;
  border: none;
  bottom: 75px;
  padding: 10px 15px;
  font-size: 18px;
  cursor: pointer;
  display: none;
}
.back-to-top:hover {
  background-color: rgb(38, 37, 37);
  transition: 1s;
  padding: 10px 15px;
  font-size: 18px;
}
i {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}
.myinfo {
  width: 30rem;
  font-size: 1.5rem;
}
.info-pag {
  font-size: 1.15rem;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: #f0f0f0;
}
textarea,
textarea::placeholder {
  font: large sans-serif;
}
.message {
  flex-direction: column;
  width: 99%;
  padding: 10px 0px;
}
.img1 {
  position: relative;
  margin-left: 5px;
}
.name {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid blueviolet;
  animation: typewriter 2s steps(13) forwards,
    cursor 0.4s step-end infinite alternate;
}
@keyframes cursor {
  50% {
    border-right-color: transparent;
  }
}
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 8em;
  }
}
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.img1:hover {
  background-image: conic-gradient(
    from var(--angle),
    rgb(255, 7, 48),
    rgb(174, 0, 255),
    rgb(0, 255, 47)
  );
  z-index: 1;
  padding: 5px;
  border: 10px;

  animation: 3s spin infinite linear;
  border-radius: 50%;
}
@keyframes spin {
  from {
    --angle: 0deg;
  }
  to {
    --angle: 360deg;
  }
}
.img1:hover {
  box-shadow: 0 0 20px rgba(69, 231, 91, 0.6);
}

/* for 1080px */
@media (max-width: 1080px) {
  body {
    width: 100vw;
    margin: auto;
  }
  main section div div h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    line-height: 1.3;
  }
  main section div {
    display: flex;
    /* flex-direction: row; */
    color: white;
    width: 80vw;
    justify-content: center;
    gap: 30px;
    height: fit-content;
    margin: auto;
    /* padding-top: 20vh; */
  }
  .message {
    flex-direction: column;
    /* width: 99%; */
    /* padding: 10px 0px; */
  }
  form {
    margin: 0;
  }
  
  .contact-info i {
    font-size: large;
  }
  main section div img {
    width: 30vw;
    height: fit-content;
  }
  main section div div {
    font-size: 1rem;
    width: 100%;
    padding: 10px 0px;
 
  }
  .last {
    width: auto;
  }
  div.block p {
    padding: 0;
    font-size: 1.2rem;
    width: 35vw;
  }
  .info-pag {
    font-size: 1rem;
  }
  .name {
    font-size: 3rem;
  }

  .img1 {
    margin: auto;
  }
  .cv {
    width: 100px;
  }
}
/* for the 768px device */
@media (max-width: 768px) {
  div.contact-box {
    flex-direction: column;
    height: auto;
    width: auto;
  }
   
  .message {
    display: flex;
    flex-direction: row !important;
    width: 99%;
    padding: 10px 0px;
  }

  main section div {
    padding: 5vh;
  }

  header nav {
    height: 50px;
  }
  main section div div {
    font-size: 1rem;
    line-height: 1;
  }
  .contact-info i {
    font-size: medium;
  }
  input {
    margin-bottom: 5px;
  }
  textarea {
    padding: revert;
  }
  .pi {
    padding: 0;
  }
  .chart {
    margin: 0;
  }
  .piechart {
    margin: 0;
  }
  div.block p {
    width: 20rem;
    font-size: 1rem;
  }
  .info-pag {
    font-size: 1rem;
    line-height: 1.5;
  }

  #contact div {
    flex-direction: column;
  }
  #contact div div.sdiv {
    width: 100%;
    padding: 0;
  }
  #contact div div.contact-info {
    padding: 0;
  }
  #contact div div.contact-box {
    margin: 1rem 0;
  }
}
@media (min-width: 500px) and (max-width: 768px) {
  input{
    width: 100%;
  }
      .footer {
        flex-direction: column;
        height: 4.4em;
        display: flex;
        text-align: center;
        /* align-items: center; */
        justify-content: center;
    }
}
@media (max-width: 500px) {
  .footer {
    flex-direction: column;
    height: 4.4em;
    display: flex;
    text-align: center;
    /* align-items: center; */
    justify-content: center;
  }
  input{
    padding: 5px 0;
    margin: 2px 0;
  }
  .message{
    flex-direction: column !important;
    width: 99%;
    padding: 10px 0px;
  }

  main section div {
    font-size: 0.5rem;
    flex-direction: column-reverse;
  }

  header nav {
    height: 50px;
    font-size: 30px;
    float: right;
  }
  

  .sec-img {
    display: none;
  }
  footer p {
    font-size: small;
  }
  .sdiv {
    width: 80vw;
    height: fit-content;
    padding: 0;
  }
  .piechart {
    width: 100px;
    height: 100px;
  }
  .abt {
    margin: 0;
  }

  img.img2 {
    display: none;
  }
  .name {
    font-size: 2.5rem;
  }
  div.block p {
    width: auto;
    font-size: 1rem;
  }
  main section div div {
    width: 100%;
  }
  .block {
    padding: 0;
  }
  .abt {
    padding: 0;
  }
  p.myinfo {
    width: fit-content;
  }
  .contact-box {
    width: 76vw;
    margin: revert;
  }

  ul {
    text-align: center;
    font-size: small;
  }
  .last {
    gap: 15px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: row;
  }
  div.icons {
    font-size: 1.5rem;
  }
  i {
    margin: auto 1rem;
  }
}

/* responsive nav bar */
.topnav .icon {
  display: none;
}
@media screen and (max-width: 500px) {
  .topnav a {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }

  .topnav.responsive {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    float: none;
  }
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
    height: 50px;
  }
}
