/* Venkata Jonnakuti - personal site
   Palette: oxblood. Light theme. Sans: Inter. */

:root {
  --ink: #1c1513;
  --ink-soft: #6f6360;
  --ink-faint: #9a8f8b;
  --bg: #ffffff;
  --bg-soft: #faf6f4;
  --line: #ece3e0;
  --line-strong: #ddd0cc;

  --ox-900: #4a1212;
  --ox-800: #791f1f;
  --ox-700: #922626;
  --ox-600: #a82f2d;
  --ox-400: #d6483f;
  --ox-tint: #fbeceb;
  --ox-tint-2: #f6dcd9;
  --ox-dot: #f0a39a;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }

/* dotted-grid background utility */
.dotgrid {
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ox-900);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #fff;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 14px;
  color: rgba(255,255,255,.74);
  transition: color .2s var(--ease);
  position: relative;
}
.nav-links a:not(.cv):hover { color: #fff; }
.nav-links a:not(.cv)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1.5px; background: var(--ox-dot); transition: right .25s var(--ease);
}
.nav-links a:not(.cv):hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: #fff; }
.cv {
  background: #fff; color: var(--ox-900) !important;
  padding: 7px 15px; border-radius: var(--radius-sm); font-weight: 500;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.cv:hover { transform: translateY(-1px); opacity: .9; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }

/* ---------- hero ---------- */
.hero { background: var(--ox-900); color: #fff; position: relative; overflow: hidden; min-height: 600px; }
.hero-inner {
  position: relative;
  padding: 108px 0 122px;
}
.hero-copy { position: relative; z-index: 2; max-width: 580px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.14); color: #fff;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ox-dot); }
.hero h1 { font-size: clamp(40px, 7vw, 68px); color: #fff; margin-bottom: 22px; }
.hero p.lead {
  font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.84);
  max-width: 460px; margin: 0 0 30px; line-height: 1.55;
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; padding: 12px 20px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: transform .2s var(--ease), opacity .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: #fff; color: var(--ox-900); }
.btn-solid:hover { opacity: .92; }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* hero eye + rna composition */
.hero-art {
  position: absolute; z-index: 1; top: 50%; right: -70px;
  transform: translateY(-50%);
  width: clamp(440px, 52vw, 660px); height: auto; pointer-events: none;
}
.hero-art .rings-a { animation: ringPulse 7s ease-in-out infinite; }
.hero-art .rings-b { animation: ringPulse 7s ease-in-out infinite reverse; animation-delay: -2.6s; }
.hero-art .strand { stroke-dasharray: 6 10; animation: strandDash 9s linear infinite; }
.hero-art .strand2 { stroke-dasharray: 5 11; animation: strandDash 13s linear infinite reverse; }
.hero-art .tw { animation: twinkle 4s ease-in-out infinite; }
@keyframes ringPulse { 0%,100% { opacity:.42 } 50% { opacity:.95 } }
@keyframes strandDash { to { stroke-dashoffset: -240 } }
@keyframes twinkle { 0%,100% { opacity:.15 } 50% { opacity:.85 } }

/* ---------- statement ---------- */
.statement { padding: 64px 0; border-bottom: 1px solid var(--line); }
.statement p {
  font-size: clamp(22px, 3.4vw, 32px); font-weight: 600; letter-spacing: -.02em;
  line-height: 1.34; margin: 0; max-width: 940px;
}
.statement .hl { color: var(--ox-600); }

/* ---------- section heading ---------- */
.section { padding: 60px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 26px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-link { font-size: 14px; color: var(--ox-600); display: inline-flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--ox-800); }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ox-600); font-weight: 600; margin-bottom: 10px; }

/* ---------- focus tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile {
  position: relative; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius); padding: 22px;
  background: var(--ox-tint);
  transition: transform .28s var(--ease), background .28s var(--ease);
}
.tile:hover { transform: translateY(-4px); }
.tile i { font-size: 26px; color: var(--ox-800); }
.tile h3 { font-size: 17px; margin: 14px 0 5px; font-weight: 600; color: var(--ox-800); }
.tile p { font-size: 14px; margin: 0; line-height: 1.5; color: var(--ox-700); }
.tile-cue {
  position: absolute; top: 18px; right: 18px; font-size: 16px; color: var(--ox-600);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.tile:hover .tile-cue { opacity: .9; transform: none; }
.tile.is-active { background: var(--ox-900); }
.tile.is-active i, .tile.is-active h3 { color: #fff; }
.tile.is-active p { color: rgba(255,255,255,.78); }
.tile.is-active .tile-cue { color: #fff; opacity: .9; transform: none; }
.focus-detail {
  margin-top: 14px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.focus-detail p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: var(--ink); }
.focus-detail a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ox-700); font-weight: 500; }
.focus-detail a:hover { color: var(--ox-800); }
.focus-detail a i { transition: transform .2s var(--ease); }
.focus-detail a:hover i { transform: translateX(3px); }
.focus-detail.swap { animation: fadeSwap .35s var(--ease); }
@keyframes fadeSwap { from { opacity: .15; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- publication rows ---------- */
.pub-list { display: flex; flex-direction: column; }
.pub-row {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 22px 12px; border-top: 1px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.pub-row:last-child { border-bottom: 1px solid var(--line); }
.pub-row:hover { background: var(--bg-soft); transform: translateX(4px); }
.pub-row:hover .arw { transform: translate(3px,-3px); color: var(--ox-600); }
.pub-idx { font-size: 28px; font-weight: 600; color: var(--ox-400); min-width: 46px; letter-spacing: -.04em; }
.pub-year { font-size: 14px; font-weight: 600; color: var(--ink-faint); min-width: 42px; padding-top: 3px; }
.pub-body { flex: 1; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 7px; }
.pub-journal { font-size: 12px; color: var(--ink-faint); }
.pub-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; line-height: 1.32; letter-spacing: -.01em; color: var(--ink); }
.pub-blurb { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.arw { font-size: 18px; color: var(--ink-faint); padding-top: 3px; transition: transform .25s var(--ease), color .25s var(--ease); }

.tag { font-size: 11px; font-weight: 500; border-radius: 5px; padding: 3px 9px; line-height: 1.4; }
.tag-first { background: var(--ox-600); color: #fff; }
.tag-cofirst { background: var(--ox-tint-2); color: var(--ox-800); }
.tag-comp { background: var(--ox-tint); color: var(--ox-800); }
.tag-clin { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.tag-imaging { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }

/* ---------- stat cards ---------- */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { flex: 1; min-width: 130px; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--ink-soft); margin: 0 0 3px; }
.stat .num { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.02em; }
.stat .num.accent { color: var(--ox-700); }

/* by-year chart */
.chart-card { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 18px 10px; margin-bottom: 24px; }
.chart-card .eyebrow { margin-bottom: 8px; }

/* ---------- filter tabs ---------- */
.tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.tab {
  font-size: 13.5px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.tab:hover { border-color: var(--ox-400); }
.tab.active { background: var(--ox-900); color: #fff; border-color: var(--ox-900); }

/* ---------- page header (sub pages) ---------- */
.page-head { padding: 52px 0 30px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 10px; }
.page-head p { font-size: 16px; color: var(--ink-soft); margin: 0; max-width: 620px; }

/* ---------- about ---------- */
.profile { display: flex; gap: 28px; align-items: center; padding: 44px 0; border-bottom: 1px solid var(--line); }
.portrait {
  width: 200px; height: 212px; flex-shrink: 0; position: relative;
  display: flex; align-items: flex-start; justify-content: center;
}
.portrait-art { position: absolute; inset: 0; width: 200px; height: 210px; }
.portrait-art .pr-a { transform-origin: 100px 86px; animation: ringPulse 7s ease-in-out infinite; }
.portrait-art .pr-b { transform-origin: 100px 86px; animation: ringPulse 7s ease-in-out infinite reverse; animation-delay: -2.5s; }
.portrait-photo {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 136px; height: 136px; border-radius: 50%; background: var(--ox-tint);
  border: 1px solid var(--ox-tint-2); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.portrait-photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait-photo .mono {
  width: 52px; height: 52px; border-radius: 50%; background: var(--ox-900); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600;
}
.portrait-photo .cap { font-size: 11px; color: var(--ox-600); }

/* awards */
.awards { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.awards li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); transition: padding-left .25s var(--ease); }
.awards li:last-child { border-bottom: 1px solid var(--line); }
.awards li:hover { padding-left: 6px; }
.aw-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--ox-tint); color: var(--ox-700); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.aw-title { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.aw-sub { font-size: 13px; color: var(--ink-soft); margin: 0; }
.profile h1 { font-size: clamp(28px, 4vw, 38px); margin: 12px 0 6px; }
.profile .role { font-size: 15px; color: var(--ink-soft); margin: 0 0 16px; max-width: 420px; }
.socials { display: flex; gap: 16px; font-size: 20px; color: var(--ink-faint); }
.socials a { transition: color .2s var(--ease), transform .2s var(--ease); }
.socials a:hover { color: var(--ox-600); transform: translateY(-2px); }

.prose { max-width: 720px; }
.prose h2 { font-size: 20px; margin-bottom: 16px; }
.prose p { font-size: 17px; line-height: 1.72; margin: 0 0 16px; }
.prose .hl { color: var(--ox-700); font-weight: 600; }

/* timeline */
.timeline { border-left: 2px solid var(--ox-tint-2); margin-left: 8px; max-width: 720px; }
.titem { position: relative; padding: 0 0 28px 26px; }
.titem:last-child { padding-bottom: 4px; }
.titem .node {
  position: absolute; left: -10px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ox-600); border: 4px solid var(--bg); transition: transform .22s var(--ease);
}
.titem:last-child .node { background: var(--ox-900); }
.titem:hover .node { transform: scale(1.25); }
.titem .period { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ox-600); margin: 0 0 3px; }
.titem h3 { font-size: 16px; margin: 0 0 4px; transition: color .2s var(--ease); }
.titem:hover h3 { color: var(--ox-800); }
.titem p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

.work-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.work-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .26s var(--ease), border-color .26s var(--ease); }
.work-card:hover { transform: translateY(-4px); border-color: var(--ox-400); }
.work-card i { font-size: 26px; color: var(--ox-700); }
.work-card h3 { font-size: 16px; margin: 12px 0 6px; }
.work-card p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ---------- research: APA diagram ---------- */
.apa-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.apa-svg { width: 100%; height: auto; display: block; }
.apa-svg text { font-family: var(--font-sans); }
.apa-h { font-size: 13px; font-weight: 600; fill: var(--ink); }
.apa-cds { font-size: 12px; font-weight: 500; fill: #fff; }
.apa-tag { font-size: 11px; fill: #791f1f; }
.apa-pa { font-size: 11px; font-weight: 600; fill: #791f1f; }
.apa-meter { font-size: 13px; font-weight: 600; fill: var(--ox-700); }
#apa-utr { transition: width .6s var(--ease); }
#apa-patail { transition: transform .6s var(--ease); }
#apa-reg, #apa-rep { transition: opacity .5s var(--ease); }
#apa-pfill { transition: width .6s var(--ease); }
.apa-controls { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 3px; }
.seg-btn { font: inherit; font-size: 13.5px; padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg-btn.is-on { background: var(--ox-900); color: #fff; }
.auto-btn { font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink-soft); cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease); }
.auto-btn.is-on { color: var(--ox-700); border-color: var(--ox-400); }
.apa-caption { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 640px; }
.apa-caption strong { color: var(--ox-700); font-weight: 600; }

/* research buttons (light surfaces) */
.btn-dark { background: var(--ox-900); color: #fff; }
.btn-dark:hover { opacity: .92; }
.btn-outline { color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--ox-400); }

/* application cards */
.appcard { position: relative; display: block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .26s var(--ease), border-color .26s var(--ease); }
.appcard:hover { transform: translateY(-4px); border-color: var(--ox-400); }
.appcard i { font-size: 24px; color: var(--ox-700); }
.appcard h3 { font-size: 16px; margin: 12px 0 5px; }
.appcard p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.5; }
.appcue { font-size: 13px; color: var(--ox-700); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.appcard:hover .appcue i { transform: translateX(3px); }
.appcue i { transition: transform .2s var(--ease); }

/* ---------- contact band ---------- */
.contact { background: var(--ox-900); color: #fff; }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 56px 0; flex-wrap: wrap; }
.contact h2 { font-size: clamp(24px, 3.4vw, 32px); color: #fff; margin-bottom: 8px; }
.contact p { font-size: 15px; color: rgba(255,255,255,.78); margin: 0; }

/* ---------- oct divider ---------- */
.oct-divider { display: flex; justify-content: center; padding: 8px 0; opacity: .8; }
.oct-divider svg { width: 100%; max-width: 320px; height: 26px; }

/* ---------- footer ---------- */
.footer { padding: 26px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer small { font-size: 13px; color: var(--ink-faint); }
.footer .socials { font-size: 18px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.loading { color: var(--ink-faint); font-size: 14px; padding: 30px 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero-art { right: -200px; opacity: .45; }
}

@media (max-width: 960px) {
  .burger { display: block; }
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ox-900); padding: 8px 28px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; }
  .nav-links a.cv { margin-top: 8px; }
  .hero-inner { padding: 58px 0 66px; }
  .hero-copy { max-width: none; }
  .hero-art { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .work-cards { grid-template-columns: 1fr; }
  .profile { flex-direction: column; align-items: flex-start; text-align: left; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===================== dark mode ===================== */
body { transition: background-color .3s ease, color .3s ease; }
[data-theme="dark"] {
  --ink: #f2ebe8;
  --ink-soft: #b6aaa5;
  --ink-faint: #897c77;
  --bg: #181210;
  --bg-soft: #221917;
  --line: #382b27;
  --line-strong: #4a3a35;
  --ox-tint: #311b19;
  --ox-tint-2: #3e2421;
  --ox-tt: #f2c9c3;
  --ox-800: #f0c5be;
  --ox-700: #e8aaa2;
  --ox-600: #df978f;
  --ox-400: #ea6a62;
}
.theme-toggle {
  background: none; border: 0; color: rgba(255,255,255,.74); cursor: pointer;
  font-size: 18px; padding: 4px 2px; display: inline-flex; align-items: center;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { color: #fff; transform: translateY(-1px); }

/* keep diagram on-canvas labels readable in both themes */
.apa-pa { fill: var(--ox-800); }
.apa-lbl { font-size: 11px; font-family: var(--font-sans); fill: var(--ox-800); }

/* ===================== CV page ===================== */
.cv-wrap { max-width: 900px; }
.cv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.cv-section { padding: 30px 0; border-top: 1px solid var(--line); }
.cv-section:first-of-type { border-top: 0; }
.cv-section h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ox-600); font-weight: 600; margin: 0 0 18px; }
.cv-row { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 9px 0; }
.cv-row .when { font-size: 13px; font-weight: 600; color: var(--ink-faint); padding-top: 2px; }
.cv-row .what { font-size: 15px; line-height: 1.55; }
.cv-row .what .sub { color: var(--ink-soft); font-size: 14px; }
.cv-list { list-style: none; margin: 0; padding: 0; counter-reset: pub; }
.cv-list li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; }
.cv-list li:first-child { border-top: 0; }
.cv-list li::before { counter-increment: pub; content: counter(pub); position: absolute; left: 0; top: 11px; font-size: 12px; font-weight: 600; color: var(--ox-400); }
.cv-list li.no-num { padding-left: 0; }
.cv-list li.no-num::before { content: none; }
.cv-list .me { font-weight: 600; }
.cv-list .venue { color: var(--ink-soft); }
.cv-list a { color: var(--ox-700); }
.cv-tag { font-size: 11px; font-weight: 500; border-radius: 5px; padding: 2px 7px; margin-left: 6px; background: var(--ox-tint); color: var(--ox-tt); white-space: nowrap; }

/* ===================== software page ===================== */
.sw-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.sw-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ox-700); background: var(--ox-tint); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.code-block { background: #1c1513; color: #e9e0db; border-radius: var(--radius); padding: 18px 20px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13.5px; line-height: 1.7; overflow-x: auto; position: relative; }
[data-theme="dark"] .code-block { background: #0f0b0a; border: 1px solid var(--line); }
.code-block .cm { color: #b6857f; }
.code-block .tok { color: #f0a39a; }
.copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.08); border: 0; color: #e9e0db; font-size: 12px; padding: 5px 11px; border-radius: 6px; cursor: pointer; transition: background .2s; }
.copy-btn:hover { background: rgba(255,255,255,.16); }
.cite-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; line-height: 1.6; position: relative; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ===================== OCT explainer ===================== */
.oct-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.oct-stage { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.oct-controls { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.oct-controls input[type=range] { flex: 1; }
.oct-readout { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; line-height: 1.6; }
.oct-readout strong { color: var(--ox-700); }
@media (max-width: 700px) { .oct-stage { grid-template-columns: 1fr; } .sw-hero { grid-template-columns: 1fr; } .cv-row { grid-template-columns: 1fr; gap: 2px; } }

input[type="range"] { accent-color: var(--ox-700); }

/* cite block: header row so the copy button never overlaps the citation */
.cite-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cite-src { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.cite-text { margin: 0; }
.cite-top .copy-btn { position: static; background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink-soft); }
.cite-top .copy-btn:hover { background: var(--bg-soft); color: var(--ink); }

/* ===================== print (CV) ===================== */
@media print {
  :root, html[data-theme="dark"] {
    --ink: #111; --ink-soft: #333; --ink-faint: #555;
    --bg: #fff; --bg-soft: #fff; --line: #ccc; --line-strong: #bbb;
    --ox-600: #333; --ox-700: #222; --ox-800: #222; --ox-400: #555; --ox-tint: #f2f2f2; --ox-tt: #222;
  }
  body { background: #fff; color: #111; }
  .nav, .footer, .contact, .cv-actions, .theme-toggle, .oct-divider, .burger { display: none !important; }
  .page-head { padding: 0 0 10px; }
  .page-head h1 { font-size: 26px; }
  .cv-section { padding: 12px 0; }
  .cv-section h2 { color: #444; break-after: avoid; page-break-after: avoid; }
  .cv-row, .cv-list li { break-inside: avoid; page-break-inside: avoid; }
  a { color: #111 !important; text-decoration: none; }
  .hero, .hero-art { min-height: auto; }
  @page { margin: 1.4cm; }
}

.footer small a { color: var(--ink-soft); }
.footer small a:hover { color: var(--ox-600); }

/* OCT explainer: audience toggle (patient / clinician) */
.aud-toggle { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); background: var(--bg-soft); border-radius: 999px; }
.aud-toggle button { font: inherit; font-size: 13.5px; padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.aud-toggle button.on { background: var(--ox-900); color: #fff; }
[data-aud="pat"] .aud-clin { display: none !important; }
[data-aud="clin"] .aud-pat { display: none !important; }
