/* Site refresh: loaded after hux-blog.min.css */

/* fonts (self-hosted so they also load in China) */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/source-sans-3/source-sans-3-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --ink: #26302f;
  --muted: #5d6968;
  --accent: #176a6b;
  --accent-dark: #0e4b4c;
  --accent-tint: #e7f1f0;
  --rule: #dde5e4;
  --award: #8a5a00;
  --award-tint: #f8efdc;
}

/* type */
body, h1, h2, h3, h4, h5, h6,
.navbar-custom,
.intro-header .site-heading .subheading,
.intro-header .page-heading .subheading {
  font-family: "Source Sans 3", "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
body { font-size: 17px; line-height: 1.65; color: var(--ink); }
.post-container font { font-size: inherit; color: inherit; }
.post-container p { margin: 0 0 1em; }

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-dark); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header: photos and their gradients unchanged */
.intro-header .site-heading h1 { letter-spacing: -0.01em; font-weight: 700; }
.intro-header .site-heading .subheading { font-size: 20px; font-weight: 400; line-height: 1.4; }
@media (min-width: 768px) {
  .intro-header.inner .site-heading { padding: 120px 0 105px; }
}

/* navigation */
.navbar-custom .nav li a { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
@media (min-width: 768px) {
  .navbar-custom .nav li.active a { box-shadow: inset 0 -2px 0 #fff; }
  .navbar-custom.is-fixed .nav li.active a { box-shadow: inset 0 -2px 0 var(--accent); }
}

/* section headings */
.post-container h3 {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--rule);
}
.post-container > h3:first-child,
.post-container > style + h3 { margin-top: 0.4em; }
.post-container .legend { font-size: 15px; color: var(--muted); margin: -0.2em 0 1.2em; }

/* reference lists */
.post-container ul.refs { list-style: none; padding-left: 0; margin: 0; }
.post-container ul.refs li {
  padding-left: 1.6em;
  text-indent: -1.6em;
  margin: 0 0 1.05em;
  line-height: 1.6;
}
.post-container ul.refs p { margin: 0; }
.post-container ul.refs b { color: #111a19; }

/* link tags and award labels */
a.tag {
  display: inline-block;
  text-indent: 0;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 0 0.55em;
  margin: 0 0.15em;
  border-radius: 3px;
  background: var(--accent-tint);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: 1px;
}
a.tag:hover, a.tag:focus { background: var(--accent); color: #fff; text-decoration: none; }
a.tag .k { font-weight: 600; margin-right: 0.35em; }
.award {
  display: inline-block;
  text-indent: 0;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 0 0.55em;
  margin: 0 0.15em;
  border-radius: 3px;
  background: var(--award-tint);
  color: var(--award);
  font-weight: 600;
  vertical-align: 1px;
}
.award a { color: var(--award); text-decoration: underline; text-underline-offset: 2px; }
.note { font-size: 15px; color: var(--muted); }

/* homepage */
.bio p { max-width: 42em; }
.lines { margin: 1.2em 0 0.4em; }
.lines .line {
  border-left: 3px solid var(--accent);
  padding: 0.15em 0 0.15em 1em;
  margin: 0 0 1.1em;
}
.lines .line h4 { font-size: 18px; font-weight: 600; margin: 0 0 0.2em; color: #111a19; line-height: 1.4; }
.lines .line p { margin: 0; color: var(--ink); }
.links { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 0.6em 1.6em; }
.links a { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 600; text-decoration: none; }
.links a:hover span { text-decoration: underline; }
.links svg, .icons svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.figure { margin: 1.6em 0 1em; }
.figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* sidebar */
.sidebar-container { color: var(--muted); }
.sidebar-container h5 { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.06em; }
.sidebar-container .short-about img { width: 100%; max-width: 220px; border-radius: 2px; }
.sidebar-container .short-about .name { color: var(--ink); font-size: 18px; font-weight: 600; margin: 0 0 0.1em; }
.sidebar-container .short-about .role { color: var(--ink); font-size: 15px; margin: 0 0 0.8em; }
.sidebar-container .short-about address { font-size: 14.5px; line-height: 1.55; font-style: normal; margin: 0 0 1em; }
.sidebar-container .short-about .mail { font-size: 14.5px; margin: 0 0 1em; word-break: break-all; }
.icons { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px; }
.icons svg { width: 16px; height: 16px; }
.icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 3px;
  background: var(--accent-tint); color: var(--accent);
}
.icons a:hover, .icons a:focus { background: var(--accent); color: #fff; }
@media (max-width: 991px) {
  .sidebar-container { margin-top: 2em; border-top: 1px solid var(--rule); padding-top: 1.5em; }
  .sidebar-container hr { display: none; }
}

/* footer */
footer .copyright { font-size: 14px; color: var(--muted); }

/* overrides of theme/bootstrap colors */
.post-container a, .sidebar-container a { color: var(--accent); }
.post-container a:hover, .post-container a:focus { color: var(--accent-dark); }
.post-container a.tag, .sidebar-container .icons a { color: var(--accent); }
.post-container a.tag:hover, .post-container a.tag:focus,
.sidebar-container .icons a:hover, .sidebar-container .icons a:focus { color: #fff; }
.post-container .award a { color: var(--award); }
.navbar-custom .nav > .active > a,
.navbar-custom .nav > .active > a:hover,
.navbar-custom .nav > .active > a:focus { background: transparent; }
@media (min-width: 768px) {
  .navbar-custom .nav > .active > a { color: #fff; }
  .navbar-custom.is-fixed .nav > .active > a { color: var(--accent); }
}
.figure img { max-width: 560px; width: 100%; }
/* theme forces sidebar links gray with !important */
.sidebar-container .icons a { color: var(--accent) !important; }
.sidebar-container .icons a:hover, .sidebar-container .icons a:focus { color: #fff !important; }

/* grouped course lists (teaching) */
.post-container ul.terms { list-style: none; padding-left: 0; margin: 0; }
.post-container ul.terms > li { margin: 0 0 1em; }
.post-container ul.terms .term { display: block; font-weight: 600; color: #111a19; margin-bottom: 0.15em; }
.post-container ul.terms ul { list-style: none; padding-left: 1.6em; margin: 0; }
.post-container ul.terms ul li { line-height: 1.6; }

/* supervision details */
.orig { color: var(--muted); }
.status {
  display: inline-block; font-size: 13.5px; line-height: 1.5; padding: 0 0.55em; border-radius: 3px;
  background: var(--rule); color: var(--muted); text-indent: 0; vertical-align: 1px;
}
.muted { color: var(--muted); }

/* CV button (homepage) */
.post-container h3.bio-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 0.8em; }
.post-container a.cv-button {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: 0;
  padding: 0.6em 0.95em; border-radius: 4px;
  background: var(--accent); color: #fff; text-decoration: none;
}
.post-container a.cv-button svg { width: 16px; height: 16px; fill: currentColor; }
.post-container a.cv-button:hover, .post-container a.cv-button:focus { background: var(--accent-dark); color: #fff; }

/* updates (homepage): picture cards */
.updates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0.2em 0 0.6em; }
.update { min-width: 0; }
.update .pic {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; border-radius: 4px;
  background: var(--accent);
}
.post-container .update .pic img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
.update .pic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 25, 25, 0.82) 0%, rgba(10, 25, 25, 0.35) 45%, rgba(10, 25, 25, 0) 70%);
}
.update .kind {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 12.5px; font-weight: 600; line-height: 1.6; padding: 0 0.6em; border-radius: 3px;
  background: #fff; color: var(--accent);
}
.post-container .update h4.title {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; margin: 0;
  font-size: 17px; font-weight: 600; line-height: 1.3; color: #fff; text-wrap: balance;
}
.post-container .update h4.title a { color: #fff; text-decoration: none; }
.post-container .update h4.title a::before { content: ""; position: absolute; inset: -400px -12px -10px; }
.post-container .update h4.title a:hover, .post-container .update h4.title a:focus { text-decoration: underline; text-underline-offset: 3px; }
.update:has(a:focus-visible) .pic { outline: 2px solid var(--accent); outline-offset: 2px; }
.update .when { margin: 0.6em 0 0.15em; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-container .update .desc { margin: 0; font-size: 15.5px; line-height: 1.5; }
@media (max-width: 767px) {
  .updates { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .update .pic { aspect-ratio: 16 / 9; }
}

/* language switch (top right) */
.navbar-custom a.lang-switch {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.4;
  padding: 4px 11px; border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 3px; color: #fff;
  text-decoration: none; text-transform: none;
}
.navbar-custom a.lang-switch:hover, .navbar-custom a.lang-switch:focus { background: rgba(255, 255, 255, 0.15); color: #fff; }
@media (min-width: 768px) {
  .navbar-custom .nav li.lang-item { margin-left: 8px; }
  .navbar-custom .nav li.lang-item a.lang-switch { margin: 14px 15px 0 0; padding: 4px 11px; text-transform: none; letter-spacing: 0.02em; }
  .navbar-custom .nav li.lang-item a.lang-switch:hover { background: rgba(255, 255, 255, 0.15); }
  .navbar-custom.is-fixed .nav li.lang-item a.lang-switch { border-color: var(--accent); color: var(--accent); }
  .navbar-custom.is-fixed .nav li.lang-item a.lang-switch:hover { background: var(--accent-tint); }
}
@media (max-width: 767px) {
  .navbar-custom .navbar-header a.lang-switch { float: right; margin: 12px 4px 0 0; }
}
/* Chinese pages: a little more line height */
html[lang="zh-CN"] body { line-height: 1.75; }

/* education / positions list (Chinese homepage) */
.post-container ul.cv-list { list-style: none; padding: 0; margin: 0 0 0.6em; }
.post-container ul.cv-list li { display: grid; grid-template-columns: 6.5em 1fr; gap: 0 0.8em; padding: 0.3em 0; }
.post-container ul.cv-list .yr { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .post-container ul.cv-list li { grid-template-columns: 1fr; } }
