/* ===============================
   Custom Intro Styling (Massively style)
   =============================== */
#intro {
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.intro-block {
  text-align: center;
  padding: 4rem 2rem;
  background: transparent;
}

.intro-image img {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 100%;
  border: 3px solid white;
  margin: 0 auto 1.5rem auto;
  display: block;
}

.intro-divider {
  width: 5rem;
  margin: 2rem auto;
  border: none;
  border-top: 1px solid #fff;
}

#intro h1.intro-heading {
  font-size: 1.75rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

#intro .intro-subheading {
  color: #fff;
  text-transform: uppercase;
  line-height: 1.875;
  font-size: 0.8rem;
  letter-spacing: 0.2rem;
  margin-top: 1rem;
}

#intro p {
    font-style: normal;
}

.intro-note {
  display: block;
  opacity: 0.8;
  margin-top: 1rem;
  letter-spacing: 0.2rem;
  font-size: 0.6rem;
}

/* Minimal branding for internal pages */

#header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  opacity: 0.85;
}

#header .header-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

#header .header-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  opacity: 1;
  margin-bottom: 4rem;
}

#header a.logo {
    border: none;
    padding-bottom: 3rem;
}

#header a .header-name {
  border-bottom: 1px dotted transparent;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

#header a:hover .header-name {
    border-bottom: 1px dotted #fff;
}

@media screen and (max-width: 980px) {
    #header a.logo {
        font-size: 1.75rem;
        border-width: 3px !important;
        padding-bottom: 0rem;
        margin-top: 3rem;
    }

    #header {
        padding: 0rem;
    }

    #header .header-name {
        margin-bottom: 2rem;
    }
}

/* ===============================
   Timeline Layout
   =============================== */

.timeline {
  padding: 4rem 2rem;
}

.entries {
  margin: 0 auto;
  position: relative;
  max-width: 960px;
}

/* Vertical line */
.entries::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 4px;
  background: #111;
  z-index: 1;
}

/* Row wrapper */
.entry-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
  z-index: 2;
}

/* Vertical dot centered */
.entry-row::after {
  content: '';
  position: absolute;
  top: 2.4rem;
  left: 50%;
  transform: translate(-50%, 0);
  width: 14px;
  height: 14px;
  background: #111;
  border-radius: 50%;
  z-index: 10;
}

/* Right-only = white circle with black border */
.entry-row.has-right:not(.has-left)::after {
  width: 18px;
  height: 18px;
  background: #fff;
  box-shadow: 0 0 0 2px #111;
}

/* Left-only = solid dot (default already above) */
.entry-row.has-left:not(.has-right)::after {
  background: #111;
  border: none;
}

/* Both = target icon: black center, white ring, black ring */
.entry-row.has-both::after {
  width: 18px;
  height: 18px;
  background: #111;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px #111;
}

/* Shared block styles */
.entry {
  width: 48%;
  box-sizing: border-box;
}

.entry.left-item {
  text-align: right;
  padding-right: 2rem;
}

.entry.right-item {
  text-align: left;
  padding-left: 2rem;
  margin-left: auto;
}

.entry .title {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111;
}

.entry .subtitle {
  color: #777;
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.25rem;
}

.entry .body {
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
}

/* Responsive: stack vertically */
@media screen and (max-width: 768px) {
  .entry-row {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 2rem;
    position: relative;
  }

  .entry-row::after {
    left: 1.15rem;
    transform: translateX(-50%);
  }

  .entry {
    width: 100%;
    padding: 0 0 1.5rem 1.25rem;
    text-align: left !important;
  }

  .entry.left-item,
  .entry.right-item {
    padding: 0 0 1.5rem 1.25rem !important;
    text-align: left !important;
  }

  .entries::before {
    left: 1rem;
    transform: none;
  }
}

/* ===============================
   Academia
   =============================== */

/* Publication item styles */
.publication-item {
  padding: 8px 12px;
  border-radius: 6px;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  background-color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
}

/* General publication layout */
.publication-details {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9em;
  align-items: flex-start;
  gap: 12px;
}

/* Publication year */
.publication-year {
  flex: 0 0 50px;
  font-weight: bold;
}

.publication-info {
  flex: 1 1 0; 
  white-space: normal;    
  word-break: break-word;
  color: #333;
}

/* Author styling */
.publication-authors {
  font-weight: normal;
  color: #555;
}

/* Title styling */
.publication-title {
  font-weight: bold;
  color: #007BFF;
}

