/* ===== Navigation (left sidebar) ===== */
/* Hide site name in header on large screens */
.md-header__title {
  display: none;
}
/* Show site name only on small screens (≤ 768px) */
@media (max-width: 768px) {
  .md-header__title {
    display: block;
  }
}

.md-nav__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  text-transform: uppercase;
}

.md-nav__link {
  font-size: 0.8rem;   /* default ~0.7–0.8rem */
  padding: 0.2rem 0;   /* add vertical spacing */
}

/* ===== Table of contents (right sidebar) ===== */
.md-sidebar--secondary .md-nav__link {
  font-size: 0.8rem;  /* slightly larger */
  padding: 0.2rem 0;  /* add vertical spacing */
}

/* Optional: Make headings in TOC stand out more */
.md-sidebar--secondary .md-nav__item .md-nav__link {
  font-weight: 500;
}

/* Make "Table of contents" header more prominent */
.md-sidebar--secondary .md-sidebar__title {
  font-size: 0.9rem;         /* increase font size */
  font-weight: 700;          /* bold */
  color: var(--md-primary-fg-color);  /* use your theme’s primary color */
  text-transform: uppercase;
  margin-bottom: 0.75rem;     /* spacing below */
}

/* ===== Homepage: two-column hero card ===== */
.md-typeset .hero-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 16px;
  background: var(--md-default-bg-color);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin: 0 0 1.25rem 0;
}

.md-typeset .hero-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.md-typeset .hero-meta h1 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .6rem 0;
  color: var(--md-default-fg-color);
}

.md-typeset .hero-meta h3 {
  font-size: 0.75rem;
  font-weight: 400;
  margin: .15rem 0;
  color: var(--md-default-fg-color--light);
}

.md-typeset .hero-meta .hero-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light);
  margin: .15rem 0 .15rem 0;
}

.md-typeset .hero-contact {
  margin-top: .6rem;
  font-size: .75rem;
  color: var(--md-default-fg-color);
}

.md-typeset .hero-contact a {
  color: var(--md-typeset-a-color);
  text-decoration: none;
  font-weight: 500;
}
.md-typeset .hero-contact a:hover { text-decoration: underline; }

.md-typeset .hero-links {
  margin-top: .45rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .75rem;
}

/* Responsive: stack on narrow screens */
@media (max-width: 820px) {
  .md-typeset .hero-card {
    grid-template-columns: 110px 1fr;
    gap: 1rem 1.25rem;
  }
  .md-typeset .hero-photo {
    width: 110px;
    height: 110px;
  }
  .md-typeset .hero-meta h1 { font-size: 1.9rem; }
  .md-typeset .hero-meta .hero-title { font-size: 1.05rem; }
}

/* Extra small: full width image on top */
@media (max-width: 520px) {
  .md-typeset .hero-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .md-typeset .hero-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto .25rem 0;
  }
}

/* ===== Generic cards (used in Research, Funding, etc.) ===== */
.card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: .75rem;
}

@media (min-width: 900px) {
  .card-list { gap: 0.5rem; }
}

.card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.card-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: .35rem;
  color: var(--md-default-fg-color);
}

.card-body {
  font-size: .75rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.5;
}

/* ===== CV cards (same style as Awards) ===== */
/* ===== CV Buttons ===== */
.cv-buttons {
  display: flex;
  gap: 0.6rem;           /* space between buttons */
  margin: 0 0 1rem 0;        /* spacing above/below group */
}

