/* RESET */

/* Remove default browser spacing; use border-box so padding doesn't add to element width */

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


/* BODY */
body {
  font-family: system-ui, -apple-system, sans-serif; /* Native system font stack */
  background-color: #2e2e2e; /* Dark gray background */
  color: #f5f5f5;            /* Off-white text */
  line-height: 1.6;          /* Comfortable reading spacing */
  overflow-y: auto;          /* Allow vertical scroll, prevent horizontal bleed */
}


/* FOOTER */
footer {
  background-color: #1f1f1f; /* Slightly darker than body */
  padding: 0.9rem 2rem;
  text-align: center;
}


/* GLOBAL LINKS */
a {
  color: #f5f5f5;
  text-decoration: none;
  transition: color 0.2s ease; /* Smooth color fade on hover */
}

a:hover {
  color: #949292; /* Muted gray on hover */
}


/* HEADER */
.header {
  position: fixed;          /* Sticks to top on scroll */
  top: 0;
  left: 0;
  width: 100%;
  background: #1f1f1f;
  padding: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Subtle drop shadow below header */
  z-index: 1000;            /* Always on top of other content */
  flex-wrap: wrap;
}


/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;           /* Center the navbar content */
  flex-wrap: wrap;
}


/* Header positioning controls for the home-page icons.
Change these values to move the page icons and social icons left/right or up/down. */
:root {

  /* Move the page icons group (blog/projects) left or right */
  --header-page-links-right: 46%;

  /* Move the social icons group (X/GitHub) left or right */
  --header-social-links-right: 5%;

  /* Move both icon groups up or down together */
  --header-links-top: 50%;

  /* Change the spacing between icons inside each group */
  --header-links-gap: 2.5rem;

  /* Change the size of all header icons */
  --header-icon-size: 1.60rem;
}


/* Page icon group in the header. Adjust `--header-page-links-right` above to move it. */
.page-links {
  display: flex;
  margin-left: auto;
  gap: var(--header-links-gap);
  align-items: center;
  position: absolute;
  right: var(--header-page-links-right);
  top: var(--header-links-top);
  transform: translateY(-50%);
}

.page-links a {
  color: #f5f5f5;
}

.page-links a:hover {
  color: #949292;
}


/* Social icon group in the header. Adjust `--header-social-links-right` above to move it. */
.social-links {
  display: flex;
  gap: var(--header-links-gap);
  align-items: center;
  position: absolute;
  right: var(--header-social-links-right);
  top: var(--header-links-top);
  transform: translateY(-50%);
}


/* Change `--header-icon-size` above to make every header icon bigger or smaller. */
.header-icon {
  font-size: var(--header-icon-size);
}


/* Burger button — hidden on desktop and shown only on mobile */
.burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
}

.burger:focus {
  outline: 2px solid #949292;
  outline-offset: 2px;
}


/* Burger hover: lines fade to the same muted gray as the links.
   Wrapped in (hover: hover) so touch screens don't leave it stuck gray after a tap. */
@media (hover: hover) {

  .burger:hover .burger-lines,
  .burger:hover .burger-lines::before,
  .burger:hover .burger-lines::after {

    background: #949292;
  }
}


/* Burger-lines: creates the three horizontal lines of the hamburger icon */

/* Uses ::before and ::after pseudo-elements for the top and bottom lines */
.burger-lines,
.burger-lines::before,
.burger-lines::after {

  display: block;
  background: #f5f5f5;
  height: 3px;
  border-radius: 2px;
  width: 22px;
  position: relative;
  transition: background 0.2s ease; /* Smooth color fade on hover */
}


/* Create top and bottom lines using pseudo-elements */
.burger-lines::before,
.burger-lines::after {

  content: "";
  position: absolute;
  left: 0;
  transition: transform 250ms ease, opacity 250ms ease, background 0.2s ease;
}

.burger-lines::before {
  top: -7px;
}

.burger-lines::after {
  top: 7px;
}


/* MOBILE/DROPDOWN MENU */

