/* ==========================================================================
   Faruq Pradhan — MHPTT Digital Portfolio
   Design system: modern minimal.

   Everything is driven by the tokens in :root below. Light is the base;
   the dark block overrides colour tokens only. To re-skin the whole site,
   change --accent. To change the reading width, change --measure.
   ========================================================================== */

:root{
  /* Type */
  --sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --display:"Instrument Serif",Iowan Old Style,Georgia,"Times New Roman",serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* Fluid type scale */
  --t-xs:0.75rem;
  --t-sm:0.8125rem;
  --t-base:1.0625rem;
  --t-md:clamp(1.0625rem,1.02rem + 0.22vw,1.1875rem);
  --t-lg:clamp(1.25rem,1.16rem + 0.42vw,1.5rem);
  --t-xl:clamp(1.5rem,1.32rem + 0.9vw,2rem);
  --t-2xl:clamp(2.2rem,1.75rem + 2.1vw,3.4rem);

  /* Space. --shell governs the header, footer and full-width content; --content
     is the reading column. Both are centred, so every page shares one axis. */
  --gutter:1.5rem;
  --shell:58rem;
  --content:40rem;

  /* Colour — light. Warm paper, near-black ink, one vivid accent. */
  --bg:#f6f4ee;
  --surface:#f0ede4;
  --surface-2:#e8e4d8;
  --ink:#15140f;
  --ink-soft:#514d43;
  --ink-faint:#6f6a5c;
  --rule:#ded9cb;
  --rule-strong:#c6c0ae;
  --accent:#b0402a;
  --accent-wash:#f7ebe6;
  --focus:#2f6b86;

  --radius:10px;
  --radius-sm:6px;
}

@media (prefers-color-scheme:dark){
  :root{
    --bg:#131210;
    --surface:#1b1a16;
    --surface-2:#23211c;
    --ink:#f0ece1;
    --ink-soft:#b2ac9d;
    --ink-faint:#8f887a;
    --rule:#2b2924;
    --rule-strong:#3d3a32;
    --accent:#e88267;
    --accent-wash:#241a16;
    --focus:#7fc0d8;
  }
}

/* --------------------------------------------------------------- Reset */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important}
}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-size:var(--t-base);
  line-height:1.7;
  font-synthesis-weight:none;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  overflow-wrap:break-word;
}
/* break-word is a safety net for body copy, but it mangles a heading — it split
   "MB.BCh.BAO," across two lines. Headings wrap between words only. */
.page-title,.prose h2,.index-name,.brand-name,.lede{overflow-wrap:normal}

img{max-width:100%;height:auto;display:block}
hr{border:0;border-top:1px solid var(--rule);margin:3.5rem 0}

a{color:var(--accent);text-decoration-thickness:.05em;text-underline-offset:.2em;
  transition:color .15s ease}
a:hover{text-decoration-thickness:.1em}

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

.skip{position:absolute;left:-9999px}
.skip:focus{position:fixed;left:1rem;top:1rem;z-index:99;background:var(--bg);
  color:var(--ink);padding:.7rem 1.1rem;border:2px solid var(--focus);
  border-radius:var(--radius-sm);font-size:var(--t-sm);font-weight:500}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

.wrap{width:100%;max-width:var(--shell);margin-inline:auto;padding-inline:var(--gutter)}
.container{width:100%;max-width:var(--content);margin-inline:auto;padding-inline:var(--gutter)}
.container.wide{max-width:var(--shell)}
.prose{max-width:none}

/* Small uppercase label, used for eyebrows, artifact labels, section marks.
   Set in the mono face — this is the detail that gives the site its character. */
.label,.eyebrow{
  font-family:var(--mono);font-size:.7rem;font-weight:500;letter-spacing:.07em;
  text-transform:uppercase;color:var(--ink-faint);margin:0;
}
.eyebrow{margin-bottom:1rem}
.eyebrow a{color:inherit;text-decoration:none}
.eyebrow a:hover{color:var(--accent)}

