

body,h1,h2,h3,h4,h5,h6 {font-family: Lato, sans-serif}
.w3-bar-block .w3-bar-item {padding:20px}

.fa {
    padding: 8px;
    font-size: 24px;
    width: 40px;
    text-align: center;
    text-decoration: none;
    margin: 5px 2px;
  }

  .fa:hover {
      opacity: 0.7;
  }
  
  .fa-facebook {
    background: #3B5998;
    color: white;
  }
  
  .fa-twitter {
    background: #55ACEE;
    color: white;
  }
  
  .fa-google {
    background: #dd4b39;
    color: white;
  }
  
  .fa-linkedin {
    background: #007bb5;
    color: white;
  }
  
  .fa-youtube {
    background: #b00;
    color: white;
  }
  
  .fa-instagram {
    background: #125688;
    color: white;
  }
  
  .fa-pinterest {
    background: #cb2027;
    color: white;
  }
  
  .fa-snapchat-ghost {
    background: #fffc00;
    color: white;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
  }
  
  .fa-skype {
    background: #00aff0;
    color: white;
  }
  
  .fa-android {
    background: #a4c639;
    color: white;
  }
  
  .fa-dribbble {
    background: #ea4c89;
    color: white;
  }
  
  .fa-vimeo {
    background: #45bbff;
    color: white;
  }
  
  .fa-tumblr {
    background: #2c4762;
    color: white;
  }
  
  .fa-vine {
    background: #00b489;
    color: white;
  }
  
  .fa-foursquare {
    background: #45bbff;
    color: white;
  }
  
  .fa-stumbleupon {
    background: #eb4924;
    color: white;
  }
  
  .fa-flickr {
    background: #f40083;
    color: white;
  }
  
  .fa-yahoo {
    background: #430297;
    color: white;
  }
  
  .fa-soundcloud {
    background: #f50;
    color: white;
  }
  
  .fa-reddit {
    background: #ff5700;
    color: white;
  }
  
  .fa-rss {
    background: #f60;
    color: white;
  }

  .fa-quora {
    background: #a20;
    color: white;
  }

  .fa-github {
    background: #4078c0;
    color: white;
  }

  .fa-wordpress {
    background: #00749C;
    color: white;
  }

  .fa-imdb {
    background: #F3CE13;
    color: white;
  }


  * {box-sizing:border-box}

/* Slideshow container */
.slideshow-container {
  /* max-width: 1000px; */
  max-width: 100%;
  position: relative;
  margin: auto;
}

/* Hide the images by default */
.mySlides {
  display: none;
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgb(0 0 0 / 80%);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* Set your aspect ratio */
.video-container {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 56.25%; /* creates a 16:9 aspect ratio */
  }
  
  .video-container iframe,
  .video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
  }
  
  /* And set the max-width of the parent element */
  .video-wrap {
    width: 50%;
    max-width: 400px;
  }

  /* Lightbox Modal Styles */
  .lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 95%);
    overflow: auto;
  }

  .lightbox-content {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-slide {
    display: none;
    text-align: center;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .lightbox-slide[style*="display: block"] {
    display: flex !important;
  }

  .lightbox-slide img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .lightbox-caption {
    color: #f2f2f2;
    font-size: 18px;
    padding: 16px;
    text-align: center;
  }

  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
  }

  .lightbox-close:hover,
  .lightbox-close:focus {
    color: #bbb;
  }

  .lightbox-prev,
  .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 3px;
    user-select: none;
    background-color: rgb(0 0 0 / 30%);
  }

  .lightbox-next {
    right: 20px;
  }

  .lightbox-prev {
    left: 20px;
  }

  .lightbox-prev:hover,
  .lightbox-next:hover {
    background-color: rgb(0 0 0 / 80%);
  }

  @media screen and (width <= 768px) {
    .lightbox-caption {
      font-size: 14px;
      padding: 10px;
    }

    .lightbox-prev,
    .lightbox-next {
      font-size: 18px;
      padding: 12px;
    }

    .lightbox-close {
      font-size: 30px;
      top: 10px;
      right: 20px;
    }
  }

/* ===== Section landing card grid (used on /, /ai/, /astro/) ===== */

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.section-card:hover {
  box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
  transform: translateY(-2px);
}

.section-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #f4f4f4;
  display: block;
}

.section-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 1.1rem;
  color: #888;
  background: linear-gradient(135deg, #f4f4f4 0%, #e8eef5 100%);
}

.section-card-body {
  padding: 16px 20px 20px;
  font-family: "Source Sans 3", Lato, sans-serif;
}

