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

::selection {
  background: #0f0f0f;
  color: #fafafa;
}

:root {
  --ink: #0f0f0f;
  --paper: #FCFCFC;
  --dim: #706e68;
  --rule: #d8d6cf;
}

html {
  font-size: 19px;
}

body {
  font-family: 'EB Garamond', 'Noto Serif Bengali', Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-top: 88px;
  /* compensate for fixed topbar */
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Mirror the .page max-width (860px) + 40px side padding */
  padding: 14px max(40px, calc((100vw - 860px) / 2 + 40px));
  opacity: 0;
  animation: appear 0.4s ease 0.05s forwards;
}

.brand {
  text-decoration: none;
  color: inherit;
  line-height: 1.25;
}

.brand-mark {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: 0.72em;
  letter-spacing: 0.16em;
  color: var(--ink);
  display: block;
}

.brand-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.82em;
  color: var(--dim);
  display: block;
}

nav {
  display: flex;
  gap: 2em;
  align-items: center;
}

nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68em;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--ink);
}

/* ── HERO ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 0 60px;
}

.hero-name {
  font-size: clamp(3.2em, 8vw, 6em);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
  opacity: 0;
  animation: slideup 0.6s ease 0.15s forwards;
}

.hero-name em {
  font-style: italic;
  font-weight: 400;
}

.hero-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75em;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 32px;
  opacity: 0;
  animation: appear 0.5s ease 0.35s forwards;
}

.hero-divider {
  width: 32px;
  height: 1px;
  background: var(--rule);
  margin-bottom: 24px;
  opacity: 0;
  animation: appear 0.5s ease 0.45s forwards;
}

.hero-bio {
  max-width: 780px;
  opacity: 0;
  animation: appear 0.6s ease 0.55s forwards;
}

.hero-bio p {
  font-size: 1.1em;
  line-height: 1.82;
  color: #444;
  margin-bottom: 1em;
}

.hero-bio p:last-child {
  margin-bottom: 0;
}

/* ── NOW READING ── */
.reading-section {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  opacity: 0;
  animation: appear 0.6s ease 0.7s forwards;
}

.reading-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65em;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 20px;
}

.reading-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reading-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reading-book {
  font-size: 1.05em;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.15s;
  display: block;
}

.reading-book:hover {
  opacity: 0.55;
}

.reading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.reading-meta span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68em;
  font-weight: 300;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  opacity: 0;
  animation: appear 0.5s ease 0.85s forwards;
}

.footer-sig {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65em;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.footer-icons {
  display: flex;
  gap: 0.9em;
  flex-wrap: wrap;
}

.footer-icon {
  font-size: 0.88em;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-icon:hover {
  color: var(--ink);
}

@keyframes appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideup {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  body {
    padding-top: 72px;
  }

  .page {
    padding: 0 22px;
  }

  .topbar {
    padding: 12px 22px;
  }

  .brand-sub {
    white-space: normal;
  }

  .brand-sub-break {
    display: block;
    height: 0;
  }

  nav {
    gap: 0.7em;
    flex-wrap: nowrap;
  }

  .hero {
    padding: 52px 0 40px;
  }

  .hero-name {
    font-size: 3em;
  }

  .hero-bio p {
    font-size: 1em;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 440px) {
  nav {
    gap: 0.6em;
  }

  nav a {
    font-size: 0.62em;
  }
}