@charset "utf-8";

/* =========================================================
   Shahidul Islam Shabuz — site stylesheet
   Palette: slate-teal ground, deep teal accent, amber signal
   Type: Spectral (display) / Public Sans (text) / JetBrains Mono (data)
   ========================================================= */

:root {
  --bg:         #F0F3F2;
  --surface:    #FFFFFF;
  --surface-2:  #E6ECEA;
  --ink:        #0F1E1D;
  --ink-2:      #4C605E;
  --ink-3:      #748885;
  --rule:       #D2DBD9;
  --rule-soft:  #E3EAE8;
  --accent:     #0E5E58;
  --accent-2:   #0B4A45;
  --accent-soft:#D8E8E5;
  --signal:     #9A5A0D;
  --signal-soft:#F4E8D6;
  --shadow:     0 1px 2px rgba(15,30,29,.05), 0 8px 24px -16px rgba(15,30,29,.25);

  --display: "Spectral", Georgia, "Times New Roman", serif;
  --text:    "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --data:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1140px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #0B1413;
    --surface:    #111E1C;
    --surface-2:  #162523;
    --ink:        #E4ECEA;
    --ink-2:      #9CB1AE;
    --ink-3:      #748A87;
    --rule:       #223331;
    --rule-soft:  #1A2826;
    --accent:     #62B5AB;
    --accent-2:   #87CDC4;
    --accent-soft:#123330;
    --signal:     #D9963F;
    --signal-soft:#2B2214;
    --shadow:     0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.7);
  }
}

:root[data-theme="dark"] {
  --bg:         #0B1413;
  --surface:    #111E1C;
  --surface-2:  #162523;
  --ink:        #E4ECEA;
  --ink-2:      #9CB1AE;
  --ink-3:      #748A87;
  --rule:       #223331;
  --rule-soft:  #1A2826;
  --accent:     #62B5AB;
  --accent-2:   #87CDC4;
  --accent-soft:#123330;
  --signal:     #D9963F;
  --signal-soft:#2B2214;
  --shadow:     0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.7);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { color: var(--accent-2); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.012em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 5.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.16rem; line-height: 1.3; }
