/* Publication (paper) single page: justify text */
.article-container p,
.article-style p,
#main .article-container p {
  text-align: justify !important;
}

/* Experience: remove timeline entirely (circles + line) - no overflow possible */
#experience .card::before,
#experience .card::after,
#experience .article-style::before,
#experience .article-style::after,
#experience .card-body::before,
#experience .card-body::after,
#experience .card-block::before,
#experience .card-block::after,
#experience [class*="col-"]::before,
#experience [class*="col-"]::after,
#experience .stream,
#experience .stream::before,
#experience .stream::after,
#experience [class*="stream"],
#experience [class*="timeline"],
#experience .row::before,
#experience .row::after,
#experience .wg-experience .card::before,
#experience .wg-experience .card::after,
#experience .wg-experience [class*="col"]::before,
#experience .wg-experience [class*="col"]::after {
  display: none !important;
  content: none !important;
  background: none !important;
  border: none !important;
  height: 0 !important;
  overflow: hidden !important;
}
/* Experience: left-accent bar only (custom widget has no timeline markup) */
#experience .card,
#experience .article-style,
#experience .experience-card-plain,
#experience [class*="col-"] .card {
  border-left: 4px solid var(--global-theme-color, #007bff) !important;
  padding-left: 1rem !important;
  margin-bottom: 0.75rem;
}
#experience .experience-widget-plain .row { margin-bottom: -0.25rem; }
#experience .experience-col-plain { margin-bottom: 0.5rem; }
#experience .experience-card-plain .card-body { padding-left: 0.5rem; }
#experience .exp-title { margin-bottom: 0.35rem; }
#experience .exp-meta { font-size: 0.95rem; margin-bottom: 0.25rem; }
#experience .exp-meta,
#experience .exp-meta a {
  color: var(--global-text-color, #1e2022) !important;
}
#experience .exp-meta a:hover { opacity: 0.85; }
#experience .exp-date { font-size: 0.85rem; color: var(--global-theme-color, #007bff); margin-bottom: 0.5rem; }
#experience .exp-desc,
#experience .card-text { color: inherit !important; }
#experience .exp-desc { text-align: justify; }

/* Experience & Extracurricular: justify description text */
#experience .card-text,
#experience .article-style p,
#experience .card p,
#experience p.description,
#experience .experience-description,
#extracurricular .card-text,
#extracurricular .article-style p,
#extracurricular .card p,
#extracurricular p.description,
#extracurricular .experience-description {
  text-align: justify;
}

/* Newsletter page: logo */
.newsletter-logo-wrap {
  margin-bottom: 1.25rem;
}
.newsletter-logo {
  max-width: 200px;
  height: auto;
  display: block;
}

/* Newsletter page: Buttondown embed */
.newsletter-embed {
  max-width: 560px;
  margin-top: 1.5rem;
}
.newsletter-embed .newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}
.newsletter-embed .newsletter-form label {
  width: 100%;
  font-weight: 600;
  margin-bottom: 0;
}
.newsletter-embed .newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}
.newsletter-embed .newsletter-form input[type="submit"] {
  padding: 0.5rem 1.25rem;
  background: var(--global-theme-color, #007bff);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}
.newsletter-embed .newsletter-form input[type="submit"]:hover {
  opacity: 0.9;
}
.newsletter-embed .newsletter-powered {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 2rem;
}
.newsletter-embed .newsletter-iframe {
  margin-top: 0.5rem;
}

/* Other page: Instagram link – simple line below tagline */
.other-instagram-link {
  display: inline;
  margin-top: 0;
  font-size: 0.95rem;
}
.other-instagram-link i.fa-instagram {
  font-size: 0.9em;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Other page: Gear table – consistent gap and alignment */
.other-content-justify table {
  table-layout: fixed;
  width: 100%;
  max-width: 480px;
}
.other-content-justify table th,
.other-content-justify table td {
  padding: 0.5rem 1rem 0.5rem 0;
  vertical-align: top;
}
.other-content-justify table th:first-child,
.other-content-justify table td:first-child {
  width: 7rem;
  min-width: 7rem;
  padding-right: 1.25rem;
}
.other-content-justify table th:last-child,
.other-content-justify table td:last-child {
  padding-left: 0;
}

/* Other page: justify text */
.other-content-justify p,
#other p,
#other .article-style p,
#other .content p {
  text-align: justify !important;
}

/* Other page: photography gallery grid */
.other-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.other-gallery p {
  margin: 0;
}
.other-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* Lightbox/enlarged view: keep actual aspect ratio, no squeezing */
/* Target GLightbox: let container center the image and don't stretch */
.glightbox-container .gslide-content,
.glightbox-container .gslide-image,
.gslide-inner-content {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
}
.glightbox-container .gslide-image img,
.glightbox-container .gslide-content img,
.other-gallery .glightbox img,
.other-gallery [data-gallery] img,
.glightbox-content img,
.other-gallery + .glightbox-container .gslide-image img {
  object-fit: contain !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100vh !important;
}
.pswp__zoom-wrap,
.pswp__container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.pswp__zoom-wrap img,
.pswp__img {
  object-fit: contain !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: auto !important;
  height: auto !important;
}
.lightbox img,
.modal-body img,
[data-fancybox] img {
  object-fit: contain !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100vh !important;
}
/* Catch-all: lightbox/modal/overlay images keep aspect ratio */
[class*="lightbox"] img:not(.other-gallery img),
[class*="modal"] img,
[class*="overlay"] img,
[class*="pswp"] img {
  object-fit: contain !important;
  max-width: 100% !important;
  max-height: 100vh !important;
  width: auto !important;
  height: auto !important;
}
/* If lightbox uses background-image instead of img */
.glightbox-container .gslide-image[style*="background"],
[class*="glightbox"] [class*="gslide"][style*="background"] {
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

