/* Academic homepage — layout follows the single-page convention popularized by
   jonbarron.github.io. Styling written for yangzaijia.github.io. */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --accent:       #2f6d5b;   /* deep teal */
  --accent-soft:  #e6f1ec;
  --accent-hover: #c2683a;   /* terracotta on hover */
  --ink:          #22292f;
  --heading:      #14232b;
  --muted:        #6b7785;
  --line:         #e4e8ec;
  --page:         #f4f6f6;
  --card:         #ffffff;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
  background: linear-gradient(180deg, #e7edeb 0%, var(--page) 260px, var(--page) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, td, th, tr, p, a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 15px;
}

::selection { background: var(--accent-soft); color: var(--heading); }

/* the outer 800px table becomes a floating card */
body > table {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 34px rgba(20, 35, 43, .09);
  margin-top: 38px !important;
  margin-bottom: 52px !important;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--accent-hover); }

h2 {
  position: relative;
  margin: 0 0 12px;
  padding: 0 0 8px;
  font-size: 21px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--line);
}
h2::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 44px; height: 3px; border-radius: 3px;
  background: var(--accent);
}

.name {
  padding-top: 20px;
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--heading);
}

/* ---- publications ---- */
.papertitle { font-size: 15px; font-weight: 700; color: var(--heading); }
a:hover .papertitle { color: var(--accent-hover); }
em { color: var(--muted); }

td[style*="width:30%"] img,
td[style*="width:30%"] video {
  box-shadow: 0 3px 12px rgba(20, 35, 43, .13);
  transition: transform .25s ease, box-shadow .25s ease;
}
td[style*="width:30%"] img:hover,
td[style*="width:30%"] video:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(20, 35, 43, .2);
}

/* ---- lists ---- */
ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
ul li { position: relative; padding-left: 20px; margin-bottom: 9px; }
ul li::before {
  content: "";
  position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.news li { padding-left: 0; }
.news li::before { display: none; }
.news li strong {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  vertical-align: 1px;
}

/* ---- profile photo ---- */
img.hoverZoomLink {
  box-shadow: 0 0 0 5px var(--accent-soft), 0 10px 26px rgba(20, 35, 43, .16);
  transition: transform .3s ease, box-shadow .3s ease;
}
img.hoverZoomLink:hover {
  transform: scale(1.03);
  box-shadow: 0 0 0 5px #d8e9e1, 0 14px 32px rgba(20, 35, 43, .24);
}

/* ---- contact pills ---- */
.links a {
  display: inline-block;
  margin: 5px 3px;
  padding: 5px 15px;
  font-size: 13px; font-weight: 600;
  color: #37424d;
  background: #fff;
  border: 1px solid #dbe0e4;
  border-radius: 22px;
  transition: all .15s ease;
}
.links a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 109, 91, .3);
}

.footer { color: var(--muted); font-size: 12px; }
.footer a { color: var(--muted); }

span.highlight { background-color: #fffbd6; }

/* ---- small screens ---- */
@media (max-width: 700px) {
  body > table { margin-top: 16px !important; border-radius: 12px; }
  .name { font-size: 26px; }
  table[style*="width:100%"] td { display: block; width: 100% !important; max-width: 100% !important; }
}
