/* Slate theme in dark and light, mono everywhere, editorial layout with a sticky section index. */
:root, [data-theme="dark"] {
  --bg: #0e0f11; --bg2: #16171a; --card: #17181b; --line: rgba(255, 255, 255, .08);
  --fg: #ececee; --dim: #8b8e96; --faint: #4f525a; --acc: #fafafa; --inv: #0e0f11;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f7f8; --bg2: #efeff1; --card: #fff; --line: rgba(0, 0, 0, .08);
  --fg: #151518; --dim: #6b6e76; --faint: #b9bbc1; --acc: #151518; --inv: #fff;
  --shadow: 0 20px 50px -28px rgba(0, 0, 0, .25);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.7 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section { scroll-margin-top: 80px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { font-weight: 800; letter-spacing: -.03em; }
.logo span { color: var(--dim); }
.links { display: flex; gap: 18px; margin-right: auto; font-size: 13px; color: var(--dim); }
.links a:hover { color: var(--fg); }
.tog { display: flex; gap: 6px; align-items: center; }
.tog button { white-space: nowrap; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 11px; font-size: 12px; }
.tog b { font-weight: 400; color: var(--dim); }
.tog b.on { font-weight: 700; color: var(--fg); }

/* the .md export button */
.mdbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--faint) !important; background: none !important; border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--dim); }
.mdbtn:hover { color: var(--fg); border-color: var(--fg) !important; }
.mdbtn i { font-style: normal; font-weight: 700; color: var(--fg); }

