/* ----- Tingting Liu — dark navy minimal -----
   Palette:
     bg     #0a1729   (deep navy / 藏蓝)
     fg     #ece4cf   (warm cream)
     accent #c89968   (warm gold)
*/

:root {
  --bg:        #0a1729;
  --bg-2:      #0d1e36;
  --bg-3:      #11233f;
  --fg:        #ece4cf;
  --fg-soft:   #b9b1a0;
  --muted:     #6e7383;
  --accent:    #c89968;
  --rule:      #19283e;
  --maxw:      1180px;
  --side-pad:  48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Home page: lock to one viewport, no scroll */
body.home { height: 100vh; overflow: hidden; }

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

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(236,228,207,0.18);
  transition: color .2s, border-color .2s;
}
a:hover { color: var(--accent); border-bottom-color: var(--accent); }

em { font-style: italic; }

/* ----- Top nav ----- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px var(--side-pad);
  pointer-events: none;
}
.topnav > * { pointer-events: auto; }

.topnav .brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  color: var(--fg);
  border-bottom: none;
  letter-spacing: -0.01em;
}

.topnav nav {
  display: flex; gap: 28px;
}
.topnav nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
  border-bottom: none;
}
.topnav nav a:hover { color: var(--accent); }

/* ===========================================================
   HOME / HERO
   =========================================================== */

.hero {
  height: 100vh;
  display: flex; flex-direction: column;
  position: relative;
  padding-top: 76px;          /* clears fixed topnav */
}

.hero-grid {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: center;
  min-height: 0;              /* allow grid to shrink */
}

/* Left: text */
.hero-text { min-width: 0; }

.display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(60px, 9vw, 124px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  color: var(--fg);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.display .cred {
  display: block;
  font-style: italic;
  font-size: 0.36em;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.005em;
  margin-top: 8px;
  font-variation-settings: "opsz" 36;
}

.lede {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg);
  margin: 0 0 28px;
}
.lede em {
  font-family: "Fraunces", Georgia, serif;
  color: var(--fg-soft);
  font-weight: 400;
}

.affil {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 40px;
}
.affil span:not(:last-child)::after {
  content: " / ";
  color: var(--rule);
  margin: 0 4px;
}

.hero-links {
  display: flex; flex-wrap: wrap;
  gap: 20px 32px;
}
.hero-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: none;
  padding-right: 18px;
}
.hero-links a::after {
  content: "→";
  position: absolute; right: 0; top: 0;
  color: var(--accent);
  transition: transform .25s ease;
}
.hero-links a:hover { color: var(--accent); }
.hero-links a:hover::after { transform: translateX(4px); }

/* Right: portrait */
.hero-photo {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-3);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- News ticker ----- */
.ticker {
  flex-shrink: 0;
  height: 56px;
  display: flex; align-items: stretch;
  border-top: 1px solid var(--rule);
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.18));
}
.ticker-label {
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 22px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border-right: 1px solid var(--rule);
}
.ticker-window {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  padding-left: 28px;
  animation: ticker-scroll 75s linear infinite;
  gap: 28px;
}
.ticker-window:hover .ticker-track {
  animation-play-state: paused;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: baseline;
  gap: 14px;
  font-size: 13.5px;
  color: var(--fg-soft);
}
.ticker-item em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--fg);
}
.ticker-date {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.ticker-sep {
  color: var(--rule);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 18px;
}

/* ===========================================================
   SUBPAGES (work.html, teaching.html)
   =========================================================== */

body.subpage {
  padding-top: 84px;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px var(--side-pad) 96px;
}

.page-header {
  margin-bottom: 64px;
}
.page-eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.page-title {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
}
.page-back {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
  border-bottom: none;
}
.page-back:hover { color: var(--accent); }

.page-intro {
  max-width: 640px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0 0 8px;
}
.page-intro em {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--fg-soft);
}

.papers {
  list-style: none;
  margin: 0; padding: 0;
}
.papers li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.papers li:first-child { border-top: none; padding-top: 8px; }
.year {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
  font-variation-settings: "opsz" 36;
  padding-top: 1px;
}
.title {
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 6px;
  color: var(--fg);
}
.title em {
  font-family: "Fraunces", serif;
  font-style: italic;
}
.meta {
  font-size: 14px;
  color: var(--fg-soft);
  margin: 0;
}
.meta a { color: var(--fg-soft); border-bottom-color: rgba(185,177,160,0.3); }
.meta a:hover { color: var(--accent); }
.meta em { font-family: "Fraunces", serif; font-style: italic; color: var(--fg-soft); }

.section-divider {
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 64px 0 28px;
}

.course {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.course:first-of-type { border-top: none; padding-top: 8px; }
.course-name { font-size: 17px; margin: 0 0 4px; color: var(--fg); }
.course-meta {
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.course p { margin: 0; color: var(--fg-soft); font-size: 14.5px; }

/* ----- Contact page ----- */
.contact-block {
  margin: 0 0 56px;
  max-width: 640px;
}
.contact-block:last-of-type { margin-bottom: 0; }

.contact-label {
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.contact-value {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.45;
  color: var(--fg);
  margin: 0;
  font-variation-settings: "opsz" 36;
  user-select: all;        /* triple-click selects whole value for easy copy */
}
.contact-value .at { color: var(--accent); }

.contact-address {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-soft);
  user-select: text;
}

.contact-links {
  list-style: none;
  margin: 0; padding: 0;
}
.contact-links li {
  display: inline-block;
  margin: 0 28px 10px 0;
}
.contact-links a {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--fg);
  border-bottom: 1px solid rgba(236,228,207,0.18);
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */

@media (max-width: 900px) {
  :root { --side-pad: 24px; }
  body.home { height: auto; overflow: auto; }   /* allow scroll on small screens */
  .hero { height: auto; min-height: 100vh; padding-bottom: 0; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 24px; padding-bottom: 32px;
  }
  .hero-photo { max-width: 240px; order: -1; }   /* photo first on mobile */
  .display { font-size: clamp(56px, 14vw, 100px); margin-bottom: 28px; }
  .lede { font-size: 16.5px; }
  .topnav { padding: 16px 24px; gap: 12px; flex-wrap: wrap; }
  .topnav nav { gap: 18px; }
  .ticker-label { padding: 0 16px; }
}