.cv-btn {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: transparent;
  color: var(--md-typeset-a-color);
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.cv-btn:hover {
  background: var(--md-default-fg-color--lightest);
}

/* Different accent styles */
.cv-btn.open {
  border-color: var(--md-default-fg-color--lightest);
  color: var(--md-primary-fg-color--light);
}

.cv-btn.download {
  border-color: var(--md-default-fg-color--lightest);
  color: var(--md-primary-fg-color--light);
}

.cv-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.cv-card {
  display: flex;
  align-items: center;           /* center vertically */
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.cv-title {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;        /* title on top, sub under */
  margin: 0;
  font-weight: 700;
}

.cv-sub {
  font-size: 0.85em;
  color: var(--md-default-fg-color--light);
  margin-top: 0.2rem;
  font-weight: 400;
}

/* Year badge pinned right */
.cv-year {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;

  border: 1px solid var(--md-default-fg-color--lightest);
  background: transparent;
  color: var(--md-typeset-a-color);

  border-radius: 6px;
  padding: .15rem .2rem;
  font-size: .65rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace; /* keep alignment consistent */
}

@media (min-width: 900px) {
  .cv-list { gap: 0.5rem; }
}
/* ===== Publications: clean card layout (separated lines) ===== */
.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: .75rem;

  /* reset numbering counter */
  counter-reset: pub-counter;
}

@media (min-width: 900px) {
  .pub-list { gap: 0.5rem; }
}

.pub-card {
  display: grid;
  grid-template-columns: auto 1fr auto; /* number | details | year */
  align-items: start;                   /* align number with first line */
  font-size: 0.8rem;
  gap: 0.6rem 0.9rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .2s ease, transform .05s ease;

  /* increment the counter for each card */
  counter-increment: pub-counter;
}

.pub-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Automatic numbering */
.pub-number, .pub-num::before {
  content: counter(pub-counter);
  align-self: start;
  justify-self: center;
  font-weight: 600;
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
  background: var(--md-default-fg-color--lightest);
  border-radius: 999px;
  padding: .3rem .65rem;
  line-height: 1;
}

/* Lines inside the details column */
.pub-details { line-height: 1.55; }

.pub-authors {
  display: block;
  color: var(--md-default-fg-color);  /* same neutral text color as body */
  font-size: 0.75rem;
  margin: 0 0 .15rem 0;
}

.pub-title {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--md-default-fg-color);   /* same neutral text color as body */
  margin: .1rem 0 .15rem 0;
}
.pub-title i {
  font-style: italic;
  font-weight: bold; /* Add bold styling */
}

/* Publication title when it's a link */
.pub-title a {
  color: var(--md-primary-fg-color);   /* accent blue only for links */
  text-decoration: none;
}
.pub-title a:hover {
  text-decoration: underline;
}

/* Journal / volume / pages */
.pub-venue {
  display: block;
  color: var(--md-default-fg-color--light);
  font-size: 0.75rem;
  /* font-style: italic; */
  margin: 0 0 .15rem 0;
}

/* DOI line */
.pub-doi {
  display: block;
  margin-top: .1rem;
  font-size: .95rem;
}
.pub-doi a {
  text-decoration: none;
  color: var(--md-typeset-a-color);        /* blue link */
}
.pub-doi a:hover { text-decoration: underline; }

/* Subtle highlight for your name, same grey tone as co-authors */
.me, .pub-authors .me {
  color: var(--md-default-fg-color);  /* same grey as other authors */
  font-weight: 800;                          /* still bold */
  text-decoration: underline;                /* subtle emphasis */
}

/* Right-aligned year badge */
.pub-year {
  justify-self: end;
  background-color: #3f51b5;
  color: #fff;
  font-size: .75em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ===== Software cards ===== */
.software-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: .75rem;
}

.software-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .2s ease, transform .05s ease;
}

.software-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); }

/* ---- title row with actions on the right ---- */
.software-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .15rem;
  flex-wrap: wrap;  /* actions wrap under title on narrow screens */
}

.software-title {
  display: flex;
  flex-wrap: wrap;       /* allows wrapping if too long */
  align-items: center;   /* vertical alignment */
  gap: 0.4rem;           /* spacing between title, buttons, tags */
  font-weight: 700;
  font-size: 0.85rem;
}

/* subtitle line under the header */
.software-authors {
  color: var(--md-default-fg-color);
  font-size: 0.75rem;
  margin: 0 0 0.15rem 0;
}

.software-venue {
  color: var(--md-default-fg-color--light);
  margin: 0 0 .15rem 0;
  line-height: 1.4;
  font-size: 0.75rem;
  /* font-style: italic;    */
}

/* ---- actions live in the header now ---- */
.software-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 0;       /* no push-down spacing */
}

/* ===== Buttons vs Tags ===== */

/* reset */
.software-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}

/* Action buttons (Paper, GitHub) – small, distinct from tags */
.software-btn.action {
  border: 1px solid var(--md-default-fg-color--lightest);
  background: transparent;
  color: var(--md-typeset-a-color);
  border-radius: 6px;
  padding: .15rem .25rem;
  font-size: .75rem;
  font-weight: 600; 
}
.software-btn.action:hover { background: var(--md-default-fg-color--lightest); }

/* Small colored tech tags */
.software-tag {
  font-size: .68rem;
  font-weight: 700;
  padding: .14rem .42rem;
  border-radius: 999px;
  color: #fff;
  vertical-align: middle;
}

.software-tag.matlab { background: #e67e22; } /* orange */
.software-tag.python { background: #3572A5; } /* blue */
.software-tag.dl     { background: #8e44ad; } /* purple */

/* a touch of spacing before the first tag if it follows a button */
.software-actions .software-tag:first-of-type { margin-left: .25rem; }

/* slight title size bump on wide screens */
@media (min-width: 900px) {
  .software-list { gap: 0.5rem; }
}
