:root {
  --bg: #eef3f8;
  --card: #ffffff;
  --card-soft: #f8fbff;
  --text: #132033;
  --muted: #53657d;
  --line: #d8e2ef;
  --accent: #0b66d8;
  --accent-soft: #eaf3ff;
  --red: #d51541;
  --shadow: 0 12px 28px rgba(35, 66, 105, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.48;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.page {
  max-width: 1180px;
  margin: 22px auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 18px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}
.avatar {
  width: 150px;
  height: 190px;
  margin: 2px auto 14px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(35, 66, 105, .12);
  background: var(--card-soft);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.name { text-align: center; font-size: 26px; line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.03em; }
.role { text-align: center; color: var(--accent); font-weight: 650; font-size: 12px; line-height: 1.35; margin: 0 auto 16px; max-width: 200px; }
.side-line { height: 1px; background: var(--line); margin: 16px 0; }
.contact-list { display: grid; gap: 12px; }
.contact-item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.contact-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.contact-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 1px; }
.contact-value { color: var(--text); font-size: 12.5px; overflow-wrap: anywhere; }
.contact-value a { color: var(--text); }
.main { display: grid; gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.section-title {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 10px;
}
.bio p { margin: 0 0 10px; color: #26364b; }
.bio p:last-child { margin-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--accent-soft);
  color: #0a4fa5;
  border: 1px solid #d6e8ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item { padding: 0; }
.item + .item { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.item-title { font-weight: 760; color: #0c1728; margin-bottom: 2px; }
.item-meta { color: var(--accent); font-size: 12.5px; margin-bottom: 4px; }
.item-text { color: var(--muted); margin: 0; }
ul.compact { margin: 6px 0 0 18px; padding: 0; color: var(--muted); }
ul.compact li { margin: 3px 0; }
.experience-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.research-box {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 12px;
  background: linear-gradient(90deg, rgba(11,102,216,.04), transparent);
}
.research-box .item-title { margin-bottom: 2px; }
.publication-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.publication-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.publication-item:last-child { border-bottom: 0; padding-bottom: 0; }
.pub-year { color: var(--red); font-weight: 800; font-size: 13px; padding-top: 1px; }
.pub-title { color: #003fbd; font-weight: 760; line-height: 1.35; }
.pub-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pub-journal { color: var(--accent); font-size: 12.5px; margin-top: 1px; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.skill-group { background: var(--card-soft); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.skill-group h3 { margin: 0 0 6px; font-size: 13px; }
.skill-group p { margin: 0; color: var(--muted); font-size: 12.5px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 2px 0 18px; }
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; margin: 12px auto; padding: 0 10px; }
  .sidebar { position: static; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; }
  .avatar {
    width: 92px;
    height: 92px;
    margin: 0;
    border-radius: 50%;
  }
  .avatar img {
    border-radius: 50%;
  }
  .name, .role { text-align: left; max-width: none; }
  .side-line { display: none; }
  .contact-list { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .two-col, .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 13px; }
  .card { padding: 15px; border-radius: 14px; }
  .publication-item { grid-template-columns: 38px 1fr; }
  .sidebar { border-radius: 14px; }
}

/* On portrait/narrow screens, use a circular avatar; desktop keeps the formal square portrait. */
@media (orientation: portrait) {
  .avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
  }
  .avatar img {
    border-radius: 50%;
  }
}


/* Balanced revision: compact tag-style skills, avoiding long overclaiming paragraphs. */
.skill-tag-groups { display: grid; gap: 12px; }
.skill-tag-group h3 { margin: 0 0 7px; font-size: 13px; color: #0c1728; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tags span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  color: #3d526d;
  font-size: 12px;
  line-height: 1.2;
}