/* -------------------------------------------------------------- Header */

.site-header{
  position:sticky;top:0;z-index:40;
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--ink);
}
@supports not (backdrop-filter:blur(1px)){ .site-header{background:var(--bg)} }

.header-inner{display:flex;align-items:center;justify-content:space-between;
  gap:2rem;min-height:4.25rem}

.brand{text-decoration:none;color:inherit;display:flex;align-items:center;gap:.7rem;
  padding:.5rem 0;min-width:0}
.brand-text{min-width:0}
.brand-mark{flex:0 0 auto;color:var(--accent)}
.brand-name{display:block;font-family:var(--display);font-weight:400;
  font-size:1.3rem;letter-spacing:0;line-height:1.15}
.brand-role{display:block;font-family:var(--mono);font-size:.66rem;color:var(--ink-faint);
  letter-spacing:.06em;text-transform:uppercase;margin-top:.3rem;font-weight:400}
@media (max-width:560px){ .brand-role{display:none} }

.site-nav > ul{display:flex;align-items:center;gap:.35rem;list-style:none;margin:0;padding:0}
.nav-link{
  display:block;font-size:var(--t-sm);font-weight:500;color:var(--ink-soft);
  text-decoration:none;padding:.5rem .7rem;border-radius:var(--radius-sm);
  white-space:nowrap;
}
.nav-link:hover{color:var(--ink);background:var(--surface-2)}
.nav-link[aria-current="page"]{color:var(--accent);font-weight:600}