.section-card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
}

.section-card-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}

/* ===== YouTube embeds (used on /outreach/) ===== */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 1.25rem 0 2rem;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.95rem;
  color: #444;
  margin: 0.5rem 0 0;
}

/* ===== Talk entries (used on /outreach/) ===== */

.talk-entry {
  max-width: 720px;
  margin: 1.5rem 0 2.5rem;
}

.talk-entry h4 {
  font-family: Lato, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #1a1a1a;
}

.talk-meta {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 0.75rem;
}

.talk-entry .video-embed {
  margin-bottom: 0.75rem;
}

.talk-entry p {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #333;
  margin: 0.5rem 0;
}

/* ===== Talk photo strip (used on /outreach/) ===== */

.talk-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 0.75rem 0 1rem;
}

.talk-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  cursor: zoom-in;
  background: #000;
}

.talk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.talk-photo:hover img {
  opacity: 0.85;
}

/* ===== Personal aside (used on /outreach/) ===== */

.personal-note {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-style: italic;
  color: #555;
  border-left: 3px solid #999;
  padding: 0.4rem 1rem;
  margin: 1.5rem 0 2rem;
  background: #fafafa;
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ===== Mission-level subheading (used on /outreach/) ===== */

.mission-heading {
  font-family: Lato, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #ddd;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

/* ===== Reddit thread feedback (used on /outreach/) ===== */

.reddit-thread {
  max-width: 720px;
  margin: 1.5rem 0 2rem;
}

.reddit-thread h4 {
  font-family: Lato, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #1a1a1a;
}

.reddit-thread h4 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

.reddit-thread h4 a:hover {
  border-bottom-color: #1a1a1a;
}

.reddit-thread .reddit-meta {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.75rem;
}

.reddit-quote {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #333;
  border-left: 3px solid #ff4500;
  padding: 0.4rem 0.8rem;
  margin: 0.5rem 0;
  background: #fafafa;
}

.reddit-quote-author {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.3rem;
}

/* ===== Page ToC (used on /outreach/) ===== */

html { scroll-behavior: smooth; }

/* --- Mobile / narrow default: sticky header bar with hamburger trigger --- */
.page-toc {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.95rem;
  color: #333;
}

.page-toc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  font-weight: 600;
  user-select: none;
}

.page-toc summary::-webkit-details-marker { display: none; }
.page-toc summary::marker { display: none; }

.page-toc-bars {
  font-size: 1.4rem;
  line-height: 1;
  color: #555;
}

.page-toc[open] .page-toc-bars {
  color: #000;
}

.page-toc-title { display: none; }

.page-toc ul {
  list-style: none;
  padding: 0.4rem 1rem 0.8rem;
  margin: 0;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.page-toc li {
  margin: 0.3rem 0;
  line-height: 1.4;
}

.page-toc a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0.6rem;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.page-toc a:hover,
.page-toc a:focus {
  color: #000;
  border-left-color: #888;
}

/* --- Wide screens: sticky next to the centered content column, no border, no summary --- */

/* Anchored to the photo-gallery's right edge (max-width 1100px → half = 550px). */

/* Breakpoint is set so the ToC has room without overlapping the gallery. */
@media (width >= 1500px) {
  .page-toc {
    position: fixed;
    top: 6rem;
    left: calc(50% + 550px + 16px);
    width: 180px;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border-bottom: none;
    font-size: 0.9rem;
    z-index: 100;
  }

  .page-toc summary { display: none; }

  /* Force the hidden details content to show on desktop regardless of open state */
  .page-toc > .page-toc-title,
  .page-toc > ul {
    display: block !important;
  }

  .page-toc-title {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
  }

  .page-toc ul {
    padding: 0;
    border-top: none;
    background: transparent;
  }

  .page-toc a {
    padding: 0.15rem 0 0.15rem 0.5rem;
    margin-left: -0.5rem;
  }
}

/* ===== Article pull quote (used on /outreach/) ===== */

.article-quote {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.97rem;
  line-height: 1.55;
  color: #222;
  border-left: 3px solid #888;
  padding: 0.6rem 1rem;
  margin: 0.6rem 0 0.4rem;
  background: #fafafa;
  font-style: italic;
}

.article-quote-source {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4rem;
}

/* ===== Astrophotography masonry gallery (used on /astrophotography/) ===== */

.gallery-section-heading {
  max-width: 1100px;
  margin: 2rem auto 0.5rem;
  padding: 0 16px;
  font-family: Lato, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.photo-gallery {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 16px;
}

.gallery-sizer,
.gallery-item {
  width: calc(50% - 12px); /* 24px gutter / 2 */
}

@media (width <= 800px) {
  .gallery-sizer,
  .gallery-item {
    width: 100%;
  }
}

.gallery-item {
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 6px;
  overflow: hidden;
}

.gallery-link {
  display: block;
  cursor: zoom-in;
  background: #000;
}

.gallery-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.gallery-link:hover img {
  opacity: 0.92;
}

.gallery-item .astro-image-title,
.gallery-item .astro-image-description,
.gallery-item .astro-image-tech {
  margin-left: 16px;
  margin-right: 16px;
}

.gallery-item .astro-image-title {
  margin-top: 0.7rem;
}

.gallery-item .astro-image-tech {
  margin-bottom: 1rem;
}

/* PhotoSwipe caption — bottom-centred over the dark backdrop */
.pswp__custom-caption {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(0 0 0 / 60%);
  color: #fff;
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  max-width: 90%;
  text-align: center;
}

.pswp__custom-caption:empty {
  display: none;
}

/* ===== Astrophotography image annotations (used on /astrophotography/) ===== */

.astro-image-title {
  font-family: Lato, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.6rem 0 0.25rem;
  color: #1a1a1a;
}

.astro-image-description {
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin: 0 0 0.6rem;
  text-align: left;
}

.astro-image-tech {
  text-align: left;
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.astro-image-tech > summary {
  cursor: pointer;
  color: #666;
  font-weight: 600;
  padding: 0.3rem 0;
  list-style: none;
}

.astro-image-tech > summary::-webkit-details-marker { display: none; }
.astro-image-tech > summary::marker { display: none; }

.astro-image-tech > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.astro-image-tech[open] > summary::before {
  content: "▾ ";
}

.astro-image-tech dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0.5rem 0 0;
  color: #333;
  line-height: 1.5;
}

.astro-image-tech dt {
  font-weight: 600;
  color: #555;
}

.astro-image-tech dd {
  margin: 0;
}

/* ===== Bio page typography ===== */

.bio {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  font-family: "Source Sans 3", Lato, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
}

.bio h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 2px;
  text-align: center;
  margin: 0 0 0.5rem;
}

.bio h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 0.5rem;
}

.bio h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 1.5rem 0 0.25rem;
}

