/* samiulalam.site/science */
:root {
  --bg: #0e1110;
  --panel: #121615;
  --ink: #edeae3;
  --muted: #8d9692;
  --line: rgba(255, 255, 255, .1);
  --accent: #3fbf6b;
  --warm: #e5b45a;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(20px, 5vw, 72px);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); background: rgba(14, 17, 16, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar__nav { display: flex; align-items: center; gap: 18px; }
.bar__nav > a:not(.pill) { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); transition: color .2s; }
.bar__nav > a:not(.pill):hover { color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,.04); transition: transform .3s var(--ease), background .2s; white-space: nowrap; }
.pill:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.pill--light { background: var(--ink); color: #111; border-color: var(--ink); }
.pill--light:hover { background: #fff; }

/* ---------- intro ---------- */
.intro { max-width: 1100px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--pad) clamp(28px, 4vw, 48px); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--warm); }
.intro h1 { margin-top: 14px; font-size: clamp(30px, 5vw, 64px); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; max-width: 16em; }
.intro__text { margin-top: 22px; max-width: 46em; color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- project cards ---------- */
.projects { max-width: 1100px; margin: 0 auto; padding: 0 var(--pad); display: grid; gap: clamp(56px, 8vw, 96px); }
.proj { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.proj.in { opacity: 1; transform: none; }
.proj__years { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--warm); }
.proj__title { margin-top: 6px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.proj__ctx { margin-top: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel { margin-top: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.panel svg { display: block; width: 100%; height: auto; }
.panel__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.caption { flex: 1 1 360px; min-height: 2.9em; font-family: var(--mono); font-size: 13px; line-height: 1.45; color: var(--ink); }
.caption::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.states { display: flex; flex-wrap: wrap; gap: 6px; }
.states button { font: 600 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.states button:hover { color: var(--ink); }
.states button[aria-pressed="true"] { color: #0e1110; background: var(--ink); border-color: var(--ink); }
.proj__link { display: inline-flex; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; gap: 6px; }
.proj__link:hover { color: var(--ink); }

/* ---------- svg vocabulary ---------- */
.lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; fill: #7d8783; }
.lbl-hi { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; fill: #cfd5d2; }
.lbl-acc { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; fill: var(--accent); }
.lbl-warn { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; fill: #e0615a; }
.cell { fill: rgba(255,255,255,.015); stroke: rgba(255,255,255,.2); stroke-width: 1.2; }
.organelle { fill: rgba(63,191,107,.07); stroke: rgba(126,214,160,.55); stroke-width: 1.2; }
.thy { stroke: rgba(126,214,160,.45); stroke-width: 1; }
.soil { fill: rgba(224,166,75,.06); }
.soil-line { stroke: rgba(224,166,75,.35); stroke-dasharray: 3 5; }
.root { fill: none; stroke: rgba(237,234,227,.16); stroke-width: 12; stroke-linecap: round; }
.root-thin { fill: none; stroke: rgba(237,234,227,.14); stroke-width: 4; stroke-linecap: round; }
.stem { fill: none; stroke: rgba(126,214,160,.4); stroke-width: 4; stroke-linecap: round; }
.leafshape { fill: rgba(63,191,107,.08); stroke: rgba(126,214,160,.5); stroke-width: 1.2; }
.grain { fill: rgba(229,180,90,.25); stroke: rgba(229,180,90,.6); stroke-width: 1; }
.membrane { stroke: rgba(237,234,227,.25); stroke-width: 1.2; }
.flowpath { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 1; stroke-dasharray: 2 4; }
.dash { fill: none; stroke: rgba(255,255,255,.18); stroke-dasharray: 3 4; }
.enz { fill: rgba(255,255,255,.02); stroke: rgba(255,255,255,.22); stroke-width: 1.2; transition: stroke .6s, fill .6s; }
.enz.glow { stroke: var(--accent); fill: rgba(63,191,107,.1); }
.glowtext { transition: fill .6s; }
.glowtext.glow { fill: var(--accent); }
.stage { fill: rgba(255,255,255,.02); stroke: rgba(255,255,255,.2); stroke-width: 1.2; transition: stroke .5s, fill .5s; }
.stage.glow { stroke: var(--warm); fill: rgba(229,180,90,.1); }
.series { fill: none; stroke: rgba(237,234,227,.55); stroke-width: 1.4; }
.series2 { fill: none; stroke: rgba(229,180,90,.7); stroke-width: 1.4; stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.6s var(--ease); }
.series2.on { stroke-dashoffset: 0; }
.microbe { fill: var(--accent); opacity: .85; }
.tog { opacity: 0; transition: opacity .7s var(--ease); }
.tog.on { opacity: 1; }
.mbg { fill: rgba(255,255,255,.08); }
.mfill { fill: var(--ink); transform-box: fill-box; transform-origin: left center; transition: transform 1.1s var(--ease); }
.mfill.warn { fill: #e0615a; }
.mfill.good { fill: var(--accent); }

.hmeters { display: none; }
.hm { display: grid; grid-template-columns: 1fr 42%; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hm i { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.hm b { display: block; height: 100%; border-radius: 3px; transform-origin: left center; transition: transform 1.1s var(--ease); }
.hm b.warn { background: #e0615a; } .hm b.good { background: var(--accent); }

/* ---------- biological drawing vocabulary ---------- */
.intro__note { margin-top: 12px; max-width: 46em; color: #6f7874; font-size: 13px; font-family: var(--mono); line-height: 1.55; }
.lbl.tiny, .tiny { font-size: 8.5px; }
.tpname { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; fill: #e6e2d8; }
.wall { fill: rgba(214, 206, 180, .05); stroke: rgba(214, 206, 180, .42); stroke-width: 5; }
.pm { stroke: rgba(237, 234, 227, .4); stroke-width: 1; }
.pm2 { fill: none; stroke: rgba(237, 234, 227, .22); stroke-width: .8; }
.vac { stroke: rgba(106, 174, 232, .55); stroke-width: 1.2; }
.nuc { fill: rgba(179, 140, 240, .1); stroke: rgba(179, 140, 240, .55); stroke-width: 1.4; }
.nucleolus { fill: rgba(179, 140, 240, .35); }
.pore { fill: #121615; stroke: rgba(179, 140, 240, .6); stroke-width: .6; }
.chromatin { fill: none; stroke: rgba(179, 140, 240, .45); stroke-width: 1; }
.mito { fill: rgba(229, 140, 90, .12); stroke: rgba(229, 160, 100, .7); stroke-width: 1.2; }
.mito-in { fill: none; stroke: rgba(229, 160, 100, .3); stroke-width: .7; }
.cristae { fill: none; stroke: rgba(229, 160, 100, .6); stroke-width: 1; stroke-linejoin: round; }
.chl { stroke: rgba(126, 214, 160, .75); stroke-width: 1.3; }
.chl-in { fill: none; stroke: rgba(126, 214, 160, .3); stroke-width: .6; }
.grana { fill: rgba(70, 190, 110, .7); }
.lamella { stroke: rgba(126, 214, 160, .45); stroke-width: .8; }
.plasto { fill: rgba(237, 234, 227, .35); }
.perox { fill: rgba(229, 180, 90, .1); stroke: rgba(229, 180, 90, .6); stroke-width: 1; }
.perox-core { fill: rgba(229, 180, 90, .45); }
.er { fill: none; stroke: rgba(237, 234, 227, .2); stroke-width: 1; }
.tp rect { fill: #2b3431; stroke: rgba(237, 234, 227, .55); stroke-width: 1; transition: stroke .6s, fill .6s; }
.tp.glow rect { stroke: var(--accent); fill: rgba(63, 191, 107, .25); }
.hair { fill: none; stroke: rgba(214, 206, 180, .4); stroke-width: 9; stroke-linecap: round; }
.hair-in { fill: none; stroke: #14120e; stroke-width: 5; stroke-linecap: round; }
.bact { fill: rgba(63, 191, 107, .85); }
.bact-in { fill: rgba(14, 17, 16, .5); }
.flag { fill: none; stroke: rgba(63, 191, 107, .7); stroke-width: .8; }
.drop { fill: rgba(63, 191, 107, .85); }
.cuticle { stroke: rgba(229, 180, 90, .55); stroke-width: 3; stroke-linecap: round; }
.epi { fill: rgba(237, 234, 227, .035); stroke: rgba(237, 234, 227, .25); stroke-width: 1; }
.guard { fill: rgba(63, 191, 107, .25); stroke: rgba(126, 214, 160, .8); stroke-width: 1.2; }
.ring { fill: rgba(255, 255, 255, .02); stroke: rgba(126, 214, 160, .45); stroke-width: 1.4; stroke-dasharray: 5 4; transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; transition: stroke .6s, fill .6s; }
.ring.glow { stroke: var(--accent); fill: rgba(63, 191, 107, .12); }
@keyframes spin { to { transform: rotate(360deg); } }
.membrane-hot { stroke: #e0615a; stroke-width: 2; stroke-dasharray: 3 3; }
.tiller { fill: none; stroke: rgba(126, 214, 160, .55); stroke-width: 2.4; stroke-linecap: round; }
.blade { fill: none; stroke: rgba(63, 191, 107, .55); stroke-width: 5; stroke-linecap: round; }
.blade-mid { fill: none; stroke: rgba(14, 17, 16, .5); stroke-width: .8; }
.rachis { fill: none; stroke: rgba(229, 180, 90, .6); stroke-width: 1.4; }
.rootline { fill: none; stroke: rgba(214, 206, 180, .45); stroke-width: 1.3; stroke-linecap: round; }
.lens { fill: none; stroke: rgba(237, 234, 227, .4); stroke-width: 1; }
.divider { stroke: rgba(255, 255, 255, .07); }
.axis { stroke: rgba(237, 234, 227, .35); stroke-width: 1; }
.grid { stroke: rgba(255, 255, 255, .05); }
.series-fill { fill: none; stroke: #e5b45a; stroke-width: 1.6; }
.series-model { fill: none; stroke: rgba(237, 234, 227, .3); stroke-width: 1.3; }
.gapband { fill: rgba(224, 97, 90, .08); }
.outlier { fill: none; stroke: #e0615a; stroke-width: 1.6; }
.bar { fill: rgba(229, 140, 70, .7); }
.dot { fill: rgba(237, 234, 227, .8); }
.trendline { stroke: #e5b45a; stroke-width: 2; }
.arrow { fill: none; stroke: rgba(237, 234, 227, .55); stroke-width: 1.4; }
.water { fill: rgba(106, 174, 232, .14); }
.wave { fill: none; stroke: rgba(106, 174, 232, .55); stroke-width: 1.2; }
.pseudostem { fill: none; stroke-width: 3; stroke-linecap: round; opacity: .85; }
.napier { fill: none; stroke-width: 4.2; stroke-linecap: round; }
.hm b.eco-g { background: #46be6e; } .hm b.eco-r { background: #c45c78; }
.particle { filter: drop-shadow(0 0 3px currentColor); }

/* ---------- outro ---------- */
.outro { max-width: 1100px; margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--pad) 48px; text-align: center; }
.outro > p:first-child { font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -.015em; }
.outro__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.outro__copy { margin-top: 56px; font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
  .bar__nav > a:not(.pill) { display: none; }
  .caption { font-size: 12px; }
  .hmeters { display: grid; gap: 10px; padding: 14px 18px 4px; border-top: 1px solid var(--line); }
  .lbl, .lbl-acc, .lbl-warn { font-size: 11.5px; }
  .lbl-hi { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; }
  .proj { opacity: 1; transform: none; transition: none; }
  .caption::after { animation: none; }
  .tog, .mfill, .enz, .stage, .series2 { transition: none; }
}