/* Competency dropdown — hover on pointer devices, :focus-within for keyboard */
.has-menu{position:relative}
.has-menu > .nav-link::after{
  content:"";display:inline-block;width:.4em;height:.4em;margin-left:.5em;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:translateY(-.15em) rotate(45deg);opacity:.55;
}
.submenu{
  list-style:none;margin:0;padding:.5rem;
  position:absolute;right:0;top:calc(100% + .35rem);z-index:50;
  min-width:23rem;
  background:var(--bg);border:1px solid var(--rule);border-radius:var(--radius);
  box-shadow:0 1px 2px rgb(0 0 0 / .04),0 12px 32px rgb(0 0 0 / .10);
  opacity:0;visibility:hidden;transform:translateY(-4px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s;
}
.has-menu:hover > .submenu,
.has-menu:focus-within > .submenu{opacity:1;visibility:visible;transform:none}
.submenu a{
  display:grid;grid-template-columns:2.25rem 1fr;align-items:baseline;gap:.5rem;
  padding:.5rem .7rem;border-radius:var(--radius-sm);
  font-size:var(--t-sm);color:var(--ink-soft);text-decoration:none;line-height:1.4;
}
.submenu a:hover{background:var(--surface-2);color:var(--ink)}
.submenu a[aria-current="page"]{color:var(--accent);font-weight:600}
.submenu .n{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500;
  color:var(--accent);font-size:.7rem}
.submenu .sep{height:1px;background:var(--rule);margin:.45rem .7rem}
.submenu .all{font-weight:600;color:var(--ink)}

/* Mobile disclosure. The checkbox is visually hidden but still focusable,
   so the menu opens from the keyboard as well as by pointer. */
.nav-toggle{position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.nav-btn{display:none}

@media (max-width:900px){
  .header-inner{min-height:3.75rem}
  .site-nav{position:static}
  .nav-btn{
    display:flex;flex-direction:column;justify-content:center;gap:5px;
    width:44px;height:44px;padding:11px;cursor:pointer;margin-right:-11px;
    border-radius:var(--radius-sm);
  }
  .nav-btn .bar{display:block;height:1.5px;background:var(--ink);border-radius:2px;
    transition:transform .18s ease,opacity .18s ease}
  .nav-toggle:focus-visible ~ .nav-btn{outline:2px solid var(--focus);outline-offset:2px}
  .nav-toggle:checked ~ .nav-btn .bar:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
  .nav-toggle:checked ~ .nav-btn .bar:nth-child(2){opacity:0}
  .nav-toggle:checked ~ .nav-btn .bar:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

  .site-nav > ul{
    display:none;position:absolute;left:0;right:0;top:100%;
    flex-direction:column;align-items:stretch;gap:0;
    background:var(--bg);border-bottom:1px solid var(--rule);
    padding:.5rem var(--gutter) 1.25rem;
    box-shadow:0 16px 32px rgb(0 0 0 / .08);
    max-height:calc(100dvh - 3.75rem);overflow-y:auto;
  }
  .nav-toggle:checked ~ ul{display:flex}
  .nav-link{padding:.7rem .25rem;font-size:1rem}
  .nav-link:hover{background:none;color:var(--accent)}

  /* On small screens the dropdown becomes a plain indented list — always open,
     so nothing is hidden behind a hover that touch cannot perform. */
  .has-menu > .nav-link::after{display:none}
  .submenu{
    position:static;opacity:1;visibility:visible;transform:none;
    min-width:0;border:0;box-shadow:none;background:none;
    padding:0 0 .5rem .25rem;margin:0;
  }
  .submenu a{padding:.4rem 0;grid-template-columns:2.5rem 1fr}
  .submenu .sep{display:none}
  .submenu .all{display:none}
}

/* ---------------------------------------------------------------- Main */

main{flex:1 0 auto;padding:4.5rem 0 6rem}
@media (max-width:640px){ main{padding:2.75rem 0 4rem} }

.page-title{
  font-family:var(--display);font-weight:400;
  font-size:var(--t-2xl);line-height:1.02;letter-spacing:-.005em;
  margin:0 0 .85rem;text-wrap:balance;
}
.page-subtitle{
  font-size:var(--t-md);color:var(--ink-soft);margin:0 0 3rem;
  max-width:52ch;text-wrap:pretty;
}
.page-title + .prose-body,.page-subtitle + .prose-body{margin-top:0}

.prose h2{font-family:var(--display);font-weight:400;
  font-size:1.75rem;line-height:1.2;letter-spacing:0;
  margin:3.25rem 0 .75rem;text-wrap:balance}
.prose h3{font-size:var(--t-xs);font-weight:600;text-transform:uppercase;
  letter-spacing:.11em;color:var(--ink-faint);margin:2.25rem 0 .6rem}
.prose h2 + h3{margin-top:1.5rem}
.prose p{margin:0 0 1.15rem;text-wrap:pretty}
.prose ul,.prose ol{margin:0 0 1.35rem;padding-left:1.25rem}
.prose li{margin-bottom:.5rem;padding-left:.15rem}
.prose li::marker{color:var(--ink-faint)}
.prose blockquote{margin:0 0 1.5rem;padding-left:1.25rem;
  border-left:2px solid var(--rule-strong);color:var(--ink-soft)}
.prose strong{font-weight:600;color:var(--ink)}

/* Opening paragraph, set in the serif for contrast against the sans UI */
.lede{
  font-family:var(--display);font-size:1.6rem;line-height:1.28;
  letter-spacing:0;color:var(--ink);margin:0 0 1.75rem;max-width:34ch;
}
.lede strong{font-weight:400;color:var(--accent)}

/* Competency statement */
.statement{
  font-family:var(--display);font-style:normal;font-size:1.3rem;line-height:1.35;
  color:var(--ink);margin:0 0 2.5rem;padding:0 0 0 1.5rem;
  border-left:0;box-shadow:inset 3px 0 0 var(--accent);max-width:52ch;
}
.statement p{margin:0}

/* Course / date metadata line */
.meta{font-family:var(--mono);font-size:.72rem;line-height:1.6;color:var(--ink-faint);
  margin:0 0 1.5rem;letter-spacing:.02em}
.meta strong{color:var(--ink-soft);font-weight:600}

/* Download / external artifact link */
.dl{
  display:inline-flex;align-items:center;gap:.55rem;
  font-family:var(--mono);font-size:.72rem;font-weight:500;letter-spacing:.05em;
  text-transform:uppercase;text-decoration:none;color:var(--ink);
  border:1px solid var(--ink);border-radius:0;
  padding:.6rem 1rem;background:transparent;
  margin:.25rem .5rem .5rem 0;
  transition:border-color .15s ease,background .15s ease,color .15s ease;
}
.dl::after{content:"↓";font-size:.95em;color:var(--ink-faint);transition:color .15s ease}
.dl:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-wash)}
.dl:hover::after{color:var(--accent)}
.dl:hover::after{color:var(--accent)}
.dl.ext::after{content:"↗"}
.dl.go::after{content:"→"}

