:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #12181f;
  --tx: #c9d1d9;
  --mut: #7d8590;
  --bd: #222b34;
  --ac: #3fb27f;
  --ac2: #4c9df0;
  --amber: #d8973c;
  --green-bright: #48d089;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 14.5px/1.7 "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  display: flex;
  justify-content: center;
  padding: 44px 18px;
}

/* Terminal window */
.win {
  width: 100%;
  max-width: 1040px;
  background: var(--panel);
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
}

/* Title bar with traffic-light dots + shell command */
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0b1016;
  border-bottom: 1px solid var(--bd);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.d1 { background: #ff5f56; }
.d2 { background: #ffbd2e; }
.d3 { background: #27c93f; }
.bar .path { margin-left: 10px; color: var(--mut); font-size: 12.5px; }
.bar .cmd { color: #cdd6e0; }

/* vim-style status line at the bottom */
.vim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: #0b1016;
  border-top: 1px solid var(--bd);
  font-size: 12px;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
}
.vim .mode {
  color: #0b1016;
  background: var(--green-bright);
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 3px;
  letter-spacing: .03em;
}

.body { padding: 34px 40px 40px; }

/* Header: avatar + identity */
.head { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.av {
  width: 84px; height: 84px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--bd);
}
h1 { font-size: 22px; margin: 0 0 4px; color: #fff; font-weight: 600; }
.head .role { color: var(--green-bright); font-size: 13.5px; font-weight: 600; margin: 0; }
.loc { color: var(--mut); font-size: 12.5px; margin: 3px 0 0; }

.cmt { color: var(--mut); }

/* Section headings styled like markdown */
h2 { font-size: 13px; margin: 0 0 16px; color: var(--ac2); font-weight: 600; }
h2::before { content: "## "; color: var(--mut); }
.sec { margin-top: 40px; }

p { margin: 0 0 14px; max-width: 92ch; }
p:first-of-type { color: #e6edf3; }
p.lede { color: #f4f8fb; font-weight: 600; margin-bottom: 16px; }

/* Zero-width soft-return glyph placed at real line-wrap points by main.js.
   Purely decorative: must not be selectable/copyable, and hidden from AT. */
.crlf {
  color: #404a57;
  display: inline-block;
  width: 0;
  overflow: visible;
  position: relative;
  left: 4px;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

a {
  color: var(--ac2);
  text-decoration: none;
  border-bottom: 1px dotted rgba(76, 157, 240, .5);
}
a:hover { border-bottom-style: solid; }

.links { margin-top: 22px; font-size: 13.5px; display: flex; gap: 18px; flex-wrap: wrap; }

/* Generic key/value rows (Education) */
.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--bd);
  max-width: 880px;
}
.row:last-child { border-bottom: none; }
.row .l { font-size: 13.5px; }
.row .co { color: var(--ac); }
.row .y { color: var(--mut); font-size: 12.5px; white-space: nowrap; }

/* Research entries */
.pub { padding: 13px 0; border-bottom: 1px dashed var(--bd); }
.pub:last-child { border-bottom: none; }
.pub h3 { margin: 0 0 5px; font-size: 13.5px; color: #e6edf3; font-weight: 600; }
.pk { color: var(--ac); }
.pub p { color: var(--mut); font-size: 13px; margin: 0 0 5px; }
.venue { font-size: 12px; }

footer {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
  color: var(--mut);
  font-size: 12px;
}

/* Blinking terminal cursor at the end of the About section */
.blink {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--ac);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Respect users who prefer reduced motion: keep the cursor, drop the blink. */
@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
}

/* Experience as a git log graph */
.glog { position: relative; margin: 2px 0; max-width: 880px; }
.gc, .gm {
  position: relative;
  padding: 9px 0 9px 30px;
  border-left: 2px solid var(--bd);
}
.gnote {
  position: relative;
  padding: 2px 0 14px 30px;
  border-left: 2px solid var(--bd);
  color: var(--mut);
  font-size: 12.5px;
  max-width: 74ch;
  line-height: 1.55;
}
.gnote::before { content: "\21b3"; position: absolute; left: 15px; top: 0; color: var(--mut); }
.node {
  position: absolute;
  left: -8px; top: 9px;
  width: 14px;
  text-align: center;
  font-size: 12px;
  background: var(--panel);
  color: var(--ac);
  line-height: 1;
}
.node.merge { color: var(--ac2); }
.r2 { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.msg { font-size: 13.5px; color: #e6edf3; }
.h { color: var(--amber); margin-right: 5px; }
.ty { color: var(--ac); font-weight: 600; }
.ty.init { color: var(--amber); }
.ty.mrg { color: var(--ac2); }
.at { color: var(--mut); }
.mrn {
  color: var(--ac2);
  font-size: 11px;
  border: 1px solid rgba(76, 157, 240, .4);
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 4px;
}
.gy { color: var(--mut); font-size: 12px; white-space: nowrap; }

@media (max-width: 560px) {
  .body { padding: 26px 22px; }
  .head { gap: 14px; }
  .av { width: 64px; height: 64px; }
  .glog, .row { max-width: none; }
}
