/* MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}
/*** ROOT STYLES ***/
:root {
  font-size: 16px;
}
/* ALL ELEMTENTS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Roboto", Verdana, system-ui, Tahoma, Helvetica;
}

/*** ACCESSIBILITY: SKIP TO MAIN CONTENT ***/
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: #000;
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

/*** FLEXBOX STYLES ***/
.d-flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.justify-content-space-between {
  justify-content: space-between;
}
.justify-content-space-evenly {
  justify-content: space-evenly;
}
.justify-content-center {
  justify-content: center;
}
.justify-content-space-around {
  justify-content: space-around;
}
.align-items-center {
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
body {
  color: black;
  line-height: normal;
  min-height: 100%;
}

/*** UNDERLINE FOR EMPHASIS ***/
.underline {
  text-decoration: underline;
}
/**** HIGHLIGHTS ****/
.highlight {
  color: #166416;
  font-weight: 700;
}

/*** External link styles ***/
.project a {
  font-size: 1.3rem;
}
.project a,
#blog a {
  color: blue;
}
#blog a {
  font-weight: 400;
}
article i {
  margin-left: 10px;
}

/*** HEADER STYLES ***/
header h1 {
  width: 100%;
  height: 80px;
  background-color: #fafdff;
  padding: 1rem 1.75rem;
  color: #1b1b1b;
}
header h1 .my-name-header {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}
header h1 .focus {
  font-weight: 400;
  font-size: 1.5rem;
  padding-top: 10px;
}
.navbar {
  width: 100%;
  height: 60px;
  position: relative;
  font-size: 1.2rem;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px;
  z-index: 999;
}
.navbar.fixed {
  position: fixed;
  top: 0;
}
nav > ul {
  height: 100%;
  padding: 0.2rem;
}
nav > ul > li {
  color: black;
  margin: 0 0.2rem;
  padding: 0.2rem;
  display: block;
}

nav > ul > li > a:visited {
  color: blue;
}
nav > ul > li > a:hover {
  color: green;
}
nav > ul > li > a:active {
  color: green;
}

@media (max-width: 900px) {
  header h1 {
    display: none !important;
  }
}
@media (max-width: 320px) {
  .navbar {
    font-size: 1rem;
  }
}

/*** MAIN STYLES ***/
main {
  padding-top: 20px;
  background-color: #fafdff;
}

/*** ABOUT SECTION ***/
.about-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 70px 60px 60px;
}
@media (max-width: 700px) {
  .about-wrapper {
    padding: 70px 40px 60px;
  }
}
@media (max-width: 425px) {
  .about-wrapper {
    padding: 70px 30px 60px;
  }
}
.container-about-content {
  margin: 0 auto;
  width: 95%;
}
.container-about-image {
  width: 35%;
  height: auto;
}
#about img {
  width: 95%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}
#about a {
  color: blue;
}
.container-about-text {
  width: 60%;
  max-width: 675px;
  /* padding: 0 10px; */
}
.my-name-about {
  font-weight: 700;
}
.context-about-me {
  font-size: 1.25rem;
}

@media (max-width: 900px) {
  .container-about-image {
    width: 65%;
  }
  .container-about-text {
    width: 100%;
    padding: 50px 0 20px;
  }
}
@media (max-width: 700px) {
  .container-about-image {
    width: 75%;
  }
}
@media (max-width: 425px) {
  .container-about-image {
    width: 85%;
  }
}
.container-about-text h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #026bd3;
}
.container-about-text h3 {
  font-size: 1.65rem;
  margin-bottom: 10px;
  color: #026bd3;
}
.container-about-text p {
  line-height: 1.5;
  width: 100%;
}
.container-about-text p {
  margin-bottom: 1rem;
}
/*** override the previous style for the last paragraph of each part of the about section ***/
.container-about-text .first-part p:last-of-type {
  margin-bottom: 1.5rem;
}
.container-about-text .second-part p {
  margin-bottom: 0;
}

