body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  /* UPDATED: Layered backgrounds - background_of_background.png fills entire view, background_idea.png sits on top */
  background:
    url('images/background_of_background.png') no-repeat center center fixed;
  background-size: cover;
  /* contain for main image, cover for background layer */
  background-color: #fefefa;
  /* fallback color */
  color: #222;
  /* FIXED: Remove the duplicate padding-top and set correct value */
  padding-top: 70px;
  /* Increased to account for navbar height + some buffer */
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #0a3d62;
  padding: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  z-index: 1000;
  box-sizing: border-box;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.navbar li {
  margin: 0 2rem;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar a:hover {
  color: #38ada9;
}

/* REMOVED: Duplicate body padding-top rule */

.main-title-card,
.projects-title-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(10, 61, 98, 0.08);
  padding: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  max-width: 90vw;
  box-sizing: border-box;
}

.about-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(10, 61, 98, 0.08);
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Contact links in About */
.contact-links {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a3d62;
  text-decoration: none;
  background: rgba(10, 61, 98, 0.06);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  color: #38ada9;
  background: rgba(56, 173, 169, 0.12);
  transform: translateY(-1px);
}

.contact-link .icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.contact-link .label {
  font-size: 0.98rem;
  line-height: 1;
  word-break: break-word;
}

.centered-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 20vh;
  text-align: center;
  margin-top: 2rem;
}

/* Ensure chat and about visually fill the viewport height minus navbar */
#chat.centered-section,
#about.centered-section {
  min-height: calc(100vh - 90px);
}

.projects-title-card {
  margin-bottom: 2rem;
  /* REMOVED: conflicting scroll-margin-top */
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 0;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 1rem;
}

/* Projects Search + Filter Tags */
.projects-search {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 1rem;
  margin-bottom: 1rem;
  /* gap below search bar */
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.projects-search input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid rgba(10, 61, 98, 0.15);
  border-radius: 25px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.projects-search input:focus {
  border-color: #38ada9;
  box-shadow: 0 0 0 3px rgba(56, 173, 169, 0.1);
}

.projects-reset {
  background: #0a3d62;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.projects-reset:hover {
  background: #38ada9;
}

.specialty-tags {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.specialty-tags .filter-tag {
  display: inline-block;
  background: #38ada9;
  color: #fff;
  border-radius: 14px;
  padding: 0.25rem 0.85rem;
  margin: 0.2rem 0.25rem 0.2rem 0;
  font-size: 0.9rem;
  cursor: default;
  user-select: none;
}


.project-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(10, 61, 98, 0.08);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
  min-height: 0;
  margin: 0;
  box-sizing: border-box;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 24px rgba(56, 173, 169, 0.15);
}

.project-card h2 {
  color: #0a3d62;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: #222;
  margin-bottom: 1rem;
}

.tags {
  margin-bottom: 1rem;
}

.tags span {
  display: inline-block;
  background: #38ada9;
  color: #fff;
  border-radius: 12px;
  padding: 0.2rem 0.8rem;
  margin: 0 0.2rem;
  margin-top: 0.2rem;
  margin-right: 0.2rem;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}





.project-card button {
  background: #0a3d62;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.project-card button:hover {
  background: #38ada9;
}

body::after {
  content: '';
  display: block;
  height: 8vh;
}

/* Full-width empty state under projects */
.projects-empty {
  grid-column: 1 / -1;
  /* span all grid columns */
  justify-self: center;
  /* center the grid item itself */
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: #0a3d62;
  font-weight: 500;
}

/* Modern responsive design using container queries and clamp() */
@media (max-width: 1200px) {
  .projects-grid {
    padding: 0 2rem;
  }
}

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: 0 1.5rem;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 80px;
    /* FIXED: Increased for mobile */
  }

  /* Reduce artificial bottom spacer on small screens */
  body::after {
    height: 4vh;
  }

  .site-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 1rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    max-width: calc(100vw - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
    padding: clamp(1rem, 4vw, 2rem);
  }

  .centered-section {
    margin-top: 1rem;
    min-height: unset;
    padding: 0 1rem;
  }

  .navbar ul {
    padding: 0 1rem;
    justify-content: space-around;
  }

  .navbar li {
    margin: 0 0.5rem;
  }

  .navbar a {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* REMOVED: conflicting projects-title-card scroll-margin-top */
}

@media (max-width: 480px) {
  .navbar li {
    margin: 0 0.3rem;
  }

  .navbar a {
    font-size: 1rem;
  }

  .projects-grid {
    padding: 0 0.5rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    max-width: calc(100vw - 1rem);
  }
}

