/* =========================================================================
   V6b · CLINICAL
   A personal page formatted as a scientific paper. Pure paper white,
   pure ink black, single hospital-blue accent for figure refs and links.
   Two-column body at desktop. Print-correct.
   ========================================================================= */

:root {
  --paper:   #FFFFFF;
  --ink:     #050505;
  --soft:    #2A2A2A;
  --muted:   #6B6B6B;
  --rule:    #D6D6D6;
  --blue:    #0050B3;
  --blue-bg: #E8F0F8;

  --serif: 'Source Serif 4', 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', -apple-system, Helvetica, Arial, sans-serif;
  --mono:  'IBM Plex Mono', SFMono-Regular, Menlo, Consolas, monospace;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: oldstyle-nums;
}

p, h1, h2, h3, h4, dl, dd, ol, ul, li, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
em { font-style: italic; }
sup { font-size: 0.7em; vertical-align: super; line-height: 0; }
code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: #F4F4F4;
  padding: 1px 4px;
  border-radius: 2px;
}

/* =========================================================================
   JOURNAL MASTHEAD
   ========================================================================= */

.journal {
  border-bottom: 2px solid var(--ink);
  padding: 14px 32px 10px;
  margin-bottom: 0;
}
.journal__row {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.journal__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.journal__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--soft);
  letter-spacing: 0.02em;
}
.journal__row--sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

/* =========================================================================
   PAPER CONTAINER
   ========================================================================= */

.paper {
  max-width: 940px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

/* =========================================================================
   TITLE BLOCK
   ========================================================================= */

.title-block { margin-bottom: 48px; }

.kind {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.8vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.article-title em {
  font-weight: 400;
  color: var(--soft);
}

.authors { margin-bottom: 6px; }
.author {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.affil { margin-bottom: 22px; }
.affil li {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--soft);
  line-height: 1.4;
}

.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.dates > div {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--soft);
}
.dates dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dates dd { font-weight: 500; color: var(--ink); }

/* =========================================================================
   ABSTRACT (boxed, full width above two columns)
   ========================================================================= */

.abstract {
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  padding: 22px 24px;
  margin-bottom: 40px;
}
.abstract h2 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.abstract p {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 10px;
  color: var(--ink);
}
.abstract p:last-of-type { margin-bottom: 0; }
.kwds {
  font-size: 13px !important;
  font-style: italic;
  color: var(--soft) !important;
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,80,179,0.35);
}

/* =========================================================================
   BODY (two columns at desktop)
   ========================================================================= */

.body {
  column-count: 2;
  column-gap: 36px;
  column-rule: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: justify;
  hyphens: auto;
}
.body > section {
  break-inside: avoid-column;
  margin-bottom: 22px;
}
.body p {
  margin-bottom: 12px;
  color: var(--ink);
}
.body p:first-of-type::first-line {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

.sec {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  margin-bottom: 8px;
  break-after: avoid;
  text-transform: none;
}
.sec span {
  display: inline-block;
  width: 1.6em;
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
}

/* Figures and tables span both columns */
.fig, .table {
  column-span: all;
  margin: 14px 0 18px;
  break-inside: avoid;
  padding: 14px;
  border: 1px solid var(--rule);
  background: #FAFAFA;
}
.fig__plot {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  padding: 8px;
  margin-bottom: 10px;
}
.fig__plot svg { display: block; width: 100%; height: auto; }
.fig figcaption,
.table caption {
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--soft);
  text-align: left;
  caption-side: top;
  padding-bottom: 6px;
}
.fig figcaption strong,
.table caption strong { font-weight: 600; color: var(--ink); }

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 6px;
}
th, td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--rule);
}
th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
tbody tr:last-child td { border-bottom: 1px solid var(--ink); }

/* References */
.refs {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  counter-reset: ref;
}
.refs li {
  counter-increment: ref;
  position: relative;
  padding-left: 28px;
  margin-bottom: 5px;
  text-indent: 0;
  color: var(--soft);
}
.refs li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer {
  max-width: 940px;
  margin: 0 auto;
  padding: 28px 32px 56px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

::selection { background: var(--blue); color: var(--paper); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 720px) {
  .body { column-count: 1; column-rule: none; text-align: left; hyphens: none; }
  .journal__row { flex-direction: column; gap: 4px; }
  .paper { padding: 36px 22px 64px; }
}

@media print {
  body { font-size: 10pt; }
  .body { column-count: 2; }
  .journal { border-bottom: 1pt solid #000; }
  a { color: #000; }
}
