/* ==========================================================
   Md. Shohel Arman — monochrome portfolio
   Ink: #111 · Paper: #fff · Nothing else.
   ========================================================== */

:root {
  --ink: #111111;
  --paper: #ffffff;
  --grey-1: #f4f4f4;
  --grey-2: #e4e4e4;
  --grey-3: #6f6f6f;
  --navbg: rgba(255,255,255,.92);
  --acc: var(--ink);
  --acc-deep: var(--ink);
  --gold: var(--ink);
  --red: var(--ink);
  --display: "Archivo", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

body, .nav, .contact, .footer, .campus__scene {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease;
}
body {
  font-family: var(--display);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }

img { max-width: 100%; display: block; }
::selection { background: var(--ink); color: var(--paper); }
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--ink); outline-offset: 3px;
}
a { color: inherit; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: transparent;
}
.progress span {
  display: block; height: 100%; width: 0; background: var(--ink);
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; mix-blend-mode: difference;
  pointer-events: none; z-index: 70;
  transform: translate(-50%, -50%);
  transition: width .18s ease, height .18s ease;
}
.cursor.is-big { width: 56px; height: 56px; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: var(--navbg);
  backdrop-filter: blur(6px);
  border-bottom: 1.5px solid var(--ink);
}
.nav__logo {
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  text-decoration: none; letter-spacing: .04em;
}
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-family: var(--mono); font-size: .82rem; text-decoration: none;
  position: relative; padding: 2px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav__links a:hover::after, .nav__links a:focus-visible::after,
.nav__links a.active::after { transform: scaleX(1); }
.nav__cta { border: 1.5px solid var(--ink); padding: 4px 12px !important; }
.nav__cta:hover { background: var(--ink); color: var(--paper); }
.nav__cta::after { display: none; }

.nav__right { display: flex; align-items: center; gap: 22px; }
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-pencil { display: none; }
[data-theme="color"] .icon-pencil { display: block; }
[data-theme="color"] .icon-drop { display: none; }

.nav__burger { display: none; background: none; border: none; cursor: pointer; }
.nav__burger span {
  display: block; width: 26px; height: 2.5px; background: var(--ink); margin: 6px 0;
  transition: transform .25s ease;
}
.mobilemenu { display: none; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .mobilemenu {
    position: fixed; inset: 0; z-index: 45; background: var(--paper);
    display: flex; flex-direction: column; justify-content: center; gap: 8px;
    padding: 0 var(--pad);
    transform: translateY(-100%); transition: transform .35s ease;
  }
  .mobilemenu.is-open { transform: translateY(0); }
  .mobilemenu a {
    font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 9vw, 3rem);
    text-decoration: none; text-transform: uppercase; letter-spacing: -0.02em;
    border-bottom: 1.5px solid var(--grey-2); padding: 10px 0;
  }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero {
  min-height: 82svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px var(--pad) 70px;
  max-width: var(--maxw); margin: 0 auto;
  position: relative;
}
.hero__eyebrow { font-size: .82rem; color: var(--grey-3); margin-bottom: 18px; }
.hero__title {
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(3rem, 11.5vw, 9.2rem);
  line-height: .92; letter-spacing: -0.03em;
}
.hero__line { display: block; }
.hero__line--outline {
  color: var(--paper);
  -webkit-text-stroke: 2.5px var(--ink);
  text-stroke: 2.5px var(--ink);
}
.hero__meta {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px; margin-top: 34px; align-items: end;
}
.hero__role { font-size: 1.08rem; max-width: 56ch; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 18px 26px; justify-content: flex-end; }
.hero__facts div { text-align: right; }
.hero__facts b { display: block; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__facts span { font-size: .72rem; color: var(--grey-3); }
.hero__down {
  position: absolute; bottom: 26px; left: var(--pad);
  font-size: .82rem; text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-width: 760px) {
  .hero__meta { grid-template-columns: 1fr; }
  .hero__facts { justify-content: flex-start; }
  .hero__facts div { text-align: left; }
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  overflow: hidden; white-space: nowrap;
  padding: 10px 0;
}
.marquee__track {
  display: inline-block;
  animation: scroll 26s linear infinite;
  font-family: var(--mono); font-size: .88rem; text-transform: uppercase;
  letter-spacing: .06em;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- generic sections ---------- */
.section, .campus, .contact { scroll-margin-top: 68px; }
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 5.5vw, 68px) var(--pad);
}
.section--line { border-top: 2px solid var(--ink); }
.section__head { margin-bottom: 24px; }
.eyebrow { font-size: .8rem; color: var(--grey-3); margin-bottom: 10px; }
.eyebrow--inv { color: var(--grey-2); }
h2 {
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.02;
}
.section__sub { margin-top: 12px; max-width: 60ch; color: var(--grey-3); }