/* Unwritten-content marker. Delete the element as each section is filled in. */
.todo{
  font-size:var(--t-sm);line-height:1.6;color:var(--ink-faint);
  border:1px dashed var(--rule-strong);border-radius:var(--radius-sm);
  padding:.9rem 1.05rem;margin:0 0 1.25rem;background:var(--surface);
}
.todo strong{color:var(--ink-soft)}

/* ---------------------------------------------------------------- Media */

/* The site's own mark. Inline SVG, so it takes the surrounding colour and
   follows the theme without a second file or a second request. */
.mark{display:block;overflow:visible}
.footer-mark{display:inline-block;vertical-align:-.28em;margin-right:.5rem;
  color:var(--rule-strong)}

/* Figures. Images are the only element on the page that can shift text while
   they load, so height is reserved up front and nothing animates in. */
.figure{margin:0 0 2rem}
.figure img{
  width:100%;height:auto;display:block;
  background:var(--surface-2);
  border:1px solid var(--rule);border-radius:var(--radius);
}
.figure figcaption{
  font-family:var(--mono);font-size:.7rem;line-height:1.6;letter-spacing:.02em;
  color:var(--ink-faint);margin-top:.6rem;
}
/* A lead image may run wider than the reading column on a roomy screen. */
@media (min-width:900px){
  .figure-wide{width:calc(100% + 6rem);margin-left:-3rem;margin-right:-3rem}
}
/* Photographs sit slightly quieter in the dark theme, where a bright frame
   otherwise glares against the warm dark ground. */
@media (prefers-color-scheme:dark){
  .figure img{filter:brightness(.92) contrast(1.02)}
}

/* Several images together — module screens, presentation stills. */
.gallery{display:grid;gap:1.25rem;margin:0 0 2rem;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))}
.gallery .figure{margin:0}

/* ----------------------------------------------------------- About hero */

.hero{display:grid;grid-template-columns:minmax(0,1fr) 15rem;gap:3.5rem;
  align-items:start;margin-bottom:1rem}
.hero-solo{grid-template-columns:minmax(0,1fr)}
.hero-body{min-width:0;max-width:var(--content)}
.hero .page-subtitle{margin-bottom:2rem}
.portrait{margin:0}
.portrait img{
  width:100%;aspect-ratio:4/5;object-fit:cover;object-position:50% 20%;
  display:block;border-radius:var(--radius);
  background:var(--surface-2);border:1px solid var(--rule);
}
.portrait figcaption{font-family:var(--mono);font-size:.68rem;color:var(--ink-faint);
  margin-top:.6rem;line-height:1.55}
@media (prefers-color-scheme:dark){ .portrait img{filter:brightness(.94)} }
@media (max-width:900px){
  .hero{grid-template-columns:1fr;gap:2rem}
  .portrait{max-width:13rem;order:-1}
}

/* Definition-style fact rows, e.g. board certifications */
.facts{margin:0 0 1.75rem;padding:0}
.facts dt{font-family:var(--mono);font-size:.7rem;font-weight:500;text-transform:uppercase;
  letter-spacing:.06em;color:var(--ink-faint);margin:0 0 .35rem}
.facts dd{margin:0 0 1.15rem;color:var(--ink-soft);line-height:1.6}
.facts dd:last-child{margin-bottom:0}