/* FIXED: Ensure both sections scroll to proper positions */
#about,
#projects {
  scroll-margin-top: 0;
}

/* FIXED: Add scroll padding to html for global smooth scrolling offset */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  /* This ensures all scroll targets account for navbar */
}

/* Site Title - Always Visible */
.site-title {
  text-align: center;
  color: #0a3d62;
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
  font-weight: 600;
  position: relative;
  z-index: 10;
  width: 100%;
}

/* Content Section Visibility and Fade Transitions */
.content-section {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  width: 100%;
}

.content-section.active {
  display: flex;
  opacity: 1;
}

.content-section.fade-out {
  opacity: 0;
  display: flex;
  /* Keep visible during fade-out */
}

.project-card h2 {
  color: #0a3d62;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: #222;
  margin-bottom: 1rem;
}

.tags {
  margin-bottom: 1rem;
}

.tags span {
  display: inline-block;
  background: #38ada9;
  color: #fff;
  border-radius: 12px;
  padding: 0.2rem 0.8rem;
  margin: 0 0.2rem;
  margin-top: 0.2rem;
  margin-right: 0.2rem;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}





.project-card button {
  background: #0a3d62;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.project-card button:hover {
  background: #38ada9;
}

body::after {
  content: '';
  display: block;
  height: 8vh;
}

/* Full-width empty state under projects */
.projects-empty {
  grid-column: 1 / -1;
  /* span all grid columns */
  justify-self: center;
  /* center the grid item itself */
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: #0a3d62;
  font-weight: 500;
}

/* Modern responsive design using container queries and clamp() */
@media (max-width: 1200px) {
  .projects-grid {
    padding: 0 2rem;
  }
}

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: 0 1.5rem;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 80px;
    /* FIXED: Increased for mobile */
  }

  /* Reduce artificial bottom spacer on small screens */
  body::after {
    height: 4vh;
  }

  .site-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 1rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    max-width: calc(100vw - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
    padding: clamp(1rem, 4vw, 2rem);
  }

  .centered-section {
    margin-top: 1rem;
    min-height: unset;
    padding: 0 1rem;
  }

  .navbar ul {
    padding: 0 1rem;
    justify-content: space-around;
  }

  .navbar li {
    margin: 0 0.5rem;
  }

  .navbar a {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* REMOVED: conflicting projects-title-card scroll-margin-top */
}

@media (max-width: 480px) {
  .navbar li {
    margin: 0 0.3rem;
  }

  .navbar a {
    font-size: 1rem;
  }

  .projects-grid {
    padding: 0 0.5rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    max-width: calc(100vw - 1rem);
  }
}

/* FIXED: Ensure both sections scroll to proper positions */
#about,
#projects {
  scroll-margin-top: 0;
}

/* FIXED: Add scroll padding to html for global smooth scrolling offset */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  /* This ensures all scroll targets account for navbar */
}

/* Site Title - Always Visible */
.site-title {
  text-align: center;
  color: #0a3d62;
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
  font-weight: 600;
  position: relative;
  z-index: 10;
  width: 100%;
}

/* Content Section Visibility and Fade Transitions */
.content-section {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  width: 100%;
}

.content-section.active {
  display: flex;
  /* Keep visible during fade-out */
}

.project-card h2 {
  color: #0a3d62;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: #222;
  margin-bottom: 1rem;
}

.tags {
  margin-bottom: 1rem;
}

.tags span {
  display: inline-block;
  background: #38ada9;
  color: #fff;
  border-radius: 12px;
  padding: 0.2rem 0.8rem;
  margin: 0 0.2rem;
  margin-top: 0.2rem;
  margin-right: 0.2rem;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}





.project-card button {
  background: #0a3d62;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.project-card button:hover {
  background: #38ada9;
}

body::after {
  content: '';
  display: block;
  height: 8vh;
}

/* Full-width empty state under projects */
.projects-empty {
  grid-column: 1 / -1;
  /* span all grid columns */
  justify-self: center;
  /* center the grid item itself */
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: #0a3d62;
  font-weight: 500;
}

/* Modern responsive design using container queries and clamp() */
@media (max-width: 1200px) {
  .projects-grid {
    padding: 0 2rem;
  }
}

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: 0 1.5rem;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 80px;
    /* FIXED: Increased for mobile */
  }

  /* Reduce artificial bottom spacer on small screens */
  body::after {
    height: 4vh;
  }

  .site-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 1rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    max-width: calc(100vw - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
    padding: clamp(1rem, 4vw, 2rem);
  }

  .centered-section {
    margin-top: 1rem;
    min-height: unset;
    padding: 0 1rem;
  }

  .navbar ul {
    padding: 0 1rem;
    justify-content: space-around;
  }

  .navbar li {
    margin: 0 0.5rem;
  }

  .navbar a {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* REMOVED: conflicting projects-title-card scroll-margin-top */
}

