/* ------------------------------------------------------------------
   Yicheng Liu — personal homepage
   Layout in the spirit of the "Minimal Light" Jekyll theme:
   fixed left profile rail + right content column.
   ------------------------------------------------------------------ */

:root {
  --bg:          #ffffff;
  --text:        #333333;
  --text-strong: #222222;
  --heading:     #043361;
  --link:        #3399cc;
  --link-hover:  #006699;
  --muted:       #777777;
  --rule:        #e5e5e5;
  --badge-bg:    #002d72;
  --btn-border:  #000000;
  --btn-text:    #000000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #20212b;
    --text:        #dadbdf;
    --text-strong: #eeeff0;
    --heading:     #3eb7f0;
    --link:        #3eb7f0;
    --link-hover:  #7fd0f7;
    --muted:       #9a9ba3;
    --rule:        #3a3b46;
    --badge-bg:    #2496cb;
    --btn-border:  #dadbdf;
    --btn-text:    #dadbdf;
  }
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               Helvetica, Arial, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.wrapper { width: 960px; margin: 0 auto; }

/* ---------- left rail ---------- */

header {
  width: 232px;
  float: left;
  position: fixed;
  padding-top: 4em;
  text-align: center;
}

header .avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.1em;
}

header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.25;
  margin: 0 0 8px;
}

header .position { font-size: 15px; display: block; }
header .affiliation { font-size: 15px; display: block; color: var(--muted); }
header .affiliation a { color: var(--muted); }
header .email {
  font-size: 12px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  display: block;
  margin-top: 8px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.social-icons { margin-top: 16px; }
.social-icons a {
  display: inline-block;
  height: 2.2rem;
  width: 2.2rem;
  line-height: 2.2rem;
  border-radius: 50%;
  text-align: center;
  font-size: 1.15rem;
  color: var(--link);
  margin: 0 3px;
  transition: transform .15s ease, color .15s ease;
}
.social-icons a:hover { transform: scale(1.2); color: var(--link-hover); }

/* ---------- right column ---------- */

section {
  width: 650px;
  float: right;
  padding-top: 4em;
  padding-bottom: 60px;
}

h2 {
  color: var(--heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin: 2px 0 15px;
}

h2 .note {
  font-size: 0.6em;
  color: var(--muted);
  font-weight: normal;
  margin-left: 10px;
}

p, ul, ol { margin: 0 0 20px; }
ul { padding-left: 20px; }
li { margin-bottom: 6px; }

strong { color: var(--text-strong); font-weight: 600; }

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

hr { border: 0; background: var(--rule); height: 1px; margin: 30px 0 25px; }

img { max-width: 100%; }

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

.publications { margin-top: 1.6rem; }
.publications ol.bibliography { list-style: none; padding: 0; margin: 0; }
.publications ol.bibliography li { margin-bottom: 1.6rem; }

.pub-row { display: flex; align-items: center; }

.pub-teaser-col {
  position: relative;
  flex: 0 0 285px;
  padding: 0 15px;
}

.pub-teaser-col img.teaser {
  border-radius: 8px;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, .35);
  height: 123px;
  width: 100%;
  object-fit: cover;
  display: block;
}

/* placeholder keeps rows aligned when a teaser image is missing */
.pub-teaser-col .teaser.placeholder {
  height: 123px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 45, 114, .10), rgba(0, 45, 114, .03));
  box-shadow: 3px 3px 6px rgba(0, 0, 0, .18);
}
@media (prefers-color-scheme: dark) {
  .pub-teaser-col .teaser.placeholder {
    background: linear-gradient(135deg, rgba(62, 183, 240, .16), rgba(62, 183, 240, .04));
  }
}

.pub-teaser-col abbr.badge {
  display: inline-block;
  position: absolute;
  top: 6px;
  left: 22px;
  background-color: var(--badge-bg);
  color: #fff !important;
  padding: .25em 1rem;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  border-radius: .125rem;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
}

.pub-body { flex: 1 1 auto; padding: 0 15px 0 20px; }
.pub-body .title { font-weight: 700; line-height: 1.35; margin-bottom: 2px; }
.pub-body .author { font-size: 14px; line-height: 1.45; }
.pub-body .author em { font-style: normal; border-bottom: 1px solid; }
.pub-body .periodical { font-size: 14px; color: var(--muted); font-style: italic; }
.pub-body .links { margin-top: 6px; }

.pub-body .links a.btn {
  display: inline-block;
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 3px;
  padding: .1rem .5rem;
  font-size: 12px;
  margin-right: 4px;
  line-height: 1.5;
}
.pub-body .links a.btn:hover { color: var(--link); border-color: var(--link); }

/* ---------- earlier work (collapsed) ---------- */

details.earlier { margin-bottom: 20px; }
details.earlier summary {
  cursor: pointer;
  color: var(--link);
  font-size: 15px;
  margin-bottom: 10px;
  outline: none;
}
details.earlier ul { font-size: 14px; }
details.earlier .venue { color: var(--muted); font-style: italic; }

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

@media print, screen and (max-width: 960px) {
  .wrapper { width: auto; margin: 0; padding: 0 20px; }
  header, section { float: none; position: static; width: auto; }
  header { padding: 25px 0 0; }
  header .avatar img { width: 130px; height: 130px; }
  section {
    border-top: 1px solid var(--rule);
    padding: 25px 0 40px;
    margin: 25px 0 0;
  }
}

@media print, screen and (max-width: 620px) {
  .pub-row { display: block; }
  .pub-teaser-col { padding: 0 0 8px; flex: none; max-width: 320px; }
  .pub-teaser-col abbr.badge { left: 8px; }
  .pub-body { padding: 0; }
}