h2.h-sub { font-size: 1.16rem; line-height: 1.3; }  /* h2 for structure, h3 for size */
h4 { font-size: 1rem; font-family: var(--text); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.measure { max-width: 66ch; }
.measure-narrow { max-width: 56ch; }

.eyebrow {
  font-family: var(--data);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .85rem;
}

.lede {
  font-family: var(--display);
  font-size: clamp(1.12rem, 2.2vw, 1.33rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.data { font-family: var(--data); font-size: .84rem; letter-spacing: .01em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 66px;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark .given { color: var(--ink-2); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: .93rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 3px;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--signal);
  border-radius: 0;
}

.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-2);
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  font-family: var(--text);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.nav-btn { display: none; }

@media (max-width: 900px) {
  .nav-btn { display: grid; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 14px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 4px; border-bottom: 1px solid var(--rule-soft); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .site-header { position: relative; }
}

/* ---------- sections ---------- */
.band { padding-block: clamp(52px, 8vw, 88px); }
.band + .band { border-top: 1px solid var(--rule); }
.band-tint { background: var(--surface-2); }

.band-head { margin-bottom: 40px; }
.band-head p.measure { color: var(--ink-2); margin-top: .7rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 86px) clamp(44px, 6vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.hero h1 { margin-bottom: .55rem; }
.hero .role {
  font-family: var(--text);
  font-size: 1.02rem;
  color: var(--ink-2);
  margin: 0 0 .3rem;
}
.hero .role.last { margin-bottom: 1.6rem; }
.hero .role b { color: var(--ink); font-weight: 600; }
.hero .thesis {
  font-family: var(--display);
  font-size: clamp(1.14rem, 2.3vw, 1.38rem);
  line-height: 1.5;
  color: var(--ink);
  border-left: 2px solid var(--signal);
  padding-left: 20px;
  margin: 0 0 1.7rem;
  max-width: 52ch;
}

/* portrait with detection-bracket frame — one flourish, from the subject's own world */
.frame { margin: 0; width: 100%; max-width: 300px; }
.frame-img { position: relative; display: block; }
.frame-img img { width: 100%; background: var(--surface-2); }
.frame-img::before, .frame-img::after,
.frame-img .brk::before, .frame-img .brk::after {
  content: ""; position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--signal);
  pointer-events: none;
}
.frame-img::before { top: -7px; left: -7px;  border-right: 0; border-bottom: 0; }
.frame-img::after  { top: -7px; right: -7px; border-left: 0;  border-bottom: 0; }
.frame-img .brk::before { bottom: -7px; left: -7px;  border-right: 0; border-top: 0; }
.frame-img .brk::after  { bottom: -7px; right: -7px; border-left: 0;  border-top: 0; }
.frame figcaption {
  font-family: var(--data);
  font-size: .72rem;
  color: var(--ink-3);
  margin-top: 18px;
  letter-spacing: .02em;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .frame { max-width: 210px; order: -1; }
}

/* ---------- rail + prose split ---------- */
.split {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
}
.split-rail { position: sticky; top: 96px; }
.split-rail h1 { font-size: clamp(2.1rem, 4.6vw, 2.9rem); }
.split-index {
  list-style: none; margin: 28px 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.split-index li {
  font-family: var(--data); font-size: .77rem; color: var(--ink-3);
  padding: 11px 0; border-bottom: 1px solid var(--rule-soft); line-height: 1.5;
}
.split-index b { display: block; color: var(--ink-2); font-weight: 500; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-rail { position: static; }
  .split-index { display: none; }
}

/* ---------- link rows ---------- */
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--data);
  font-size: .8rem;
  letter-spacing: .02em;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-solid {
  background: var(--accent); border-color: var(--accent); color: #fff;
  font-family: var(--text); font-size: .92rem; font-weight: 500; letter-spacing: 0;
  padding: 9px 18px;
}
.chip-solid:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
:root[data-theme="dark"] .chip-solid,
:root:not([data-theme="light"]) .chip-solid { color: #08201E; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chip-solid { color: #fff; }
}

/* ---------- stat strip (real, verifiable numbers) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 28px 0 0;
}
.stats div { padding: 18px 20px; border-left: 1px solid var(--rule); }
.stats div:first-child { border-left: 0; }
.stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stats span {
  display: block;
  font-family: var(--data);
  font-size: .71rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 7px;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* ---------- entry list (projects, news, courses) ---------- */
.entries { display: grid; gap: 0; }
.entry {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 6px 32px;
  padding-block: 30px;
  border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-meta {
  font-family: var(--data);
  font-size: .78rem;
  color: var(--ink-3);
  letter-spacing: .02em;
  padding-top: .28rem;
}
.entry-meta b { display: block; color: var(--ink-2); font-weight: 500; }
.entry-body > h3 { margin-bottom: .45rem; }
.entry-body p { color: var(--ink-2); font-size: .97rem; }
.entry-body .linkrow { margin-top: 16px; }
@media (max-width: 720px) {
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .entry-meta { padding-top: 0; }
  .entry-meta b { display: inline; }
}

/* ---------- publications ---------- */
.pub {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0 22px;
  padding-block: 30px;
  border-top: 1px solid var(--rule);
}
.pub:last-of-type { border-bottom: 1px solid var(--rule); }
.pub-n {
  font-family: var(--data);
  font-size: .82rem;
  color: var(--ink-3);
  padding-top: .3rem;
}
.pub h3 { margin-bottom: .5rem; font-size: 1.22rem; }
.pub .authors { font-size: .95rem; color: var(--ink-2); margin-bottom: .3rem; }
.pub .authors b { color: var(--ink); font-weight: 600; }
.pub .venue {
  font-family: var(--data);
  font-size: .82rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.pub .venue em { color: var(--ink-2); font-style: normal; }
.tag {
  display: inline-block;
  font-family: var(--data);
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--signal-soft);
  color: var(--signal);
  margin-bottom: .8rem;
}
details.abstract { margin-top: 16px; border-top: 1px solid var(--rule-soft); padding-top: 14px; }
details.abstract summary {
  cursor: pointer;
  font-family: var(--data);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  list-style: none;
}
details.abstract summary::-webkit-details-marker { display: none; }
details.abstract summary::before { content: "+ "; }
details.abstract[open] summary::before { content: "– "; }
details.abstract p {
  margin-top: 14px;
  font-size: .95rem;
  color: var(--ink-2);
  max-width: 68ch;
}
@media (max-width: 620px) {
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub-n { padding-top: 0; }
}

/* ---------- course grid ---------- */
.courses { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.course { background: var(--surface); padding: 20px 22px; }
/* an odd count would otherwise leave half a row showing the container colour */
.course:last-child:nth-child(odd) { grid-column: 1 / -1; }
.course .code {
  font-family: var(--data); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 6px;
}
.course h3 { font-family: var(--text); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: .35rem; }
.course p { font-size: .9rem; color: var(--ink-2); margin: 0; }
@media (max-width: 620px) { .courses { grid-template-columns: 1fr; } }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { border: 1px solid var(--rule); background: var(--surface); }
.gallery figcaption {
  font-family: var(--data); font-size: .74rem; color: var(--ink-3);
  margin-top: 10px; line-height: 1.45;
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 32px;
}
.contact-grid > * { background: var(--surface); padding: 20px 22px; text-decoration: none; display: block; color: inherit; }
.contact-grid a:hover { background: var(--accent-soft); }
.contact-grid span {
  display: block; font-family: var(--data); font-size: .7rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px;
}
.contact-grid strong { font-weight: 500; font-size: .97rem; word-break: break-word; }

/* ---------- callout ---------- */
.callout {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  padding: 22px 24px;
  margin-top: 36px;
}
.callout h4 { margin-bottom: .5rem; }
.callout p { color: var(--ink-2); font-size: .96rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  padding-block: 40px;
  margin-top: 0;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-note { font-family: var(--data); font-size: .75rem; color: var(--ink-3); line-height: 1.7; }

/* ---------- CV page ---------- */
.cv-sheet {
  max-width: 940px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: clamp(28px, 5vw, 56px);
  margin-block: 40px 64px;
}
.cv-head { border-bottom: 2px solid var(--ink); padding-bottom: 22px; margin-bottom: 34px; }
.cv-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.5rem); margin-bottom: .4rem; }
.cv-head .cv-role { color: var(--ink-2); margin: 0 0 1rem; }
.cv-contact { font-family: var(--data); font-size: .8rem; color: var(--ink-2); line-height: 1.9; }
.cv-contact a { color: var(--accent); text-decoration: none; }

.cv-section { margin-bottom: 34px; }
.cv-section > h2 {
  font-family: var(--data);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 7px;
  margin-bottom: 18px;
}
.cv-item { margin-bottom: 20px; }
.cv-item:last-child { margin-bottom: 0; }
.cv-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; align-items: baseline; }
.cv-line h3 { font-family: var(--text); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.cv-when { font-family: var(--data); font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.cv-where { color: var(--ink-2); font-size: .94rem; margin: .15rem 0 .4rem; font-style: italic; }
.cv-item ul { margin: .4rem 0 0; padding-left: 19px; }
.cv-item li { font-size: .95rem; color: var(--ink-2); margin-bottom: .28rem; }
.cv-plain { font-size: .95rem; color: var(--ink-2); }
.cv-plain b { color: var(--ink); font-weight: 600; }

@media print {
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.42; }
  .cv-sheet { border: 0; padding: 0; margin: 0; background: #fff; }
  .cv-section { margin-bottom: 15pt; page-break-inside: avoid; }
  .cv-section > h2 { color: #000; border-color: #000; }
  .cv-head { border-color: #000; }
  .cv-item li, .cv-where, .cv-plain, .cv-contact { color: #222; }
  a { color: #000; text-decoration: none; }
  @page { margin: 14mm; }
}
