.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* Push header closer to top */
  padding: 0.001rem 1.5rem;

  /* Ensure it spans full width */
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-nav {
  margin-left: auto; /* forces nav to extreme right */
}

.header-nav ul {
  display: flex;
  gap: 1.8rem;

  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav a {
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 400;
}

.home-intro {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  margin-top: 2.5rem;
}

.intro-name {
  font-size: 2rem;   /* slightly larger, not dramatic */
  line-height: 1.6;
  margin-bottom: 1.2rem;
  margin-left: 100px;
  font-weight: 700;
  color: #000000ed;
  font-family: 'sans-serif';
  /* background-color: #be7878; */
}

.intro-lead {
  font-size: 1.25rem;   /* slightly larger, not dramatic */
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.intro-body {
  font-size: 1rem;
  line-height: 1.7;
}

.intro-photo img {
  width: 1000px;
  height: auto;
  border-radius: 4px;     /* subtle, academic */
  object-fit: cover;
}

/* =========================
   Timeline (Education / Experience)
   ========================= */

.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 0.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left:1.1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e5e5e5;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 110px 40px auto;
  column-gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.timeline-date {
  font-size: 1.0rem;
  color: #555;
  text-align: right;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  background-color: #4CAF50; /* can be tuned */
  border-radius: 50%;
  margin-top: 0.35rem;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.0rem;
  font-weight: 600;
}

.timeline-place {
  margin: 0.3rem 0 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: #666;
}

/* =========================
   Experience section
   ========================= */

.experience-list {
  margin-top: 0.5rem;
}

.experience-item {
  display: grid;
  grid-template-columns: 140px auto;
  column-gap: 2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #e6e6e6;
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-period {
  font-size: 1.0rem;
  color: #666;
  text-align: right;
  white-space: nowrap;
}

.experience-role {
  font-size: 1.0rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.experience-org {
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
  margin-bottom: 0.4rem;
}

.experience-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

.about-header {
  display: flex;
  align-items: flex-start;
  /* gap: 2rem; */
  margin-bottom: 1.2rem; /* was much larger via theme */
}

.about-description {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
}

.about-contacts {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.about-contacts img {
  width: 20px;
  height: 20px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.about-contacts img:hover {
  opacity: 1;
}

.about-content {
  margin-top: 1.2rem;
}

.about-content p:first-child {
  margin-top: 0;
}

.research-interests {
  columns: 3;
  padding-left: 1rem;
  font-size: 1.0rem;
}

.research-interests li {
  margin-bottom: 0.4rem;
}

/* =========================
   Compact lists (Awards, Memberships)
   ========================= */

.compact-list {
  margin-top: 1.5rem;
}

.compact-item {
  display: grid;
  grid-template-columns: 1fr max-content;
  column-gap: 1.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e6e6e6;
}

.compact-item:last-child {
  border-bottom: none;
}

.compact-main {
  font-size: 1.0rem;
  line-height: 1.5;
}

.compact-meta {
  font-size: 1.0rem;
  color: #666;
  text-align: right;
  white-space: nowrap;
}

/* =========================
   Publications
   ========================= */

.pub-list {
  margin-top: 0rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 110px auto;
  column-gap: 2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e6e6e6;
}

.pub-item:last-child {
  border-bottom: none;
}

/* Journal cover */
.pub-cover img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Details */
.pub-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.3rem;
}

.pub-meta {
  font-size: 0.9rem;
  color: #666;
}

.pub-journal {
  font-style: italic;
}

.pub-highlights {
  margin: 0.6rem 0 0.8rem 1.2rem;
  padding: 0;
  font-size: 0.9rem;
  color: #444;
}

.pub-highlights li {
  margin-bottom: 0.3rem;
}

.pub-actions {
  margin-top: 0.4rem;
}

.pub-readmore {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  background: #fafafa;
  transition: all 0.2s ease;
}

.pub-readmore:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* =========================
   Conferences
   ========================= */

.conf-list {
  margin-top: 0rem;
}

.conf-item {
  display: grid;
  grid-template-columns: 1fr max-content;
  column-gap: 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e6e6e6;
}

.conf-item:last-child {
  border-bottom: none;
}

.conf-title {
  font-size: 1.0rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.conf-name {
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
}

.conf-location {
  font-size: 0.8rem;
  color: #666;
}

.conf-meta {
  font-size: 0.8rem;
  color: #666;
  white-space: nowrap;
  text-align: right;
}

.conf-tag {
  display: inline-block;
  margin-left: 0rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.5rem;
  border: 1px solid #bbb;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.conf-tag:hover {
  background-color: #eaeaea;
  border-color: #888;
}

/* =========================
   Personal
   ========================= */

.personal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.flip-card {
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 80%;
  height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.flip-card:hover .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flip-card-front {
  background: #fff;
}

.flip-card-front img {
  width: 128px;
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

.flip-card-front h3 {
  margin: 0;
  font-size: 1.1rem;
}

.flip-card-back {
  background: #fafafa;
  transform: rotateY(180deg);
  text-align: center;
}

.flip-card-back p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.flip-action {
  font-size: 0.85rem;
  color: #555;
}

/* =========================
   Research & Projects
   ========================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* Flip card */
.project-card {
  perspective: 1000px;
  max-width: 350px;
  /* margin: 0 auto; */
}

.project-card-inner {
  position: relative;
  width: 100%;
  height: 260px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* .project-card:hover .project-card-inner
.project-card.is-flipped .project-card-inner {
  transform: rotateY(180deg);
} */

.project-card:hover .project-card-inner {
  transform: rotateY(180deg);
}

/* Front & back */
.project-card-front,
.project-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  overflow: hidden;
}

.project-card-front {
  display: flex;
  flex-direction: column;
  background-color: #ffffff; /* Forces card to pure white */
  height: 100%;
  overflow: hidden;
}

.project-card-front img {
  flex: 1;
  width: 100%;
  object-fit: contain;
  min-height: 0;
  background-color: #ffffff;
  /* padding: 10px; */
  box-sizing: border-box;
  /* height: auto; */
  /* object-fit: cover; */
}

.project-card-front h3 {
  flex-shrink: 0;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  border-top: 1px solid #f0f0f0;
}

.project-card-back {
  background: #fafafa;
  transform: rotateY(180deg);
  padding: 1.2rem 1.5rem;;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
}

.project-heading {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;    /* Space between heading and description */
  color: #333;              /* Or your preferred color */
}

.project-card-back p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-link {
  align-self: flex-start;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid #ccc;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  color: #333;
}

/* =========================
   Personal pages
   ========================= */

.personal-page {
  max-width: 900px;
  margin: 0 auto;
}

.personal-header {
  margin-bottom: 2rem;
}

.personal-title {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.personal-subtitle {
  font-size: 1rem;
  color: #666;
}

.personal-content p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.personal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  column-gap: 1rem;
  row-gap: 0.1rem;
  margin: 0 0;
}

/* .personal-gallery img {
  width: 100%;
  border-radius: 6px;
} */
.personal-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Forces square shape */
  object-fit: cover;   /* Smart crops portrait/landscape to fit square */
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  border: 1px solid var(--border-color);

  &:hover {
    transform: scale(1.02);
    filter: brightness(0.9);
  }
}

/* 2. The Preview Modal */
.modal {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Dark backdrop */
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 0px;
  border: none !important;
  padding: 0 !important;       
  background: none !important;
  box-shadow: none;
  /* box-shadow: 0 0 20px rgba(0,0,0,0.5); */
  transition: opacity 0.2s ease-in-out;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.modal-arrow {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px; /* Centers vertically */
  color: white;
  font-weight: bold;
  font-size: 40px;
  transition: 0.3s ease;
  border-radius: 3px;
  user-select: none; /* Prevents highlighting the arrow text */
  z-index: 10000;
  

  &:hover {
    background-color: rgba(255,255,255,0.1);
  }
}

/* Position the "Next" button to the right */
.next-slide {
  right: 15%;
}

/* Position the "Previous" button to the left */
.prev-slide {
  left: 15%;
}

/* Adjust Close button position slightly if needed */
.close-modal {
  top: 20px;
  right: 30px;
}


/* =========================
   Updates
   ========================= */
@keyframes shimmer-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.updates-title {
  display: inline-block;
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  
/* Professional Blue Gradient: Black -> Deep Blue -> Slate Grey -> Black */
  background: linear-gradient(90deg, #000000, #0056b3, #6c757d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  animation: shimmer-flow 2s ease infinite;
}

/* Updates Layout */
.updates-section {
  margin-top: 50px;
  padding: 20px 0;
}

.updates-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.update-row {
  display: grid;
  grid-template-columns: 150px 1fr; /* Two column layout */
  align-items: baseline;
  padding: 0px 0;
}

.update-date {
  font-weight: bold;
  color: #666;
  font-family: monospace;
}

.update-description {
  line-height: 1.5;
}

.read-more {
  font-size: 0.85rem;
  margin-left: 5px;
  text-decoration: underline;
  color: #007bff;
}

/* More Updates Button */
.more-updates-box {
  display: inline-block;
  text-align: center;
  padding: 5px;
  border: 2px dashed #ccc;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  font-weight: bold;

  &:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
  }
}

.updates-link-text {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  color: #666;
  font-weight: bold;
  font-size: 0.95rem;
  transition: color 0.2s ease;

  span {
    display: inline-block;
    transition: transform 0.2s ease;
  }

  &:hover {
    color: #000;
    span {
      transform: translateX(5px); /* Moves the arrow forward */
    }
  }
}

.updates-link-underline {
  display: inline-block;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  position: relative;
  padding-bottom: 2px;

  &::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, red, orange, yellow, green, blue);
    transition: width 0.3s ease;
  }

  &:hover::after {
    width: 100%;
  }
}

/* Updates Feed Layout */
.updates-feed {
  margin-top: 20px;
}

.update-item {
  margin-bottom: 0px;
}

.update-header {
  margin-bottom: 0px;
}

.update-page-date {
  font-family: monospace;
  color: #828282;
  font-size: 1rem;
  text-transform: uppercase;
}

.update-page-description {
  margin: 0 0 0 0;
  font-size: 1.3rem;
  color: #000;
  font-weight: bold;
}

/* Body Content & Media Styling */
.update-full-content {
  line-height: 1.6;
  color: #333;
  font-size: 1.1rem;

  p {
    margin-bottom: 20px;
  }

  /* Ensures images don't overflow and are centered */
  img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  }

  /* Style for links inside the update */
  a {
    color: #0056b3;
    text-decoration: underline;
    &:hover {
      color: #000;
    }
  }
}

.update-separator {
  border: 0;
  border-top: 1px solid #eee;
  margin: 40px 0;
}

/* .site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
}

.header-nav ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav a {
  text-decoration: none;
  font-size: 1.1rem;
}
