/* ============================================================
   Md Anwar Hossen — academic site
   Theme inspired by Beautiful Jekyll (clean, light, card-based)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --text: #404040;
  --text-soft: #555555;
  --heading: #2c3e50;
  --link: #1a7bb9;
  --link-hover: #0d5a8f;
  --border: #eaeaea;
  --nav-bg: #f7f7f7;
  --btn-primary: #2b3a55;
  --btn-primary-text: #ffffff;
  --btn-ghost-border: #d6d6d6;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Lora", "Georgia", Cambria, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------------- Navbar ---------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.navbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.navbar-brand {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading);
}
.navbar-brand:hover { text-decoration: none; color: var(--link); }
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a { color: var(--heading); }
.nav-links a:hover { color: var(--link); text-decoration: none; }
.nav-links a.active { color: var(--link); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ---------------- Page container ---------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ---------------- Profile header ---------------- */
.profile {
  text-align: center;
  padding-top: 34px;
}
.profile img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.profile h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--heading);
  margin: 18px 0 4px;
}
.profile .tagline {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------------- Intro / bio ---------------- */
.intro p { margin: 0 0 18px; }

/* social / link badges */
.badges {
  margin: 22px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 4px;
  color: #fff !important;
  display: inline-block;
}
.badge:hover { text-decoration: none; opacity: 0.9; }
.badge.linkedin { background: #0a66c2; }
.badge.scholar  { background: #4285f4; }
.badge.cv       { background: #1c1c1c; }
.badge.github   { background: #24292e; }
.badge.email    { background: #c0392b; }
.badge.arxiv    { background: #b31b1b; }

/* ---------------- Section headings ---------------- */
h2.section {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--heading);
  margin: 46px 0 8px;
}
.rule { border: 0; border-top: 1px solid var(--border); margin: 12px 0 22px; }

.year-head {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--heading);
  margin: 38px 0 6px;
  border-bottom: 2px solid var(--heading);
  padding-bottom: 6px;
}

/* ---------------- News timeline ---------------- */
.news {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.news-item {
  display: flex;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.news-item:last-child { border-bottom: 0; }
.news-date {
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  min-width: 64px;
}

/* ---------------- Honors / generic lists ---------------- */
.tidy-list { padding-left: 22px; margin: 0; }
.tidy-list li { margin-bottom: 8px; }

/* ---------------- Publication cards ---------------- */
.pub {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.pub-thumb {
  flex: 0 0 180px;
  width: 180px;
}
.pub-thumb img,
.pub-thumb .ph {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: block;
}
.pub-thumb .ph {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8eef5, #d4dde8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8aa0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
}
.pub-body { flex: 1; min-width: 0; }
.pub-title {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--heading);
  margin: 0 0 8px;
  line-height: 1.35;
}
.pub-title a { color: var(--heading); }
.pub-title a:hover { color: var(--link); text-decoration: none; }
.pub-authors { font-size: 0.98rem; color: var(--text); margin: 0 0 4px; }
.pub-authors .me { font-weight: 700; }
.pub-venue { font-style: italic; color: var(--text-soft); font-size: 0.95rem; margin: 0 0 12px; }
.pub-venue .award { font-style: normal; font-weight: 700; color: #b8860b; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-primary { background: var(--btn-primary); color: var(--btn-primary-text); }
.btn-ghost {
  background: #fff;
  color: var(--heading);
  border: 1px solid var(--btn-ghost-border);
}

.btn-code {
  background: #24292e;   /* GitHub dark gray */
  color: #ffffff;
}
.btn-code:hover { color: #ffffff; }

.btn-ghost:hover { background: var(--bg-soft); color: var(--heading); }
.btn .star { color: #e3b341; }

/* ---------------- Project cards (grid) ---------------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.proj-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  display: flex;
  flex-direction: column;
}
.proj-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.10); transform: translateY(-3px); }
.proj-card .thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #2b3a55, #4a6fa5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}
.proj-card .body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.proj-card h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  color: var(--heading);
  margin: 0 0 8px;
}
.proj-card p { font-size: 0.95rem; color: var(--text-soft); margin: 0 0 14px; flex: 1; }
.proj-card .more {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
}
.tag {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-soft);
  padding: 2px 9px;
  border-radius: 20px;
  margin: 0 6px 6px 0;
}

/* ---------------- Project detail page ---------------- */
.proj-hero {
  padding-top: 30px;
}
.proj-hero h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--heading);
  margin: 6px 0 10px;
}
.proj-meta { color: var(--text-soft); font-size: 0.98rem; margin-bottom: 16px; }
.proj-meta .me { font-weight: 700; color: var(--text); }
.back-link {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}
.proj-content h2 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.4rem;
  color: var(--heading);
  margin: 34px 0 10px;
}
.proj-content p { margin: 0 0 16px; }
.proj-content ul { padding-left: 22px; }
.proj-content li { margin-bottom: 8px; }
.callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--link);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 20px 0;
  font-size: 0.98rem;
}

/* ---------------- Timeline (Experience / Education) ---------------- */
.timeline {
  position: relative;
  margin: 10px 0 0;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  padding: 0 0 30px 6px;
}
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--link);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
.tl-item.current::before { background: #27ae60; }
.tl-date {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 3px;
}
.tl-date .now {
  background: #27ae60;
  color: #fff;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.tl-title {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--heading);
  margin: 0 0 2px;
}
.tl-org {
  font-size: 0.98rem;
  color: var(--link);
  margin: 0 0 8px;
}
.tl-org .place { color: var(--text-soft); }
.tl-item ul { padding-left: 20px; margin: 6px 0 0; }
.tl-item ul li { margin-bottom: 6px; font-size: 0.97rem; }
.tl-gpa {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-soft);
  padding: 2px 10px;
  border-radius: 20px;
  margin-top: 6px;
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
}
.footer-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.footer-icons a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #3a3a3a;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s ease;
}
.footer-icons a:hover { background: var(--link); text-decoration: none; }
.footer-text {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
  }
  .nav-links.open { display: flex; }
  .navbar-inner { position: relative; }
  .pub { flex-direction: column; gap: 14px; }
  .pub-thumb { flex-basis: auto; width: 100%; max-width: 320px; }
  .proj-grid { grid-template-columns: 1fr; }
  .profile h1 { font-size: 2rem; }
}

.proj-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 24px 0 8px;
}
/* ---------------- CV page ---------------- */
.cv-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 6px;
}
@media print {
  .navbar, .footer, .cv-actions { display: none !important; }
  body { font-size: 11pt; }
  .cv-sheet { box-shadow: none; border: 0; margin: 0; padding: 0; max-width: 100%; }
  a { color: #000 !important; text-decoration: none; }
}

.cv-sheet {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  border-radius: 6px;
  padding: 48px 52px;
  margin-top: 14px;
}

.cv-head {
  text-align: center;
  border-bottom: 2px solid var(--heading);
  padding-bottom: 18px;
  margin-bottom: 8px;
}
.cv-head h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--heading);
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.cv-head .cv-role {
  color: var(--text-soft);
  font-size: 1.02rem;
  margin: 0 0 10px;
}
.cv-contact {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.86rem;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}
.cv-contact a { color: var(--link); }