/* ---------- campus ---------- */
.campus {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(38px, 5vw, 60px) var(--pad) 26px;
}
.campus__scene {
  border: 2.5px solid var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 34px, var(--grey-1) 34px 35px),
    var(--paper);
  padding: 8px;
  overflow-x: auto;
}
#citysvg { display: block; min-width: 760px; width: 100%; height: auto; }
.campus__hint { margin-top: 12px; font-size: .78rem; color: var(--grey-3); }

.bldg { cursor: pointer; outline: none; }
.bldg > * { transition: transform .3s ease; }
.bldg:hover > *:not(.bldg__label),
.bldg:focus-visible > *:not(.bldg__label) { transform: translateY(-7px); }
#citysvg [stroke="#111"] { stroke: var(--ink); }
#citysvg [fill="#fff"] { fill: var(--paper); }
#citysvg [fill="#111"] { fill: var(--ink); }
#citysvg pattern line { stroke: var(--ink); }
.bldg .win { transition: fill .25s ease; }
#citysvg .bldg:hover .win, #citysvg .bldg:focus-visible .win { fill: var(--ink); }
.bldg__label { opacity: 0; transition: opacity .25s ease, transform .3s ease; }
.bldg:hover .bldg__label, .bldg:focus-visible .bldg__label { opacity: 1; }
.labeltext {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  fill: #fff; letter-spacing: .08em;
}
.signtext {
  font-family: var(--mono); font-size: 11px; fill: var(--ink); letter-spacing: .06em;
}

.cloud--a { animation: drift 34s linear infinite; }
.cloud--b { animation: drift 46s linear infinite reverse; }
@keyframes drift {
  from { transform: translateX(-60px); }
  to   { transform: translateX(1260px); }
}
.birds { animation: flutter 5s ease-in-out infinite; }
@keyframes flutter { 50% { transform: translate(14px, -8px); } }
.sunrays { transform-origin: 1090px 70px; animation: spinrays 40s linear infinite; }
@keyframes spinrays { to { transform: rotate(360deg); } }
.rickshaw { animation: ride 17s linear infinite; }
@keyframes ride {
  from { transform: translateX(-90px); }
  to   { transform: translateX(1300px); }
}

/* ---------- about ---------- */
.about__grid {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(24px, 3.5vw, 44px); align-items: stretch;
}
.about__photo {
  margin: 0; display: flex; flex-direction: column; min-height: 0;
}
.about__photo img {
  flex: 1 1 auto; min-height: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border: 2.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.about__photo figcaption { margin-top: 14px; font-size: .74rem; color: var(--grey-3); }
.about__text p { margin-bottom: 13px; font-size: 1rem; }
.about__text p:last-child { margin-bottom: 0; }
.about__cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 44px); margin-top: 30px;
}
.about__edu { list-style: none; font-size: .8rem; }
.about__edu li { border-top: 1.5px solid var(--grey-2); padding: 7px 0; }
@media (max-width: 760px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 340px; }
  .about__photo img { height: auto; aspect-ratio: 4 / 5; }
  .about__cols { grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
}