.bio p {
  margin: 1rem 0;
}

.bio strong {
  font-weight: 500;
}

.bio a {
  color: #0b5cad;
  text-decoration: underline;
  text-decoration-skip-ink: auto;
  text-underline-offset: 2px;
}

.bio a:hover {
  color: #073d72;
}

.bio ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.bio li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.bio hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 2.5rem 0 1.5rem;
}

.bio-back {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.bio-tagline {
  text-align: center;
  letter-spacing: 1px;
  color: #555;
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.bio-hero {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 4px;
}

.bio-hero--portrait {
  max-width: 320px;
}

.bio-role-meta {
  color: #777;
  font-weight: 400;
}

.bio-connect {
  text-align: center;
  padding: 0.5rem 0;
}

.bio-connect .fa {
  color: white;
  text-decoration: none;
}

.bio-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  color: #666;
  font-size: 0.9rem;
  text-align: center;
}

.bio-footer p {
  margin: 0.5rem 0;
}

@media screen and (width <= 520px) {
  .bio {
    font-size: 17px;
    padding: 32px 18px 48px;
  }

  .bio h2 {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .bio h3 {
    margin-top: 2rem;
  }
}

/* Homelab page: enlargeable diagram */
.diagram-trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
  position: relative;
}

.diagram-trigger img {
  display: block;
}

.diagram-trigger-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.diagram-trigger:hover .diagram-trigger-hint,
.diagram-trigger:focus-visible .diagram-trigger-hint {
  opacity: 1;
}

.diagram-modal {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 92%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  cursor: zoom-out;
}

.diagram-modal[hidden] {
  display: none;
}

.diagram-modal img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.diagram-modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: transparent;
  border: 0;
  color: #f1f1f1;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.diagram-modal-close:hover {
  color: #bbb;
}

.diagram-trigger--photo {
  max-width: 360px;
  margin: 0.5rem auto 1.5rem;
}

.diagram-trigger--photo img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.diagram-caption {
  text-align: center;
  font-style: italic;
  color: #666;
  margin: 1.5rem auto 0.25rem;
  max-width: 720px;
}

.diagram-trigger--screenshot {
  max-width: 900px;
  margin: 0.5rem auto 1.5rem;
}

.diagram-trigger--screenshot img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
