/* ===== Site design — closely matching suikei-wang.github.io ===== */

html {
  height: 100%;
  font-weight: 300;
}

body {
  color: #424242;
  line-height: 25px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  font-weight: 200;
  margin: 0;
  background: #ffffff;
}

p {
  cursor: default;
  margin: 0;
}

strong {
  font-weight: 600;
  color: #7c7c7c;
}

a {
  text-decoration: none;
  color: #6d9cd1;
  font-weight: 400;
}
a:hover { color: #5b97bd; }
a:visited {
  text-decoration: none;
  color: #6d9cd1;
}

li { text-decoration: none; }

#app {
  height: 100%;
  padding: 10px;
}

/* ----- 8-column grid container, 1024px max ----- */
.container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-column-gap: 40px;
  grid-auto-rows: minmax(3rem, auto);
  grid-row-gap: 0.5rem;
  max-width: 1024px;
  margin: 0 auto;
}

/* ----- Header ----- */
header {
  padding: 2rem 0rem 1rem 0rem;
  background: #ffffff;
}

.header_photo {
  grid-column: 1 / 4;
  justify-self: end;
  align-self: stretch;
  position: relative;
}

#avadiv {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
}

#avatar {
  height: 100%;
  width: auto;
  display: block;
}

.header_photo p { margin: 5px; }

.header_title {
  grid-column: 4 / 9;
}

.name {
  font-size: 25px;
  font-weight: 400;
  color: rgba(50, 50, 50, 0.7411764706);
  padding: 10px 0;
  display: inline;
}

.edu { padding: 2px 0; }

.icons { padding-top: 8px; }
.icons a {
  color: #7c7c7c;
  margin: 5px;
}

.cv-link {
  padding-top: 6px;
  font-size: 14px;
}
.cv-link a {
  color: #6d9cd1;
  font-weight: 400;
}
.cv-link i { margin-right: 4px; }

/* ----- Main + sections ----- */
main {
  border-top: solid;
  border-top-color: #eaeaee;
  border-top-width: 1px;
}

section {
  margin: 0;
  padding: 2rem 0;
}

.about, .header_bio, .news, .pubs {
  grid-column: 1 / 9;
}

/* Section title + wavy SVG separator */
.title {
  font-size: 20px;
  font-weight: bold;
  color: #7c7c7c;
  margin-bottom: 0;
  text-transform: capitalize;
}

.deco {
  max-width: 60px;
  margin-top: 8px;
  margin-bottom: 20px;
}
.deco svg { width: 100%; display: block; }

.text { padding: 10px 0; }
.in-text { color: #6d9cd1; }

/* ----- Recently/news list ----- */
.newslist { padding-top: 10px; }

.attending-item { padding-bottom: 10px; }

.attending-date {
  display: inline;
  background-color: rgba(160, 203, 225, 0.251);
  padding: 3px 5px;
  border-radius: 5px;
  margin-right: 5px;
}

.attending-event { display: inline; }

/* ----- Publications notice line ----- */
.pub-note {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
  margin-bottom: 15px;
}

/* ----- Paper / publication items ----- */
.paper-item {
  display: grid;
  grid-template-columns: 240px 1fr;   /* thumbnail column width */
  grid-column-gap: 35px;              /* gap to text */
  line-height: 22px;
  padding-bottom: 40px;
}

.paper-left  { grid-column: 1; }
.paper-right { grid-column: 2; }

.paper-right > div {
  padding: 0 0 5px 0;
}

.paper-figure {
  margin: 0;
}
.paper-figure > img,
.paper-figure > video {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
}

.paper-placeholder {
  width: 100%;
  max-width: 200px;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f0f8fc, #e0ecf5);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #99b8d0;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.paper-title {
  font-weight: bold;
  color: rgba(50, 50, 50, 0.7411764706);
}

.paper-venue { font-weight: 400; }

.paper-abstract {
  line-height: 20px;
  color: #424242;
}

.paper-link {
  padding: 5px 0;
  margin-top: 5px;
  font-size: 13px;
}
.paper-link > a {
  background-color: rgba(210, 210, 210, 0.2509803922);
  margin-right: 5px;
  padding: 4px 7px;
  border-radius: 5px;
}

/* Author highlight (yellow underline) */
.highlight { position: relative; }
.highlight:before {
  background-color: rgba(255, 218, 143, 0.614);
  content: "";
  position: absolute;
  width: calc(100% + 4px);
  height: 60%;
  left: -2px;
  bottom: 0;
  z-index: -1;
  transform: rotate(-2deg);
}

/* ----- Flat experience / teaching items (no thumbnail, no indent) ----- */
.flat-item {
  line-height: 22px;
  padding-bottom: 20px;
}

/* ----- Teaching: institution heading + course list ----- */
.pubs h3 {
  font-size: 15px;
  font-weight: 600;
  color: #7c7c7c;
  margin: 14px 0 6px;
}
.pubs h3:first-of-type { margin-top: 0; }
.pubs ul {
  list-style: disc;
  padding-left: 22px;
  margin: 0 0 6px;
}
.pubs ul li {
  margin-bottom: 4px;
  color: #424242;
  line-height: 22px;
  display: list-item;
}

/* ----- Experience / work items with logo ----- */
/* Wider logo column so ultra-wide logos fit; same gap to text. */
.paper-item.work-item {
  grid-template-columns: 130px 1fr;
}
.work-item .paper-left  {
  grid-column: 1;
  display: flex;
  align-items: center;
}
.work-item .paper-right { grid-column: 2; }

/* Paper reference link inside experience: black (not blue), still underlined */
.work-item .paper-venue a {
  color: inherit;
  text-decoration: underline;
}
.work-item .paper-venue a:hover { color: #000; }

/* Uniform-height box so every logo row aligns; logo is centered inside
   with consistent breathing room regardless of aspect ratio. */
.work-figure {
  margin: 0;
  width: 100%;
  height: 56px;
  box-sizing: border-box;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-figure > img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.work-date {
  color: #7c7c7c;
  font-size: 0.9em;
}

/* ----- Footer ----- */
.footer {
  color: #7c7c7c;
  border-top: solid 1px #eaeaee;
}

#small {
  text-align: center;
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  margin: 0;
  padding-top: 5px;
  grid-column: 1 / 9;
}

#last-updated {
  grid-column: 1 / 9;
  margin: 8px 0 16px;
  font-size: 12px;
  color: #666;
  text-align: right;
}

/* ----- Responsive (April Wang-style mobile) ----- */
@media screen and (max-width: 600px) {
  /* Side padding */
  #app { padding: 10px 20px; }

  /* Header stacks: photo centered on top, info below */
  .header_photo {
    grid-column: 1 / 9;
    justify-self: center;
    position: static;
    align-self: auto;
  }
  .header_title { grid-column: 1 / 9; text-align: center; }
  #avadiv {
    position: static;
    max-width: 150px;
    margin: 0 auto;
  }
  #avatar { width: 100%; height: auto; }

  /* Publications & experience: hide thumbnail/logo, text takes full width.
     .work-item .paper-left needs equal specificity to override the flex rule. */
  .paper-item,
  .paper-item.work-item {
    grid-template-columns: 1fr;
  }
  .paper-left,
  .work-item .paper-left { display: none; }
  .paper-right,
  .work-item .paper-right { grid-column: 1; }
}
