/*--------------------------------------------------------------
# Custom styles for Mohamed L. Habiboullah's site
# (loaded after style.css, which is the iPortfolio template)
--------------------------------------------------------------*/
:root {
  --accent: #149ddd;
  --navy: #173b6c;
  --ink: #272829;
  --muted: #5f6b7a;
  --soft: #f5f8fd;
  --line: #e3e9f2;
}

/* Sidebar portrait: crop the portrait photo into a circle */
#header .profile img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: 50% 42%;
}
#header .profile h1 {
  font-size: 20px;
}
#header .profile .social-links a {
  margin: 0 2px 6px;
}

/* Hero: keep the (long) name inside the visible area, next to the sidebar */
#hero h1 {
  text-align: center;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.15;
  padding: 0 20px;
}
@media (min-width: 1200px) {
  #hero {
    padding-left: 300px;
  }
}
#hero p {
  text-align: center;
}
@media (max-width: 768px) {
  #hero p {
    font-size: 19px;
  }
}

/* About */
.about .content .lead-text {
  font-size: 17px;
  color: #3b4452;
}
.about .content ul li {
  align-items: flex-start;
  margin-bottom: 14px;
}
.about .content ul i {
  line-height: 1.4;
}

/* Resume layout fixes */
.resume .resume-item h4 {
  line-height: 1.35;
}
.resume .resume-item p {
  margin-bottom: 8px;
}
.cv-button-row {
  margin-top: 30px;
}
.cv-button-row .btn {
  margin-left: 0;
}
.about .cv-button-row .btn,
.about .cv-button-row .btn:hover {
  color: #fff;
}

/* Publications */
.pub-note {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}
.pub-group-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 14px;
}
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pub-list li {
  padding: 14px 18px;
  margin-bottom: 12px;
  background: #fff;
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 6px rgba(4, 11, 20, 0.06);
}
.pub-list .pub-title {
  font-weight: 600;
  color: #050d18;
}
.pub-list .pub-authors {
  color: #3b4452;
}
.pub-list .pub-authors .me {
  font-weight: 700;
  color: #050d18;
}
.pub-list .pub-venue {
  font-style: italic;
  color: var(--muted);
}
.pub-links {
  margin-top: 6px;
}
.pub-links a {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  margin: 4px 6px 0 0;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
}
.pub-links a:hover {
  background: var(--accent);
  color: #fff;
}
.pub-links .pending {
  display: inline-block;
  font-size: 13px;
  padding: 2px 10px;
  margin: 4px 6px 0 0;
  border: 1px dashed #9aa6b5;
  border-radius: 20px;
  color: var(--muted);
}

/* Timeline lists (awards, teaching, service, talks) */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline-list li {
  display: flex;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-list li:last-child {
  border-bottom: 0;
}
.timeline-list .when {
  flex: 0 0 120px;
  font-weight: 600;
  color: var(--navy);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  padding-top: 2px;
}
.timeline-list .what {
  flex: 1;
}
.timeline-list .what strong {
  color: #050d18;
}
.timeline-list .what small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}
@media (max-width: 576px) {
  .timeline-list li {
    flex-direction: column;
    gap: 2px;
  }
  .timeline-list .when {
    flex: none;
  }
}
.block-title {
  font-size: 22px;
  font-weight: 700;
  color: #050d18;
  margin: 10px 0 16px;
}

/* Skills as chips */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
  padding: 0;
  list-style: none;
}
.chip-list li {
  background: #e4edf9;
  color: var(--navy);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 14px;
  font-weight: 600;
}
.skills-group h4 {
  font-size: 16px;
  font-weight: 700;
  color: #050d18;
  margin-bottom: 4px;
}

/* Contact */
.contact .info p a {
  color: var(--navy);
}
.contact .info p a:hover {
  color: #37b3ed;
}

/* Footer */
#footer .credits {
  font-size: 13px;
  margin-top: 4px;
}

/*--------------------------------------------------------------
# Research section (cards on the home page)
--------------------------------------------------------------*/
.research-group-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 10px 0 18px;
}
.research-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 22px 18px;
  transition: box-shadow 0.25s, transform 0.25s;
  color: var(--ink);
}
.research-card:hover {
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(4, 11, 20, 0.10);
  transform: translateY(-2px);
}
.research-card .card-kicker {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.research-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: #050d18;
  line-height: 1.35;
  margin-bottom: 8px;
}
.research-card p {
  font-size: 14.5px;
  color: #4a5463;
  flex: 1;
  margin-bottom: 12px;
}
.research-card .card-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.research-card .badge-new {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e8871e;
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}

/*--------------------------------------------------------------
# Project pages
--------------------------------------------------------------*/
.project-page {
  padding: 40px 0 90px;
}
.project-article {
  max-width: 820px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #2b3038;
}
.project-article .project-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.project-article h1 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 12px;
}
.project-article .project-subtitle {
  font-size: 19px;
  color: #4a5463;
  line-height: 1.55;
}
.project-article h2 {
  font-size: 23px;
  font-weight: 700;
  color: #050d18;
  margin: 38px 0 12px;
}
.project-article h3 {
  font-size: 18px;
  font-weight: 700;
  color: #050d18;
  margin: 24px 0 8px;
}
.project-article ul li,
.project-article ol li {
  margin-bottom: 6px;
}
.paper-card {
  background: var(--soft);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0 8px;
  font-size: 15px;
  line-height: 1.55;
}
.paper-card .paper-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.paper-card .paper-title {
  font-weight: 600;
  color: #050d18;
}
.paper-card .me {
  font-weight: 700;
}
.tldr {
  border-left: 4px solid var(--accent);
  background: #eef7fd;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 28px 0 10px;
}
.tldr .tldr-title {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 17px;
  margin-bottom: 4px;
}
.tldr p:last-child {
  margin-bottom: 0;
}
.project-figure {
  margin: 26px 0;
  text-align: center;
}
.project-figure img {
  max-width: 100%;
  height: auto;
}
.project-figure figcaption {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
  text-align: left;
}
.result-list {
  list-style: none;
  padding: 0;
}
.result-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.result-list li::before {
  content: "\2713";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
details.for-experts {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 20px;
  background: #fff;
}
details.for-experts summary {
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 17px;
  padding: 14px 0;
}
details.for-experts[open] {
  padding-bottom: 12px;
}
.project-article pre {
  background: #0d1a2b;
  color: #e6edf5;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  overflow-x: auto;
}
.project-article code {
  font-size: 0.92em;
}
.project-article p code,
.project-article li code {
  background: #eef1f5;
  color: #173b6c;
  padding: 1px 5px;
  border-radius: 4px;
}
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.project-nav a {
  font-weight: 600;
  max-width: 48%;
}
@media (max-width: 576px) {
  .project-nav a {
    max-width: 100%;
  }
}
.project-nav .nav-next {
  margin-left: auto;
  text-align: right;
}
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
}