/* ------------------------------------------------- Competency index list */

/* Two columns on wide screens. Row rules run across both, so the grid reads as
   a table of outcomes rather than as eleven separate cards. */
.prose .index-list{
  list-style:none;margin:2rem 0 0;padding:0;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:2.75rem;
  border-top:1px solid var(--ink);
}
.prose .index-list > li{margin:0;padding-left:0}
.index-list .index-item{
  position:relative;
  display:grid;grid-template-columns:2.4rem minmax(0,1fr);gap:.85rem;align-items:baseline;
  padding:1.05rem .3rem 1.15rem;border-bottom:1px solid var(--rule);
  transition:background .15s ease;
}
.index-list .index-item:hover{background:var(--surface)}
.index-num{
  font-family:var(--display);font-size:1.7rem;line-height:1;font-weight:400;
  color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:-.01em;
}
.index-text{min-width:0}
.index-name{font-family:var(--display);font-size:1.3rem;font-weight:400;
  letter-spacing:0;line-height:1.15;margin:0 0 .3rem}
.index-name a{color:inherit;text-decoration:none}
/* Stretched link: the whole cell is clickable, but the link's accessible name
   stays just the competency name rather than the entire block of text. */
.index-name a::after{content:"";position:absolute;inset:0}
.index-item:hover .index-name a{color:var(--accent)}
.index-stmt{font-size:.8rem;line-height:1.55;color:var(--ink-soft);margin:0 0 .5rem}
.prose .index-artifacts{list-style:none;margin:0;padding:0;
  display:flex;flex-direction:column;gap:.15rem}
.prose .index-artifacts li{
  /* Deliberately NOT the mono face — artifact titles are long, and mono
     uppercase makes them unreadable at this size. */
  font-family:var(--sans);font-size:.72rem;line-height:1.45;
  color:var(--ink-faint);margin:0;padding-left:.8rem;position:relative;
}
.prose .index-artifacts li::before{
  content:"";position:absolute;left:0;top:.55em;width:3px;height:3px;
  border-radius:50%;background:var(--rule-strong);
}
@media (max-width:820px){
  .prose .index-list{grid-template-columns:minmax(0,1fr);column-gap:0}
}
@media (max-width:520px){
  .index-list .index-item{grid-template-columns:2rem minmax(0,1fr);gap:.7rem;padding:.95rem .2rem 1rem}
  .index-num{font-size:1.45rem}
  .index-name{font-size:1.2rem}
}

/* ------------------------------------------------------ Competency page */

/* Jump list to the artifacts on this page */
.on-page{margin:0 0 3rem;padding:1.15rem 1.35rem;background:var(--surface);
  border:1px solid var(--rule);border-radius:var(--radius)}
.on-page .label{margin-bottom:.7rem}
.prose .on-page ol,.prose .on-page ul{list-style:none;margin:0;padding:0}
.prose .on-page li{margin:0 0 .45rem;padding:0}
.prose .on-page li::marker{content:none}
/* A long section index (the CV page) reads better in two columns. */
@media (min-width:640px){ .prose .on-page ul{columns:2;column-gap:2.5rem} }
.prose .on-page ul li{break-inside:avoid}
.on-page li:last-child{margin-bottom:0}
.on-page a{font-size:var(--t-sm);font-weight:500;color:var(--ink);
  text-decoration:none;line-height:1.5}
.on-page a:hover{color:var(--accent);text-decoration:underline}
.on-page .n{font-family:var(--mono);font-size:.72rem;color:var(--accent);font-weight:500;
  margin-right:.55rem;font-variant-numeric:tabular-nums}

/* One artifact block */
.artifact{padding-top:2.75rem;margin-top:2.75rem;border-top:1px solid var(--rule);
  scroll-margin-top:6rem}
.artifact:first-of-type{padding-top:0;margin-top:0;border-top:0}
.artifact > h2{margin-top:.35rem}
.artifact > .label{color:var(--accent);margin-bottom:.55rem}

