/* Ruixiang Tang — site styles.
   Type scale, colours and spacing follow the Google Sites original this site
   was migrated from; the values below were measured off that page. */

:root {
  --ink: #212121;          /* body text */
  --ink-head: #434343;     /* h2 and publication titles */
  --ink-h1: #494e52;       /* large section headings */
  --muted: #666666;
  --rule: #e0e0e0;
  --paper: #ffffff;
  --band: #f7f4ee;         /* research overview band */
  --blue: #4a86e8;         /* publication section headings */
  --link: #1155cc;         /* news tags, plain links */
  --green: #188038;        /* blog tags */
  --banner: #3c4043;

  --sans: Roboto, Arial, Helvetica, sans-serif;
  --gutter: 71px;
  --shell: 1280px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.56;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

/* ---------------------------------------------------------------- shell */

.band { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }

main { display: block; }

/* ---------------------------------------------------------------- masthead */

.masthead { background: var(--paper); }
.masthead__in {
  max-width: var(--shell); margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  font-size: 26.67px; font-weight: 500; line-height: 1.2;
  letter-spacing: .3px;
}
.brand img { width: 32px; height: 40px; display: block; }
.site { margin-left: auto; }
.site ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.site a {
  text-decoration: none; color: var(--ink);
  font-size: 15px; line-height: 2;
  padding-bottom: 2px; border-bottom: 3px solid transparent;
}
.site a:hover { border-bottom-color: var(--rule); }
.site a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------------------------------------------------------------- banner */

.banner {
  /* Rutgers scarlet, used until a photo is dropped at assets/img/banner.jpg */
  background: linear-gradient(115deg, #8c0022 0%, #cc0033 45%, #2b2f33 100%);
  background-size: cover; background-position: center;
  padding: 104px var(--gutter);
  text-align: center;
  position: relative;
}
/* a photo background gets a scrim so the white title keeps its contrast */
.banner[style] {
  background-color: var(--banner);
  /* the band is much wider than the photo is tall, so bias the visible slice
     up to the skyline instead of letting `cover` centre it on the water */
  background-position: center 24%;
}
.banner[style]::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .34);
}
.banner h1 {
  position: relative;
  margin: 0 auto; max-width: var(--shell);
  color: #fff; font-size: 48px; line-height: 1.38; font-weight: 700;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

/* ---------------------------------------------------------------- headings */

h1, h2, h3 { font-weight: 400; margin: 0; }

.h-page {                     /* "Awards", "PhD Students", "Conference/Journal Papers" */
  font-size: 32px; line-height: 1.2; font-weight: 500; color: var(--ink-h1);
  margin: 42px 0 26px;
}
.h-sec {                      /* "About Our Lab", "Research Overview", "News", "Teaching" */
  font-size: 21.33px; line-height: 1.38; font-weight: 700; color: var(--ink-head);
  margin: 40px 0 20px;
}
.h-item {                     /* the name block, "More about me", blog post titles */
  font-size: 24px; line-height: 1.56; font-weight: 700; color: var(--ink);
  margin: 0 0 4px;
}

p { margin: 0 0 16px; }

/* Google Sites uses square bullets throughout */
ul.gs { list-style: square; margin: 0 0 22px; padding-left: 20px; }
ul.gs li { margin: 0 0 2px; }
ul.gs p { margin: 0; }

/* ---------------------------------------------------------------- home */

.ident { display: flex; gap: 30px; align-items: center; padding-top: 34px; flex-wrap: wrap; }
.ident__body { min-width: 17rem; flex: 1 1 20rem; align-self: flex-start; }
.ident__body p { margin: 0 0 6px; }
.ident__portrait { width: 266px; flex: none; border-radius: 2px; }
.ident__logo { width: 266px; flex: none; }

.social { display: flex; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%; background: var(--ink); color: #fff;
  text-decoration: none;
}
.social a:hover { background: var(--ink-head); }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 34px 0 0; }

.areas {
  background: var(--band);
  margin: 0 calc(var(--gutter) * -1);
  padding: 30px var(--gutter);
}
.areas__in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 44px; }
.areas h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.areas p { margin: 0; font-size: 16px; line-height: 1.56; }

