@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

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

/* background */
html {
  background-color: #fafafa;
}

body {
  display: flex;
  flex-direction: column;
  font-family: "Barlow", sans-serif;
  min-height: 100vh;
  width: 100%;
  margin: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* typography */

h1 {
  font-size: 1.75rem;
  margin: 0;
}

h2 {
  font-size: 1.5rem;
  display: inline-block;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

p {
  font-size: 1rem;
  line-height: 1.6em;
  margin-bottom: 1rem;
}

li {
  font-size: 1rem;
  line-height: 1.6rem;
  margin: 0.5em 0;
}

ul {
  list-style-type: disc !important;
  margin-bottom: 2rem;
}
ul ul {
  list-style-type: circle;
  margin-bottom: 1rem;
  margin-left: 1rem;
}

.project-post > ul,
.article-post > ul {
  padding-left: 1rem;
}

hr {
  height: 1px;
  background-color: #0d0d0d0d;
  border: none;
  margin: 2rem 0;
}

/* table styling */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
}

th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

td {
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
}

/* Remove last row bottom border */
tr:last-child td {
  border-bottom: none;
}

/* Subtle hover effect */
tbody tr:hover {
  background-color: #f3f4f6;
  transition: background-color 0.2s ease;
}

/* header nav */

.site-header {
  display: flex;
  flex-direction: row;
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  justify-self: center;
  margin: auto;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 0 1.25em;
  margin: auto;
}

.logo {
  width: 2.5em;
  height: 2.5em;
}

.logo-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1em;
}

nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fafafa;
}

/* enables nav when menu is toggled */
nav.open {
  display: flex;
}

nav a {
  display: flex;
  color: #090909;
  text-decoration: none;
  font-size: 1rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding-left: 5em;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

nav ul li {
  display: inline;
  margin: 0 0.5em;
}

/* Hamburger Button */
.menu-toggle {
  background: none;
  border: none;
  display: inline-block;
  cursor: pointer;
  padding: 10px;
  z-index: 1100;
}

/* Hamburger Icon */
.hamburger {
  width: 25px;
  height: 3px;
  background-color: #333;
  display: block;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.menu-toggle .hamburger,
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  display: block;
  height: 3px;
  width: 25px;
  background-color: black;
  transition: all 0.3s ease;
  position: relative;
}

.menu-toggle .hamburger::before {
  position: absolute;
  top: -8px;
}

.menu-toggle .hamburger::after {
  position: absolute;
  top: 8px;
}

/* Exit Icon for menu */

.close-icon {
  position: relative;
  display: block;
  width: 25px;
}

/* Reuse your same base line styles */
.menu-toggle .close-icon::before,
.menu-toggle .close-icon::after {
  content: "";
  display: block;
  height: 3px;
  width: 25px;
  background-color: #bf1721;
  transition: all 0.3s ease;
  position: absolute;
  top: 50%;
  left: 0;
  transform-origin: center;
}

/* diagonal lines of the 'x' button */
.menu-toggle .close-icon::before {
  transform: rotate(90deg) translateY(-20%);
}

.menu-toggle .close-icon::after {
  transform: rotate(-180deg) translateY(-180%);
  top: -8px;
}

/* toggle visibility */

.menu-toggle .hamburger {
  display: block;
}

.menu-toggle.active .hamburger {
  display: none;
}

.menu-toggle .close-icon {
  display: none;
}

.menu-toggle.active .close-icon {
  display: block;
}

body {
  min-height: 100vh;
  box-sizing: border-box;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin: 0 auto 3em auto;
}

/* layout for main section */
.main-section {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

/* layout for hero */

.hero {
  width: 100%;
  margin-top: 7em;
  padding: 1rem;
}

/* featured article layout */

.featured-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 18em;
  margin-top: 7.8em;
  margin-left: 1rem;
  margin-right: 1rem;
  gap: 2em;
}

.featured-section .article-header,
.featured .article-header a {
  color: #fafafa;
}

.featured .article-header a {
  text-decoration: #fafafa underline;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 4px;
}

.featured-intro {
  flex: 1;
}

.featured {
  flex: 1;
  height: 100%;
  padding: 2rem;
  background-color: #064dd9;
  border-radius: 6px;
}

.featured .article-meta {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1em;
}

/* styling article list layout */

.article-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1em;
  margin: 1em auto;
  padding: 1rem;
}

.article-list h1 {
  margin-bottom: 1em;
}

.article-list li {
  display: block;
  margin-bottom: 1rem;
  transition: background-color 0.2s ease;
}

/* Indidivual Article Entry Layout */

.article {
  display: flex;
  justify-content: center;
}

.article-post {
  max-width: 80%;
  margin: 7.5em 1.5em;
  line-height: 1.6;
}

.article-post h1,
.article-post h2 {
  margin-bottom: 1em;
}

/* Image Wrapper */
.styled-image {
  display: block;
  margin: 1em auto;
  max-width: 100%;
  text-align: center;
}

.image {
  max-width: 75%;
  height: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 3em auto;
}

.styled-image figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

/* styling post */

