/* ============================================================
   Direction A: redesign design system
   Loaded only on pages using the `redesign` layout family.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root{
  --ink:#10172a; --muted:#5a6478; --line:#e7e9f0;
  --accent:#3b5bdb; --accent-soft:#eef2ff; --gold:#b8860b; --gold-soft:#fbf3df;
  --bg:#fbfbfd; --card:#ffffff;
  --maxw:1120px;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{ font-family:'Inter',sans-serif; color:var(--ink); background:var(--bg); line-height:1.5; -webkit-font-smoothing:antialiased; }
body.rd h1, body.rd h2, body.rd h3{ font-family:'Fraunces',serif; letter-spacing:-.01em; line-height:1.1; }
.rd .mono{ font-family:'JetBrains Mono',monospace; }
.rd-wrap{ max-width:var(--maxw); margin:0 auto; padding:0 48px; }
.rd a{ color:var(--accent); }

/* ---------- NAV ---------- */
.rd-nav{ display:flex; align-items:center; justify-content:space-between; padding:20px 48px; max-width:var(--maxw); margin:0 auto; }
.rd-nav .brand{ font-family:'Fraunces',serif; font-weight:700; font-size:20px; color:var(--ink); text-decoration:none; }
.rd-nav .brand span{ color:var(--accent); }
.rd-nav ul{ display:flex; gap:24px; list-style:none; align-items:center; }
.rd-nav ul a{ text-decoration:none; color:var(--muted); font-size:14.5px; font-weight:500; }
.rd-nav ul a:hover{ color:var(--ink); }
.rd-nav ul a.active{ color:var(--ink); font-weight:700; border-bottom:2px solid var(--accent); padding-bottom:3px; }
.rd-nav .cv-btn{ background:var(--ink); color:#fff; padding:9px 18px; border-radius:8px; font-size:14px; font-weight:600; text-decoration:none; }
.rd-nav .cv-btn:hover{ background:var(--accent); }
.rd-navtoggle{ display:none; }

/* ---------- HERO ---------- */
.rd-hero{ display:grid; grid-template-columns:1.25fr .75fr; gap:56px; align-items:center; padding:58px 0 50px; }
.rd-eyebrow{ display:inline-flex; align-items:center; gap:9px; background:#fff; border:1px solid var(--line);
  color:var(--ink); font-family:'JetBrains Mono',monospace; font-size:12.5px; font-weight:500;
  padding:8px 15px; border-radius:999px; margin-bottom:24px; }
.rd-eyebrow .dot{ width:8px; height:8px; border-radius:50%; background:#22c55e; box-shadow:0 0 8px rgba(34,197,94,.6); }
.rd-hero h1{ font-size:51px; font-weight:700; margin-bottom:20px; }
.rd-hero h1 em{ font-style:normal; color:var(--accent); }
.rd-hero .lead{ font-size:18px; line-height:1.62; color:var(--muted); max-width:570px; margin-bottom:26px; }
.rd-cta{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:26px; }
.rd-btn{ text-decoration:none; font-size:14.5px; font-weight:600; padding:12px 21px; border-radius:9px; display:inline-block; }
.rd-btn.primary{ background:var(--accent); color:#fff; }
.rd-btn.primary:hover{ background:#2f4ac0; }
.rd-btn.ghost{ background:#fff; color:var(--ink); border:1px solid var(--line); }
.rd-btn.ghost:hover{ border-color:var(--accent); color:var(--accent); }
.rd-contact{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.rd-contact .email{ display:inline-flex; align-items:center; gap:9px; background:var(--accent-soft);
  color:var(--accent); font-weight:600; font-size:14.5px; padding:11px 17px; border-radius:10px; text-decoration:none; }
.rd-contact .ico{ display:flex; gap:18px; }
.rd-contact .ico a{ color:var(--muted); text-decoration:none; font-size:14px; font-weight:500; }
.rd-contact .ico a:hover{ color:var(--accent); }
.rd-portrait{ position:relative; }
.rd-portrait img{ width:100%; border-radius:20px; display:block; box-shadow:0 30px 60px -28px rgba(15,23,41,.4); }
.rd-portrait .ring{ position:absolute; inset:-13px; border:1.5px solid var(--accent); border-radius:28px; opacity:.22; }
.rd-portrait .badge{ position:absolute; bottom:-18px; left:-18px; background:#fff; border:1px solid var(--line);
  border-radius:13px; padding:13px 17px; box-shadow:0 16px 34px -18px rgba(15,23,41,.35); }
.rd-portrait .badge .n{ font-family:'Fraunces',serif; font-size:22px; font-weight:700; color:var(--gold); line-height:1; }
.rd-portrait .badge .l{ font-size:11px; color:var(--muted); margin-top:4px; }

/* ---------- METRIC BAND ---------- */
.rd-metrics{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line);
  border:1px solid var(--line); border-radius:16px; overflow:hidden; margin-bottom:62px; }
.rd-metric{ background:#fff; padding:25px 28px; }
.rd-metric .n{ font-family:'Fraunces',serif; font-size:33px; font-weight:700; }
.rd-metric .n span{ color:var(--accent); }
.rd-metric .l{ font-size:13px; color:var(--muted); margin-top:4px; }

/* ---------- SECTION HEADINGS ---------- */
.rd-sec{ margin-bottom:62px; }
.rd-sechead{ display:flex; align-items:baseline; gap:13px; margin-bottom:26px; }
.rd-sechead .k{ font-family:'JetBrains Mono',monospace; font-size:13px; color:var(--accent); }
.rd-sechead h2{ font-size:30px; font-weight:600; }
.rd-sechead .more{ margin-left:auto; font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--muted); text-decoration:none; }
.rd-sechead .more:hover{ color:var(--accent); }

/* ---------- PILLARS ---------- */
.rd-pillars{ display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.rd-pillar{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:25px 28px; }
.rd-pillar .ic{ width:42px; height:42px; border-radius:10px; background:var(--accent-soft); display:flex;
  align-items:center; justify-content:center; font-size:21px; margin-bottom:15px; }
.rd-pillar h3{ font-size:18.5px; font-weight:600; margin-bottom:7px; }
.rd-pillar p{ font-size:14.3px; line-height:1.58; color:var(--muted); }

/* ---------- PILLS ---------- */
.rd-pills-label{ font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--muted); margin:26px 0 12px; }
.rd-pills{ display:flex; flex-wrap:wrap; gap:9px; }
.rd-pills .pill{ font-size:13px; font-weight:500; color:var(--ink); background:#fff;
  border:1px solid var(--line); padding:7px 14px; border-radius:999px; }
.rd-pills .pill.key{ background:var(--accent-soft); color:var(--accent); border-color:transparent; }

/* ---------- WORK CARDS (landing) ---------- */
.rd-work{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.rd-proj{ background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; text-decoration:none; color:inherit; display:block; }
.rd-proj .top{ height:96px; display:flex; align-items:flex-end; padding:15px; color:#fff;
  font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:600; }
.rd-proj .body{ padding:18px 20px 22px; }
.rd-proj h3{ font-size:17px; font-weight:600; margin-bottom:7px; }
.rd-proj p{ font-size:13.5px; line-height:1.52; color:var(--muted); margin-bottom:13px; }
.rd-tags{ display:flex; gap:7px; flex-wrap:wrap; }
.rd-tag{ font-size:11.5px; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:4px 10px; border-radius:6px; font-family:'JetBrains Mono',monospace; }

/* gradient accents: muted, dusty palette (calm, not default-vivid) */
.grad-1{ background:linear-gradient(135deg,#515f7d,#69779a); } /* dusty slate-indigo */
.grad-2{ background:linear-gradient(135deg,#4f7a6c,#669085); } /* muted sage */
.grad-3{ background:linear-gradient(135deg,#a5715a,#bd8a72); } /* soft terracotta */
.grad-4{ background:linear-gradient(135deg,#6d6188,#867aa0); } /* muted mauve */
.grad-5{ background:linear-gradient(135deg,#56708a,#6d889f); } /* dusty steel blue */

/* ---------- PUBLICATIONS ---------- */
.rd-pagehead{ padding:46px 0 8px; }
.rd-crumb{ font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--accent); margin-bottom:12px; }
.rd-pagehead h1{ font-size:42px; font-weight:700; margin-bottom:10px; }
.rd-pagehead p{ font-size:16.5px; color:var(--muted); max-width:660px; line-height:1.55; }
.rd-toolbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:26px 0 8px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.rd-chip{ font-size:13px; font-weight:600; padding:7px 14px; border-radius:999px; border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer; }
.rd-chip.on{ background:var(--accent); color:#fff; border-color:var(--accent); }
.rd-toolbar .count{ margin-left:auto; font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--muted); }
.rd-yr{ font-family:'JetBrains Mono',monospace; font-size:13px; color:var(--muted); font-weight:500; margin:30px 0 6px; }
.rd-pub{ display:flex; gap:20px; align-items:flex-start; padding:18px 0; border-top:1px solid var(--line); }
.rd-pub .venue{ font-family:'JetBrains Mono',monospace; font-size:11.5px; font-weight:600; color:#fff;
  background:var(--ink); padding:6px 11px; border-radius:7px; white-space:nowrap; min-width:96px; text-align:center; }
.rd-pub .venue.gold{ background:var(--gold); }
.rd-pub .venue.soon{ background:#fff; color:var(--accent); border:1px dashed var(--accent); }
.rd-pub .meta h3{ font-family:'Inter',sans-serif; font-size:16px; font-weight:600; line-height:1.42; margin-bottom:5px; }
.rd-pub .meta .auth{ font-size:13.5px; color:var(--muted); }
.rd-pub .meta .auth b{ color:var(--ink); }
.rd-pub .meta .venuetxt{ font-size:13px; color:var(--muted); font-style:italic; margin-top:2px; }
.rd-pub .meta .links{ display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.rd-pub .meta .links a{ font-size:12.5px; font-weight:600; color:var(--accent); background:var(--accent-soft);
  padding:5px 11px; border-radius:7px; text-decoration:none; }
.rd-award{ display:inline-block; font-size:11.5px; font-weight:700; color:var(--gold); background:var(--gold-soft); padding:2px 9px; border-radius:5px; margin-left:6px; }

/* ---------- FEATURED PROJECT + GRID ---------- */
.rd-feat{ display:grid; grid-template-columns:1.05fr .95fr; background:var(--card); border:1px solid var(--line);
  border-radius:18px; overflow:hidden; margin-bottom:24px; }
.rd-feat .art{ padding:34px 36px; color:#fff; }
.rd-feat .art .badge{ font-family:'JetBrains Mono',monospace; font-size:11.5px; background:rgba(255,255,255,.18);
  padding:5px 11px; border-radius:999px; display:inline-block; margin-bottom:18px; }
.rd-feat .art h2{ font-size:30px; font-weight:700; line-height:1.12; margin-bottom:14px; color:#fff; }
.rd-feat .art p{ font-size:14.5px; line-height:1.6; opacity:.92; }
.rd-feat .art .nums{ display:flex; gap:26px; margin-top:24px; }
.rd-feat .art .nums .n{ font-family:'Fraunces',serif; font-size:26px; font-weight:700; }
.rd-feat .art .nums .l{ font-size:11.5px; opacity:.85; }
.rd-feat .fbody{ padding:30px 34px; }
.rd-feat .fbody h3{ font-size:14px; font-family:'JetBrains Mono',monospace; color:var(--muted); margin-bottom:14px; font-weight:500; }
.rd-pap{ padding:12px 0; border-top:1px solid var(--line); display:flex; gap:13px; align-items:flex-start; }
.rd-pap:first-of-type{ border-top:none; }
.rd-pap .v{ font-family:'JetBrains Mono',monospace; font-size:10.5px; font-weight:600; color:#fff; background:var(--ink);
  padding:4px 8px; border-radius:6px; white-space:nowrap; min-width:84px; text-align:center; }
.rd-pap .v.gold{ background:var(--gold); }
.rd-pap .t{ font-size:13.8px; font-weight:600; line-height:1.4; }
.rd-pap .t .star{ color:var(--gold); }
.rd-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.rd-gcard{ background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.rd-gcard .top{ height:80px; display:flex; align-items:flex-end; padding:16px 20px; color:#fff;
  font-family:'JetBrains Mono',monospace; font-size:11.5px; font-weight:600; }
.rd-gcard .body{ padding:22px 24px 24px; }
.rd-gcard h3{ font-size:20px; font-weight:600; margin-bottom:8px; }
.rd-gcard p{ font-size:14px; line-height:1.56; color:var(--muted); margin-bottom:14px; }
.rd-gcard .pubs{ font-size:12.5px; color:var(--muted); margin-bottom:14px; }
.rd-gcard .pubs b{ color:var(--ink); }
.rd-gcard .links{ display:flex; gap:9px; flex-wrap:wrap; margin-top:14px; }
.rd-gcard .links a{ font-size:12.5px; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:5px 11px; border-radius:7px; text-decoration:none; }

/* ---------- TIMELINE (experience) ---------- */
.rd-seclabel{ font-family:'JetBrains Mono',monospace; font-size:13px; color:var(--accent); margin:34px 0 18px; }
.rd-tl{ position:relative; padding-left:36px; }
.rd-tl::before{ content:''; position:absolute; left:9px; top:6px; bottom:6px; width:2px; background:var(--line); }
.rd-item{ position:relative; padding-bottom:30px; }
.rd-item::before{ content:''; position:absolute; left:-31px; top:6px; width:14px; height:14px; border-radius:50%;
  background:#fff; border:3px solid var(--accent); }
.rd-item.now::before{ background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.rd-item .card{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px 26px; }
.rd-item .top{ display:flex; justify-content:space-between; align-items:baseline; gap:14px; margin-bottom:2px; }
.rd-item h3{ font-size:19px; font-weight:600; }
.rd-item .when{ font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--muted); white-space:nowrap; }
.rd-item .org{ font-size:14px; color:var(--accent); font-weight:600; margin-bottom:12px; }
.rd-item .org span{ color:var(--muted); font-weight:500; }
.rd-item ul{ list-style:none; display:flex; flex-direction:column; gap:7px; }
.rd-item li{ font-size:14px; line-height:1.55; color:var(--muted); padding-left:18px; position:relative; }
.rd-item li::before{ content:'▹'; position:absolute; left:0; color:var(--accent); }
.rd-item li b{ color:var(--ink); font-weight:600; }
.rd-item .tags{ margin-top:13px; }

/* ---------- CV PAGE ---------- */
.rd-cvhead{ display:flex; justify-content:space-between; align-items:flex-start; padding:46px 0 22px; gap:30px; }
.rd-cvhead h1{ font-size:42px; font-weight:700; margin-bottom:8px; }
.rd-cvhead .sub{ font-size:16px; color:var(--muted); }
.rd-cvhead .contactline{ font-size:13.5px; color:var(--muted); margin-top:10px; }
.rd-cvhead .contactline a{ color:var(--accent); text-decoration:none; }
.rd-dl{ display:flex; flex-direction:column; gap:10px; min-width:200px; }
.rd-dl a{ text-decoration:none; font-size:14px; font-weight:600; padding:12px 18px; border-radius:9px; text-align:center; }
.rd-dl a.pdf{ background:var(--accent); color:#fff; }
.rd-dl a.print{ background:#fff; color:var(--ink); border:1px solid var(--line); }
.rd-dl .upd{ font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--muted); text-align:center; }
.rd-cols{ display:grid; grid-template-columns:230px 1fr; gap:48px; padding-top:14px; }
.rd-rail .box{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px 22px; margin-bottom:16px; }
.rd-rail h4{ font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--muted); font-weight:500; margin-bottom:12px; text-transform:uppercase; letter-spacing:.04em; }
.rd-rail .skill{ font-size:13px; line-height:1.5; color:var(--ink); margin-bottom:9px; }
.rd-rail .skill b{ display:block; font-size:11.5px; color:var(--muted); font-weight:600; margin-bottom:1px; }
.rd-rail .toc a{ display:block; font-size:13.5px; color:var(--muted); text-decoration:none; padding:5px 0; border-bottom:1px solid var(--line); }
.rd-rail .toc a:last-child{ border-bottom:none; }
.rd-cvsec{ margin-bottom:30px; }
.rd-sh{ display:flex; align-items:baseline; gap:12px; border-bottom:2px solid var(--ink); padding-bottom:8px; margin-bottom:16px; }
.rd-sh h2{ font-size:22px; font-weight:600; }
.rd-sh .k{ font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--accent); }
.rd-entry{ margin-bottom:18px; }
.rd-entry .top{ display:flex; justify-content:space-between; align-items:baseline; gap:14px; }
.rd-entry h3{ font-size:16.5px; font-weight:600; }
.rd-entry .when{ font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--muted); white-space:nowrap; }
.rd-entry .org{ font-size:14px; color:var(--accent); font-weight:600; margin:2px 0 8px; }
.rd-entry .org span{ color:var(--muted); font-weight:500; }
.rd-entry ul{ list-style:none; display:flex; flex-direction:column; gap:5px; }
.rd-entry li{ font-size:13.8px; line-height:1.5; color:var(--muted); padding-left:16px; position:relative; }
.rd-entry li::before{ content:'▹'; position:absolute; left:0; color:var(--accent); }
.rd-entry li b{ color:var(--ink); }
.rd-awards{ display:flex; flex-direction:column; gap:9px; }
.rd-awd{ display:flex; gap:12px; align-items:baseline; font-size:14px; }
.rd-awd .yr{ font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--muted); min-width:60px; }
.rd-awd b{ color:var(--ink); }
.rd-awd .tag{ font-size:11px; font-weight:700; color:var(--gold); background:var(--gold-soft); padding:2px 8px; border-radius:5px; }
.rd-pubnote{ background:var(--accent-soft); border-radius:12px; padding:18px 22px; font-size:14px; color:var(--ink); display:flex; justify-content:space-between; align-items:center; gap:14px; }
.rd-pubnote a{ color:var(--accent); font-weight:600; text-decoration:none; }

/* ---------- SOFTWARE / REPOS ---------- */
.rd-repos{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.rd-repo{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px 22px; display:flex; flex-direction:column; text-decoration:none; color:inherit; }
.rd-repo:hover{ border-color:var(--accent); }
.rd-repo .rname{ font-family:'JetBrains Mono',monospace; font-size:15px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:8px; margin-bottom:9px; }
.rd-repo .rname .gh{ color:var(--muted); font-weight:500; }
.rd-repo p{ font-size:13.5px; line-height:1.55; color:var(--muted); margin-bottom:14px; flex:1; }
.rd-repo .rfoot{ display:flex; align-items:center; gap:14px; font-size:12px; color:var(--muted); font-family:'JetBrains Mono',monospace; }
.rd-repo .rfoot .star{ color:var(--gold); }
.rd-repo.soon{ opacity:.7; }
.rd-repo.soon .rfoot{ color:var(--accent); }

/* ---------- PRESENTATIONS & POSTERS ---------- */
.rd-pres{ display:flex; gap:18px; align-items:flex-start; padding:18px 0; border-top:1px solid var(--line); }
.rd-pres .ptype{ font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:600; padding:6px 11px; border-radius:7px; white-space:nowrap; min-width:84px; text-align:center; }
.rd-pres .ptype.talk{ background:var(--accent-soft); color:var(--accent); }
.rd-pres .ptype.poster{ background:var(--gold-soft); color:var(--gold); }
.rd-pres .ptype.workshop{ background:#eef6f2; color:#0ca678; }
.rd-pres .pmeta h3{ font-family:'Inter',sans-serif; font-size:16px; font-weight:600; line-height:1.4; margin-bottom:4px; }
.rd-pres .pmeta .pvenue{ font-size:13.5px; color:var(--muted); }
.rd-pres .pmeta .pvenue .when{ font-family:'JetBrains Mono',monospace; }
.rd-pres .pmeta .plinks{ display:flex; gap:10px; margin-top:9px; flex-wrap:wrap; }
.rd-pres .pmeta .plinks a{ font-size:12.5px; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:5px 11px; border-radius:7px; text-decoration:none; }
.rd-pres .pmeta .award2{ display:inline-block; font-size:11.5px; font-weight:700; color:var(--gold); background:var(--gold-soft); padding:2px 9px; border-radius:5px; margin-left:6px; }

/* ---------- TEACHING ---------- */
.rd-teach{ display:flex; flex-direction:column; gap:20px; }
.rd-teach .card{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:24px 28px; }
.rd-teach .thead{ display:flex; justify-content:space-between; align-items:baseline; gap:14px; }
.rd-teach h3{ font-size:20px; font-weight:600; }
.rd-teach .when{ font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--muted); white-space:nowrap; }
.rd-teach .org{ font-size:14px; color:var(--accent); font-weight:600; margin:3px 0 12px; }
.rd-teach .org span{ color:var(--muted); font-weight:500; }
.rd-teach .ttype{ display:inline-block; font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:5px 11px; border-radius:7px; margin-bottom:14px; }
.rd-teach .tbody{ font-size:14px; line-height:1.62; color:var(--muted); }
.rd-teach .tbody p{ margin-bottom:10px; }
.rd-teach .tbody p:last-child{ margin-bottom:0; }
.rd-teach .tbody strong{ color:var(--ink); font-weight:600; }
.rd-teach .tbody ul{ list-style:none; display:flex; flex-direction:column; gap:7px; margin-top:6px; }
.rd-teach .tbody li{ padding-left:18px; position:relative; }
.rd-teach .tbody li::before{ content:'▹'; position:absolute; left:0; color:var(--accent); }

/* ---------- FOOTER ---------- */
.rd-footer{ border-top:1px solid var(--line); padding:30px 0 44px; margin-top:30px; color:var(--muted); font-size:13.5px; display:flex; justify-content:space-between; align-items:center; gap:14px; }
.rd-footer a{ color:var(--muted); text-decoration:none; }
.rd-footer a:hover{ color:var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width:900px){
  .rd-wrap, .rd-nav{ padding-left:24px; padding-right:24px; }
  .rd-hero{ grid-template-columns:1fr; gap:34px; }
  .rd-hero .rd-portrait{ max-width:320px; }
  .rd-hero h1{ font-size:38px; }
  .rd-metrics{ grid-template-columns:repeat(2,1fr); }
  .rd-pillars, .rd-work, .rd-grid, .rd-repos{ grid-template-columns:1fr; }
  .rd-feat{ grid-template-columns:1fr; }
  .rd-cols{ grid-template-columns:1fr; }
  .rd-nav ul{ display:none; }
  .rd-nav ul.open{ display:flex; position:absolute; top:64px; right:24px; left:24px; flex-direction:column;
    background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 20px; gap:14px; z-index:30; box-shadow:0 20px 40px -20px rgba(0,0,0,.25); }
  .rd-navtoggle{ display:inline-flex; background:none; border:1px solid var(--line); border-radius:8px; padding:8px 12px; font-size:18px; cursor:pointer; }
}
@media (max-width:520px){
  .rd-metrics{ grid-template-columns:1fr; }
  .rd-hero h1{ font-size:32px; }
  .rd-cvhead{ flex-direction:column; }
}

/* ---------- PRINT (CV) ---------- */
@media print{
  .rd-nav, .rd-footer, .rd-dl, .rd-rail .box:first-child, .rd-navtoggle{ display:none !important; }
  body{ background:#fff; font-size:11pt; }
  .rd-cols{ grid-template-columns:1fr; gap:0; }
  .rd-wrap{ max-width:100%; padding:0; }
  .rd-cvsec{ break-inside:avoid; }
  a{ color:#000 !important; text-decoration:none; }
}
