:root {
  --text: #1a1a1a;
  --muted: #666;
  --accent: #1a5fb4;
  --line: #e5e5e5;
  --bg: #fff;
  --code-bg: #f4f4f4;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e0e0e0;
    --muted: #9a9a9a;
    --accent: #ff8c42;
    --line: #333;
    --bg: #121212;
    --code-bg: #1e1e1e;
  }

  .pub-thumb img { opacity: 0.85; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  margin: 0 0 0.3em;
}

.tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0;
}

.about { margin: 2.5rem 0 3.5rem; }
.about p { margin: 0 0 1rem; }
.contact a { margin-right: 0.2rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.section { margin-top: 3.5rem; }

.section h2 {
  font-size: 1.8rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--text);
}

.section h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.section h4 { font-size: 1rem; margin: 1.2rem 0 0.4rem; }
.section h5,
.section h6 { font-size: 0.95rem; margin: 1rem 0 0.4rem; }

.section ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.section li { margin: 0.2rem 0; }

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

.pub {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.pub-thumb {
  flex: 0 0 150px;
}

.pub-thumb img {
  width: 150px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
}

.pub-num {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 1.4rem;
  color: var(--muted);
}

.pub-info { flex: 1; min-width: 0; }

.pub-title {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  display: block;
  margin-bottom: 0.4rem;
}

.pub-authors { margin: 0.15rem 0; }

.pub-author-me {
  font-weight: 700;
}

.pub-venue {
  color: var(--muted);
  font-style: italic;
}

.pub-award { margin-top: 0.3rem; }

.pub-links {
  margin-top: 0.4rem;
  font-size: 0.95rem;
}
.pub-links a { margin-right: 0.4rem; font-weight: 600; }

@media (max-width: 560px) {
  main { padding: 40px 18px 64px; }
  .pub { flex-direction: column; gap: 10px; }
  .pub-thumb { flex-basis: auto; }
  .pub-thumb img { width: 100%; max-width: 220px; }
}

@media (max-width: 820px) {
  .pub-title { font-size: 1.05rem; }
}