.post {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: 2.5em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  background-color: #fff;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-header h2,
.article-header a {
  text-decoration: none;
}

.main-section .article-header a {
  color: #090909;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1em 0;
}

.article-date,
.entry-article-date {
  font-size: 0.75em;
}

/* styling article layout */

.article-img {
  height: 200px;
  height: 200px;
  object-fit: cover;
  box-shadow: 0 4px 6px 2px #f0f0f0;
  border-radius: 6px;
}

.article-img img {
  height: 100%;
  width: 100%;
}

/* multiple images */

.image-flex-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.image-flex-container .styled-image {
  flex: 1 1 100%;
}

/* view more section*/

.section-one {
  display: flex;
  align-content: center;
  justify-content: center;
  margin: 4em 0em;
}

.section-one a,
.project-meta-data li,
.project-meta-data a {
  text-decoration: none;
  list-style-type: none;
  color: #01233f;
  font-weight: 500;
  font-size: 18px;
}

/* hover state */

.featured-section .article-header a:hover,
.article-meta-data a:hover {
  text-decoration: underline;
  text-decoration-color: #01233f;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 4px;
}

.section-one a:hover,
.main-section .article-header a:hover,
.project-meta-data a:hover {
  text-decoration: underline;
  color: #01233f;
  text-decoration-color: #01233f;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 8px;
}

/* about */

.about {
  display: flex;
  flex-direction: column;
  gap: 2em;
  margin: 0 auto;
  line-height: 2em;
  margin-bottom: 5em;
  padding: 0 1rem;
}

.about-bio {
  margin: 2em 0em;
}

.reverse {
  flex-direction: row-reverse;
}

.about-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #e3f2fd;
  padding: 2em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  gap: 2em;
  max-width: 800px;
  margin: 0 auto;
}

.about-profile p {
  font-size: 1em;
}

.about-profile h1,
.about-text h2,
.about-text p {
  margin-bottom: 0.5em;
}

.about-profile-img img {
  border-radius: 50%;
  width: 100%;
  max-height: 250px;
  max-width: 250px;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.about-text h2 {
  color: #1b1b1b;
  background: #f0f0f0;
  padding: 0.5em 0.75em;
  border-radius: 6px;
}

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

.about-img img {
  width: 250px;
  height: 250px;
  flex-shrink: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: contain;
}

/* projects */
.projects {
  max-width: 80%;
  padding: 7em 1.5em;
}

.project-post h1 {
  margin-bottom: 2em;
}

.project-post h3,
.project-post h2,
.project-post p {
  margin: 0.5em 0em;
}

/* project layout styling */

.project-list {
  padding: 1rem;
}

.project-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0.75rem;
  background-color: #fff;
  box-shadow: 0 4px 6px 2px #f0f0f0;
  border-radius: 6px;
}

.project-featured-image img {
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 300px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  flex: 2;
  object-fit: cover;
  object-position: top;
}

.project-meta-data {
  width: 100%;
  flex: 3;
  padding: 1rem;
}

.project-meta-data li > a {
  text-decoration: none;
  list-style-type: none;
  color: #01233f;
}

/* article container and image */

.article-container {
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #fff;
  box-shadow: 0 4px 6px 2px #f0f0f0;
  border-radius: 6px;
}

.article-featured-image {
  flex: 3;
  width: 100%;
  height: 100%;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 300px;
  border-radius: 6px;
  flex: 2;
  object-fit: cover;
  object-position: top;
}

.article-meta-data {
  width: 100%;
  flex: 3;
  padding: 1rem;
  margin-bottom: 1rem;
}

.article-meta-data li > a {
  color: #01233f;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
}

/* footer */

footer {
  display: block;
  text-align: start;
  color: #fafafa;
  background-color: #01233f;
  padding: 2.25em 2.25em;
  gap: 2.25em;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  padding: 0 1.25em;
  margin: auto;
  text-align: center;
  align-items: center;
}

/* code block for .md file */

pre {
  background-color: #f7f7f8;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

pre code {
  background: none;
  padding: 0;
  border: 0;
  font-size: inherit;
  color: #1f2937; /* neutral dark gray text */
}

/* media query tablet layout */

@media (min-width: 651px) {
  /* hamburger menu */
  .menu-toggle {
    display: none;
  }
  nav {
    display: flex;
    width: auto;
    height: auto;
    position: static;
  }
  nav ul {
    flex-direction: row;
  }

  main {
    margin-bottom: 5em;
    max-width: 1200px;
  }

  .image-flex-container .styled-image {
    flex: 1 1 48%;
  }

  /* home page */

  .featured-section {
    flex-direction: row;
    gap: 2em;
  }

  /* about page */

  .about-profile {
    flex-direction: row;
  }

  /* projects page layout */
  .project-container {
    flex-direction: row;
  }
  .project-featured-image {
    flex: 1;
  }
  .project-meta-data {
    flex: 2;
    align-self: start;
  }

  /* articles page layout */

  .article-container {
    flex-direction: column;
  }

  .article-featured-image img {
    border-radius: 6px 6px 0px 0px;
  }

  /* footer */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* media query desktop layout */

@media (min-width: 980px) {
  /* home page */
  .featured-section {
    min-height: 400px;
  }

  .main-section {
    flex-direction: row;
    gap: 1em;
  }

  main {
    display: flex;
    flex-direction: column;
  }

  /* about page */
  .about-bio {
    display: flex;
    gap: 2em;
  }
  .about-text {
    line-height: 2em;
    margin-bottom: 1em;
    flex: 1 75%;
  }

  .secondary-info {
    width: 100%;
    margin: auto;
  }

  /* projects */

  .projects .post {
    flex-direction: row;
    gap: 2em;
  }

  /* articles page layout */
  .article-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-container {
    flex-direction: column;
  }

  /* footer */
  .footer-inner {
    text-align: left;
  }
}
