:root {
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --ink: #18212B;
  --muted: #5A6571;
  --faint: #8A949E;
  --rule: #DCE1E6;
  --c-banking: #2F5DA8;
  --c-ecom: #C98207;
  --c-logistics: #C23A6E;
  --c-fmcg: #23845A;
  --focus: #2F5DA8;
  --radius-s: 6px;
  --radius-m: 12px;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2.6rem, 6vw, 4.4rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151B; --surface: #171E26; --ink: #E6EBF0; --muted: #A1ACB7; --faint: #6F7B87; --rule: #29333E;
    --c-banking: #6E98E0; --c-ecom: #E7A93A; --c-logistics: #E9709E; --c-fmcg: #4FBF8A; --focus: #8DB0EC;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10151B; --surface: #171E26; --ink: #E6EBF0; --muted: #A1ACB7; --faint: #6F7B87; --rule: #29333E;
  --c-banking: #6E98E0; --c-ecom: #E7A93A; --c-logistics: #E9709E; --c-fmcg: #4FBF8A; --focus: #8DB0EC;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Figtree", system-ui, sans-serif; font-size: var(--step-0); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 16px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.topnav { display: flex; gap: 20px; margin-right: auto; font-size: var(--step--1); color: var(--muted); }
.topnav a { text-decoration: none; }
.topnav a:hover { color: var(--ink); }
.topctl { display: flex; gap: 10px; align-items: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: var(--step--1); color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.icon-btn { border: 1px solid var(--rule); background: var(--surface); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
@media (max-width: 760px) { .topnav { display: none; } .brand span { display: none; } .topctl { margin-left: auto; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 84px) 0 8px; }
.greet { font-weight: 600; color: var(--c-banking); margin: 0 0 10px; }
.hero h1 { font-size: var(--step-3); line-height: 1; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 18px; }
.lede { font-size: var(--step-1); line-height: 1.45; max-width: 36ch; margin: 0 0 12px; color: var(--ink); }
.lede b { font-weight: 700; }
.hint { color: var(--muted); max-width: 60ch; margin: 0 0 28px; }

/* Route map */
.routemap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 8px 4px 4px; overflow-x: auto; }
.routemap svg { display: block; width: 100%; min-width: 720px; height: auto; }
.rm-bg { stroke-width: 3; opacity: .22; }
.rm-seg { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s; }
.rm-line-label { font-size: 14px; font-weight: 700; fill: var(--ink); }
.rm-line-hit { cursor: pointer; }
.rm-line-hit:hover .rm-line-label, .rm-line-hit:focus-visible .rm-line-label { text-decoration: underline; }
.rm-line-hit:focus-visible { outline: none; }
.rm-line-hit:focus-visible .rm-line-label { fill: var(--focus); }
.rm-station circle { fill: var(--surface); stroke: var(--ink); stroke-width: 3; transition: r .15s; }
.rm-station { cursor: pointer; }
.rm-station:hover circle, .rm-station:focus-visible circle { r: 9; }
.rm-station:focus-visible { outline: none; }
.rm-station text { font-size: 12.5px; fill: var(--ink); font-weight: 600; }
.rm-station .rm-sub { fill: var(--muted); font-weight: 400; font-size: 11.5px; }
.rm-axis { font-size: 11px; fill: var(--faint); }
.rm-tick { stroke: var(--rule); }
.rm-now circle.dot { fill: var(--ink); }
.rm-now circle.pulse { fill: none; stroke: var(--ink); stroke-width: 2; animation: pulse 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
.rm-now text { font-size: 12px; font-weight: 700; fill: var(--ink); }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }
.routemap.focused .rm-seg:not(.on) { opacity: .18; }
.routemap.focused .rm-station:not(.on) { opacity: .35; }
.draw .rm-seg { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .55s ease-in-out forwards; animation-delay: var(--delay); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .draw .rm-seg { animation: none; stroke-dashoffset: 0; }
  .rm-now circle.pulse { animation: none; opacity: 0; }
}

/* Lenses */
.lenses { margin-top: 18px; display: grid; gap: 10px; }
.lens-row { display: grid; grid-template-columns: 76px 1fr; align-items: start; gap: 10px; }
.lens-name { font-size: var(--step--1); color: var(--muted); padding-top: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 5px 14px 5px 11px; font-size: var(--step--1); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw, var(--ink)); display: inline-block; }
.chip.skill i { border-radius: 2px; background: none; border: 2px solid var(--ink); }
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"].skill i { border-color: var(--bg); }
.lens-status { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: var(--step--1); color: var(--muted); min-height: 1.6em; }
.linkish { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); font-size: inherit; }
@media (max-width: 560px) { .lens-row { grid-template-columns: 1fr; gap: 4px; } .lens-name { padding-top: 0; } }

