/* basic reset */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,
     "Helvetica Neue",Arial,sans-serif;line-height:1.6;
     color:#333;background:#fafafa}

/* container */
.wrapper{max-width:780px;margin:auto;padding:1.5rem}

/* header */
.site-header{background:#fff;border-bottom:1px solid #e5e5e5;
             padding:1rem 0;margin-bottom:2rem;text-align:center}
.site-header h1{font-size:1.9rem;font-weight:600;margin-bottom:.3rem}
.site-header nav a{margin:0 .6rem;color:#0366d6;text-decoration:none}
.site-header nav a:hover{text-decoration:underline}

/* footer */
.footer{margin:3rem 0;text-align:center;font-size:.85rem;color:#777}

/* project list */
ul.proj-list{list-style:none;padding:0}
ul.proj-list li{border:1px solid #e0e0e0;background:#fff;
                padding:1rem;border-radius:.4rem;margin-bottom:1rem}
ul.proj-list li a{font-size:1.15rem;font-weight:600;color:#0366d6}

/* individual project */
.project-page h1{margin-bottom:1rem}
.project-page img{max-width:100%;border:1px solid #ddd;border-radius:4px;margin:1rem 0}

/* wider horizontal rule */
hr {
  border: 0;
  border-top: 2px solid #bbb;
  margin: 0.5rem 0 !important;
}

/* move bullets / numbers in all main‑content areas */
.wrapper ul,
.wrapper ol {
  margin-left: 1.6rem !important;
  padding-left: 0;
}

/* Remove underlines from all links */
a {
  text-decoration: none !important;
}
a:hover {
  text-decoration: underline !important;
}

/* breadcrumb styling */
.breadcrumb {
  margin: 1rem auto 2rem auto;
  max-width: 1200px; /* Adjust to match your content width */
  padding: 0 1rem;
  font-size: 0.9rem;
  text-align: center; /* Center the breadcrumbs */
}

/* Alternative: Left-align under header */
.breadcrumb.left-align {
  text-align: left;
  margin: 1rem auto 2rem auto;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex; /* Use inline-flex for centering */
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* Center the breadcrumb items */
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin: 0 0.75rem;
  color: #6b7280;
  font-weight: normal;
}

.breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: #374151;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .breadcrumb {
    font-size: 0.8rem;
    margin: 0.5rem auto 1.5rem auto;
  }
  
  .breadcrumb li:not(:last-child)::after {
    margin: 0 0.5rem;
  }
}



/* Keep header as is */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  margin-bottom: 0;
  text-align: center;
}

/* Fix wrapper spacing - different for homepage vs other pages */
.wrapper {
  max-width: 780px;
  margin: auto;
  padding: 1.5rem;
}
body:not(.home-page) .wrapper {
  padding-top: 0;
}
.home-page .wrapper {
  padding-top: 2rem;
}

/* ONLY target homepage heading and intro - leave project pages alone */
.home-page .wrapper > h2:first-of-type {
  text-align: center;
  margin: 1rem 0 2rem 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c3e50;
}
.home-page .wrapper > p:first-of-type {
  text-align: center;
  margin-bottom: 1rem;
  color: #6c757d;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Center the Blog page h1 heading */
.wrapper > h1:first-of-type {
  text-align: center;
  margin: 1rem 0 2rem 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c3e50;
}

/* Reduce space between breadcrumbs and first h1 heading */
.breadcrumb-container + .wrapper > h1:first-of-type {
  margin-top: 0;  /* Remove top margin when following breadcrumbs */
}


/* simple search feature styling */
.search-box {
  max-width: 600px;
  padding: 0 1rem;
  margin: 1rem auto 2rem auto; /* Consistent spacing */
}

/* Force consistent positioning regardless of page content */
.wrapper .search-box {
  position: relative;
  top: 0;
}

/* Specific fix for homepage vs blog page */
body.home-page .wrapper .search-box {
  margin-top: 1rem !important; /* Same as blog page */
}

body:not(.home-page) .wrapper .search-box {
  margin-top: 1rem !important; /* Consistent with homepage */
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.search-box input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#results-container {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

#results-container:not(:empty) {
  display: block;
  border: 1px solid #e5e7eb;
}

#results-container li {
  border-bottom: 1px solid #f3f4f6;
}

#results-container li:last-child {
  border-bottom: none;
}

#results-container a {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

#results-container a:hover {
  background-color: #f9fafb;
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
  .search-box {
    margin: 0.5rem auto 1.5rem auto !important;
  }
  
  .search-box input {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
}