@media (max-width: 480px) {
  .navbar li {
    margin: 0 0.3rem;
  }

  .navbar a {
    font-size: 1rem;
  }

  .projects-grid {
    padding: 0 0.5rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    max-width: calc(100vw - 1rem);
  }
}

/* FIXED: Ensure both sections scroll to proper positions */
#about,
#projects {
  scroll-margin-top: 0;
}

/* FIXED: Add scroll padding to html for global smooth scrolling offset */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  /* This ensures all scroll targets account for navbar */
}

/* Site Title - Always Visible */
.site-title {
  text-align: center;
  color: #0a3d62;
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
  font-weight: 600;
  position: relative;
  z-index: 10;
  width: 100%;
}

/* Content Section Visibility and Fade Transitions */
.content-section {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  width: 100%;
}

.content-section.active {
  display: flex;
  opacity: 1;
}

.content-section.fade-out {
  opacity: 0;
  display: flex;
  /* Keep visible during fade-out */
}

.content-section.fade-in {
  opacity: 1;
  display: flex;
  /* Keep visible during fade-in */
}

main {
  position: relative;
  min-height: calc(100vh - 70px);
  width: 100%;
}

/* Project Menu Dropdown */
.project-menu-container {
  position: relative;
  display: inline-block;
}

.project-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 100;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.project-card button:hover {
  background: #38ada9;
}

body::after {
  content: '';
  display: block;
  height: 8vh;
}

/* Full-width empty state under projects */
.projects-empty {
  grid-column: 1 / -1;
  /* span all grid columns */
  justify-self: center;
  /* center the grid item itself */
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: #0a3d62;
  font-weight: 500;
}

/* Modern responsive design using container queries and clamp() */
@media (max-width: 1200px) {
  .projects-grid {
    padding: 0 2rem;
  }
}

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: 0 1.5rem;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 80px;
    /* FIXED: Increased for mobile */
  }

  /* Reduce artificial bottom spacer on small screens */
  body::after {
    height: 4vh;
  }

  .site-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 1rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    max-width: calc(100vw - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
    padding: clamp(1rem, 4vw, 2rem);
  }

  .centered-section {
    margin-top: 1rem;
    min-height: unset;
    padding: 0 1rem;
  }

  .navbar ul {
    padding: 0 1rem;
    justify-content: space-around;
  }

  .navbar li {
    margin: 0 0.5rem;
  }

  .navbar a {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* REMOVED: conflicting projects-title-card scroll-margin-top */
}

@media (max-width: 480px) {
  .navbar li {
    margin: 0 0.3rem;
  }

  .navbar a {
    font-size: 1rem;
  }

  .projects-grid {
    padding: 0 0.5rem;
  }

  .main-title-card,
  .projects-title-card,
  .about-card,
  .project-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    max-width: calc(100vw - 1rem);
  }
}

/* FIXED: Ensure both sections scroll to proper positions */
#about,
#projects {
  scroll-margin-top: 0;
}

/* FIXED: Add scroll padding to html for global smooth scrolling offset */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  /* This ensures all scroll targets account for navbar */
}

/* Site Title - Always Visible */
.site-title {
  text-align: center;
  color: #0a3d62;
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
  font-weight: 600;
  position: relative;
  z-index: 10;
  width: 100%;
}

/* Content Section Visibility and Fade Transitions */
.content-section {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  width: 100%;
}

.content-section.active {
  display: flex;
  opacity: 1;
}

.content-section.fade-out {
  opacity: 0;
  display: flex;
  /* Keep visible during fade-out */
}

.content-section.fade-in {
  opacity: 1;
  display: flex;
  /* Keep visible during fade-in */
}

main {
  position: relative;
  min-height: calc(100vh - 70px);
  width: 100%;
}

/* Project Menu Dropdown */
.project-menu-container {
  position: relative;
  display: inline-block;
}

.project-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 100;
  display: none;
  margin-top: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-menu-dropdown.show {
  display: block;
}

.project-menu-dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #0a3d62;
  text-decoration: none;
  transition: all 0.2s;
  text-align: left;
  font-size: 0.95rem;
}

.project-menu-dropdown a:hover {
  background: rgba(56, 173, 169, 0.1);
  color: #38ada9;
}