/* Impact */
.impact { padding: 36px 0 8px; }
.impact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.impact-list > div { padding: 16px 18px 16px 14px; border-bottom: 1px solid var(--rule); border-left: 4px solid var(--sw); }
.impact-list dt { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.impact-list dd { margin: 4px 0 0; color: var(--muted); font-size: var(--step--1); line-height: 1.4; }

/* Section headings */
section h2 { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 8px; font-weight: 800; }
.section-note { color: var(--muted); margin: 0 0 20px; max-width: 62ch; }
.work, .matrix, .projects, .contact { padding-top: 64px; }
.work > h2 { margin-bottom: 20px; }

/* Roles */
.role { display: grid; grid-template-columns: 170px 1fr; gap: 0 28px; padding: 26px 0; border-top: 1px solid var(--rule); }
.role-when { font-size: var(--step--1); color: var(--muted); padding-top: 4px; }
.role-when > span { display: block; }
.role-when .ind { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.role-when .ind i { width: 14px; height: 6px; border-radius: 3px; background: var(--sw); }
.role h3 { font-size: var(--step-1); line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.role .co { margin: 2px 0 10px; color: var(--muted); }
.role .co b { color: var(--ink); font-weight: 600; }
.role .sum { margin: 0 0 12px; max-width: 68ch; }
.role ul.bul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 72ch; }
.role ul.bul li { position: relative; padding-left: 20px; }
.role ul.bul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--sw); background: var(--surface); }
.role ul.bul li.hit::before { background: var(--sw); }
.role ul.bul li.hit { font-weight: 500; }
.role .tags { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: 1px; }
.role .tag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.role .tools { margin: 14px 0 0; font-size: var(--step--1); color: var(--muted); }
.role .more { margin-top: 10px; }
.role.dim .sum, .role.dim ul.bul, .role.dim .tools { display: none; }
.role.dim h3 { color: var(--muted); font-size: var(--step-0); }
.role.dim { padding: 14px 0; }
@media (max-width: 760px) { .role { grid-template-columns: 1fr; } .role-when { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; } .role-when .ind { margin: 0; } }

.earlier { border-top: 1px solid var(--rule); padding: 18px 0 0; color: var(--muted); }
.earlier summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.earlier p { max-width: 68ch; }

/* Matrix */
.matrix-grid { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(4, minmax(58px, 1fr)); gap: 4px; max-width: 760px; }
.mx-h { font-size: var(--step--1); font-weight: 600; padding: 6px 4px; display: flex; align-items: flex-end; gap: 6px; }
.mx-h i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw); flex: none; }
.mx-r { font-size: var(--step--1); padding: 10px 4px; align-self: center; }
.mx-c { border: 0; border-radius: var(--radius-s); min-height: 46px; background: color-mix(in srgb, var(--sw) calc(var(--a) * 1%), var(--surface)); color: var(--ink); font-size: var(--step--1); font-weight: 700; outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--rule); }
.mx-c[data-n="0"] { color: var(--faint); font-weight: 400; cursor: default; }
.mx-c.dark { color: #fff; }
.mx-c[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--ink); }
@media (max-width: 560px) { .mx-h span { writing-mode: vertical-rl; transform: rotate(180deg); } .mx-h { flex-direction: column; align-items: center; } }

.evidence { margin-top: 18px; max-width: 760px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--sw); border-radius: var(--radius-s); padding: 16px 20px; }
.evidence h3 { margin: 0 0 8px; font-size: var(--step-0); }
.evidence ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.evidence .src { color: var(--muted); font-size: var(--step--1); }

.toolbox { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; }
.toolbox h3 { font-size: var(--step-0); margin: 0 0 6px; }
.toolbox p { margin: 0; color: var(--muted); }

/* Projects */
.proj-list, .edu-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; }
.proj-list li, .edu-list li { padding: 14px 0; border-top: 1px solid var(--rule); }
.proj-list a { font-weight: 700; }
.proj-list p, .edu-list p { margin: 4px 0 0; color: var(--muted); font-size: var(--step--1); }
.edu-list b { display: block; }
.edu-h { margin-top: 48px !important; }

/* Contact */
.contact p { max-width: 60ch; color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: var(--step-1); font-weight: 600; }
.contact-list .linkish { font-size: inherit; font-weight: 600; }
#phones { display: inline-flex; gap: 20px; flex-wrap: wrap; }

.foot { padding: 64px 0 40px; color: var(--faint); font-size: var(--step--1); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: var(--step--1); z-index: 40; }

@media print {
  .topbar, .routemap, .lenses, .matrix, .toast, .skip { display: none !important; }
  body { background: #fff; }
}
.role > * { min-width: 0; }
.role .tags { flex-wrap: wrap; }
@media (max-width: 560px) { .matrix-grid { grid-template-columns: minmax(96px, 1.2fr) repeat(4, minmax(40px, 1fr)); } .mx-r { font-size: 13px; } }
.mx-r { hyphens: auto; overflow-wrap: anywhere; }
.swipe { display: none; font-size: var(--step--1); color: var(--muted); margin: 8px 0 0; }
@media (max-width: 760px) { .swipe { display: block; } }
