/* Hang Yang — academic homepage. Plain HTML aesthetic. */

:root {
  --ink:   #111;
  --paper: #ffffff;
  --mute:  #555;
  --rule:  #ddd;
  --link:  #0645ad;     /* classic web blue */
  --link-v:#5a3696;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

hr  { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }
pre, code, kbd, samp { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }
pre { background: #f6f6f4; padding: 0.8rem; overflow-x: auto; }
blockquote { margin: 1rem 0; padding-left: 0.9rem; border-left: 3px solid var(--rule); color: var(--mute); }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.15rem 0; }

/* --- shell --- */
.shell { max-width: 720px; margin: 0 auto; padding: 0 1rem; }
.shell--wide { max-width: 980px; }

/* --- masthead --- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1rem; }
.brand:hover { text-decoration: underline; }
.brand-mark { display: none; }

.nav { display: flex; flex-wrap: wrap; gap: 0; font-size: 0.95rem; }
.nav a { color: var(--link); text-decoration: none; padding: 0.15rem 0.5rem; }
.nav a + a::before { content: "·"; color: var(--mute); margin-right: 0.5rem; margin-left: -0.5rem; padding-right: 0.3rem; }
.nav a:hover, .nav a.is-active { text-decoration: underline; }

/* --- footer --- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 1rem 0 2rem;
  font-size: 0.9rem;
  color: var(--mute);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.foot a { color: var(--mute); }

/* --- typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 1.4rem 0 0.5rem; }
h1 { font-size: 1.5rem; margin-top: 0.5rem; }
h2 { font-size: 1.2rem; margin-top: 1.8rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 1rem; font-style: italic; }
p  { margin: 0 0 0.7rem; }

/* --- page chrome --- */
.page { padding: 1.2rem 0 1rem; }
.page__title  { font-size: 1.5rem; margin: 0 0 0.3rem; }
.page__kicker { font-size: 0.95rem; color: var(--mute); margin: 0 0 0.3rem; }
.page__lede   { font-size: 1rem; color: var(--mute); margin: 0.3rem 0 1.2rem; }

/* --- home: nothing fancy, no hero block. Just normal text. --- */
.hero, .section { padding: 0; margin: 0; border: 0; }
.hero__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0 0.3rem;
  line-height: 1.2;
}
.hero__name br { display: none; }
.hero__name em { font-style: normal; font-weight: 700; }
.hero__lede { margin: 0.3rem 0 0.7rem; font-style: normal; max-width: 60ch; }
.hero__role { display: block; margin: 0.4rem 0 0.7rem; font-size: 0.95rem; color: var(--mute); }
.hero__role dt, .hero__role dd { display: inline; margin: 0; }
.hero__role dt { font-style: italic; }
.hero__role dt::after { content: ": "; }
.hero__role dd::after { content: " · "; }
.hero__role dd:last-of-type::after { content: ""; }

.section__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.8rem 0 0.5rem;
  padding: 0;
  border: 0;
}
.section__title em { font-style: normal; font-weight: 700; }
.section__num { display: none; }

/* Inline two-col for research list */
.cols-2 { display: block; margin: 0 0 0.5rem; }
.cols-2__label { display: inline; font-style: italic; font-weight: 600; }
.cols-2__label::after { content: ". "; font-style: normal; font-weight: 400; }
.cols-2 > p { display: inline; margin: 0; }

/* --- archive entries --- */
.entries { list-style: none; padding: 0; margin: 0; }
.entry {
  padding: 0.4rem 0;
  display: block;
}
.entry__date { display: inline; color: var(--mute); font-size: 0.95rem; }
.entry__date::after { content: ".\00a0 "; }
.entry__main { display: inline; }
.entry__title { display: inline; font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.4; }
.entry__title a { color: var(--link); text-decoration: underline; }
.entry__title a:hover { text-decoration: none; }
.entry__title::after { content: ". "; }
.entry__meta { display: inline; color: var(--mute); font-style: italic; font-size: 0.95rem; margin: 0; }
.entry__excerpt { margin: 0.15rem 0 0.2rem; font-size: 0.95rem; color: #333; max-width: 60ch; }
.entry__links { margin-top: 0.15rem; font-size: 0.9rem; }
.entry__links a { margin-right: 0.6rem; }
.entry__citation { display: none; }

/* --- register (Education, Contact) --- */
.register dl { margin: 0; padding: 0; }
.register dt, .register dd { display: inline; padding: 0; margin: 0; border: 0; }
.register dt { font-style: italic; color: var(--mute); }
.register dt::after { content: ".\00a0 "; }
.register dd { font-style: normal; }
.register dd::after { content: ""; }
.register dl > * { display: block; }
.register dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.1rem 0.6rem; font-size: 0.97rem; }
.register dl > dt, .register dl > dd { display: block; padding: 0.15rem 0; border: 0; }
.register dt::after { content: ""; }

