:root {
  --bg: #fbfbf9;
  --surface: #f2f2ee;
  --text: #1b1d1c;
  --muted: #5f6562;
  --faint: #8a908c;
  --rule: #e3e4df;
  --accent: #0f6e5c;
  --accent-soft: #e3f1ec;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111413;
    --surface: #191d1b;
    --text: #e8ebe9;
    --muted: #a3aaa6;
    --faint: #747c78;
    --rule: #262b29;
    --accent: #5cc7a8;
    --accent-soft: #16302a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }
::selection { background: var(--accent-soft); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header { padding: 88px 0 56px; }
.kicker {
  font: 500 13px/1 var(--mono);
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
h1 { font-size: clamp(36px, 7vw, 52px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 700; }
.lede { font-size: clamp(18px, 2.6vw, 21px); line-height: 1.5; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.lede strong { color: var(--text); font-weight: 600; }

.links { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color .15s, color .15s;
}
.links a:hover { border-color: var(--accent); }
.links svg { width: 16px; height: 16px; flex: none; }

/* ---------- Sections ---------- */
section { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 40px 0; border-top: 1px solid var(--rule); }
h2 { font: 600 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 0; }
section p { margin: 0 0 14px; }
section p:last-child { margin-bottom: 0; }

.entry + .entry { margin-top: 36px; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
h3 { font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.meta { font: 13px/1.5 var(--mono); color: var(--faint); white-space: nowrap; }
.role { color: var(--muted); margin: 2px 0 12px; }
ul.points { margin: 0; padding-left: 18px; }
ul.points li { margin-bottom: 8px; }
ul.points li::marker { color: var(--faint); }
.num { font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tags li { font: 12px/1 var(--mono); padding: 6px 9px; border-radius: 6px; background: var(--surface); color: var(--muted); border: 1px solid var(--rule); }

.project {
  border: 1px solid var(--rule); border-radius: 14px; padding: 22px; background: var(--surface);
}
.project .entry-head { row-gap: 8px; margin-bottom: 6px; }
.project .entry-head a { font: 500 13px/1 var(--mono); color: var(--accent); text-decoration: none; }
.project .entry-head a:hover { text-decoration: underline; }
.project p { color: var(--muted); }

.project + .project { margin-top: 16px; }

.skills { display: grid; grid-template-columns: 96px 1fr; gap: 10px 16px; margin: 0; }
.skills dt { font: 13px/1.65 var(--mono); color: var(--faint); }
.skills dd { margin: 0; }

.edu { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.edu + .edu { margin-top: 18px; }
.edu div:first-child span { display: block; color: var(--muted); }

footer { border-top: 1px solid var(--rule); padding: 32px 0 56px; color: var(--faint); font: 13px/1.6 var(--mono); }

@media (max-width: 640px) {
  header { padding: 56px 0 40px; }
  section { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .meta { white-space: normal; }
}

/* ---------- Shared nav + footer ---------- */
.nav { display: flex; justify-content: space-between; align-items: center; padding: 28px 0 0; }
.nav .mark {
  font: 700 14px/1 var(--mono); text-decoration: none;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.nav .mark:hover { color: #fff; opacity: .9; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav ul a { font: 500 14px/1 var(--sans); text-decoration: none; padding: 9px 12px; border-radius: 8px; color: var(--muted); }
.nav ul a:hover { color: var(--text); background: var(--surface); }
.nav ul a[aria-current="page"] { color: var(--text); background: var(--surface); }
header { padding-top: 64px; }

footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--muted); }
.social a:hover { color: var(--accent); background: var(--surface); }
.social svg { width: 18px; height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- About page ---------- */
.profile { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.photo {
  width: 200px; aspect-ratio: 4 / 5; height: auto; flex: none;
  border-radius: 16px; object-fit: cover; display: block;
  background: var(--surface); border: 1px solid var(--rule);
}
.profile > div { flex: 1 1 300px; min-width: 0; }
.profile h1 { margin-bottom: 10px; }
.profile .lede { margin: 0; }

.now { list-style: none; margin: 0; padding: 0; }
.now li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.now li:last-child { border-bottom: 0; }
.now b { font: 500 13px/1.65 var(--mono); color: var(--faint); }
.updated { font: 12px/1.6 var(--mono); color: var(--faint); margin-top: 16px !important; }


/* ---------- Blog page ---------- */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li + li { margin-top: 22px; }
.posts a.title { font-weight: 600; font-size: 17px; text-decoration: none; }
.posts a.title:hover { text-decoration: underline; }
.posts .meta { display: block; margin-top: 2px; }
.posts p { color: var(--muted); margin: 4px 0 0; }
@media (prefers-color-scheme: dark) { .nav .mark, .nav .mark:hover { color: #0b1512; } }

/* ---------- Post pages ---------- */
.post-head { padding: 56px 0 28px; }
.post-head h1 { font-size: clamp(30px, 5.5vw, 42px); line-height: 1.15; margin: 14px 0 12px; }
.back { font: 500 13px/1 var(--mono); color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.post { font-size: 17px; line-height: 1.75; max-width: 680px; padding: 32px 0 56px; border-top: 1px solid var(--rule); }
.post p, .post ol, .post ul { margin: 0 0 20px; }
.post li { margin-bottom: 12px; }
.post img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0 28px; }
.post h2, .post h3 { font-family: var(--sans); text-transform: none; letter-spacing: -0.01em; color: var(--text); margin: 36px 0 12px; }
.post h2 { font-size: 24px; } .post h3 { font-size: 20px; }


@media (max-width: 640px) {
  header { padding-top: 40px; }
  .now li { grid-template-columns: 1fr; gap: 2px; }
  .photo { width: 100%; max-width: 300px; }
}