/*** PROJECTS SECTION ***/
#projects {
  width: 100%;
  padding: 90px 20px 60px;
  background-color: #b9e6ff;
}
#projects h2 {
  text-align: center;
  margin: 0 auto 40px;
  padding: 0 30px;
  font-size: 2rem;
  color: #292929;
}
.projects-wrapper {
  width: 100%;
}
.project {
  width: 65%;
  margin-bottom: 5rem;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
/*** override margin bottom for last project ***/
.project:last-child {
  margin-bottom: 2.5rem;
}
.project figcaption {
  background: #fafdff;
  height: auto;
  padding: 2rem 1rem;
  width: 100%;
}
.project figcaption .project-title {
  font-size: 1.5rem;
  font-weight: 700;
}
.project figcaption .tech {
  font-weight: 700;
}
.project figcaption p {
  margin-top: 0.75rem;
  font-size: 1.1rem;
}
.project figcaption p:nth-of-type(2) {
  margin-top: 1rem;
}
.project figcaption p a {
  margin-right: 10px;
}
.projects-wrapper img {
  width: 100%;
  height: auto;
}

@media (max-width: 1000px) and (min-width: 700px) {
  .project {
    width: 80%;
  }
}
@media (max-width: 699px) {
  .project {
    width: 95%;
  }
}

/*** SKILLS SECTION ***/
#skills {
  width: 100%;
  padding-top: 90px;
  background-color: #fafdff;
}
#skills h2 {
  text-align: center;
  margin: 0 auto 40px;
  padding: 0 30px;
  font-size: 2rem;
  color: #026bd3;
}
.skills-wrapper {
  width: 100%;
  padding: 0 20px 60px;
}
.container-skills-content {
  width: 90%;
  margin: 0 auto;
}
.container-skills-content {
  gap: 40px;
}
.container-skills-content .cards {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  padding: 20px;
  width: 30%;
  height: 350px;
}
.container-skills-content .cards h3 {
  color: #000;
  font-size: 18px;
  margin-bottom: 20px;
  font-size: 1.75rem;
  height: 70px;
}
.container-skills-content .cards ul {
  list-style: none;
  padding: 0;
  font-size: 1.2rem;
}

.container-skills-content .cards li {
  margin-bottom: 5px;
}
@media (max-width: 1031px) and (min-width: 650px) {
  .container-skills-content .cards {
    width: 45%;
  }
  .container-skills-content .cards h3 {
    height: auto;
  }
}
@media (max-width: 649px) {
  .container-skills-content .cards {
    width: 100%;
  }
  .container-skills-content .cards h3 {
    height: auto;
  }
}

/*** BLOG SECTION ***/
#blog {
  width: 100%;
  padding: 90px 0 60px;
  background-color: #b9e6ff;
}
#blog h2 {
  text-align: center;
  margin: 0 auto 40px;
  font-size: 2rem;
  color: #292929;
  padding: 0 30px;
}
#blog article {
  height: 400px;
  width: 70%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  padding: 0 50px;
  margin: 0 auto 40px;
  background-color: #fafdff;
}

#blog article .description {
  width: 60%;
}
#blog article .description h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
#blog article .description p {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
#blog article .description h3,
#blog article .description p {
  line-height: 1.4;
}

#blog article .date {
  font-size: 1.2rem;
  font-weight: 700;
  word-spacing: 4px;
}
@media (max-width: 800px) {
  #blog article {
    flex-direction: column-reverse;
    justify-content: space-evenly;
    align-items: flex-start;
    height: auto;
    padding: 2.5rem;
    overflow: hidden;
  }
  #blog article .description {
    width: 100%;
  }
  #blog article .date {
    margin-bottom: 10px;
  }
}
@media (max-width: 600px) {
  #blog article {
    width: 90%;
  }
}
@media (max-width: 425px) {
  #blog article {
    padding: 3rem 1rem;
  }
}

/*** CONTACT SECTION ***/
#contact {
  width: 100%;
  padding: 90px 0 100px;
}
#contact h2 {
  text-align: center;
  margin: 0 auto 40px;
  padding: 0 30px;
  font-size: 2rem;
  width: 80%;
  color: #026bd3;
}