.competency-body > h2{margin-top:3.5rem}
.competency-body > h2:first-child{margin-top:0}

/* CV entry list — title with a right-aligned date, optional detail beneath */
.cv-list{margin:0 0 2.25rem;padding:0}
.cv-list dt{
  display:flex;justify-content:space-between;align-items:baseline;gap:1.25rem;
  font-weight:600;font-size:.97rem;line-height:1.45;color:var(--ink);
  border-top:1px solid var(--rule);margin-top:1rem;padding-top:1rem;
}
.cv-list dt:first-of-type{border-top:0;margin-top:0;padding-top:0}
.cv-list .when{
  font-family:var(--mono);font-size:.7rem;font-weight:400;color:var(--ink-faint);
  white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.01em;
}
.cv-list dd{margin:.35rem 0 0;font-size:var(--t-sm);line-height:1.55;color:var(--ink-soft)}
@media (max-width:560px){
  .cv-list dt{flex-direction:column;gap:.2rem}
  .cv-list .when{order:-1}
}

/* Citation list — hanging indent, tabular numbering */
.prose .cites{margin:0 0 2rem;padding:0;list-style:none;counter-reset:cite}
.prose .cites li{
  position:relative;margin:0 0 .9rem;padding-left:2.4rem;
  font-size:var(--t-sm);line-height:1.6;color:var(--ink-soft);
}
.prose ol.cites li{counter-increment:cite}
.prose ol.cites li::before{
  content:counter(cite) ".";position:absolute;left:0;top:0;width:2rem;
  text-align:right;color:var(--ink-faint);font-variant-numeric:tabular-nums;
}
.prose ul.cites li::before{
  content:"";position:absolute;left:.75rem;top:.72em;width:4px;height:4px;
  border-radius:50%;background:var(--rule-strong);
}
.cites a{word-break:break-word}

/* Page-level reference list */
.references{margin-top:3.5rem;padding-top:2rem;border-top:1px solid var(--rule)}
.references h2,.references h3{margin-top:0}
.prose .references ol,.prose .references ul{font-size:var(--t-sm);line-height:1.6;
  color:var(--ink-soft);padding-left:0;list-style:none}
.prose .references li{padding-left:2rem;text-indent:-2rem;margin-bottom:.75rem}

/* Previous / next */
.pager{display:grid;grid-template-columns:1fr 1fr;gap:1rem;
  margin-top:4.5rem;padding-top:1.75rem;border-top:1px solid var(--rule)}
.pager a{display:block;text-decoration:none;color:var(--ink-soft);
  font-size:var(--t-sm);line-height:1.45;padding:.85rem 1rem;
  border:1px solid var(--rule);border-radius:var(--radius);
  transition:border-color .15s ease,color .15s ease}
.pager a:hover{border-color:var(--accent);color:var(--accent)}
.pager .label{display:block;margin-bottom:.3rem}
.pager-next{text-align:right;grid-column:2}
@media (max-width:560px){
  .pager{grid-template-columns:1fr}
  .pager-next{text-align:left;grid-column:1}
}

/* ----------------------------------------------------- Tables and code */

/* Kramdown applies {: .table-scroll} to the <table> itself, not to a wrapper,
   so the table has to be its own scroll container. display:block is what makes
   overflow-x actually apply to a table box. */
.table-scroll{display:block;width:100%;max-width:100%;overflow-x:auto;
  margin:0 0 1.75rem;border:1px solid var(--rule);border-radius:var(--radius)}
table{border-collapse:collapse;width:100%;font-size:var(--t-sm)}
th,td{text-align:left;padding:.7rem .9rem;border-bottom:1px solid var(--rule);
  vertical-align:top}
tbody tr:last-child td{border-bottom:0}
/* Date ranges read badly when an en dash lets them wrap mid-span — but on a
   narrow screen wrapping beats forcing the page sideways. */
