/* Direction
   Product    Hasib's homepage: a backend developer in Dhaka, his skills first, then the projects that prove them
   Character  plainspoken, exact, a little warm
   World      a quiet page of his own, a test run that just passed, a Bangla name beside an English one
   Moments    the skill wall (real logos); the last real test run of ServiceHub BD
   Signature  the green check, only where a claim has proof, linking to that proof */

/* ---------- Tokens ---------- */
:root {
  --bg: #fbfbfa;
  --card: #ffffff;
  --raised: #f3f3f1;
  --text: #171716;
  --text-2: #52524e;
  --text-3: #6f6f6a;
  --line: rgb(23 23 22 / 0.08);
  --line-2: rgb(23 23 22 / 0.16);
  --pass: #157f3c;
  --shadow: 0 8px 24px rgb(23 23 22 / 0.05);
  --sans: "IBM Plex Sans", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #141413;
  --card: #1a1a19;
  --raised: #232322;
  --text: #ededeb;
  --text-2: #a3a39e;
  --text-3: #8a8a84;
  --line: rgb(237 237 235 / 0.08);
  --line-2: rgb(237 237 235 / 0.16);
  --pass: #4cc38a;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/26px var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
html[lang="bn"] body { line-height: 28px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--text); color: var(--bg); }

.i {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.m { width: 16px; height: 16px; flex: none; fill: currentColor; }

.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: 8px;
  font-size: 14px; line-height: 20px; color: var(--text-2);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.ctl:hover { background: var(--raised); color: var(--text); }
#langBtn { font-family: "Hind Siliguri", var(--sans); }
html[lang="bn"] #langBtn { font-family: var(--sans); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- Page ---------- */
.page { width: min(1040px, 100% - 40px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav { display: flex; gap: 24px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.nav a { transition: color 0.15s var(--ease); }
.nav a:hover { color: var(--text); }
.toggles { display: flex; gap: 4px; }

/* Intro */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; padding-top: 64px; }
.intro-text { max-width: 640px; }
/* CI-style badges */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.badge { display: inline-flex; overflow: hidden; border-radius: 4px; font-size: 12px; line-height: 20px; }
.badge > span { padding: 0 8px; color: #fff; background: #4a4a46; }
.badge > .v { background: #5b6875; }
.badge > .v.ok { background: #157f3c; }

/* The code card */
.code { margin: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); font: 400 12px/20px var(--mono); color: var(--text-3); }
.code-head .tab { color: var(--text); }
.code pre { margin: 0; padding: 12px 0; overflow-x: auto; counter-reset: ln; font: 400 12.5px/22px var(--mono); }
.code code { display: block; }
.code .l { display: block; padding-right: 16px; white-space: pre; color: var(--text); }
.code .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 40px; padding-right: 16px; text-align: right; color: var(--text-3); opacity: 0.6; }
.code .k { color: var(--text-3); }
.code .t { color: var(--text); font-weight: 500; }
.code .s { color: var(--text-2); }
.code .n { color: var(--text); }
.code .hl { color: var(--pass); }
h1 { font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
html[lang="bn"] h1 { font-size: 34px; line-height: 52px; letter-spacing: 0; }
.about { margin-top: 20px; font-size: 17px; line-height: 28px; color: var(--text-2); }
html[lang="bn"] .about { line-height: 30px; }
.links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 15px; line-height: 24px; }
.links a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); transition: color 0.15s var(--ease); }
.links a:hover { color: var(--text); }
.links .i { color: var(--text-3); }

/* Sections */
.block { margin-top: 96px; }
.block > h2, .duo > div > h2 { margin-bottom: 24px; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; }
html[lang="bn"] .block > h2, html[lang="bn"] .duo > div > h2 { letter-spacing: 0; line-height: 36px; }

/* ---------- Skills ---------- */
.sgroup { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 12px 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.sgroup:last-child { border-bottom: 1px solid var(--line); }
.sgroup h3 { padding-top: 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-3); }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.tiles li {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; line-height: 20px; font-weight: 500;
  transition: border-color 0.15s var(--ease);
}
.tiles li:hover { border-color: var(--line-2); }
.tiles img, .tiles svg { width: 24px; height: 24px; flex: none; }
.tiles .g { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tiles .m { fill: var(--text); }
[data-theme="dark"] .tiles img.dk { filter: grayscale(1) brightness(0) invert(0.86); }

/* ---------- Projects ---------- */
.proj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; padding: 32px 0; border-top: 1px solid var(--line); }
.meta { font-size: 14px; line-height: 20px; color: var(--text-3); }
.proj h3 { margin-top: 4px; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; }
.desc { margin-top: 12px; color: var(--text-2); }
.points { list-style: none; margin-top: 16px; }
.points li { position: relative; padding: 4px 0 4px 20px; font-size: 15px; line-height: 24px; }
.points li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 6px; height: 1px; background: var(--text-3); }
.stack { margin-top: 16px; font: 400 13px/20px var(--mono); color: var(--text-3); }
.plinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.plink {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px;
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; line-height: 20px; font-weight: 500;
  transition: box-shadow 0.15s var(--ease);
}
.plink:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.plink.proof .i { color: var(--pass); stroke-width: 2; }
.cap { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--text-3); }