.tag {
  font-style: italic;
  font-size: 0.95rem;
  text-decoration: underline;
  border: 0;
  padding: 0;
}
.prose { max-width: 60ch; }

/* =========================================================================
   CLUSTER DASHBOARD — plain tables, no hero
   ========================================================================= */
.cd-dash { display: block; }

.cd-hero, .cd-hero__num, .cd-hero__num .unit, .cd-hero__meta {
  font-style: normal;
}
.cd-hero { display: block; margin: 0; padding: 0; border: 0; }
.cd-hero__num {
  display: inline;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}
.cd-hero__num .unit { font-style: italic; color: var(--mute); margin-left: 0.2rem; display: inline; }
.cd-hero__meta {
  display: block;
  font-size: 0.95rem;
  color: var(--mute);
  margin: 0.4rem 0 0.6rem;
}
.cd-hero__meta dt, .cd-hero__meta dd { display: inline; margin: 0; padding: 0; }
.cd-hero__meta dt { font-style: italic; }
.cd-hero__meta dt::after { content: ": "; }
.cd-hero__meta dd::after { content: " · "; }
.cd-hero__meta dd:last-of-type::after { content: ""; }

.cd-statline {
  font-size: 0.95rem;
  color: var(--mute);
  border: 0;
  padding: 0;
  margin: 0.2rem 0 1.2rem;
  display: block;
}
.cd-statline > * { margin-right: 1rem; }
.cd-statline strong { color: var(--ink); font-weight: 700; }
.cd-statline .live { display: inline; }
.cd-statline .dot {
  width: 0.5rem; height: 0.5rem; background: #2e7d32; border-radius: 50%;
  display: inline-block; vertical-align: middle; margin-right: 0.25rem;
  animation: cd-pulse 2.4s ease-in-out infinite;
}
@keyframes cd-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.cd-refresh {
  font: inherit;
  font-size: 0.9rem;
  background: none;
  color: var(--link);
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.cd-refresh:hover { text-decoration: none; }

.cd-section { margin: 1.4rem 0 0; }
.cd-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
  padding: 0;
  border: 0;
}
.cd-section__title em { font-style: normal; font-weight: 700; }
.cd-section__num { display: none; }

.cd-table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  margin: 0.2rem 0 0.6rem;
}
.cd-table th, .cd-table td {
  text-align: left;
  padding: 0.3rem 0.7rem 0.3rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-weight: 400;
}
.cd-table th {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--mute);
  border-bottom: 1px solid #999;
}
.cd-table .num { font-variant-numeric: tabular-nums; }

.cd-state { font-family: ui-monospace, monospace; font-size: 0.78rem; }
.cd-state.RUNNING   { color: #1f6b1f; }
.cd-state.PENDING   { color: #8a6300; }
.cd-state.COMPLETED { color: var(--mute); }
.cd-state.FAILED, .cd-state.TIMEOUT { color: #b00020; font-weight: 700; }
.cd-state.CANCELLED { color: var(--mute); }
.cd-state::before { content: none; }

.cd-tape { font-family: ui-monospace, monospace; font-size: 0.95rem; letter-spacing: -0.03em; }
.cd-tape .filled { color: var(--ink); }
.cd-tape .empty  { color: var(--rule); }

.cd-empty { color: var(--mute); font-style: italic; font-size: 0.95rem; }
.cd-error { color: #b00020; font-style: italic; }

/* --- responsive --- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .register dl { grid-template-columns: 1fr; }
  .cd-table { font-size: 0.78rem; }
  .cd-table thead { display: none; }
  .cd-table, .cd-table tbody, .cd-table tr, .cd-table td { display: block; width: 100%; }
  .cd-table tr { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
  .cd-table td { border: 0; padding: 0.05rem 0; }
  .cd-table td::before {
    content: attr(data-label) ": ";
    color: var(--mute);
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
  }
}

@media print {
  .masthead, .foot, .cd-refresh, .cd-statline .live { display: none; }
  a { color: black; }
}
