/* ============================================
   V1 — MINIMAL / CLEAN
   White · Inter · Flat · No shadows
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #FFFFFF;
  --bg-alt:       #F7F7F7;
  --white:        #FFFFFF;
  --text:         #111111;
  --text-mid:     #3D3D3D;
  --text-muted:   #909090;
  --navy:         #111111;
  --blue:         #2563EB;
  --blue-mid:     #3B82F6;
  --blue-light:   #EFF6FF;
  --blue-rule:    #BFDBFE;
  --border:       #E2E2E2;
  --border-light: #EFEFEF;
  --shadow-sm:    none;
  --shadow-md:    none;
  --font-serif:   'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:        64px;
  --max-w:        1020px;
  --r:            0px;
}

html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: #1D4ED8; text-decoration: underline; }
img { max-width: 100%; display: block; }


/* ============================
   NAVIGATION
   ============================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  z-index: 200;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 5%;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-sans);
  font-size: 1.1rem; font-weight: 600; color: var(--text); letter-spacing: 0;
}
.nav-brand:hover { opacity: .55; text-decoration: none; color: var(--text); }

.nav-links { list-style: none; display: flex; gap: 2.25rem; align-items: center; }
.nav-links a {
  font-size: .9rem; font-weight: 400;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1.5px solid transparent; padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); border-bottom-color: var(--text); text-decoration: none;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px 2px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-mid); transition: all .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ============================
   HERO
   ============================ */
