@charset "UTF-8";
/**************/
/* BASE RULES */
/**************/
@import url("https://fonts.googleapis.com/css2?family=Helvetica:wght@700&display=swap");
.container {
  width: 100%;
  /* Ensure the container is full-width on smaller screens */
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
  font-family: Helvetica, "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-display: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

strong {
  font-family: Helvetica, "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-display: auto;
}

h2 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  font-display: auto;
  font-weight: normal;
  padding: 0px;
  margin: 0px;
  display: inline;
}

h3 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  font-display: auto;
  padding: 0px;
  margin: 0px;
  display: inline;
}

h1 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: normal;
  font-display: auto;
  text-align: center;
  padding: 0px;
  margin-block-start: 14px;
  margin-block-end: 14px;
  margin-left: 0px;
  margin-right: 0px;
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background-color: #ffffd0;
}

.email-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

.amogh-text {
  /* Make the text bold */
  font-weight: bold;
  /* Create the gradient effect */
  background: linear-gradient(45deg, #4169E1, #9370DB);
  /* This makes the background clip to the text */
  -webkit-background-clip: text;
  background-clip: text;
  /* This makes the text transparent so the gradient shows through */
  -webkit-text-fill-color: transparent;
  /* Ensure the text remains crisp */
  -webkit-font-smoothing: antialiased;
}

/*
PUBLICATION TITLE HOVER EFFECT AND GRADIENT EFFECT
*/
.publication-title {
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.25em;
  background-clip: text;
  -webkit-background-clip: text;
  position: relative;
  display: inline-block;
  text-decoration: none;
  /* Set up the gradient */
  background-image: linear-gradient(to right, #4169E1 0%, #9370DB 50%, #2a2a2a 50%, #2a2a2a 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  /* Only transition the background position */
  transition: background-position 1s ease;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.publication-title:hover {
  background-position: 0 0;
}

/* Override visited link style */
.publication-title:visited {
  color: inherit;
}

.profile-photo-container {
  position: relative;
  display: inline-block;
  padding: 4px;
  background: linear-gradient(90deg, #4169E1 0%, #9370DB 33%, #4169E1 66%, #9370DB 100%);
  background-size: 300% 100%;
  border-radius: 50%;
  animation: gradientBorder 10s linear infinite;
  cursor: pointer;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
}

@keyframes gradientBorder {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}
.profile-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid white;
  border-radius: 50%;
  color-scheme: only light;
  -webkit-color-scheme: only light;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

a {
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  color: #4169E1;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #9370DB;
}

a:not(.subway-link) {
  /* styles */
}

.news-date {
  background: black;
  color: white;
  padding: 2px 8px;
  border-radius: 15px;
  font-weight: normal;
  font-family: Helvetica, Arial, sans-serif;
  display: inline-block;
  margin-bottom: 6px;
}

.show-more-link {
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  color: #4169E1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.show-more-link:hover {
  color: #9370DB;
}

h2 {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  color: white;
  padding: 10px 15px;
  background: black;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.line-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.subway-sign {
  display: flex;
  align-items: center;
  gap: 2px;
  background: black;
  width: fit-content;
  position: relative;
  padding: 2px 13px 2px 2px;
}

.subway-sign::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 2px;
  background: white;
}

.subway-sign h2 {
  color: white;
  margin: 0;
}

.subway-arrow {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-block;
  transform: rotate(45deg);
}

.subway-arrow::before {
  content: '';
  position: absolute;
  width: 30px;
  height: 6px;
  background: white;
  left: 0;
  top: 12px;
}

.subway-arrow::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 6px solid white;
  border-right: 6px solid white;
  transform: rotate(45deg);
  right: 0;
  top: 6px;
}

h1 {
  font-family: Helvetica, Arial, sans-serif;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  width: 70%;
  max-width: 700px;
  border-radius: 5px;
  font-family: Helvetica, Arial, sans-serif;
  border: 4px solid;
  border-image: linear-gradient(to bottom right, #4169E1, #9370DB) 1;
  transform: scale(0.7);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.publication-image {
  width: 200px;
  height: 140px;
  object-fit: contain;
  background-color: white;
  padding: 0px;
}

.publication-item td, .project-item td {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  vertical-align: top !important;
}

.publication-item:last-child td, .project-item:last-child td {
  padding-bottom: 10px !important;
}

.subway-link {
  text-decoration: none;
  transition: transform 0.2s ease;
  display: inline-block;
}

.subway-link:hover {
  transform: translateY(-2px);
}

/* Make sure subway signs in navigation are clickable */
.subway-link .subway-sign {
  cursor: pointer;
}

.navigation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.nav-section {
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #1772d0;
}

.nav-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nav-title {
  font-family: 'Lato', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.nav-description {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin: 0;
  flex-grow: 1;
}

.nav-section:hover .nav-title {
  color: #1772d0;
}

.nav-section:hover .nav-description {
  color: #555;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
  padding: 0 2.5%;
  max-width: 100%;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  padding: 0;
  transition: border-color 0.3s ease;
  background: white;
}

.highlight-card:hover {
  border-color: #4169E1;
}

.highlight-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background-color: #f9f9f9;
}

.highlight-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
}

.highlight-title {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #4169E1;
  margin: 0;
  line-height: 1.2;
}

.highlight-venue {
  font-size: 11px;
  color: #666;
  margin: 0;
  background: #e5e5e5;
  padding: 4px 8px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 15px;
  }

  .highlight-image {
    height: 140px;
  }

  .highlight-content {
    padding: 10px;
  }

  .highlight-title {
    font-size: 13px;
  }

  .highlight-venue {
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  .navigation-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .nav-section {
    padding: 16px;
  }

  .nav-title {
    font-size: 16px;
  }

  .nav-description {
    font-size: 12px;
  }

  .research-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 15px;
  }

  .highlight-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .highlight-image {
    height: 100px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .research-content,
  .project-content {
    padding: 16px;
  }
}
.gradient-bubble {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 5px;
  border-radius: 15px;
  color: #4169E1;
  text-decoration: none;
  font-size: 13px;
  position: relative;
  background: white;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  transition: color 0.3s ease;
}

.gradient-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  margin: -1.5px;
  border-radius: inherit;
  background: linear-gradient(to bottom right, #4169E1, #9370DB);
}

.gradient-bubble:hover {
  color: white;
  background: linear-gradient(to bottom right, #4169E1, #9370DB);
  background-clip: padding-box;
}

.gradient-bubble-prominent {
  display: inline-block;
  padding: 12px 24px;
  margin: 0 8px;
  border-radius: 25px;
  color: #4169E1;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  position: relative;
  background: white;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(65, 105, 225, 0.2);
}

.gradient-bubble-prominent::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  margin: -2px;
  border-radius: inherit;
  background: linear-gradient(to bottom right, #4169E1, #9370DB);
}

.gradient-bubble-prominent:hover {
  color: white;
  background: linear-gradient(to bottom right, #4169E1, #9370DB);
  background-clip: padding-box;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.nav-cards-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 25px 0 35px 0;
  flex-wrap: wrap;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 90px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 0px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}
.nav-card:hover {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box, radial-gradient(circle at center, #4169E1, #9370DB) border-box;
  color: #1772d0;
}

.nav-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.nav-card-title {
  font-size: 14px;
  font-weight: 500;
  text-transform: lowercase;
}

.musing-post {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}
.musing-post.clickable-post {
  cursor: pointer;
  user-select: none;
}
.musing-post.clickable-post:hover {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box, linear-gradient(45deg, #4169E1, #9370DB) border-box;
  box-shadow: 0 6px 20px rgba(65, 105, 225, 0.25);
  transform: translateY(-2px);
}
.musing-post.clickable-post:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}
.musing-post h3 {
  margin-top: 0;
  margin-bottom: 8px;
}
.musing-post h3 .publication-title {
  color: #1772d0;
  text-decoration: none;
}
.musing-post h3 .publication-title:hover {
  text-decoration: none;
}
.musing-post .news-date {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  font-style: italic;
}
.musing-post p {
  line-height: 1.6;
  margin-bottom: 15px;
}
.musing-post .read-more-text {
  color: #1772d0;
  font-weight: 500;
  margin-bottom: 0;
}

.expand-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 10000;
  border-radius: 50%;
  transform: scale(0);
  transform-origin: center;
  pointer-events: none;
}
.expand-overlay.expanding {
  animation: expandFromCenter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expandFromCenter {
  0% {
    transform: scale(0);
    border-radius: 50%;
  }
  70% {
    transform: scale(1.1);
    border-radius: 20%;
  }
  100% {
    transform: scale(1.2);
    border-radius: 0;
  }
}
.enhanced-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 0px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.enhanced-image.full-width {
  width: 100%;
  margin: 30px 0;
}
.enhanced-image.half-width {
  width: 50%;
}
.enhanced-image.half-width.center {
  margin: 20px auto;
}
.enhanced-image.half-width.left {
  float: left;
  margin: 0 20px 20px 0;
}
.enhanced-image.half-width.right {
  float: right;
  margin: 0 0 20px 20px;
}
.enhanced-image.inline-left {
  width: 40%;
  float: left;
  margin: 0 20px 15px 0;
}
.enhanced-image.inline-right {
  width: 40%;
  float: right;
  margin: 0 0 15px 20px;
}
.enhanced-image.hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin: 0 0 30px 0;
  border-radius: 0px;
}
.enhanced-image.small {
  width: 25%;
  margin: 10px auto;
}

.map-inset {
  border-radius: 0px;
  border: 2px solid #e0e0e0;
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.map-inset.inset-right {
  width: 300px;
  height: 200px;
  float: right;
  margin: 0 0 20px 20px;
}
.map-inset.inset-left {
  width: 300px;
  height: 200px;
  float: left;
  margin: 0 20px 20px 0;
}
.map-inset.full-width {
  width: 100%;
  height: 400px;
  margin: 30px 0;
}
.map-inset.small {
  width: 200px;
  height: 150px;
}

.callout {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  margin: 25px 0;
  border-radius: 0px;
  border-left: 4px solid;
  background: #f8f9fa;
}
.callout .callout-icon {
  font-size: 20px;
  margin-right: 15px;
  flex-shrink: 0;
}
.callout .callout-content {
  flex: 1;
  line-height: 1.6;
}
.callout.callout-info {
  border-left-color: #1772d0;
  background: #f0f7ff;
}
.callout.callout-warning {
  border-left-color: #ff9800;
  background: #fff8e1;
}
.callout.callout-success {
  border-left-color: #4caf50;
  background: #f1f8e9;
}
.callout.callout-error {
  border-left-color: #f44336;
  background: #ffebee;
}
.callout.callout-note {
  border-left-color: #9c27b0;
  background: #fce4ec;
}
.callout.center {
  max-width: 600px;
  margin: 25px auto;
}

.gallery {
  display: grid;
  gap: 15px;
  margin: 30px 0;
}
.gallery.grid-2 {
  grid-template-columns: 1fr 1fr;
}
.gallery.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.gallery.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.gallery .gallery-item {
  overflow: hidden;
  border-radius: 8px;
}
.gallery .gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery .gallery-item img:hover {
  transform: scale(1.05);
}
.gallery.masonry {
  display: block;
  column-count: 3;
  column-gap: 15px;
}
.gallery.masonry .gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 15px;
}
.gallery.masonry .gallery-item img {
  height: auto;
}

.custom-quote {
  border-left: 4px solid #1772d0;
  padding: 20px 30px;
  margin: 30px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 0px;
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
  position: relative;
}
.custom-quote::before {
  content: '"';
  font-size: 60px;
  color: #1772d0;
  position: absolute;
  left: 10px;
  top: -10px;
  font-family: serif;
}
.custom-quote.center {
  text-align: center;
  max-width: 700px;
  margin: 30px auto;
}

@media (max-width: 768px) {
  .enhanced-image.half-width, .enhanced-image.inline-left, .enhanced-image.inline-right {
    width: 100%;
    float: none;
    margin: 20px 0;
  }

  .map-inset.inset-right, .map-inset.inset-left {
    width: 100%;
    float: none;
    margin: 20px 0;
  }

  .gallery.grid-3, .gallery.grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .gallery.masonry {
    column-count: 2;
  }
}
@media (max-width: 480px) {
  .gallery.grid-2, .gallery.grid-3, .gallery.grid-4 {
    grid-template-columns: 1fr;
  }
  .gallery.masonry {
    column-count: 1;
  }
}
.blog-post-content {
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: #333;
}
.blog-post-content h1, .blog-post-content h2, .blog-post-content h3, .blog-post-content h4, .blog-post-content h5, .blog-post-content h6 {
  font-family: Helvetica, Arial, sans-serif;
  color: #333;
  margin: 30px 0 15px 0;
}
.blog-post-content h1:first-child, .blog-post-content h2:first-child, .blog-post-content h3:first-child, .blog-post-content h4:first-child, .blog-post-content h5:first-child, .blog-post-content h6:first-child {
  margin-top: 0;
}
.blog-post-content h1 {
  font-size: 28px;
  font-weight: bold;
}
.blog-post-content h2 {
  font-size: 22px;
  font-weight: bold;
  position: relative;
  padding: 15px 20px;
  margin: 30px 0 20px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-left: 4px solid #1772d0;
}
.blog-post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #4169E1, #9370DB);
}
.blog-post-content h3 {
  font-size: 18px;
  font-weight: bold;
  color: #1772d0;
  margin: 25px 0 15px 0;
  position: relative;
}
.blog-post-content h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(to right, #1772d0, #4169E1);
}
.blog-post-content p {
  margin: 15px 0;
  line-height: 1.7;
  text-align: justify;
}
.blog-post-content img:not(.enhanced-image) {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  display: block;
}
.blog-post-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.blog-post-content pre {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
}
.blog-post-content pre code {
  background: none;
  padding: 0;
}
.blog-post-content blockquote:not(.custom-quote) {
  border-left: 4px solid #e0e0e0;
  padding: 15px 25px;
  margin: 25px 0;
  background: #f8f9fa;
  font-style: italic;
  color: #666;
}
.blog-post-content ul, .blog-post-content ol {
  margin: 15px 0;
  padding-left: 30px;
}
.blog-post-content ul li, .blog-post-content ol li {
  margin: 8px 0;
  line-height: 1.6;
}
.blog-post-content a {
  color: #1772d0;
  text-decoration: none;
}
.blog-post-content a:hover {
  text-decoration: underline;
}
.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.blog-post-content table th, .blog-post-content table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}
.blog-post-content table th {
  background: #f8f9fa;
  font-weight: bold;
}
.blog-post-content table tr:last-child td {
  border-bottom: none;
}
.blog-post-content::after {
  content: "";
  display: table;
  clear: both;
}

.image-with-source, .image-with-extras {
  position: relative;
  display: inline-block;
}
.image-with-source .image-source, .image-with-extras .image-source {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 0px;
  font-family: Helvetica, Arial, sans-serif;
  max-width: 200px;
  word-wrap: break-word;
}
.image-with-source .image-caption, .image-with-extras .image-caption {
  background: rgba(248, 249, 250, 0.95);
  color: #666;
  padding: 8px 0;
  font-size: 12px;
  font-style: italic;
  font-family: Helvetica, Arial, sans-serif;
  margin-top: 6px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  line-height: 1.3;
}
.image-with-source:hover .image-source, .image-with-extras:hover .image-source {
  opacity: 1;
}
.image-with-source img, .image-with-extras img {
  display: block;
  width: 100%;
  height: auto;
}
.image-with-source img.enhanced-image.inline-left, .image-with-extras img.enhanced-image.inline-left {
  float: left;
  margin: 0 20px 15px 0;
  width: 40%;
}
.image-with-source img.enhanced-image.inline-right, .image-with-extras img.enhanced-image.inline-right {
  float: right;
  margin: 0 0 15px 20px;
  width: 40%;
}
.image-with-source img.enhanced-image.half-width, .image-with-extras img.enhanced-image.half-width {
  width: 50%;
}
.image-with-source img.enhanced-image.half-width.center, .image-with-extras img.enhanced-image.half-width.center {
  margin: 20px auto;
  display: block;
}
.image-with-source img.enhanced-image.half-width.left, .image-with-extras img.enhanced-image.half-width.left {
  float: left;
  margin: 0 20px 20px 0;
}
.image-with-source img.enhanced-image.half-width.right, .image-with-extras img.enhanced-image.half-width.right {
  float: right;
  margin: 0 0 20px 20px;
}
.image-with-source img.enhanced-image.full-width, .image-with-extras img.enhanced-image.full-width {
  width: 100%;
  margin: 30px 0;
  display: block;
}
.image-with-source img.enhanced-image.hero-image, .image-with-extras img.enhanced-image.hero-image {
  width: 100%;
  margin: 0 0 30px 0;
  display: block;
  height: 300px;
  object-fit: cover;
}
.image-with-source img.enhanced-image.small, .image-with-extras img.enhanced-image.small {
  width: 25%;
  margin: 10px auto;
  display: block;
}
.image-with-source.has-inline-left, .image-with-extras.has-inline-left {
  float: left;
  margin: 0 20px 15px 0;
  width: 40%;
}
.image-with-source.has-inline-right, .image-with-extras.has-inline-right {
  float: right;
  margin: 0 0 15px 20px;
  width: 40%;
}
.image-with-source.has-half-width, .image-with-extras.has-half-width {
  width: 50%;
}
.image-with-source.has-half-width.has-center, .image-with-extras.has-half-width.has-center {
  margin: 20px auto;
  display: block;
}
.image-with-source.has-half-width.has-left, .image-with-extras.has-half-width.has-left {
  float: left;
  margin: 0 20px 20px 0;
}
.image-with-source.has-half-width.has-right, .image-with-extras.has-half-width.has-right {
  float: right;
  margin: 0 0 20px 20px;
}
.image-with-source.has-full-width, .image-with-extras.has-full-width {
  width: 100%;
  margin: 30px 0;
  display: block;
}
.image-with-source.has-hero-image, .image-with-extras.has-hero-image {
  width: 100%;
  margin: 0 0 30px 0;
  display: block;
}
.image-with-source.has-hero-image img, .image-with-extras.has-hero-image img {
  height: 300px;
  object-fit: cover;
}
.image-with-source.has-small, .image-with-extras.has-small {
  width: 25%;
  margin: 10px auto;
  display: block;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.blog-post-content h1, .blog-post-content h2, .blog-post-content h3, .blog-post-content h4, .blog-post-content h5, .blog-post-content h6 {
  clear: both;
}
.blog-post-content p:has(+ h1)::after, .blog-post-content p:has(+ h2)::after, .blog-post-content p:has(+ h3)::after, .blog-post-content p:has(+ h4)::after, .blog-post-content p:has(+ h5)::after, .blog-post-content p:has(+ h6)::after {
  content: "";
  display: table;
  clear: both;
}

.content-blocks {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  min-height: 200px;
}

.content-row {
  display: flex;
  gap: 20px;
  width: 100%;
  min-height: 60px;
  position: relative;
}
.content-row.tight {
  gap: 10px;
}
.content-row.wide {
  gap: 30px;
}
.content-row.centered {
  justify-content: center;
}
.content-row.editing {
  padding: 10px;
  border: 2px dashed transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.content-row.editing:hover, .content-row.editing.drag-over {
  border-color: #1772d0;
  background: rgba(23, 114, 208, 0.05);
}

.content-block {
  position: relative;
  min-height: 40px;
  flex-shrink: 0;
}
.content-block.quarter {
  flex: 0 0 calc(25% - 15px);
}
.content-block.third {
  flex: 0 0 calc(33.333% - 14px);
}
.content-block.half {
  flex: 0 0 calc(50% - 10px);
}
.content-block.two-thirds {
  flex: 0 0 calc(66.667% - 7px);
}
.content-block.three-quarters {
  flex: 0 0 calc(75% - 5px);
}
.content-block.full {
  flex: 1;
}
.content-block.text-block {
  padding: 15px 0;
}
.content-block.text-block p, .content-block.text-block h1, .content-block.text-block h2, .content-block.text-block h3, .content-block.text-block h4, .content-block.text-block h5, .content-block.text-block h6 {
  margin: 0 0 15px 0;
}
.content-block.text-block p:last-child, .content-block.text-block h1:last-child, .content-block.text-block h2:last-child, .content-block.text-block h3:last-child, .content-block.text-block h4:last-child, .content-block.text-block h5:last-child, .content-block.text-block h6:last-child {
  margin-bottom: 0;
}
.content-block.image-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.content-block.image-block .image-caption {
  background: rgba(248, 249, 250, 0.95);
  color: #666;
  padding: 8px 12px;
  font-size: 12px;
  font-style: italic;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  margin-top: 6px;
}
.content-block.mixed-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.content-block.editing {
  border: 2px dashed transparent;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: move;
}
.content-block.editing:hover {
  border-color: #9370DB;
  background: rgba(147, 112, 219, 0.05);
}
.content-block.editing.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  z-index: 1000;
}
.content-block.editing.drag-left {
  border-left: 4px solid #28a745;
  background: rgba(40, 167, 69, 0.1);
}
.content-block.editing.drag-right {
  border-right: 4px solid #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.block-controls {
  position: absolute;
  top: -30px;
  right: 0;
  display: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px;
  gap: 4px;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.content-block.editing:hover .block-controls {
  display: flex;
}

.control-btn {
  background: #1772d0;
  color: white;
  border: none;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 9px;
  transition: background 0.2s;
}
.control-btn:hover {
  background: #0f5aa0;
}
.control-btn.active {
  background: #9370DB;
}

.resize-handle {
  position: absolute;
  background: #1772d0;
  display: none;
}
.resize-handle.resize-right {
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}
.resize-handle.resize-corner {
  bottom: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  cursor: se-resize;
  background: #9370DB;
}

.content-block.editing:hover .resize-handle {
  display: block;
}

.drop-zone {
  min-height: 60px;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
  background: rgba(248, 249, 250, 0.5);
  transition: all 0.3s ease;
}
.drop-zone.active {
  border-color: #1772d0;
  background: rgba(23, 114, 208, 0.1);
  color: #1772d0;
}
.drop-zone::before {
  content: "Drop content here";
  font-size: 14px;
}

.editing .drop-zone {
  display: flex;
}

.image-upload-zone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}
.image-upload-zone:hover, .image-upload-zone.drag-over {
  border-color: #1772d0;
  background: rgba(23, 114, 208, 0.05);
  color: #1772d0;
}
.image-upload-zone::before {
  content: "📷 Click or drag images here";
  font-size: 16px;
  display: block;
}

@media (max-width: 768px) {
  .content-row {
    flex-direction: column;
    gap: 20px;
  }
  .content-row .content-block {
    flex: none !important;
    width: 100% !important;
  }

  .content-blocks {
    gap: 20px;
  }
}
.block-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 25px 0;
  width: 100%;
  clear: both;
}
.block-row.tight {
  gap: 10px;
}
.block-row.wide {
  gap: 30px;
}
.block-row.equal .block-item {
  flex: 1;
}
.block-row.text-image {
  align-items: center;
}
.block-row.text-image .block-item:first-child {
  flex: 2;
}
.block-row.text-image .block-item:last-child {
  flex: 1;
}
.block-row.auto {
  margin: 15px 0;
}

.block-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.block-item.full {
  flex: 0 0 100%;
}
.block-item.half {
  flex: 0 0 calc(50% - 10px);
}
.block-item.third {
  flex: 0 0 calc(33.333% - 14px);
}
.block-item.two-thirds {
  flex: 0 0 calc(66.667% - 7px);
}
.block-item.quarter {
  flex: 0 0 calc(25% - 15px);
}
.block-item.three-quarters {
  flex: 0 0 calc(75% - 5px);
}
.block-item.complement {
  flex: 1;
  min-width: 0;
}
.block-item.center-content {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.block-item.top-content {
  align-items: flex-start;
}
.block-item.bottom-content {
  align-items: flex-end;
  justify-content: flex-end;
}
.block-item img.enhanced-image {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  display: block;
}
.block-item .image-with-extras {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  display: block;
}
.block-item .image-with-extras img {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}
.block-item p {
  margin: 10px 0;
}
.block-item p:first-child {
  margin-top: 0;
}
.block-item p:last-child {
  margin-bottom: 0;
}
.block-item .map-inset {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  height: 200px;
}
.block-item .map-inset.small {
  height: 150px;
}
.block-item .map-inset.large {
  height: 300px;
}
.block-item .callout {
  margin: 15px 0;
}
.block-item .gallery {
  margin: 15px 0;
}

@media (max-width: 768px) {
  .block-row {
    flex-direction: column;
    gap: 15px;
  }
  .block-row .block-item {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
}
@media (max-width: 480px) {
  .block-row {
    gap: 10px;
    margin: 20px 0;
  }

  .block-item .map-inset {
    height: 150px !important;
  }
}
.blog-post-content .block-row {
  margin: 30px 0;
}
.blog-post-content .block-row.auto {
  margin: 15px 0;
}
.blog-post-content .block-row:first-child {
  margin-top: 0;
}
.blog-post-content .block-row:last-child {
  margin-bottom: 0;
}
.blog-post-content .block-row::before,
.blog-post-content .block-row::after {
  content: "";
  display: table;
  clear: both;
}

.block-row.editing {
  border: 2px dashed #e0e0e0;
  min-height: 60px;
  position: relative;
}
.block-row.editing::after {
  content: "Row";
  position: absolute;
  top: -25px;
  left: 0;
  font-size: 11px;
  color: #999;
  background: white;
  padding: 2px 6px;
}
.block-row.editing:hover {
  border-color: #1772d0;
}

.block-item.editing {
  border: 1px dashed #e0e0e0;
  min-height: 40px;
  position: relative;
}
.block-item.editing::after {
  content: attr(data-size);
  position: absolute;
  top: -20px;
  right: 0;
  font-size: 10px;
  color: #999;
  background: white;
  padding: 1px 4px;
}
.block-item.editing:hover {
  border-color: #1772d0;
}

.block-item .enhanced-image.left, .block-item .enhanced-image.right, .block-item .enhanced-image.inline-left, .block-item .enhanced-image.inline-right {
  float: none !important;
  width: 100% !important;
}
.block-item .image-with-extras.has-left, .block-item .image-with-extras.has-right, .block-item .image-with-extras.has-inline-left, .block-item .image-with-extras.has-inline-right {
  float: none !important;
  width: 100% !important;
}

/* Block container and rows */
.content-blocks {
  width: 100%;
  margin: 0;
  padding: 0;
}

.content-row {
  display: flex;
  width: 100%;
  margin: 24px 0;
  gap: 20px;
  align-items: flex-start;
}
.content-row:first-child {
  margin-top: 0;
}
.content-row:last-child {
  margin-bottom: 0;
}
.content-row.editing {
  padding: 8px;
  border-radius: 12px;
  background: rgba(248, 249, 250, 0.5);
  border: 1px solid rgba(23, 114, 208, 0.1);
}
.content-row.editing:hover {
  background: rgba(248, 249, 250, 0.8);
}

/* Content blocks */
.content-block {
  flex: 1;
  min-height: 60px;
  position: relative;
  margin: 0;
  padding: 16px;
  box-sizing: border-box;
  background: white;
  border-radius: 8px;
}
.content-block.quarter {
  flex: 0 0 25%;
  max-width: 25%;
}
.content-block.third {
  flex: 0 0 33.33%;
  max-width: 33.33%;
}
.content-block.half {
  flex: 0 0 50%;
  max-width: 50%;
}
.content-block.two-thirds {
  flex: 0 0 66.67%;
  max-width: 66.67%;
}
.content-block.three-quarters {
  flex: 0 0 75%;
  max-width: 75%;
}
.content-block.full {
  flex: 1;
  max-width: 100%;
}
.content-block p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
  color: #2c3e50;
}
.content-block p[contenteditable="true"] {
  min-height: 20px;
  outline: none;
  cursor: text;
}
.content-block p[contenteditable="true"]:focus {
  background: rgba(23, 114, 208, 0.05);
  border-radius: 4px;
  padding: 4px;
  margin: -4px;
}
.content-block p[contenteditable="true"]:empty::before {
  content: "Type your text here...";
  color: #95a5a6;
  font-style: italic;
}
.content-block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.content-block img[src*="data:image/svg"] {
  border: 2px dashed #ddd;
  padding: 20px;
  background: #f8f9fa;
  box-shadow: none;
}

.image-caption {
  text-align: center;
  font-style: italic;
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* Editor styles */
.editor-btn {
  background: #1772d0;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  margin: 0 5px;
}
.editor-btn:hover {
  background: #0f5aa0;
}
.editor-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.add-block-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  margin: 0 5px 5px 0;
}
.add-block-btn:hover {
  background: #218838;
}

/* CLEAN editing mode - NO UGLY BORDERS */
.content-block.clean-editing {
  transition: all 0.2s ease;
  cursor: grab;
  position: relative;
}
.content-block.clean-editing:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.content-block.clean-editing.dragging {
  opacity: 0.9;
  transform: scale(1.01);
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: grabbing;
}
.content-block.clean-editing.drag-left {
  transform: translateX(3px);
}
.content-block.clean-editing.drag-right {
  transform: translateX(-3px);
}

/* Remove ALL existing editing borders */
.content-block.editing {
  display: none !important;
}

/* Resize handles */
.resize-handle {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.content-block.editing:hover .resize-handle {
  opacity: 1;
}

.resize-right:hover {
  background: rgba(23, 114, 208, 0.3) !important;
}

.resize-corner:hover {
  background: #0f5aa0 !important;
}

/* Hover zones and add buttons */
.hover-zone {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.hover-zone:hover {
  opacity: 1;
}

.hover-add-button {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulseGlow {
  from {
    opacity: 0.6;
    box-shadow: 0 0 5px currentColor;
  }
  to {
    opacity: 1;
    box-shadow: 0 0 20px currentColor;
  }
}
/* Content editable styles */
[contenteditable="true"] {
  outline: none;
}
[contenteditable="true"]:focus {
  background: rgba(255, 235, 59, 0.1);
  border-radius: 2px;
}

/* Block tools and menus */
.content-type-menu,
.add-menu,
.insert-menu {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}
.content-type-menu .menu-option,
.content-type-menu .menu-btn,
.add-menu .menu-option,
.add-menu .menu-btn,
.insert-menu .menu-option,
.insert-menu .menu-btn {
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.content-type-menu .menu-option:hover,
.content-type-menu .menu-btn:hover,
.add-menu .menu-option:hover,
.add-menu .menu-btn:hover,
.insert-menu .menu-option:hover,
.insert-menu .menu-btn:hover {
  transform: scale(1.05);
}

/* Image drop zones */
.image-drop-overlay {
  pointer-events: auto;
}
.image-drop-overlay:hover {
  background: rgba(23, 114, 208, 0.2) !important;
}

/* Clean drag preview styles */
.drag-row-preview {
  height: 3px;
  background: #28a745;
  margin: 12px 0;
  border-radius: 8px;
  animation: subtlePulse 2s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

.drag-horizontal-preview {
  width: 3px;
  background: #1772d0;
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 100;
  border-radius: 8px;
  animation: subtlePulse 2s infinite ease-in-out;
  box-shadow: 0 0 6px rgba(23, 114, 208, 0.4);
}

.size-hint {
  position: absolute;
  background: rgba(23, 114, 208, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  z-index: 101;
  animation: fadeIn 0.2s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@keyframes subtlePulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
/* Post preview styles */
.post-preview {
  overflow: hidden;
}
.post-preview .preview-image img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.post-preview .preview-text {
  text-align: justify;
  line-height: 1.5;
  color: #444;
}

.musing-post {
  margin: 25px 0;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}
.musing-post:last-child {
  border-bottom: none;
}
.musing-post .post-preview::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .content-row {
    flex-direction: column;
    gap: 10px;
  }

  .content-block.quarter, .content-block.third, .content-block.half, .content-block.two-thirds, .content-block.three-quarters {
    flex: 1;
    max-width: 100%;
  }

  .post-preview .preview-image {
    float: none !important;
    margin: 0 0 15px 0 !important;
    max-width: 100% !important;
    text-align: center;
  }
}
