* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}
body {
  position: relative;
}

#header {
  position: relative;
}

.img-header {
  display: flex;
  justify-content: center;
}

.img-header img {
  width: 1750px;
  height: 830px;
  filter: brightness(40%);
}

.header-info {
  color: white;
  position: absolute;
  left: 180px;
  top: 450px;
}

.header-info h1 {
  font-size: calc(2rem + 1.5vw);
  width: 35ch;
  padding-bottom: 1rem;
}

.header-info p {
  font-size: calc(1rem + 0.15vw);
}

.header-info .blog-title {
  width: 80ch;
  padding-bottom: 1rem;
  font-size: calc(1rem + 0.2vw);
  color: rgb(240, 233, 233);
  line-height: 1.7rem;
}

.header-info .author-info {
  display: flex;
  padding-top: 1rem;
  color: rgb(228, 224, 224);
}

.author-info span {
  padding: 0 2rem;
}
/* main blog */

#main-blog article {
  padding-top: 5rem;
  position: relative;
}

#main-blog h2,
#main-blog p,
#main-blog article a,
#main-blog ul,
#main-blog ol,
#main-blog h4,
#main-blog h3 {
  width: 730px;
  margin: auto;
}

#main-blog pre {
  width: 800px;
  overflow-x: scroll;
  margin: auto;
}

#main-blog h2 {
  font-size: 2rem;
}

#main-blog article h2 a {
  font-size: calc(1.5rem + 0.3vw);
  color: Black;
}

#main-blog p {
  font-size: calc(1.1rem + 0.2vw);
  line-height: 1.9rem;
  position: relative;
}

#main-blog article a {
  font-size: 1.2rem;
  line-height: 1.5rem;
  color: rgb(77, 76, 76);
}

#main-blog ul {
  font-size: calc(1.1rem + 0.2vw);
  line-height: 1.6rem;
  padding-left: 3rem;
}

#main-blog img {
  width: 900px;
  object-fit: cover;
  margin: auto;
  transform: translateX(-5.5rem);
}

#main-blog {
  position: relative;
}

/* blog social */
.social {
  padding-top: 3rem;
  margin-bottom: 5rem;
  display: flex;
  justify-content: center;
}

.social i {
  padding: 0 0.8rem;
  color: black;
}

.about-author {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 2rem;
}

.about-author img {
  display: inline-block;
  padding: 0;
  width: 155px;
  height: 150px;
  border-radius: 150px;
  position: relative;
  top: -3px;
}

.author-right {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  padding-left: 2rem;
  width: 600px;
}

/* buy me a coffee */
.buymeacoffee {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  transform: translateX(5rem);
}

/* blog comments */
.comment-header {
  font-size: calc(1rem + 1vw);
  padding: 2rem 0;
}

#all-comments {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: auto;
}

#name {
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border: none;
  outline: none;
  border-bottom: 1px solid #111;
  font-size: calc(1rem + 0.2vw);
}

#comment {
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  border: none;
  outline: none;
  border-bottom: 1px solid #111;
  font-size: calc(1rem + 0.2vw);
}

/* past commment */
#pastcomments {
  list-style-type: none;
}

#pastcomments li {
  font-size: calc(1rem + 0.2vw);
  padding: 2rem 1rem;
  border-bottom: 1px solid #111;
  border-top: 1px solid #111;
}

#pastcomments li i {
  padding-bottom: 1rem;
}

/* blog comments button */
#submit {
  padding: 1rem 3rem;
  border-radius: 1.5rem;
  background-color: rgb(111, 178, 223);
  border: none;
  color: white;
  margin-bottom: 2rem;
  cursor: pointer;
}

/* tablet mode */
@media screen and (min-width: 768px) and (max-width: 1040px) {
  .header-info {
    top: 350px;
    left: 50px;
  }

  .img-header img {
    width: 1500px;
    height: 730px;
  }

  .header-info h1 {
    width: 30ch;
  }

  .header-info .author-info {
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    color: rgb(228, 224, 224);
    width: 30ch;
  }

  .author-info span {
    display: none;
  }

  .author-info p {
    font-size: 1rem;
    padding-top: 0.5rem;
  }
  .author-info span {
    padding: 0 0.3rem;
  }
}

/* landscape mode */
@media screen and (min-width: 1041px) and (max-width: 1700px) {
  .header-info {
    top: 350px;
    left: 100px;
  }

  .img-header img {
    width: 1500px;
    height: 730px;
  }

  #main-blog h2,
  #main-blog p {
    width: 600px;
  }

  #main-blog img {
    width: 650px;
    transform: translateX(-2.2rem);
  }
}

/* mobile mode */
@media screen and (max-width: 767px) {
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .header-info {
    top: 100px;
    left: 10px;
  }

  .img-header img {
    width: 1500px;
    height: 730px;
  }

  .header-info h1 {
    width: 355px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .header-info .blog-title {
    width: 35ch;
    max-width: 100%;
    line-height: 1.5rem;
    color: rgb(212, 208, 208);
  }

  .author-info p {
    font-size: 0.9rem;
    padding-top: 0.5rem;
  }
  .author-info span {
    padding: 0 0.3rem;
  }

  .header-info .author-info {
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    color: rgb(228, 224, 224);
    width: 30ch;
  }

  .author-info span {
    display: none;
  }
  /* blog article */

  #main-blog h2,
  #main-blog p,
  #main-blog pre,
  #main-blog h3,
  #main-blog h4,
  #main-blog a {
    width: 300px;
  }

  #main-blog img {
    width: 320px;
    transform: translateX(-0.5rem);
  }

  /* author section */
  .about-author {
    flex-direction: column;
  }

  .author-right {
    text-align: center;
    width: 50ch;
    padding: 0 3rem;
  }

  .buymeacoffee {
    transform: translateX(1rem);
  }

  .social {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform: translateX(1rem);
  }
  /* comment section */
  .name label,
  .comment label,
  .comment-header {
    margin: 0 1rem;
  }

  #name {
    margin: 1rem;
  }

  #comment {
    margin: 1rem;
  }

  #submit {
    margin: 0 1rem 2rem 1rem;
  }
}