/* ---------- research ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 32px; }
.areas span {
  font-family: var(--mono); font-size: .8rem;
  border: 1.5px solid var(--ink); padding: 7px 14px;
  transition: background .2s ease, color .2s ease;
}
.areas span:hover { background: var(--ink); color: var(--paper); }

.projects {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink); border-left: 2px solid var(--ink);
}
.project {
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  padding: 24px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  transition: background .25s ease;
}
.project:hover, .project:focus-visible { background: var(--grey-1); }
.project h3 {
  font-weight: 700; font-size: 1.12rem; line-height: 1.3; margin-bottom: 10px;
}
.project p { font-size: .9rem; margin-bottom: 16px; }
.project__link {
  font-size: .74rem; color: var(--grey-3); text-decoration: none;
  margin-top: auto;
}
a.project__link:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 1020px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .projects { grid-template-columns: 1fr; } }

.about__subhead {
  font-weight: 700; font-size: 1rem; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .04em;
}

.pubs { margin-top: 40px; }
.pubs__head {
  font-weight: 700; font-size: 1.25rem; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: .02em;
}
.pubs__list { list-style: none; counter-reset: pub; border-top: 2px solid var(--ink); }
.pubs__list li {
  counter-increment: pub;
  display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 3px;
  border-bottom: 1.5px solid var(--grey-2);
  padding: 12px 0; align-items: baseline;
}
.pubs__list li::before {
  content: "[" counter(pub) "]";
  grid-column: 1; grid-row: 1;
  font-family: var(--mono); font-size: .8rem; color: var(--grey-3);
}
.pubs__title { grid-column: 2; font-weight: 700; font-size: .98rem; }
.pubs__meta { grid-column: 2; font-size: .72rem; color: var(--grey-3); }
@media (max-width: 640px) {
  .pubs__list li { grid-template-columns: 30px 1fr; column-gap: 10px; }
}

.research__cta { margin-top: 40px; }
.btn {
  display: inline-block; font-family: var(--mono); font-size: .88rem;
  border: 2px solid var(--ink); padding: 13px 26px; text-decoration: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); box-shadow: 6px 6px 0 var(--grey-2); }

/* ---------- timeline ---------- */
.timeline { list-style: none; border-left: 2.5px solid var(--ink); margin-left: 6px; }
.timeline__item {
  position: relative; padding: 0 0 24px 34px;
  display: grid; grid-template-columns: 150px 1fr; gap: 20px;
}
.timeline__item::before {
  content: ""; position: absolute; left: -8px; top: 6px;
  width: 13px; height: 13px; background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 50%;
  transition: background .2s ease;
}
.timeline__item:hover::before { background: var(--ink); }
.timeline__when { font-size: .76rem; color: var(--grey-3); padding-top: 4px; }
.timeline__item h3 { font-size: 1.1rem; font-weight: 700; }
.timeline__item p { font-size: .92rem; color: var(--grey-3); margin-top: 4px; }
@media (max-width: 640px) {
  .timeline__item { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- teaching ---------- */
.teach__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 52px);
}
.teach__col h3 { font-weight: 700; font-size: 1.25rem; margin-bottom: 14px; }
.teach__col p { font-size: .98rem; margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; border: 1.5px solid var(--grey-2); padding: 6px 12px;
  transition: border-color .2s ease;
}
.tags span svg { width: 14px; height: 14px; flex: none; }
.tags span:hover { border-color: var(--ink); }
.plainlist { list-style: none; }
.plainlist li { border-top: 1.5px solid var(--grey-2); padding: 11px 0; font-size: .93rem; }
@media (max-width: 700px) { .teach__grid { grid-template-columns: 1fr; } }

