:root {
  --button-color: #a12f1b;
  --button-color-hover: #5c010a;
  --secondary-color: #f7f5fd;
  --button-color-filled: #02a6a3;
  --button-color-filled-hover: #700047;
  --font-heading: "Chewy", cursive;
  --font-body: "Poppins", sans-serif;
}

body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
}

/*TYPOGRAPHY*/

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
  font-weight: 500;
  line-height: 1.7;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}

/*BUTTONS*/

.btn-branding,
.btn-branding-outline,
.btn-branding-filled {
  padding: 0.6rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s ease-in-out;
  cursor: pointer;
}

/* Red button */
.btn-branding {
  background-color: var(--button-color);
  color: white;
  border: none;
}

.btn-branding:hover {
  background-color: var(--button-color-hover);
  color: white;
}

.btn-branding:focus-visible,
.btn-branding-outline:focus-visible {
  outline: 3px solid black;
  outline-offset: 2px;
}

/* Outline button */
.btn-branding-outline {
  background-color: white;
  color: #026461;
  border: 2px solid #025f5d;
}

.btn-branding-outline:hover {
  background-color: #d2fdfc;
}

/* Filled blue button */
.btn-branding-filled {
  background-color: #026461;
  color: white;
  border: none;
}

.btn-branding-filled:hover {
  background-color: var(--button-color-filled-hover);
  color: white;
}

/* ---------------- NAVIGATION BAR ---------------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 1rem;
  background-color: #ffe181;
}

/* Navigation links */
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Links styling */
.nav-links a {
  text-decoration: none;
  color: #272142;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #a12f1b;
  text-decoration: underline;
}

/* ---------------- HAMBURGER TOGGLE ---------------- */

/* Hide checkbox */
#menu-toggle {
  display: none;
}

/* Hamburger icon */
.hamburger {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;

  position: relative;
  z-index: 20;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: #272142;
  border-radius: 2px;
  transition: 0.3s;
}

/* ---------------- TOGGLE MENU ---------------- */

/* Closed state (mobile) */
.nav-links {
  max-height: none; /* desktop: show by default */
  overflow: visible;
  transition: max-height 0.3s ease;
}

/* Responsive: mobile */
@media (max-width: 768px) {
  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Mobile nav */
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background-color: white;
    max-height: 0; /* start closed */
    overflow: hidden;

    z-index: 10;
  }

  .nav-links li {
    text-align: center;
    padding: 1rem 0;
  }

  /* Open menu when checkbox checked */
  #menu-toggle:checked ~ .nav-links {
    max-height: 500px; /* enough to show all links */
  }

  /* Hamburger animation to X */
  #menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }
  #menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Full-width nav background */
body.home nav {
  background-color: #ffe181;
  width: 100%;
}

/* Container inside nav keeps padding but stretches logo + links */
.nav-container {
  display: flex;
  justify-content: space-between; /* logo left, links right */
  align-items: center;
  padding: 0 2rem; /* space from screen edges */
  width: 100%; /* fill available width */
  max-width: none; /* don’t constrain container width */
  box-sizing: border-box;
}

/* Ensure links stay on right */
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/*HERO SECTION*/

.hero {
  background-color: #ffe181;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 1.25rem) 1.25rem;
}

.hero h1 {
  padding-top: 0rem;
  font-size: clamp(6rem, 6vw, 4rem);
}

.hero h2 {
  padding-bottom: 0.5rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Space between hero and first grid row */
.container > .row:first-child {
  margin-top: auto; /* adjust as needed */
}

@media (max-width: 768px) {
  .container > .row:first-child {
    margin-top: 2rem;
  }
}

/*PROJECT SECTION*/

.project-description {
  padding: 2rem 2rem 0;
}

.project-image {
  max-width: 80%;
  margin: 0 auto;
  display: block;
}

/*CONTENT SECTION*/

.content-container {
  padding: clamp(3rem, 10vw, 7rem) 1.25rem;
}

.content-container h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.2;
}

.content-container h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.content-container p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-top: 1.5rem;
  margin: 0;
}

.content-container h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin-top: 1.5rem;
}

.content {
  padding: 0rem 0;
}

/*IMAGES*/

.headshot {
  max-width: 430px;
  width: 100%;
  height: auto;
  border-radius: 15px;
  display: block;
  margin: 0 auto;
}

.certifications {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
}

.certifications img {
  max-width: 100px;
  height: auto;
}

.logo {
  max-width: 150px;
  height: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 2rem;
}

.contact-image {
  display: flex;
  justify-content: center;
}

.headshot {
  max-width: 350px;
  height: auto;
}

.headshot {
  max-width: 350px;
  height: auto;
  margin-top: -10px;
}

/* PROJECT GRID IMAGES */
.project-img {
  max-width: 350px;
  width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-image {
    order: -1;
  }
}

/* Grid images styling */
/* ----- PROJECT GRID SECTIONS ----- */

/* Remove old image padding and enforce rounding */
.grid-img {
  max-width: 350px;
  width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px; /* ensures all images are rounded */
  padding-top: 0; /* remove old top padding */
}

/* Control spacing between each project section */
.row.d-flex.align-items-center {
  margin-top: 3rem; /* space above each section */
  margin-bottom: 3rem; /* space below each section */
}

/* No extra space above the first section */
.container > .row.d-flex.align-items-center:first-child {
  margin-top: 0;
}

/* Adjust project description padding inside each column */
.project-description {
  padding: 2rem 1.5rem 0; /* top 2rem, sides 1.5rem, bottom 0 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-img {
    max-width: 200px;
  }

  .row.d-flex.align-items-center {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .project-description {
    padding: 1.5rem 1rem 0;
  }
}

/* Footer */
footer .email-link {
  text-decoration: none;
  color: black;
  font-size: 24px;
  text-align: center;
}

footer .email-link:hover {
  color: var(--button-color-filled);
  text-decoration: underline;
}

footer .social-links a {
  margin: 0 15px;
  color: black;
  background: var(--secondary-color);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  border-radius: 50%;

  font-size: 18px;
}

footer .social-links a:hover {
  color: white;
  background: #a8006b;
}

footer .contact-box p {
  margin: 0;
}

footer .contact-box {
  background-color: #d2fdfc;
  padding: 30px 80px;
  border-radius: 8px;
  max-width: 70%;
  margin: 0 auto;
}

@media (max-width: 576px) {
  footer .email-link {
    font-size: 18px;
    word-break: break-word;
  }

  footer .social-links a {
    margin: 0 10px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  footer .contact-box {
    padding: 25px 20px;
    text-align: center;
  }
}

footer .social-links a {
  width: 44px;
  height: 44px;
}

footer {
  padding-top: 6rem;
}

@media (max-width: 576px) {
  footer {
    padding-top: 0;
  }
}

/* Additional Accessibility Enhancements */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