/* Contains Blog, Projects, and social links */
.mobile-menu {

  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #1f1f1f;
  padding: 0 1rem 0 1rem;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(-12px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease, max-height 250ms ease, padding 250ms ease;
}


/* Regular menu links */
.mobile-menu > a {

  display: block;
  padding: 0.6rem 0;
  color: #f5f5f5;
  border-bottom: 1px solid #2e2e2e;
  transition: color 0.3s ease, background-color 0.3s ease;
}


/* Social media section */
.mobile-social {

  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  gap: 1rem;
}


/* Social media links */
.mobile-social a {

  display: block;
  padding: 0.6rem 0;
  color: #f5f5f5;
  border-bottom: 1px solid #2e2e2e;
  transition: color 0.3s ease, background-color 0.3s ease;
}


/* Align the actual social icons with the regular menu text */
.mobile-social a i {

  display: inline-block;
  position: relative;
  left: -1px;
}


/* Menu link hover state */
.mobile-menu a:hover {
  color: #949292;
}


/* Toggle class applied by app.js when burger is clicked */
.mobile-menu.show {

  opacity: 1;
  transform: translateY(0);
  max-height: 390px;
  pointer-events: auto;
  padding: 1rem;
}


/* Overlay that appears behind the mobile menu to capture outside clicks */
.menu-overlay {

  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0,0,0,0); /* invisible but captures clicks */
  z-index: 998; /* below .mobile-menu but above page content */
  display: none;
}

.menu-overlay.active {
  display: block;
}


/* MOBILE */
@media screen and (max-width: 768px) {

  .logo {
    position: absolute;
    left: 5%;
  }

  .header {
    padding: 2.15rem;
  }

  main {
    margin-top: 72px;
  }

  /* Mobile layout: hide desktop links and show the burger button */
  .page-links,
  .social-links {
    display: none;
  }

  .burger {
    display: block;
  }
}


/* Site name / logo — pinned to the left */
.logo {

  font-size: 1.5rem;
  font-weight: bolder;
  position: absolute;
  left: 5%;
}


/* MAIN CONTENT */
main {

  margin: 80px auto 4rem;
  max-width: 800px;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
}


/* INTRO SECTION */
.intro h1 {

  font-size: 2rem;
  margin-bottom: 1rem;
}

.intro p {

  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 1rem;
  line-height: 1.75;
}


/* BLOG POST BODY TEXT */
.blog-post p {

  margin-bottom: 1.05rem;
  line-height: 1.6;
  font-size: 1.10rem;
}


/* RECENT POSTS HEADING */
.recent-posts h2 {

  margin-bottom: 1.5rem;
}


/* PROJECT CARDS */
.project {

  background: #3a3a3a;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  transition: background 0.3s ease;
}

.project:hover {

  background: #4a4a4a;
}


/* Project list items */
.project-list {

  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.project-list li {

  background: #3a3a3a;
  margin-bottom: 3.5rem;
  padding: 1rem;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.project-list li:hover {

  background: #4a4a4a;
}

.project-list a {

  color: #f5f5f5;
  font-weight: bold;
}


/* POST CARDS */
.post {

  background: #3a3a3a;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  transition: background 0.3s ease;
}

.post:hover {

  background: #4a4a4a;
}

.post-list {

  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.post-list li {

  background: #3a3a3a;
  margin-bottom: 3.5rem;
  padding: 1rem;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.post-list li:hover {

  background: #4a4a4a;
}

.post-list a {

  color: #f5f5f5;
  font-weight: bold;
}


/* INFO GRID (3-column layout below intro) */
.info-grid {

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3em;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2.5px solid #3a3a3a;
}


/* Column label */
.info-heading {

  font-weight: 600;
  text-transform: uppercase;
  color: #949292;
}


/* Column body text */
.info-col p {

  line-height: 1.6;
  margin-bottom: 0.4rem;
}


/* Stack columns vertically on mobile */
@media screen and (max-width: 768px) {

  .info-grid {

    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}