.publication-title a {
  color: inherit;
  text-decoration: none;
}

.publication-title a:hover {
  text-decoration: underline;
}

/* Venue/Publisher */
.publication-venue {
  font-style: italic;
  color: #888;
}

/* Category color scheme */
.publication-item.award {
  background-color: #fff8e1;
  border-left: 4px solid #ffb300;  /* Deep yellow/gold */
}

.publication-item.journal {
  background-color: #e8f5e9;
  border-left: 4px solid #66bb6a;  /* Green */
}

.publication-item.invited_talk {
  background-color: #f3e5f5; 
  border-left: 4px solid #ab47bc;  /* Purple */
}

.publication-item.conference {
  background-color: #e0f7fa; 
  border-left: 4px solid #00acc1;  /* Cyan */
}

.category-btn[data-category="conference"] {
  box-shadow: inset 0 0 0 2px #00acc1;
  color:        #00acc1 !important;
}
.category-btn[data-category="conference"]:hover, .category-btn[data-category="conference"].selected {
  box-shadow: inset 0 0 0 2px #00acc1;
  background-color: #00acc1;
  color:        #fff !important;
}

.category-btn[data-category="invited_talk"] {
  box-shadow: inset 0 0 0 2px #ab47bc;
  color:        #ab47bc !important;
}
.category-btn[data-category="invited_talk"]:hover, .category-btn[data-category="invited_talk"].selected {
  box-shadow: inset 0 0 0 2px #ab47bc;
  background-color: #ab47bc;
  color:        #fff !important;
}

.category-btn[data-category="journal"] {
  box-shadow: inset 0 0 0 2px #66bb6a;
  color:        #66bb6a !important;
}
.category-btn[data-category="journal"]:hover, .category-btn[data-category="journal"].selected {
  box-shadow: inset 0 0 0 2px #66bb6a;
  background-color: #66bb6a;
  color:        #fff !important;
}

.category-btn[data-category="award"] {
  box-shadow: inset 0 0 0 2px #ffb300;
  color:        #ffb300 !important;
}
.category-btn[data-category="award"]:hover, .category-btn[data-category="award"].selected {
  box-shadow: inset 0 0 0 2px #ffb300;
  background-color: #ffb300;
  color:        #fff !important;
}

@media (max-width: 800px) {
  .category-selector {
    display: flex;           /* ensure flex */
    flex-direction: column;  
    gap: 8px;                /* space between buttons */
  }

  .category-btn {
    width: 100%;             /* full-width */
    margin-bottom: 0;        /* reset any older overrides */
  }

  /* fallback for browsers that don’t support gap on flex: */
  .category-btn + .category-btn {
    margin-top: 8px;
  }
}

#publications-list {
  position: relative;       /* ensure Shuffle can absolutely position children */
}

.publication-item {
  box-sizing: border-box;   /* include padding in width */
  width: 100% !important;   /* lock in full‑width sizing */
}

/* Dark mode */
#main, #navPanel {
    transition: background 0.3s ease, color 0.3s ease;
}

#navPanelToggle.dark.alt {
    background-color: rgba(0, 0, 0, 0.875);
    color: #fff;
}

#navPanelToggle.dark {
    color: #000;
}

#main.dark, #navPanel.dark {
    background-color: #212931;
    color: #fff;
}

.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6,
.dark a,
.dark strong, .dark b,
.dark .entry .title {
  color: #fff;
}

.dark .hr {
    border-bottom-color: #fff;
}

.dark .entry .body, .dark .entry .subtitle {
    color: #c9ced3;
}

.dark .entries::before, .dark .entry-row.has-left:not(.has-right)::after {
    background: #fff;
}

.dark .entry-row.has-both::after {
    background: #fff;
    border: 4px solid #212931;
    box-shadow: 0 0 0 2px #fff;
}

.dark input[type="submit"], .dark input[type="reset"], .dark input[type="button"], .dark button, .dark .button {
    box-shadow: inset 0 0 0 2px #fff;
    color: #fff !important;
}

.dark .publication-details, .dark .publication-details strong, .dark .publication-details a {
    color: #212931;
}

.dark .publication-item {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* file preview in md */ 
.file-preview-box {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #212931;
  font-family: ui-serif, Georgia, serif;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.dark .file-preview-box {
  background-color: #1f2a32;
  color: #e0e0e0;
  border-color: #fff;
}
