/* ---- Tokens (cool slate base with warm-orange pop, Stripe-style) ---- */
:root {
  --ink: #1c2128;
  --body: #3e4750;
  --muted: #8a949c;
  --rule: #e3e6ea;
  --accent: #e07a2c;
  --accent-hover: #f29044;
  --bg: #f6f8fb;
  --venue: #9aa3ab;
  --tag-bg: #eaeef3;
  --tag-fg: #44505c;
  --highlight: #e07a2c;
}

/* ---- Base ---- */
body {
  background-color: var(--bg);
  color: var(--body);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 40px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
}

h1 {
  font-size: 20px;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}

section.main > section { margin-top: 4px; }
section.main > section:first-child { margin-top: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

a.muted, a.muted:hover {
  color: var(--muted);
  border-bottom-color: transparent;
}

p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }

b { color: var(--ink); }

a.theme-link {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px dotted var(--muted);
}

a.theme-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

ul.pubs li:target {
  background: #fff7ed;
  animation: pubFlash 1.4s ease-out;
}

@keyframes pubFlash {
  0%   { background: #ffe6c8; }
  100% { background: #fff7ed; }
}

/* ---- Header (sidebar) ---- */
header h4 {
  font-size: 23px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}

header .byline {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 12px;
}

img.personal {
  width: 100%;
  max-width: 220px;
  border-radius: 4px;
  margin: 0 0 12px;
  display: block;
}

header .contact {
  font-size: 13.5px;
  color: var(--body);
  margin-bottom: 8px;
}

header .contact .at {
  color: var(--muted);
  font-style: italic;
  font-size: 11.5px;
}

ul.links {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: block;
  height: auto;
  background: transparent;
  border: none;
  width: auto;
}

ul.links li {
  width: auto;
  float: none;
  border: none;
  height: auto;
  font-size: 13.5px;
  margin: 2px 0;
}

ul.links a {
  color: var(--body);
  display: inline-block;
  padding: 0;
  text-align: left;
  height: auto;
  font-size: 13.5px;
  line-height: 1.45;
}

ul.links a:hover { color: var(--accent); }

ul.links i {
  width: 16px;
  color: var(--muted);
  margin-right: 4px;
  font-size: 13px;
}

header .view {
  font-size: 13.5px;
  color: var(--body);
  margin-top: 6px;
  line-height: 1.5;
}

/* ---- Main ---- */
section.main { float: right; }

section.main > section {
  margin-bottom: 0;
}

section.main p {
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---- News list ---- */
ul.news {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

ul.news li {
  padding: 3px 0;
  border-bottom: 1px dashed var(--rule);
  line-height: 1.45;
}

ul.news li:last-child { border-bottom: none; }

ul.news .date {
  display: inline-block;
  width: 80px;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---- Publications / tech reports ---- */
.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 4px;
}

ul.pubs {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.pubs li {
  padding: 5px 0 6px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  padding-left: 56px;
  min-height: 0;
}

ul.pubs li:last-child { border-bottom: none; padding-bottom: 0; }

ul.pubs .venue {
  position: absolute;
  left: 0;
  top: 7px;
  width: 44px;
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--venue);
  font-variant-numeric: tabular-nums;
}

ul.pubs a.title {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 1px;
}

ul.pubs a.title:hover {
  color: var(--accent);
  border-bottom-color: transparent;
}

ul.pubs a.muted-link {
  color: var(--muted);
  font-weight: 400;
}

ul.pubs a.muted-link:hover {
  color: var(--muted);
  cursor: default;
}

ul.pubs .authors {
  display: inline;
  font-size: 13px;
  color: var(--body);
  line-height: 1.4;
}

ul.pubs .authors i {
  color: var(--ink);
  font-style: italic;
}

ul.pubs .venue-inline {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--tag-fg);
  background: var(--tag-bg);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  letter-spacing: 0.01em;
  vertical-align: 1px;
}

ul.pubs .links-inline {
  display: inline;
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}

ul.pubs .links-inline a {
  color: var(--accent);
  border: none;
}

/* ---- Projects ---- */
ul.projects {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.projects li {
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
}

ul.projects li:last-child { border-bottom: none; }

ul.projects .title {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1px;
}

ul.projects .title:hover { color: var(--accent); border: none; }

ul.projects .desc {
  display: block;
  font-size: 13px;
  color: var(--body);
  line-height: 1.5;
}

/* ---- Footer ---- */
footer {
  width: 270px;
  position: fixed;
  bottom: 10px;
  left: 40px;
}

footer small { color: var(--muted); font-size: 11.5px; }

/* ---- Reset of legacy gimmicks ---- */
.hiddenimg, img.filler, button.btn-circle, .hide-button { display: none !important; }
.hiddentxt { display: list-item; }

/* ---- Responsive overrides ---- */
@media print, screen and (max-width: 960px) {
  body { padding: 25px; }
  section.main { float: none; }
  footer { position: static; width: auto; margin-top: 24px; left: auto; }
  ul.pubs li { padding-left: 0; min-height: 0; }
  ul.pubs .venue { position: static; width: auto; display: inline-block; margin-right: 8px; }
}

@media print, screen and (max-width: 720px) {
  body { padding: 18px; }
  ul.news .date { display: block; width: auto; }
}
