/* ==========================================================================
   Hongjie Chen — personal academic site
   Theme: UC Irvine (UCI Blue #0064A4 / UCI Gold #FFD200)
   Edit the variables below to adjust colors and spacing site-wide.
   ========================================================================== */

:root {
  /* UCI brand */
  --uci-blue:      #0064a4;
  --uci-blue-dark: #00507f;
  --uci-gold:      #ffd200;
  --navy:          #14304f;
  --navy-soft:     #1b3d6d;

  /* Neutrals */
  --ink:      #1a1f2b;
  --muted:    #5b6675;
  --bg:       #ffffff;
  --bg-alt:   #f4f8fb;
  --border:   #dde5ee;

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1080px;
  --wrap-narrow: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: var(--wrap-narrow); }

/* --------------------------------------------------------------- Typography */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; }

p { margin: 0 0 1.1em; }

a {
  color: var(--uci-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 100, 164, .3);
  transition: color .15s ease, border-color .15s ease;
}

a:hover { color: var(--uci-blue-dark); border-bottom-color: var(--uci-gold); }

/* Section heading with a gold rule underneath */
.section-title {
  position: relative;
  padding-bottom: .55rem;
  margin-bottom: 1.6rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--uci-gold);
  border-radius: 2px;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
}

/* -------------------------------------------------------------------- Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 100, 164, .04);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--navy);
  border: none;
  white-space: nowrap;
}

.brand:hover { color: var(--uci-blue); }

.brand .brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  border: none;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
}

.nav a:hover { background: var(--bg-alt); color: var(--uci-blue); }

.nav a.active {
  color: var(--uci-blue);
  background: var(--bg-alt);
  box-shadow: inset 0 -2px 0 var(--uci-gold);
}

/* ---------------------------------------------------------------------- Hero */

.hero {
  background:
    radial-gradient(1100px 380px at 78% -8%, rgba(0, 100, 164, .16), transparent 62%),
    linear-gradient(160deg, #14304f 0%, #1b3d6d 55%, #0064a4 100%);
  color: #fff;
  padding: 68px 0 62px;
  border-bottom: 4px solid var(--uci-gold);
}

.hero-grid {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 46px;
  align-items: center;
}

.hero h1 { color: #fff; margin-bottom: .28em; }

.hero .title {
  font-size: 1.16rem;
  color: var(--uci-gold);
  font-weight: 600;
  margin-bottom: .2em;
}

.hero .affil {
  color: rgba(255, 255, 255, .88);
  margin-bottom: 1.15em;
}

.hero .interests {
  color: rgba(255, 255, 255, .93);
  max-width: 56ch;
  margin-bottom: 1.6em;
}

.hero .interests strong { color: #fff; }

.portrait {
  width: 232px;
  height: 232px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 5px solid rgba(255, 255, 255, .92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  display: block;
}

/* --------------------------------------------------------------------- Links */

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: .95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all .16s ease;
}

.btn-gold {
  background: var(--uci-gold);
  color: var(--navy);
  border-color: var(--uci-gold);
}

.btn-gold:hover {
  background: #ffdb33;
  border-color: #ffdb33;
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--uci-blue);
  border-color: var(--uci-blue);
}

.btn-outline:hover {
  background: var(--uci-blue);
  color: #fff;
  border-color: var(--uci-blue);
}

/* ------------------------------------------------------------------ Sections */

.section { padding: 62px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.page-head {
  background: linear-gradient(160deg, #14304f 0%, #1b3d6d 100%);
  color: #fff;
  padding: 52px 0 46px;
  border-bottom: 4px solid var(--uci-gold);
}

.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p  { color: rgba(255, 255, 255, .88); max-width: 62ch; margin: 0; }

/* --------------------------------------------------------------- Paper cards */

.papers { display: grid; gap: 22px; }

.paper {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--uci-blue);
  border-radius: 8px;
  padding: 26px 28px;
  transition: box-shadow .18s ease, transform .18s ease;
}

.paper:hover {
  box-shadow: 0 8px 26px rgba(20, 48, 79, .09);
  transform: translateY(-2px);
}

.paper h3 { margin-bottom: .35rem; }

.paper .authors {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: .9rem;
}

.paper .abstract {
  font-size: .97rem;
  color: #2c3542;
  margin-bottom: 1rem;
}

.paper .meta {
  border-top: 1px solid var(--border);
  padding-top: .9rem;
  margin: 0;
  font-size: .91rem;
  color: var(--muted);
  list-style: none;
  padding-left: 0;
}

.paper .meta li { margin-bottom: .3rem; padding-left: 1.05em; position: relative; }

.paper .meta li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--uci-blue);
}

.paper .meta li:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------- Tags */

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 1rem; }