/* News sits in a column with the press links in a rail to its right */
.newsband { display: grid; grid-template-columns: minmax(0, 822fr) minmax(0, 260fr); gap: 56px; }
.news { list-style: square; margin: 0; padding-left: 20px; }
.news li { margin: 0 0 4px; }
.news .when { font-weight: 700; }
.news .tag { color: var(--link); margin-right: 4px; }

.press { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; }
.press li { margin: 0 0 16px; }
.press a { color: var(--link); display: block; }
.press img { width: 100%; height: auto; display: block; margin: 0 0 4px; }

.svc-label { font-weight: 700; margin: 14px 0 4px; }

/* ---------------------------------------------------------------- publications */

.pub-note { font-size: 13px; color: var(--muted); margin: -18px 0 26px; }
.h-page .scholar { color: var(--blue); font-size: 24px; font-weight: 400; margin-left: 10px; }

.h-group {                    /* "Preprint" / "Publications" */
  font-size: 24px; line-height: 1.4; font-weight: 400; color: var(--blue);
  margin: 34px 0 14px;
}
.h-year { font-size: 18.67px; font-weight: 700; color: var(--ink-head); margin: 26px 0 12px; }

.pubs { list-style: square; margin: 0; padding-left: 20px; }
.pubs li { margin: 0 0 16px; }
.pubs .t { display: block; font-weight: 700; color: var(--ink-head); }
.pubs .t a { color: inherit; text-decoration: none; }
.pubs .t a:hover { text-decoration: underline; }
.pubs .a { display: block; }
.pubs .v { display: block; font-style: italic; color: var(--ink-head); }

/* ---------------------------------------------------------------- group / teaching / awards */

.people { list-style: none; margin: 0 0 12px; padding: 0; }
.people li { margin: 0 0 16px; }

.courses { list-style: none; margin: 0 0 12px; padding: 0; }
.courses li { margin: 0 0 12px; }

/* ---------------------------------------------------------------- blog */

.posts { list-style: none; margin: 0; padding: 0; }
.posts > li { padding: 34px 0; border-bottom: 1px solid var(--rule); }
.posts > li:last-child { border-bottom: 0; }
.posts .h-item a { text-decoration: none; }
.posts .h-item a:hover { text-decoration: underline; }
.post__date { font-size: 18.67px; color: var(--muted); margin: 0 0 8px; }
.post__tags { font-size: 14.67px; color: var(--green); margin: 0 0 14px; }
.post__tags span + span::before { content: "；"; color: var(--green); }
.go a { color: var(--link); }

/* ---------------------------------------------------------------- misc */

.trip { margin: 34px 0 0; }
.trip p { margin: 0 0 18px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 46px; margin: 0 0 12px; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--band); }

/* ---------------------------------------------------------------- course pages */

.crumb { font-size: 14px; color: var(--muted); margin: 34px 0 10px; }
.facts { list-style: none; margin: 0 0 26px; padding: 0; }
.facts li { margin: 0 0 4px; }

.tablewrap { overflow-x: auto; margin: 0 0 30px; -webkit-overflow-scrolling: touch; }
.sched { border-collapse: collapse; width: 100%; min-width: 44rem; font-size: 15px; line-height: 1.5; }
.sched th, .sched td {
  text-align: left; vertical-align: top;
  padding: 10px 14px; border: 1px solid var(--rule);
}
.sched th { font-weight: 700; color: var(--ink-head); background: var(--band); }
.sched td:first-child { white-space: nowrap; font-weight: 700; }
.sched p { margin: 0; }
.sched p + p { margin-top: 6px; }

/* ---------------------------------------------------------------- footer */

footer.page {
  margin-top: 60px; padding: 26px 0 44px;
  border-top: 1px solid var(--rule);
  font-size: 14px; color: var(--muted);
}
footer.page a { color: var(--muted); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .areas__in { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .newsband { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; }
  body { font-size: 15px; }
  .banner { padding: 46px var(--gutter); }
  .banner h1 { font-size: 30px; }
  .h-page { font-size: 26px; }
  .h-sec { font-size: 19px; }
  .h-item { font-size: 20px; }
  .ident { gap: 22px; }
  .ident__portrait { width: 45%; max-width: 190px; }
  .ident__logo { width: 100%; max-width: 300px; }
  .areas__in { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .masthead__in { gap: 10px; }
  .site { margin-left: 0; width: 100%; }
  .site ul { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
