/* Mainul Hossain - personal site stylesheet.
   Layout and type follow the Start Bootstrap "Resume" look (MIT License, (c) Start Bootstrap LLC),
   re-created without Bootstrap; the reboot, utility and navbar values below are those of
   Bootstrap 4.3.1 (MIT License, (c) The Bootstrap Authors and Twitter, Inc.).
   Fonts: Saira Extra Condensed and Muli (Google Fonts). Icons: Font Awesome Free 5.9.0, Academicons 1.8.6. */

/* ---------- Part A.1: reboot subset (Bootstrap 4.3.1 values) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background-color: #fff;
  color: #000;
  font-family: Muli, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 1rem;          /* 16px */
  font-weight: 400;
  line-height: 1.5;         /* 24px */
  text-align: left;
  padding-top: 54px;        /* room for the fixed top bar below 992px */
}
@media (min-width: 992px) {
  body { padding-left: 17rem; padding-top: 0; }   /* 272px fixed sidebar */
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: .5rem;
  line-height: 1.2;
  color: #000;
  font-family: "Saira Extra Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-weight: 700;
  text-transform: uppercase;
}
h1 { font-size: 6rem; line-height: 5.5rem; }   /* 96px / 88px */
h2 { font-size: 3.5rem; }                       /* 56px / 67.2px */
h3 { font-size: 2rem; }                         /* 32px / 38.4px */
h4 { font-size: 1.5rem; }                       /* 24px / 28.8px */
p { margin-top: 0; margin-bottom: 1rem; }
ul, ol { margin-top: 0; margin-bottom: 1rem; }
b, strong { font-weight: bolder; }              /* -> 700, rendered with Muli 800 face */
sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; }
sub { bottom: -.25em; }
sup { top: -.5em; }
img { vertical-align: middle; border-style: none; }
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
}
a { color: #001933; text-decoration: none; background-color: transparent; }
a:hover { text-decoration: underline; }
a:active, a:focus, a:hover { color: #000; }
a:not([href]):not([tabindex]),
a:not([href]):not([tabindex]):focus,
a:not([href]):not([tabindex]):hover { color: inherit; text-decoration: none; }
button {
  margin: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: none;
  overflow: visible;
  -webkit-appearance: button;
}
button:not(:disabled) { cursor: pointer; }

/* ---------- Part A.2: the Bootstrap utilities the markup uses ---------- */
.container-fluid { width: 100%; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; }
.p-0 { padding: 0 !important; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-100 { width: 100% !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.img-fluid { max-width: 100%; height: auto; }
.rounded-circle { border-radius: 50% !important; }
.text-primary { color: #001933 !important; }
.bg-primary { background-color: #001933 !important; }
.lead { font-size: 1.25rem; font-weight: 300; }  /* overridden by p.lead below */
@media (min-width: 768px) {
  .flex-md-row { flex-direction: row !important; }
  .text-md-right { text-align: right !important; }
  .p-md-4 { padding: 1.5rem !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .p-lg-5 { padding: 3rem !important; }
}

/* ---------- Part A.3: navbar (Bootstrap 4.3.1 component values) ---------- */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1rem;
}
.fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
.navbar-brand {
  display: inline-block;
  padding-top: .3125rem;
  padding-bottom: .3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  line-height: inherit;
  white-space: nowrap;
}
.navbar-brand:focus, .navbar-brand:hover { text-decoration: none; }
.navbar-nav { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; list-style: none; }
.nav-link { display: block; padding: .5rem 1rem; }
.nav-link:focus, .nav-link:hover { text-decoration: none; }
.navbar-nav .nav-link { padding-right: 0; padding-left: 0; }
.navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; }
.collapse:not(.show) { display: none; }
.navbar-toggler {
  padding: .25rem .75rem;
  font-size: 1.25rem;
  line-height: 1;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: .25rem;
}
.navbar-toggler:focus, .navbar-toggler:hover { text-decoration: none; }
.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  content: "";
  background: no-repeat 50%;
  background-size: 100% 100%;
}
.navbar-dark .navbar-brand,
.navbar-dark .navbar-brand:focus,
.navbar-dark .navbar-brand:hover { color: #fff; }
.navbar-dark .navbar-nav .nav-link { color: rgba(255, 255, 255, .5); }
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:hover { color: rgba(255, 255, 255, .75); }
.navbar-dark .navbar-nav .nav-link.active { color: #fff; }
.navbar-dark .navbar-toggler { color: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .1); }
.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
@media (min-width: 992px) {
  .navbar-expand-lg { flex-flow: row nowrap; justify-content: flex-start; }
  .navbar-expand-lg .navbar-nav { flex-direction: row; }
  .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
  .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
  .navbar-expand-lg .navbar-toggler { display: none; }
}

/* ---------- Part A.4: icon list ---------- */
.fa-ul { list-style-type: none; margin-left: 2.14285714em; padding-left: 0; line-height: 1.5; }
.fa-ul > li { position: relative; }
.fa-li {
  position: absolute;
  left: -2.14285714em;
  top: .14285714em;
  width: 2.14285714em;
  text-align: center;
  line-height: inherit;
}

/* ---------- Part A.5: theme ---------- */
p.lead { font-size: 1.15rem; font-weight: 400; margin-bottom: 40px; }   /* 18.4px / 27.6px */
.recNews, p.lead { text-align: justify; }
.recNews {
  color: #000;
  font-family: "Saira Extra Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;          /* wraps a <b>, so the label renders at 700 */
  text-transform: uppercase;
}
.intro-container { display: flex; flex: 6 1; }
.introduction { flex: 4 1; margin-right: 35px; }
.news { flex: 2 1; height: 735px; margin-right: 7px; overflow-y: auto; text-align: left; }
.news > ul { margin-top: 10px; }
.news > ul > li { margin-bottom: 10px; }
.paper-container { display: flex; flex: 7 1; }
.paper-body { flex: 4 1; margin-right: 35px; }
.paper-image { flex: 3 1; }
.img-caption { font-style: italic; margin-top: 7px; text-align: center; }
@media (max-width: 480px) {
  .intro-container { flex: 1 1; flex-direction: column; }
  .introduction { margin-right: 0; }
  .news { margin-top: 50px; }
  p.lead { margin-bottom: 25px; }
  .w-100 { padding: 0 22px; }
  section.resume-section { padding-top: 40px !important; padding-bottom: 40px !important; }
  .paper-container { flex: 1 1; flex-direction: column; }
  .paper-body { flex: 1 1; margin-right: 0; }
  .paper-image { flex: 1 1; }
}
.papers { list-style-type: none; padding: 0; }
.paper, .papers { text-align: justify; }
.paper { font-size: 1.15rem; font-weight: 400; }
.publishedwhere { font-style: italic; }
.authorMe { color: #001933; font-weight: 700; }
.subheading {
  font-family: "Saira Extra Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
}
.sym-icon { color: #00c; }
.social-icons a {
  display: inline-block;
  width: 3.5rem;
  height: 3.5rem;
  line-height: 3.5rem;
  margin-right: 1rem;
  border-radius: 100%;
  background-color: #001933;
  color: #fff !important;
  font-size: 1.5rem;
  text-align: center;
}
.social-icons a:last-child { margin-right: 0; }
.social-icons a:hover { background-color: #000; }
#sideNav .navbar-nav .nav-item .nav-link { font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
#sideNav .navbar-toggler:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 992px) {
  #sideNav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 17rem;
    height: 100vh;
    text-align: center;
  }
  #sideNav .navbar-brand { display: flex; margin: auto auto 0; padding: .5rem; }
  #sideNav .navbar-brand .img-profile {
    max-width: 10rem;
    max-height: 10rem;
    border: .5rem solid rgba(255, 255, 255, .2);
  }
  #sideNav .navbar-collapse { display: flex; align-items: flex-start; flex-grow: 0; width: 100%; margin-bottom: auto; }
  #sideNav .navbar-collapse .navbar-nav { flex-direction: column; width: 100%; }
  #sideNav .navbar-collapse .navbar-nav .nav-item,
  #sideNav .navbar-collapse .navbar-nav .nav-item .nav-link { display: block; }
}
section.resume-section { max-width: 75rem; padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) {
  section.resume-section { min-height: 100vh; }
  section.resume-section .resume-item .resume-date { min-width: 18rem; }
}
@media (min-width: 992px) {
  section.resume-section { padding-top: 3rem; padding-bottom: 3rem; }
}

/* =====================================================================
   Part B: layout adjustments
   ===================================================================== */
/* B1: side gutter between 481px and 767px. */
@media (min-width: 481px) and (max-width: 767.98px) {
  section.resume-section > .w-100 { padding: 0 22px; }
}
/* B2: stack bio/news and project text/image below 768px. */
@media (max-width: 767.98px) {
  .intro-container, .paper-container { flex-direction: column; }
  .introduction, .paper-body { margin-right: 0; }
  .news { margin-top: 50px; height: auto; }
}
/* B3: keep anchored headings and keyboard focus clear of the fixed 56px top bar. */
@media (max-width: 991.98px) {
  html { scroll-padding-top: 64px; }
}
/* B4: 24px between publication entries; 56px before the next year heading. */
.papers > li.paper { padding-bottom: 24px; }
/* B5: projects with short text still span the full width. */
.resume-item > .resume-content { flex: 1 1 auto; }

/* =====================================================================
   Part C: additions for this site
   ===================================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (min-width: 992px) { section.resume-section { scroll-margin-top: 0; } }

/* Keyboard focus and skip link */
a:focus-visible, button:focus-visible, .news-scroll:focus-visible { outline: 2px solid #1a1aff; outline-offset: 2px; }
#sideNav a:focus-visible { outline-color: #fff; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: .5rem 1rem; background: #fff; color: #001933; font-weight: 800; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
                   clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Sidebar: nine rows instead of five; tighten them on short screens */
#sideNav .navbar-nav .nav-item .nav-link i { font-size: 1.1rem; }
@media (min-width: 992px) {   /* the long CV labels stay on one line in the 240px sidebar */
  #sideNav .navbar-nav .nav-item.nav-cv .nav-link { letter-spacing: .01rem; white-space: nowrap; }
}
@media (min-width: 992px) and (max-height: 760px) {
  #sideNav .navbar-nav .nav-item .nav-link { padding-top: .3rem; padding-bottom: .3rem; }
  #sideNav .navbar-brand .img-profile { max-width: 8rem; max-height: 8rem; }
}
@media (max-width: 991.98px) {
  #sideNav .navbar-collapse { max-height: calc(100vh - 56px); overflow-y: auto; padding: 4px; margin: 0 -4px;
                              scroll-padding: 4px 0; }
}

/* About */
.about-tagline { margin: .5rem 0 1.5rem; }
.seeking { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 2rem;
           margin-bottom: 2.25rem; padding: .85rem 1.25rem; border-left: 4px solid #001933; background: #f1f4f8;
           font-size: 1.15rem; }
.seeking p { margin: 0; }
.seeking-text { font-weight: 800; color: #001933; }
.introduction p.lead { margin-bottom: 1.725rem; }            /* one blank line */
.introduction p.lead.emails { margin-bottom: 2rem; text-align: left; }
.emails .sep { margin: 0 .35rem; color: rgba(0, 0, 0, .35); }
.cv-links i, .emails i { margin-right: .35rem; }
.cv-links { display: flex; flex-wrap: wrap; column-gap: 1.8rem; }
.cv-links a { display: inline-block; }
.introduction p.lead.emails { padding-left: 1.6rem; text-indent: -1.6rem; }
.introduction p.lead.emails > i { width: 1.25rem; margin-right: .35rem; text-indent: 0; }
.emails a { text-indent: 0; }
@media (max-width: 1199.98px) {
  .emails .sep { display: none; }
  .emails a { display: inline-block; margin-right: 1rem; }
}
@media (max-width: 480px) {
  .seeking { padding: .75rem 1rem; }
}
.emails > i { color: #001933; }
.social-icons { display: flex; flex-wrap: wrap; gap: 1rem; }
.social-icons a { margin-right: 0; }

/* Recent News: the scroll box takes the bio's height on wide screens */
.news { position: relative; height: auto; min-height: 30rem; overflow: visible; }
.news-scroll { position: absolute; top: 2.25rem; right: 0; bottom: 0; left: 0; overflow-y: auto;
               scroll-padding-top: .5rem; scroll-padding-bottom: 2.75rem; }
.news-scroll > ul { margin-top: 10px; padding-bottom: 2.5rem; }
.news-scroll > ul > li { margin-bottom: 10px; }
.news::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2.5rem; pointer-events: none;
               background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
@media (max-width: 767.98px) {
  .news { min-height: 0; }
  .news-scroll { position: relative; top: auto; max-height: 26rem; }
}

/* Section intros and sub-section headings */
.section-intro { margin-bottom: 2.5rem; }
h3.group-heading { margin-top: 1rem; }

/* Dated rows (appointments, experience, education, awards) */
.resume-item .resume-content .subheading { line-height: 1.35; margin-bottom: .35rem !important; }
.resume-item .resume-date { white-space: nowrap; }
@media (max-width: 767.98px) {
  .resume-item .resume-date { order: -1; margin-bottom: .25rem; }
}
.resume-item p.paper { margin-bottom: .5rem; }
.resume-item p.paper:not(.meta) + p.paper:not(.meta) { margin-top: 1rem; }
.detail-line { font-size: 1.15rem; margin-bottom: .35rem; }
.detail-line .label, .meta .label { font-weight: 800; }

/* Card prose keeps a readable line length on wide screens */
.resume-item > .resume-content > p.paper:not(.meta) { max-width: 50rem; }

/* Research and software project blocks */
.project-when { margin: -.6rem 0 .75rem; color: #001933; }
.paper.meta { line-height: 1.7; }
.project-figure { margin: 1.25rem 0 0; }
.project-figure > a { display: block; }
.project-figure img { display: block; width: 100%; height: auto; border: 1px solid rgba(0, 0, 0, .1); }
.project-figure .img-caption { margin-bottom: 0; }

/* Publication entries */
.paper .title-plain { color: #00c; }
.paper u a, .paper a.bracket { text-decoration: underline; }

/* Honors and awards: an accent color, the heading face, and an award icon */
.honor { display: flex; align-items: baseline; margin: .2rem 0 .75rem; color: #85200c; font-family: "Saira Extra Condensed",
         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1.4rem;
         font-weight: 700; line-height: 1.3; letter-spacing: .02em; text-align: left; text-wrap: balance; }
.honor i { flex: none; margin-right: .5rem; font-size: 1.1rem; position: relative; top: -.05em; }
li.paper .honor { margin: .25rem 0 0; }
.resume-content > .honor:last-child { margin-bottom: .35rem; }

/* Compact list of earlier projects */
.papers.compact > li.paper { padding-bottom: 14px; }
.papers.compact .proj-name { font-weight: 800; color: #001933; }
.papers.compact .stack { font-style: italic; }

/* Skills */
.skills { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.75rem; margin: 0; font-size: 1.15rem; }
.skills dt { font-weight: 800; color: #001933; }
.skills dd { margin: 0; }
@media (max-width: 575.98px) {
  .skills { grid-template-columns: 1fr; gap: 0; }
  .skills dd { margin-bottom: .8rem; }
  .skills dd:last-child { margin-bottom: 0; }
}

/* Footer */
.site-footer { max-width: 75rem; padding: 3rem 3rem 2.5rem; text-align: center; }
.site-footer figure { margin: 0 auto 2rem; }
.site-footer blockquote { margin: 0; font-size: 1.15rem; font-style: italic; line-height: 1.6; }
.site-footer figcaption { margin-top: .6rem; }
.site-footer .footer-meta { margin: 0; color: rgba(0, 0, 0, .65); font-size: .95rem; }
@media (max-width: 767.98px) { .site-footer { padding: 2.5rem 22px 2rem; } }

/* Narrower screens: left-align justified text (avoids wide word gaps) */
@media (max-width: 1199.98px) {
  p.lead, .paper, .papers { text-align: left; }
}

/* Date column narrower where the text column is tight */
@media (min-width: 768px) and (max-width: 1199.98px) {
  section.resume-section .resume-item .resume-date { min-width: 12rem; flex-shrink: 0; padding-left: 1.5rem; }
}

/* Headings: balanced lines; keep short names together */
h1, h2, h3, h4, .subheading, .project-when { text-wrap: balance; }
.nowrap { white-space: nowrap; }

/* Links inside running text get a faint underline, not color alone */
p.lead a, .news a, p.paper a, .detail-line a, .footer-meta a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em;
  text-decoration-color: rgba(0, 0, 204, .4);
}
.footer-meta a { text-decoration-color: rgba(0, 25, 51, .4); }
p.lead a:hover, .news a:hover, p.paper a:hover, .detail-line a:hover, .footer-meta a:hover { text-decoration-color: currentColor; }

/* Even space above each section divider */
.resume-section .w-100 > .resume-item:last-child { margin-bottom: 0 !important; }
.resume-section .w-100 > .resume-item:last-child .resume-content > :last-child,
.resume-section .w-100 > :last-child .papers,
.resume-section .w-100 > .papers:last-child { margin-bottom: 0 !important; }
.resume-section .w-100 > :last-child .papers > li.paper:last-child,
.resume-section .w-100 > .papers:last-child > li.paper:last-child { padding-bottom: 0; }
@media (min-width: 481px) and (max-width: 767.98px) {
  section.resume-section { padding-top: 48px; padding-bottom: 48px; }
}

/* Touch-screen hint under the project diagrams; a zoom cursor for mouse users */
.tap-hint { display: none; }
@media screen and (hover: none) { .tap-hint { display: inline; } }
.project-figure > a { cursor: zoom-in; }

@media print {
  #sideNav, .skip-link, .news::after { display: none !important; }
  body { padding: 0 !important; }
  section.resume-section { min-height: 0 !important; padding: 1rem 0 !important; }
  .news-scroll { position: static; max-height: none; overflow: visible; }
}
