/* ==========================================================
   Abdullah Arafat Miah — academic site
   Palette: paper #FFFFFF · ink #1B2733 · slate #5C6B78
            teal accent #0E6B60 · hairline #E4E9ED
   Type:    IBM Plex Serif (display) · IBM Plex Sans (body)
   ========================================================== */

:root {
  --paper: #ffffff;
  --ink: #1b2733;
  --slate: #5c6b78;
  --teal: #0e6b60;
  --teal-dark: #0a5249;
  --hairline: #e4e9ed;
  --wash: #f4f7f8;
  --amber: #8a6100;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 28px 40px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky;
  top: 78px;
}

.portrait {
  width: 100%;
  max-width: 260px;
  border-radius: 6px;
  display: block;
  margin-bottom: 22px;
}

.name {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.role {
  font-size: 0.92rem;
  color: var(--slate);
  margin-bottom: 14px;
}

.tagline {
  font-size: 0.95rem;
  border-left: 3px solid var(--teal);
  padding-left: 12px;
  margin-bottom: 22px;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.side-links a {
  color: var(--teal);
  text-decoration: none;
}

.side-links a:hover,
.side-links a:focus-visible {
  text-decoration: underline;
}

.cv-link {
  margin-top: 8px;
  align-self: flex-start;
  border: 1.5px solid var(--teal);
  border-radius: 4px;
  padding: 6px 14px;
  font-weight: 500;
}

.cv-link:hover,
.cv-link:focus-visible {
  background: var(--teal);
  color: #fff !important;
  text-decoration: none !important;
}

/* ---------- Main content ---------- */

.content { min-width: 0; }

.content section {
  margin-bottom: 52px;
}

.content h2 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.content p { max-width: 68ch; }

.content section > p + p { margin-top: 12px; }

.content a {
  color: var(--teal);
  text-decoration: none;
}

.content a:hover,
.content a:focus-visible {
  text-decoration: underline;
  color: var(--teal-dark);
}

.section-note {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 16px;
}

/* Interests */

.interest-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.interest-list li {
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.88rem;
}

/* News */

.news-list {
  list-style: none;
  max-width: 68ch;
}

.news-list li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}

.news-list li:last-child { border-bottom: none; }

.news-date {
  color: var(--slate);
  font-size: 0.9rem;
  padding-top: 1px;
}

/* Publications */

.pub-list {
  list-style: none;
  counter-reset: pubs 9;
  max-width: 72ch;
}

.pub-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

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

.pub-title {
  font-weight: 600;
  margin-bottom: 3px;
}

.pub-authors {
  font-size: 0.93rem;
  margin-bottom: 2px;
}

.pub-venue {
  font-size: 0.93rem;
  color: var(--slate);
}

.pub-links {
  margin-top: 5px;
  font-size: 0.9rem;
}

.pub-links a {
  margin-right: 14px;
  border-bottom: 1px solid currentColor;
}

.pub-links a:hover { text-decoration: none; }

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 3px;
  padding: 1px 8px 2px;
  margin-left: 6px;
  vertical-align: 1px;
  white-space: nowrap;
}

.badge.published {
  background: var(--teal);
  color: #fff;
}

.badge.accepted {
  color: var(--teal-dark);
  border: 1px solid var(--teal);
}

.badge.review {
  color: var(--amber);
  border: 1px solid #d9b96a;
}

.badge.prep {
  color: var(--slate);
  border: 1px solid var(--hairline);
  background: var(--wash);
}

/* Projects */

.project-list {
  list-style: none;
  max-width: 68ch;
}

.project-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.project-list li:last-child { border-bottom: none; }

.project-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.project-list p:not(.project-title) {
  font-size: 0.95rem;
  color: var(--ink);
}

/* Teaching, education */

.plain-list {
  list-style: none;
  max-width: 68ch;
}

.plain-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.plain-list li:last-child { border-bottom: none; }

.edu-list {
  list-style: none;
  max-width: 68ch;
}

.edu-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.edu-list li:last-child { border-bottom: none; }

.edu-degree { font-weight: 600; }

.edu-school {
  font-size: 0.93rem;
  color: var(--slate);
}

footer {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  font-size: 0.85rem;
  color: var(--slate);
}

/* ---------- Top navigation ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--hairline);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible { color: var(--teal); }

.topnav {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.topnav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.93rem;
  white-space: nowrap;
  padding: 4px 0;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.content section,
#top {
  scroll-margin-top: 70px;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .topnav { gap: 14px; }

  .page {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 36px;
  }

  .sidebar {
    position: static;
  }

  .portrait { max-width: 200px; }

}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