.hero-section {
  padding-top: var(--nav-h); min-height: 100vh;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse 65% 45% at 8%  35%,  rgba(197,213,245,0.28) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 88% 12%,  rgba(180,205,242,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 55% 35% at 55% 75%,  rgba(197,213,245,0.20) 0%, transparent 60%),
    radial-gradient(ellipse 35% 55% at 78% 58%,  rgba(210,225,248,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 48% 30% at 22% 82%,  rgba(197,213,245,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 30% 48% at 42% 42%,  rgba(220,232,250,0.20) 0%, transparent 52%),
    radial-gradient(ellipse 58% 38% at 92% 88%,  rgba(180,200,240,0.16) 0%, transparent 65%),
    radial-gradient(ellipse 25% 40% at 65% 22%,  rgba(197,213,245,0.18) 0%, transparent 55%),
    #FFFFFF;
}
.hero-inner {
  max-width: 1400px; margin: 0 auto; padding: 4rem 5%;
  display: flex; flex-direction: column; gap: 2.5rem;
  width: 100%;
}
.hero-top {
  display: grid; grid-template-columns: 310px minmax(auto, 600px); gap: 4rem;
  align-items: center; justify-content: center;
}
.hero-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.hero-contact {
  font-size: 1.11rem; color: var(--text); margin-bottom: 1.75rem;
}
.hero-photo img { width: 100%; border-radius: 0; display: block; }

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500; color: var(--text);
  line-height: 1.1; margin-bottom: .5rem; letter-spacing: -.01em;
}
.hero-rule { width: 28px; height: 2px; background: var(--blue); margin-bottom: 1.25rem; }
.hero-subtitle { font-size: .9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; }
.hero-bio { font-size: .975rem; color: var(--text-mid); line-height: 1.8; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem;
  font-family: var(--font-sans); font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  border-radius: 0; cursor: pointer; text-decoration: none;
  transition: all .15s; border: 1.5px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; text-decoration: none; }
.btn-dl { background: var(--blue-light); color: var(--blue); border-color: var(--blue-light); }
.btn-dl:hover { background: #DBEAFE; border-color: #DBEAFE; color: var(--blue); text-decoration: none; }


/* ============================
   CONTACT STRIP
   ============================ */
.contact-strip { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.contact-strip-inner {
  max-width: var(--max-w); margin: 0 auto; padding: .9rem 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; justify-content: center;
}
.contact-item { display: flex; align-items: center; gap: .45rem; font-size: .81rem; color: var(--text-muted); }
.contact-item svg { flex-shrink: 0; opacity: .4; }
.contact-item a { color: var(--text-muted); }
.contact-item a:hover { color: var(--text); }


/* ============================
   INNER PAGES
   ============================ */
.page-wrap { max-width: var(--max-w); margin: 0 auto; padding: calc(var(--nav-h) + 3rem) 2rem 5rem; }

.page-title-block { border-bottom: 1px solid var(--border); margin-bottom: 3rem; padding-bottom: 1.25rem; }
.page-title-block h1 {
  font-family: var(--font-serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500; color: var(--text); letter-spacing: -.01em; line-height: 1.15;
}
.page-title-block p { margin-top: .6rem; font-size: .95rem; color: var(--text-mid); max-width: 640px; line-height: 1.75; }

.sec-heading {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #111111;
  position: relative;
  padding: .55rem .9rem; margin-bottom: 1.75rem;
}
.sec-heading::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: rgba(197,213,245,0.65);
  filter: blur(2px);
  z-index: -1;
}
.section-block { margin-bottom: 3.5rem; }


/* ============================
   RESEARCH
   ============================ */
.jmp-card {
  border: 1px solid var(--border); border-left: 3px solid var(--blue);
  padding: 1.75rem 2rem; margin-bottom: 2rem;
}
.badge-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem; }
.badge {
  display: inline-block; font-size: .65rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 0;
}
.badge-jmp  { background: var(--text); color: #fff; }
.badge-review { background: var(--blue-light); color: var(--blue); }
.badge-wip  { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }

.paper-title { font-family: var(--font-sans); font-size: 1rem; font-weight: 500; color: var(--text); line-height: 1.45; margin-bottom: .3rem; }
.paper-authors { font-size: .84rem; color: var(--text-muted); margin-bottom: .15rem; }

.abstract-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  background: none; border: none; padding: 0; margin-top: .5rem;
  font-family: var(--font-sans); font-size: .73rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; color: var(--blue);
  cursor: pointer; transition: color .15s;
}
.abstract-btn:hover { color: #1D4ED8; }
.abstract-btn .arr { font-size: .63rem; transition: transform .2s ease; display: inline-block; }
.abstract-btn.open .arr { transform: rotate(180deg); }

.abstract-body {
  display: none; margin-top: .9rem; padding-top: .9rem;
  border-top: 1px solid var(--border-light);
  font-size: .875rem; line-height: 1.8; color: var(--text-mid);
}
.abstract-body p + p { margin-top: .7rem; }

.paper-list { display: flex; flex-direction: column; }
.paper-entry { padding: 1.4rem 0; border-bottom: 1px solid var(--border-light); }
.paper-entry:first-child { padding-top: 0; }
.paper-entry:last-child { border-bottom: none; padding-bottom: 0; }

.conf-table { width: 100%; border-collapse: collapse; }
.conf-table td { padding: .8rem 0; vertical-align: top; border-bottom: 1px solid var(--border-light); font-size: .875rem; }
.conf-table tr:last-child td { border-bottom: none; }
.conf-year { width: 60px; font-size: .82rem; color: var(--text-muted); white-space: nowrap; padding-right: 1.5rem; }
.conf-main { color: var(--text-mid); line-height: 1.5; }
.conf-venue { font-size: .8rem; color: var(--text-muted); font-style: italic; margin-top: .1rem; }


/* ============================
   TEACHING
   ============================ */
.course-table { width: 100%; border-collapse: collapse; }
.course-table thead tr { background: transparent; }
.course-table th {
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #111111; text-align: left; padding: .55rem .9rem;
  position: relative; background: transparent; border-bottom: none;
}
.course-table th::before {
  content: '';
  position: absolute;
  inset: -2px 0;
  background: rgba(197,213,245,0.65);
  filter: blur(2px);
  z-index: -1;
}
.course-table td {
  padding: .9rem 1rem .9rem 0; vertical-align: top;
  border-bottom: 1px solid var(--border-light); font-size: .875rem; color: var(--text-mid);
}
.course-table tr:last-child td { border-bottom: none; }
.course-name-cell { color: var(--text); font-weight: 500; font-size: .9rem; }
td.year-col { width: 90px; white-space: nowrap; color: var(--text-muted); font-size: .82rem; }
td.role-col { width: 130px; white-space: nowrap; }

.role-badge {
  display: inline-block; font-size: .65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; padding: .18rem .55rem; border-radius: 0;
}
.role-instructor { background: var(--text); color: #fff; }
.role-ta { background: var(--blue-light); color: var(--blue); }

.teaching-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.photo-wrap { position: relative; overflow: hidden; border-radius: 12px; }
.photo-wrap img { width: 100%; height: 260px; object-fit: cover; display: block; transition: transform .5s ease; }
.photo-wrap:hover img { transform: scale(1.03); }
.photo-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.52); color: #fff;
  font-size: .75rem; font-weight: 500; padding: 1.2rem .9rem .55rem;
}


/* ============================
   CV
   ============================ */
.cv-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 3rem; }
.cv-top-bar h2 { font-family: var(--font-sans); font-size: 1rem; font-weight: 500; color: var(--text-mid); }
.cv-top-bar p { font-size: .82rem; color: var(--text-muted); margin-top: .1rem; }
.cv-preview { width: 100%; height: 840px; border: 1px solid var(--border); display: block; }


/* ============================
   FOOTER
   ============================ */
footer {
  border-top: 1px solid var(--border); padding: 1.75rem 2rem;
  text-align: center; font-size: .75rem; color: var(--text-muted); letter-spacing: .02em;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }


/* ============================
   MOBILE
   ============================ */
@media (max-width: 740px) {
  .nav-inner { padding: 0 1.25rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--white); flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--border); padding: .5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .8rem 1.5rem; border-bottom: none; font-size: .875rem; }

  .hero-inner { padding: 2.5rem 1.25rem 3rem; gap: 2rem; }
  .hero-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-photo { display: flex; justify-content: center; }
  .hero-photo img { max-width: 220px; }
  .hero-name, .hero-subtitle, .hero-bio { text-align: center; }
  .hero-rule { margin: .5rem auto 1.25rem; }

  .contact-strip-inner { padding: 1rem 1.25rem; }
  .page-wrap { padding: calc(var(--nav-h) + 2rem) 1.25rem 4rem; }
  .jmp-card { padding: 1.25rem 1rem; }

  .conf-table, .conf-table tbody, .conf-table tr, .conf-table td { display: block; }
  .conf-year { width: auto; font-style: italic; padding: 0 0 .2rem; }
  .conf-table tr { padding: .8rem 0; border-bottom: 1px solid var(--border-light); }
  .conf-table tr:last-child { border-bottom: none; }
  .conf-table td { padding: 0; border-bottom: none; }

  .course-table, .course-table tbody, .course-table tr, .course-table th, .course-table td { display: block; }
  .course-table thead { display: none; }
  .course-table tr { padding: .8rem 0; border-bottom: 1px solid var(--border-light); }
  .course-table tr:last-child { border-bottom: none; }
  .course-table td { padding: 0 0 .2rem; border-bottom: none; }
  td.year-col, td.role-col { width: auto; }

  .teaching-photos { grid-template-columns: 1fr; }
  .cv-top-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero-photo img { max-width: 180px; }
}