.cv-section { margin-top: 26px; }
.cv-section > h2 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  margin: 0 0 14px;
}

.cv-entry { margin-bottom: 16px; }
.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}
.cv-entry-title {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--heading);
}
.cv-entry-date {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.cv-entry-org {
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 1px 0 4px;
}
.cv-entry ul { padding-left: 20px; margin: 5px 0 0; }
.cv-entry ul li { margin-bottom: 4px; font-size: 0.95rem; }

.cv-pub-list { padding-left: 0; margin: 0; list-style: none; counter-reset: pub; }
.cv-pub-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.cv-pub-list li::before {
  counter-increment: pub;
  content: "[" counter(pub) "]";
  position: absolute;
  left: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-soft);
}
.cv-pub-list .me { font-weight: 700; }
.cv-pub-list .venue { font-style: italic; color: var(--text-soft); }
.cv-pub-list .note { color: #b8860b; font-size: 0.85rem; }

.cv-twocol {
  columns: 2;
  column-gap: 34px;
}
.cv-twocol ul { margin: 0; padding-left: 18px; }
.cv-twocol li { margin-bottom: 6px; font-size: 0.94rem; break-inside: avoid; }

.cv-flat { padding-left: 20px; margin: 0; }
.cv-flat li { margin-bottom: 7px; font-size: 0.95rem; }

@media (max-width: 720px) {
  .cv-sheet { padding: 28px 22px; }
  .cv-twocol { columns: 1; }
  .cv-entry-head { flex-direction: column; gap: 2px; }
}

.profile h1 .pronouns {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 10px;
  letter-spacing: 0.3px;
}