@media (min-width:641px){ .table-scroll td:first-child{white-space:nowrap} }
th{font-family:var(--mono);font-weight:500;color:var(--ink-faint);text-transform:uppercase;
  font-size:.68rem;letter-spacing:.05em;background:var(--surface)}
code{font-size:.85em;background:var(--surface-2);padding:.15em .38em;
  border-radius:3px;font-family:var(--mono)}

/* ---------------------------------------------------------------- Form */

.form{margin:1.5rem 0 0;max-width:34rem}
.field{margin-bottom:1.15rem}
.field label{display:block;font-size:var(--t-sm);font-weight:600;
  margin-bottom:.4rem;color:var(--ink)}
.field input,.field textarea{
  width:100%;font:inherit;font-size:var(--t-sm);color:var(--ink);
  background:var(--bg);border:1px solid var(--rule-strong);
  border-radius:var(--radius-sm);padding:.65rem .8rem;
}
.field textarea{min-height:9rem;resize:vertical}
.field input:focus,.field textarea:focus{border-color:var(--focus);outline-offset:1px}
.btn{
  display:inline-flex;align-items:center;gap:.5rem;font:inherit;
  font-size:var(--t-sm);font-weight:600;cursor:pointer;
  color:var(--bg);background:var(--ink);border:1px solid var(--ink);
  border-radius:var(--radius-sm);padding:.7rem 1.4rem;
  transition:opacity .15s ease;
}
.btn:hover{opacity:.85}

/* Inline list of external profiles */
.prose .links{list-style:none;margin:1rem 0 1.5rem;padding:0;
  display:flex;flex-wrap:wrap;gap:.5rem}
.prose .links li{margin:0}
.links a{display:inline-flex;align-items:center;gap:.45rem;
  font-size:var(--t-sm);font-weight:500;text-decoration:none;color:var(--ink);
  border:1px solid var(--rule-strong);border-radius:100px;padding:.4rem .95rem;
  transition:border-color .15s ease,color .15s ease}
.links a:hover{border-color:var(--accent);color:var(--accent)}

/* -------------------------------------------------------------- Footer */

.site-footer{border-top:1px solid var(--rule);background:var(--surface);
  padding:3rem 0;font-size:var(--t-sm);margin-top:auto}
.footer-inner{display:flex;justify-content:space-between;gap:2.5rem;flex-wrap:wrap}
.site-footer p{margin:0 0 .3rem}
.footer-name{font-weight:600;color:var(--ink)}
.footer-meta{color:var(--ink-faint)}
.footer-contact{text-align:right;color:var(--ink-faint)}
.footer-contact a{color:var(--ink-soft);text-decoration:none}
.footer-contact a:hover{color:var(--accent);text-decoration:underline}
.footer-note{width:100%;color:var(--ink-faint);font-size:var(--t-xs);
  border-top:1px solid var(--rule);padding-top:1.25rem;margin-top:.5rem}
@media (max-width:640px){
  .footer-inner{flex-direction:column;gap:1.5rem}
  .footer-contact{text-align:left}
}

/* --------------------------------------------------------------- Error */

.error-page{text-align:center;padding:2rem 0 0;max-width:44ch;margin-inline:auto}
.error-code{font-family:var(--display);font-size:6rem;font-weight:400;line-height:1;
  color:var(--accent);margin:0 0 1rem}

/* --------------------------------------------------------------- Print */

@media print{
  .site-header,.site-nav,.pager,.site-footer,.skip,.on-page,.todo{display:none !important}
  html,body{background:#fff;color:#000;font-size:10.5pt;line-height:1.45}
  main{padding:0}
  .wrap,.prose{max-width:none;padding:0}
  a{color:#000;text-decoration:underline}
  .dl{border:0;padding:0}
  .dl::after{content:""}
  .statement{border-left:2px solid #999;color:#333}
  .artifact{break-inside:auto;page-break-inside:auto}
  h1,h2,h3{break-after:avoid;page-break-after:avoid}
}