.tag {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 100, 164, .09);
  color: var(--uci-blue-dark);
  border: 1px solid rgba(0, 100, 164, .18);
}

.tag-gold {
  background: rgba(255, 210, 0, .2);
  color: #7a5c00;
  border-color: rgba(255, 210, 0, .55);
}

.tag-light {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}

/* --------------------------------------------------------------------- Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
}

.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

.card-accent { border-top: 4px solid var(--uci-gold); }

/* ------------------------------------------------------------------ Timeline */

.timeline { list-style: none; padding: 0; margin: 0; }

.timeline li {
  position: relative;
  padding: 0 0 26px 30px;
  border-left: 2px solid var(--border);
}

.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--uci-blue);
}

.timeline .when {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--uci-blue);
  margin-bottom: 2px;
}

.timeline .what   { font-weight: 600; color: var(--navy); }
.timeline .where  { color: var(--muted); font-size: .95rem; }

/* --------------------------------------------------------------- Course list */

.courses { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.courses li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 13px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  border-left: 3px solid var(--uci-gold);
}

.courses .term {
  color: var(--muted);
  font-size: .89rem;
  white-space: nowrap;
  text-align: right;
}

/* --------------------------------------------------------------- Eval scores */

.scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.score {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.score .num {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--uci-blue);
  line-height: 1.1;
}

.score .num small { font-size: .95rem; color: var(--muted); font-weight: 400; }
.score .label { font-size: .89rem; color: var(--muted); margin-top: 2px; }

.score-hero { border-left: 4px solid var(--uci-gold); }

/* --------------------------------------------------------------------- Quote */

.quotes { display: grid; gap: 16px; }

blockquote.quote {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--uci-blue);
  border-radius: 8px;
  padding: 20px 24px;
  font-size: .98rem;
  color: #2c3542;
  font-style: italic;
}

blockquote.quote p:last-child { margin-bottom: 0; }

blockquote.quote cite {
  display: block;
  margin-top: .7rem;
  font-style: normal;
  font-size: .84rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Prose bits */

.prose h3 { margin-top: 2rem; }
.prose h3:first-child { margin-top: 0; }

.pull {
  border-left: 4px solid var(--uci-gold);
  background: var(--bg-alt);
  padding: 18px 24px;
  margin: 0 0 1.6em;
  border-radius: 0 8px 8px 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--navy);
}

.pull p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- Contact */

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.contact-list li { display: flex; gap: 12px; align-items: baseline; }

.contact-list .k {
  font-weight: 600;
  color: var(--navy);
  min-width: 88px;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------- Footer */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  padding: 40px 0 34px;
  border-top: 4px solid var(--uci-gold);
  font-size: .93rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer a { color: #fff; border-bottom-color: rgba(255, 255, 255, .35); }
.site-footer a:hover { color: var(--uci-gold); border-bottom-color: var(--uci-gold); }

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Utility */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--uci-gold);
  color: var(--navy);
  padding: 10px 18px;
  z-index: 100;
  border: none;
  font-weight: 600;
}

.skip-link:focus { left: 8px; top: 8px; }

/* --------------------------------------------------------------- Responsive */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
    justify-items: center;
  }

  .hero .interests { max-width: none; }
  .hero-links { justify-content: center; }
  .portrait { width: 190px; height: 190px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .site-header .wrap { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 1.05rem; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: .9rem; }

  .hero { padding: 46px 0 44px; }
  .section { padding: 46px 0; }
  .paper { padding: 22px 20px; }

  .courses li { flex-direction: column; gap: 3px; }
  .courses .term { text-align: left; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------------- Print */

@media print {
  .site-header, .site-footer, .hero-links { display: none; }
  .hero, .page-head { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .hero h1, .page-head h1, .hero .title { color: #000; }
  body { font-size: 11pt; }
  .paper { break-inside: avoid; }
}