#contact .form-wrapper {
  background-color: #b9e6ff;
  width: 70%;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  padding: 60px 40px;
  overflow: hidden;
  /* position: relative; */
}
#contact form {
  margin: 0 auto;
  width: 100%;
  max-width: 550px;
  /* position: relative; */
}
#contact label {
  display: block;
  font-size: 1.5rem;
  margin: 0.5rem 0;
}
#contact input,
textarea {
  width: 100%;
  margin: 5px 0 15px 0;
  border-radius: 5px;
  border: 1.5px solid #292929;
  padding: 0.375rem;
  min-height: 3.2em;
  background-color: #fafdff;
}
#contact #submit {
  display: block;
  background-color: #026bd3;
  min-height: 3em;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  width: 35%;
  margin: 0 auto;
  box-shadow: 0 0.3rem 0 #003d79;
  border: none;
  cursor: pointer;
}
@media (max-width: 900px) {
  #contact .form-wrapper {
    border: none;
    box-shadow: none;
    background-color: #fafdff;
    width: 100%;
    padding: 0 20px 10px;
    /* padding-bottom: 0; */
  }
}
@media (max-width: 620px) {
  #contact input,
  textarea,
  #submit {
    width: 100%;
  }
}
@media (max-width: 400px) {
  #contact #submit {
    width: 50%;
  }
}

/* FOOTER */
footer {
  width: 100%;
  background-color: #026bd3;
  padding: 2rem;
  color: #ffffff;
  position: relative; /* Added to position children absolutely in relation to footer */
}
.footer-content {
  height: 100%;
}
.copyright {
  font-size: 1.2rem;
  font-weight: 700;
}
.copyright i {
  color: #fff;
}

/* Align external links to the right */
footer .external {
  position: absolute; /* Position it absolutely to place it on the right */
  right: 3%; /* Align to the right edge */
  font-size: 1.2rem;
}
footer .external a,
footer .external i {
  color: #fff;
  padding: 0 5px; /* Adjusted padding for spacing */
}
footer .external i {
  font-size: 2.5rem; /* Icon size */
}
footer .external i:hover {
  cursor: pointer;
}

@media (max-width: 1024px) {
  .footer-content {
    flex-direction: column-reverse;
  }
  footer .external {
    position: static;
    margin-bottom: 20px;
    justify-content: center; /* Center the links on small screens */
  }
}
@media (max-width: 422px) {
  footer .external {
    flex-direction: column;
  }
  .external .social {
    margin-top: 20px;
  }
}

/*** Media query for h2 padding except about h2 ***/
@media (max-width: 425px) {
  #contact h2,
  #projects h2,
  #blog h2,
  #skills h2 {
    padding: 0 10px;
  }
}

/**************************/
/**** BLOG POST STYLES ****/
/**************************/

#blog-post {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 60px 60px;
}
#blog-post .post-title {
  /* text-align: center; */
  font-size: 2.25rem;
}
#blog-post .post-title i {
  color: #000;
}
#blog-post .post-meta {
  margin: 3rem 0 0.25rem;
  font-size: 1.2rem;
}

#blog-post .post-title,
#blog-post .post-meta {
  line-height: 1.5;
  text-align: center;
}
@media (max-width: 669px) {
  #blog-post {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 25px 60px;
  }
  #blog-post .post-meta {
    flex-direction: column;
  }
}
#blog-post img {
  width: 100%;
  border: solid 1px #000;
}
#blog-post figure {
  margin-bottom: 2rem;
}

#blog-post figcaption {
  margin-top: 0.25rem;
}
#blog-post h3 {
  font-size: 2rem;
  margin: 1rem 0 0.75rem;
}
#blog-post h4 {
  font-size: 1.75rem;
  margin: 1rem 0 0.75rem;
}
#blog-post h5 {
  font-size: 1.5rem;
  margin: 1rem 0 0.75rem;
}
#blog-post h3:first-child {
  margin-top: 1.75rem;
}
#blog-post p,
#blog-post ul,
#blog-post ol,
#blog-post pre {
  margin-bottom: 2rem;
  font-size: 1.2rem;
  line-height: 1.5;
}
#blog-post ul,
#blog-post ol {
  padding-left: 1rem;
}
#blog-post p {
  font-family: "MerriWeather", Verdana, system-ui, Tahoma, Helvetica;
}
#blog-post ul li:not(:last-child),
#blog-post ol li:not(:last-child) {
  margin-bottom: 1rem;
}
/*** CODE SNIPPETS STYLES ***/
pre {
  background-color: #f5f5f5; /* Light grey background */
  border: 1px solid #ddd; /* Add a border */
  border-left: 4px solid #f36d33; /* Add a thicker left border for emphasis */
  color: #333; /* Dark grey text */
  overflow-x: auto; /* Enable horizontal scrolling for long lines */
}
code {
  display: block; /* Ensure it fills the container */
  font-family: Consolas, "Courier New", monospace;
}

/*** EXTERNAL LINKS A TAGS ***/
#blog-post a {
  color: blue;
}