/* hero */
.hero { padding: 80px 0 56px; }
h1 { font-size: clamp(48px, 10vw, 128px); line-height: .9; letter-spacing: -.07em; font-weight: 800; }
.role { color: var(--dim); margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips span { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--dim); }
.chips .live { color: var(--fg); }
.chips .live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
/* hero call to action: an fzf-style picker */
.fzf { flex: 1 1 auto; min-width: 0; border: 1px solid var(--dim); padding: 10px 14px 12px; font-size: 14px; }
.fzf legend { padding: 0 8px; color: var(--dim); font-size: 12px; }
.fzf .q { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; cursor: text; }
.fzf .q b { color: #22c55e; }
.fzf input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; caret-color: #22c55e; }
.fzf input::placeholder { color: var(--faint); }
.fzf .q small { color: var(--faint); font-size: 12px; }
.fzf .row { display: grid; grid-template-columns: 14px 80px minmax(0, 1fr); gap: 8px; padding: 4px 0; cursor: pointer; color: var(--dim); }
.fzf .row::before { content: ""; }
.fzf .row.sel { color: var(--fg); background: var(--bg2); }
.fzf .row.sel::before { content: "▌"; color: #22c55e; }
.fzf .row b { font-weight: 600; }
.fzf .row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fzf .row.ok span { color: #22c55e; }
.fzf .help { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.hero-actions { display: flex; align-items: flex-end; gap: 24px; margin-top: 30px; }
.thumb { position: relative; flex: none; display: block; }
.thumb .front, .thumb .back { position: absolute; inset: 0; background: #fff; border: 1px solid var(--dim); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.thumb .back { transform: translate(-7px, -6px) rotate(-3deg); opacity: .55; }
.thumb .front { overflow: hidden; box-shadow: var(--shadow); animation: print 1.1s .3s steps(14) both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.thumb iframe { display: block; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; pointer-events: none; }
.thumb .tag { position: absolute; left: 6px; bottom: 6px; background: var(--fg); color: var(--inv); font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.thumb .tag i { display: inline-block; font-style: normal; }
.thumb:hover .front { transform: translateY(-4px) rotate(1.5deg); }
.thumb:hover .back { transform: translate(-16px, -4px) rotate(-7deg); opacity: .8; }
.thumb:hover .tag i { animation: drop .8s ease-in-out infinite; }
@keyframes drop { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.pdflink { display: none; margin-top: 14px; font-size: 13px; padding: 6px 14px; }
@media (max-width: 700px) { .thumb { display: none; } .pdflink { display: inline-flex; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }

/* sections with a sticky index */
.sec { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 56px 0; border-top: 2px solid var(--fg); }
.side { position: sticky; top: 90px; align-self: start; }
.side .n { font-size: 64px; font-weight: 800; letter-spacing: -.06em; line-height: 1; color: var(--faint); }
.side h2 { margin: 8px 0 10px; font-size: 24px; letter-spacing: -.04em; line-height: 1.15; }

.tagline { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; }
.about { color: var(--dim); font-size: 15.5px; max-width: 68ch; margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }
.stat { min-width: 0; border-top: 2px solid var(--fg); padding-top: 12px; }
.stat b { display: block; font-size: 24px; letter-spacing: -.03em; }
.stat small { color: var(--dim); font-size: 13px; }

.job { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 0; }
.when { color: var(--dim); font-size: 13px; }
.when.current { color: #22c55e; }
.job h3 { font-size: 18px; letter-spacing: -.02em; }
.co { color: var(--dim); font-size: 14px; margin-bottom: 10px; }
.dash li { position: relative; padding-left: 18px; margin-top: 7px; font-size: 14.5px; opacity: .86; }
.dash li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 6px; height: 1.5px; background: var(--dim); }
.edu-label { font-size: 12px; color: var(--dim); }
.side-edu { margin-top: 28px; padding-top: 16px; border-top: 1px dashed var(--faint); }
.side-edu > div:not(.edu-label) { margin-top: 12px; } .side-edu b { display: block; font-size: 13px; } .side-edu small { display: block; color: var(--dim); font-size: 12px; line-height: 1.5; }

.xp-intro { margin-bottom: 28px; max-width: 46ch; }
.xp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.xp-h { font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 2px solid var(--fg); }
.xp-it { padding: 14px 0; border-bottom: 1px solid var(--line); }
.xp-it b { display: block; font-size: 17px; letter-spacing: -.02em; }
.xp-it small { display: block; color: var(--dim); font-size: 14px; line-height: 1.55; margin-top: 2px; }
@media (max-width: 700px) { .xp { grid-template-columns: 1fr; gap: 28px; } }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pc { display: block; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 18px; transition: transform .25s, box-shadow .25s; }
.pc[href]:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.shot { height: 150px; display: flex; align-items: flex-end; padding: 12px 14px; font-size: 12px; color: var(--dim); background: linear-gradient(135deg, var(--bg2), var(--card)); border-bottom: 1px solid var(--line); }
.pc .in { padding: 16px 18px 18px; }
.pc b { font-size: 17px; }
.pc small { display: block; color: var(--dim); font-size: 12.5px; margin: 2px 0 8px; }
.pc p { font-size: 14px; opacity: .85; }

.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0 40px; color: var(--dim); font-size: 12.5px; }
.flinks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--fg); padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.flinks a { border-bottom: 1px solid var(--faint); transition: border-color .2s; }
.flinks a:hover { border-color: var(--fg); }
.flinks .sep { color: var(--faint); }
.frow { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* .md sheet */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.sheet[hidden] { display: none; }
.panel { width: min(820px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); animation: up .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.panel header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel header small { color: var(--dim); font-size: 12px; margin-right: auto; }
.panel pre { overflow: auto; padding: 18px 20px 30px; font: 13px/1.65 "JetBrains Mono", monospace; color: var(--dim); white-space: pre-wrap; }

@media (max-width: 860px) {
  .links { display: none; }
  .nav .wrap { justify-content: space-between; }
  .sec { grid-template-columns: 1fr; gap: 10px; }
  .side { position: static; }
  .side .n { font-size: 40px; }
}
@media (max-width: 700px) {
  .job { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .mdbtn .t { display: none; }
  .tog { gap: 4px; }
  .tog button { padding: 5px 8px; }
  .stats { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } .btn, .pc, .thumb .front, .thumb .back { transition: none; } .thumb .front, .thumb .tag i { animation: none; } }