/* ---------- contact (inverted) ---------- */
.contact {
  background: var(--ink); color: var(--paper);
  text-align: center;
  padding: clamp(48px, 7vw, 84px) var(--pad);
}
.contact h2 { color: var(--paper); margin-bottom: 14px; }
.contact__sub { color: var(--grey-2); max-width: 46ch; margin: 0 auto 30px; }
.contact__mails {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.contact__mail {
  display: inline-block;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.7rem);
  color: var(--paper); text-decoration: none;
  border: 2px solid var(--paper); padding: 16px 30px;
  transition: background .2s ease, color .2s ease;
}
.contact__mail:hover { background: var(--paper); color: var(--ink); }
.contact__mail--alt {
  font-size: clamp(.9rem, 2.4vw, 1.15rem);
  padding: 11px 22px; border-width: 1.5px; font-weight: 400;
}
.contact__actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 22px;
}
.contact__actions a {
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 560px; text-align: left;
  border: 1.5px dashed var(--grey-3); padding: 10px 18px;
  color: var(--grey-2); text-decoration: none; font-size: .78rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.contact__actions a svg { width: 16px; height: 16px; flex: none; }
.contact__actions a:hover, .contact__actions a:focus-visible {
  border-color: var(--paper); color: var(--paper); background: rgba(255,255,255,.07);
}

.contact__book {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px;
  font-family: var(--mono); font-weight: 700; font-size: .92rem;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--paper); padding: 13px 26px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.contact__book svg { width: 18px; height: 18px; flex: none; }
.contact__book:hover, .contact__book:focus-visible { background: transparent; color: var(--paper); }
.contact__note { margin-top: 14px; font-size: .72rem; color: var(--grey-3); }

.contact__links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 30px;
}
.contact__links a {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1.5px solid var(--grey-3); padding: 9px 16px;
  color: var(--grey-2); text-decoration: none; font-size: .8rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.contact__links a svg { width: 16px; height: 16px; flex: none; }
.contact__links a:hover, .contact__links a:focus-visible {
  border-color: var(--paper); color: var(--paper); background: rgba(255,255,255,.07);
}
.contact__office { margin-top: 44px; font-size: .74rem; color: var(--grey-3); }

/* ---------- scroll to top ---------- */
.scrolltop {
  position: fixed; right: 20px; bottom: 20px; z-index: 55;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--paper); color: var(--ink);
  cursor: pointer; position: fixed;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease,
              background .2s ease, color .2s ease;
}
.scrolltop.show { opacity: 1; visibility: visible; transform: none; }
.scrolltop:hover { background: var(--ink); color: var(--paper); }
.scrolltop__ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.scrolltop__ring .ring-bg { stroke: var(--grey-2); }
.scrolltop__ring .ring-fg {
  stroke: currentColor; stroke-linecap: round;
  stroke-dasharray: 131.95; stroke-dashoffset: 131.95;
}
.scrolltop__arrow { width: 18px; height: 18px; position: relative; }

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px var(--pad);
  border-top: 2px solid var(--ink);
  font-size: .74rem; color: var(--grey-3);
  background: var(--ink); color: var(--grey-3);
  border-top: 1.5px solid #333;
}
.footer__top { color: inherit; text-decoration: none; }
.footer__top:hover { color: var(--paper); text-decoration: underline; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .cloud--a, .cloud--b, .birds, .sunrays, .rickshaw,
  .hero__down, .blink { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bldg > * { transition: none; }
}


/* ==========================================================
   Colour theme — warm ivory, espresso ink, bottle green,
   marigold, and a touch of rickshaw red.
   ========================================================== */
:root[data-theme="color"] {
  --ink: #2e2013;
  --paper: #f6eede;
  --grey-1: #ece0c8;
  --grey-2: #dbc9a8;
  --grey-3: #7d6b52;
  --navbg: rgba(246, 238, 222, .92);
  --acc: #1e5b45;
  --acc-deep: #143d2e;
  --gold: #dfa31f;
  --red: #b5402a;
}

[data-theme="color"] .eyebrow { color: var(--acc); }
[data-theme="color"] .progress span { background: var(--acc); }
[data-theme="color"] .nav__links a::after { background: var(--acc); }
[data-theme="color"] .nav__cta { border-color: var(--acc); color: var(--acc); }
[data-theme="color"] .nav__cta:hover { background: var(--acc); color: var(--paper); }
[data-theme="color"] .hero__line--outline { -webkit-text-stroke-color: var(--acc); }
[data-theme="color"] .hero__facts b { color: var(--acc); }
[data-theme="color"] .areas span:hover { background: var(--acc); color: var(--paper); border-color: var(--acc); }
[data-theme="color"] .btn:hover { background: var(--acc); color: var(--paper); border-color: var(--acc); }
[data-theme="color"] .timeline__item:hover::before { background: var(--acc); border-color: var(--acc); }
[data-theme="color"] .about__photo img { box-shadow: 10px 10px 0 var(--acc); }
[data-theme="color"] .project h3 { color: var(--acc-deep); }
[data-theme="color"] a.project__link:hover { color: var(--acc); }
[data-theme="color"] .contact { background: var(--acc-deep); }
[data-theme="color"] .contact__book { color: var(--acc-deep); }
[data-theme="color"] .contact__book:hover, [data-theme="color"] .contact__book:focus-visible { color: var(--paper); }
[data-theme="color"] .footer { background: var(--acc-deep); border-top-color: var(--acc); color: var(--grey-2); }
[data-theme="color"] .scrolltop { color: var(--acc); }
[data-theme="color"] .scrolltop:hover { background: var(--acc); color: var(--paper); }
[data-theme="color"] a:focus-visible, [data-theme="color"] button:focus-visible { outline-color: var(--acc); }
[data-theme="color"] .contact__office { color: var(--grey-2); }

/* the campus drawing, warmed up */
[data-theme="color"] #citysvg .sun { fill: var(--gold); }
[data-theme="color"] #citysvg .sunrays line { stroke: var(--gold); }
[data-theme="color"] #citysvg pattern line { stroke: var(--acc); }
[data-theme="color"] #citysvg .rickshaw path { stroke: var(--red); }
[data-theme="color"] #citysvg .bldg:hover .win,
[data-theme="color"] #citysvg .bldg:focus-visible .win { fill: var(--gold); }
[data-theme="color"] #citysvg .bldg__label rect { fill: var(--acc-deep); }
[data-theme="color"] .labeltext { fill: var(--paper); }