/* The test run */
.term {
  overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  font: 400 12px/20px var(--mono);
}
.term-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3);
}
.term-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-head .ctl { flex: none; font-family: var(--sans); font-size: 13px; }
.term ol { list-style: none; display: grid; gap: 4px; padding: 12px 16px; }
.term li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; transition: opacity 0.2s var(--ease); }
.term li .i { margin-top: 2px; color: var(--pass); stroke-width: 2; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.term li code { overflow-wrap: anywhere; }
.term li.more { display: block; padding-left: 24px; color: var(--text-3); }
.api ul { list-style: none; display: grid; gap: 4px; padding: 12px 16px; }
.api li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.api li b { font-weight: 500; color: var(--text-3); }
.api li code { overflow-wrap: anywhere; color: var(--text); }
.api li em { font-style: normal; color: var(--text-2); }
.api .sum { font-family: var(--sans); font-size: 13px; }
html[lang="bn"] .api .term-head span { font-family: var(--sans); }
html[lang="bn"] .term li.more { font-family: var(--sans); }
.term .sum { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-3); transition: opacity 0.2s var(--ease); }
.term .sum b { font-weight: 500; color: var(--pass); }
.term .pend { opacity: 0.4; }
.term .pend .i { opacity: 0; transform: scale(0.8); }
.term .sum.pend { opacity: 0; }

/* Practice repos */
.sub { margin: 40px 0 16px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-3); }
.repos { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.repos a {
  position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 40px 16px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.15s var(--ease);
}
.repos a:hover { border-color: var(--line-2); }
.repos b { font-size: 15px; line-height: 24px; font-weight: 500; }
.repos span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.repos em { margin-top: auto; padding-top: 8px; font: normal 400 12px/20px var(--mono); color: var(--text-3); }
.repos .i { position: absolute; top: 20px; right: 16px; color: var(--text-3); }

/* Two sections side by side */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.duo.wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; }
.duo.wide .repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Languages chart */
.langs { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.langs-big { display: flex; align-items: baseline; gap: 12px; }
.langs-big b { font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -0.01em; color: var(--pass); }
.langs-big span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.langs .bar { display: flex; gap: 2px; height: 8px; margin: 16px 0; overflow: hidden; border-radius: 4px; }
.langs .bar span { display: block; height: 100%; }
.langs ul { list-style: none; display: grid; gap: 4px; }
.langs li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 40px; align-items: center; gap: 12px; font-size: 14px; line-height: 24px; }
.langs li i { width: 8px; height: 8px; border-radius: 2px; }
.langs li span { font: 400 12px/20px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.langs li b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.langs .cap { margin-top: 12px; }
.c-cs { background: var(--pass); }
.c-2 { background: color-mix(in srgb, var(--text) 55%, transparent); }
.c-3 { background: color-mix(in srgb, var(--text) 42%, transparent); }
.c-4 { background: color-mix(in srgb, var(--text) 30%, transparent); }
.c-5 { background: color-mix(in srgb, var(--text) 20%, transparent); }
.c-6 { background: color-mix(in srgb, var(--text) 12%, transparent); }

/* How I work, drawn as a CI run */
.flow { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.flow-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); font: 400 12px/20px var(--mono); color: var(--text-3); }
.flow-head .ok { display: inline-flex; align-items: center; gap: 6px; color: var(--pass); }
.flow-head .ok .i { stroke-width: 2; }
html[lang="bn"] .flow-head .ok { font-family: var(--sans); }
.flow ol { list-style: none; padding: 8px 16px; }
.flow li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 40px; bottom: -12px; width: 2px; background: var(--line-2); }
.flow .node { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--pass); background: color-mix(in srgb, var(--pass) 14%, transparent); }
.flow .node .i { width: 14px; height: 14px; stroke-width: 2.5; }
.flow code { font-size: 13px; line-height: 24px; font-weight: 500; }
.flow p { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* The JSON card */
.json { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.json .term-head { font: 400 12px/20px var(--mono); }
.json .term-head a { color: var(--text-3); transition: color 0.15s var(--ease); }
.json .term-head a:hover { color: var(--text); }
.json pre { margin: 0; padding: 16px; overflow-x: auto; font: 400 12.5px/22px var(--mono); color: var(--text-3); }
.json .jk { color: var(--text); }
.json .js { color: var(--text-2); }
.json .hl { color: var(--pass); }
.contact .cap { margin-top: 8px; }

/* Beyond the code */
.beyond { list-style: none; border-top: 1px solid var(--line); }
.beyond li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }

/* Contact */
.portrait { width: 240px; aspect-ratio: 1 / 1; margin-bottom: 24px; overflow: hidden; border-radius: 16px; background: color-mix(in srgb, var(--text) 6%, var(--bg)); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.email {
  display: inline-block; font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 8px;
  transition: text-decoration-color 0.15s var(--ease); overflow-wrap: anywhere;
}
.email:hover { text-decoration-color: currentColor; }
.note { margin-top: 12px; color: var(--text-2); }
.contact .links { margin-top: 16px; }

.foot { margin-top: 96px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--text-3); }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .code { max-width: 480px; }
  .duo, .duo.wide { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .proj { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .portrait { width: 200px; }
  .code pre, .json pre { font-size: 11px; line-height: 20px; }
  .code .l::before { width: 32px; padding-right: 12px; }
  .intro { padding-top: 32px; }
  h1 { font-size: 30px; line-height: 38px; }
  html[lang="bn"] h1 { font-size: 26px; line-height: 40px; }
  .about { font-size: 16px; line-height: 26px; }
  .block { margin-top: 72px; }
  .sgroup { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sgroup h3 { padding-top: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles li { gap: 10px; padding: 8px 12px; font-size: 14px; }
  .tiles img, .tiles svg { width: 20px; height: 20px; }
  .repos, .duo.wide .repos { grid-template-columns: minmax(0, 1fr); }
  .repos a { padding: 16px 40px 16px 16px; }
  .repos em { padding-top: 4px; }
  .email { font-size: 22px; line-height: 32px; }
  .foot { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
