:root {
  --ink: #222222;
  --muted: #444444;
  --link: #1772d0;
  --link-hover: #f09228;
  --visited: #00008b;
  --success: #006400;
  --hairline: #eeeeee;
  --font-body: "Lato", "Noto Sans Bengali", Verdana, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body, h1, h2, h3, p, ul, ol, li, dl, dt, dd, figure {
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover,
a:focus { color: var(--link-hover); }
a:visited { color: var(--visited); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

strong, b { font-weight: 700; }

h1 {
  margin: 14px 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

h2 {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.55;
}

h3 {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
}

.skip-link:focus { top: 1rem; color: white; }

.topbar {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 2.5% 0;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  min-height: 30px;
  margin: 0 auto;
  padding: 0;
}

.topbar__brand,
.topbar__brand:visited {
  color: #333333;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.topbar__brand:hover { color: var(--link-hover); }

.topbar__nav {
  display: flex;
  align-items: stretch;
  gap: 18px;
  margin-left: 24px;
}

.topbar__nav a,
.topbar__nav a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  white-space: nowrap;
}

.topbar__nav a:hover,
.topbar__nav a:focus { color: var(--link-hover); }

/* The narrow document frame used by the reference site. */
.site-shell {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 2.5% 60px;
}

.hero {
  display: flex;
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  flex-direction: column;
  justify-content: center;
}

.hero__grid {
  display: flex;
  align-items: stretch;
  gap: 4%;
  margin-bottom: 8px;
}

.hero__copy { flex: 1 1 60%; }
.hero__copy p { margin-bottom: 14px; }

.hero__portrait {
  flex: 0 0 41%;
  max-width: 41%;
  padding: 10px 0;
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #f7f7f7;
  object-fit: cover;
}

.link-row {
  margin: 20px 0 8px;
  text-align: center;
}

.link-row a { margin: 0 6px; }
.link-row span { color: var(--ink); }

.section {
  margin-bottom: 36px;
  scroll-margin-top: 16px;
}

.bullet-list,
.entry-list {
  margin-left: 20px;
  list-style: disc;
}

.bullet-list li { margin-bottom: 6px; }

.education-item { margin-left: 20px; }
.education-item > p:first-child::before {
  content: "•";
  position: absolute;
  margin-left: -20px;
}
.education-item p { margin-bottom: 2px; }

.title-accent { color: var(--visited); }
.date-range {
  margin-left: 6px;
  color: var(--success);
  font-style: italic;
  font-weight: 700;
}

.dash-list {
  margin-top: 6px;
  list-style: none;
}

.dash-list li {
  position: relative;
  margin-bottom: 4px;
  padding-left: 14px;
}

.dash-list li::before {
  content: "-";
  position: absolute;
  left: 0;
}

.entry-list > li { margin-bottom: 22px; }
.entry-list > li:last-child { margin-bottom: 0; }
.entry-list p { margin-bottom: 2px; }

.media-list { display: block; }

.media-item {
  display: flex;
  align-items: center;
  gap: 4%;
  margin-bottom: 30px;
}

.media-item:last-child { margin-bottom: 0; }

.media-item > img {
  flex: 0 0 25%;
  width: 25%;
  min-width: 110px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: #f7f7f7;
  object-fit: contain;
}

.media-item > div { flex: 1 1 auto; }
.media-item .meta { margin: 2px 0 6px; }
.media-item .item-links { margin-bottom: 8px; }
.media-item > div > p:last-child { margin-top: 4px; }

.meta { color: var(--muted); }
.heading-link,
.heading-link:visited { color: var(--ink); }
.heading-link:hover { color: var(--link-hover); }

.skills-table { width: 100%; }

.skills-table > div {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.skills-table > div:last-child { border-bottom: 0; }
.skills-table dt { flex: 0 0 28%; font-weight: 700; }
.skills-table dd { flex: 1 1 auto; color: var(--muted); }

.site-footer {
  padding: 20px 2.5% 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.site-footer nav a:hover { color: var(--link-hover); border-color: var(--link-hover); }
.site-footer .credit { margin-top: 6px; }

.prose-page { min-height: 72vh; }
.prose-page > header,
.prose-page > h1 { margin-top: 24px; }
.prose-page header h1,
.prose-page > h1 { text-align: left; }
.prose-page header { margin-bottom: 24px; }
.back-link { display: inline-block; margin-bottom: 18px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.prose p { margin-bottom: 16px; }
.prose h2,
.prose h3 { display: block; margin: 24px 0 10px; }

.post-list { list-style: none; }
.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.post-list span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.error-page { padding-top: 12vh; text-align: center; }
.error-page h1 { text-align: center; }

.coming-soon {
  display: grid;
  min-height: 65vh;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.coming-soon > h1 {
  margin: 4px 0 12px;
  text-align: center;
}

.coming-soon > p:not(.coming-soon__mark) {
  max-width: 500px;
  margin-bottom: 22px;
  color: var(--muted);
}

.coming-soon__mark {
  margin: 0;
  color: var(--link);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

@media (max-width: 768px) {
  .topbar { padding: 18px 20px 0; }

  .topbar__inner { align-items: center; }

  .topbar__brand { font-size: 17px; }

  .topbar__nav {
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-end;
    gap: 16px;
    margin-left: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar__nav::-webkit-scrollbar { display: none; }

  .topbar__nav a {
    min-height: 30px;
    font-size: 13px;
  }

  .site-shell { padding: 12px 20px 48px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }

  .hero {
    display: block;
    min-height: auto;
  }

  .hero__grid { flex-direction: column-reverse; gap: 20px; }

  .hero__copy,
  .hero__portrait {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .hero__portrait {
    width: 240px;
    max-width: 240px;
    margin: 0 auto;
  }

  .hero__portrait img { height: auto; }

  .media-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .media-item > img {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }

  .date-range { display: block; margin-left: 0; }
  .skills-table > div { flex-direction: column; gap: 4px; }
  .skills-table dt { flex-basis: auto; }
  .post-list li { flex-direction: column; gap: 2px; }
}

@media (max-width: 480px) {
  h1 { font-size: 22px; }
}

@media print {
  body { background: white; color: black; font-size: 11pt; }
  .site-shell { max-width: none; padding: 0; }
  .topbar, .link-row, .site-footer, .skip-link { display: none; }
  a { color: inherit; text-decoration: underline; }
  .section { break-inside: avoid; }
}
