:root {
  color-scheme: light;
  --ink: #0b2a4a;
  --navy: #2563eb;
  --teal: #0d9488;
  --aqua: #0891b2;
  --sky: #bae6fd;
  --frost: #b8d4ea;
  --paper: #f4f9fd;
  --panel: #ddebf6;
  --white: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans Bengali", "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "SolaimanLipi", "Kalpurush", "Vrinda", "Noto Sans", "Helvetica Neue", sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(66rem, calc(100% - 2.2rem));
  min-width: 0;
  margin: 0 auto;
  padding: 2.2rem 0 3rem;
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: 2.6rem;
  align-items: start;
}

.side {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.35rem;
  background: var(--panel);
}

.portrait {
  width: 11.2rem;
  height: 14.4rem;
  margin: 0 0 0.85rem;
  overflow: hidden;
  background: var(--panel);
  color: var(--navy);
  font-size: 0.92rem;
}

.portrait img {
  display: block;
  width: 132%;
  max-width: none;
  height: auto;
  margin-left: -16%;
}

.portrait.is-draft {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--aqua);
}

.side .brand {
  display: block;
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.side a.brand:hover {
  color: var(--navy);
}

.side .role {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 400;
}

.side .profile {
  font-size: 0.92rem;
  line-height: 1.6;
}

.side .profile p {
  margin: 0 0 0.55rem;
}

.side .links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.05rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.main-col {
  min-width: 0;
}

.main-col nav {
  margin: 0 0 1.6rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--frost);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  z-index: 20;
  transform: translateY(-200%);
  padding: 0.3rem 0.7rem;
  background: var(--sky);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
}

nav a {
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

nav a[aria-current="page"] {
  color: var(--teal);
  box-shadow: inset 0 -2px 0 var(--teal);
}

main {
  min-width: 0;
}

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: break-word;
}

h1 {
  font-size: 1.85rem;
}

h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

#prokashona ~ h2 {
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

section + section {
  margin-top: 2rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
  overflow-wrap: break-word;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.role,
.page-lead,
.meta-row,
.byline,
.kind,
.count,
.footer-note {
  color: var(--navy);
  font-weight: 400;
}

.page-lead {
  margin: 0 0 1.4rem;
}

.draft-label {
  display: inline;
  color: var(--aqua);
  font-size: 0.9rem;
  font-weight: 700;
}

.profile.is-draft {
  padding-left: 0.85rem;
  border-left: 3px solid var(--aqua);
}

.profile p:last-child {
  margin-bottom: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.meta-sep {
  color: var(--aqua);
}

.excerpt {
  margin-bottom: 0.4rem;
}

.entry-list,
.book-grid,
.clip-grid,
.more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-list li,
.book-grid li,
.clip-grid li,
.more-list li {
  padding: 0.95rem 0;
  border-top: 1px solid var(--frost);
}

.entry-list h3,
.book-grid h2,
.clip-grid h2,
.more-list h2 {
  margin: 0 0 0.3rem;
  font-size: 1.12rem;
}

.kind {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
}

.more-list p {
  margin: 0;
}

.page-head {
  margin-bottom: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--frost);
}

.page-head h1 {
  margin: 0;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0 0 1.4rem;
  padding: 0 0 0.9rem;
  border-bottom: 1px solid var(--frost);
  font-size: 0.92rem;
  font-weight: 600;
}

.archive-group + .archive-group {
  margin-top: 2rem;
}

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.group-head h2 {
  margin: 0;
}

.count {
  font-size: 0.95rem;
}

.back {
  margin-bottom: 1.1rem;
}

.story-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--frost);
}

.story-header h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.85rem;
}

.story p {
  margin-bottom: 1.15rem;
}

.story-end {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--frost);
}

.clip-frame {
  display: block;
  margin: 0 0 0.7rem;
}

.clip-frame img {
  display: block;
  max-width: min(100%, 22rem);
  height: auto;
  border: 1px solid var(--frost);
}

.clip-grid .clip-frame img {
  max-width: 100%;
}

.book-grid li {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  column-gap: 1.15rem;
  align-items: start;
}

.book-grid .clip-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.book-grid .clip-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.book-grid .book-copy > :last-child {
  margin-bottom: 0;
}

.book-grid li:not(:has(.clip-frame)) {
  grid-template-columns: minmax(0, 1fr);
}

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, 6.8rem);
  gap: 1rem 1.15rem;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0 0.85rem;
  list-style: none;
}

.shelf a {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.shelf a > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.05em;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.shelf a:hover {
  color: var(--teal);
}

.shelf .clip-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.shelf .clip-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0.2rem 0 0.85rem;
  overflow: hidden;
  list-style: none;
}

.thumbs li {
  flex: 0 0 7.4rem;
}

.thumbs a {
  display: block;
}

.thumbs img {
  display: block;
  width: 7.4rem;
  height: 5.55rem;
  object-fit: cover;
  object-position: top center;
  background: var(--white);
  border: 1px solid var(--frost);
}

.book-grid a {
  font-weight: 600;
}

.sc-embed {
  margin: 0.55rem 0 0;
  max-width: 36rem;
}

.sc-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 2.4rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--frost);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 400;
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

::selection {
  background: var(--sky);
  color: var(--ink);
}

@media (max-width: 52rem) {
  .shell {
    display: block;
    padding-top: 1.4rem;
  }

  .side {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 1.4rem;
  }

  .portrait {
    width: 11.2rem;
    height: 14.4rem;
  }

  .book-grid li {
    grid-template-columns: 6.4rem minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .skip,
  .back,
  nav {
    display: none;
  }

  body {
    background: var(--white);
  }
}
