/* ============================================================
   style.css — Mei-Chun Lee personal website
   Option D: Pink-forward, warm editorial, cyborg-chic
   ============================================================ */

/* ── FONTS & RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:         #F2637A;
  --pink-deep:    #C93055;
  --pink-dark:    #D94060;
  --pink-light:   #FCD5DC;
  --pink-pale:    #FFF0F3;
  --beige:        #FAF7F2;
  --beige-mid:    #EDE5D8;
  --beige-dark:   #2C1A10;
  --white:        #FFFFFF;
  --black:        #0F0E0D;
  --text-on-pink: rgba(255,255,255,0.88);
  --text-muted-pink: rgba(255,255,255,0.5);
  --mono:         'Space Mono', monospace;
  --serif:        'Syne', sans-serif;
  --body:         'Outfit', sans-serif;
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  background: var(--pink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── LANGUAGE TOGGLE ── */
body.lang-zh .lang-en { display: none; }
body.lang-zh .lang-zh { display: inline; }
body.lang-en .lang-zh { display: none; }
body.lang-en .lang-en { display: inline; }
body { } /* default english */
.lang-zh { display: none; }
.lang-en { display: inline; }

/* ── NAVIGATION ── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--pink-deep);
  border-bottom: 0.5px solid rgba(255,255,255,0.15);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-name {
  font-family: var(--serif);
  font-size: 16px;
  color: #FFE8EC;
  letter-spacing: 0.1em;
  white-space: nowrap;
  font-weight: 700;
  text-transform: uppercase;
}
.nav-name .nav-sep { margin: 0 0.4em; opacity: 0.4; }
/* show only one name at a time in nav */
.nav-name .lang-zh { display: none; }
body.lang-zh .nav-name .lang-en { display: none; }
body.lang-zh .nav-name .lang-zh { display: inline; }

.nav-links {
  display: flex;
  gap: 1.75rem;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}
.nav-link {
  font-family: var(--serif);
  font-size: 13px;
  color: rgba(255,220,228,0.65);
  letter-spacing: 0.02em;
  text-transform: capitalize;
  transition: color var(--transition);
}
.nav-link:hover { color: #fff; }
.nav-cv {
  font-family: var(--serif);
  color: #FFE8EC !important;
  border: 0.5px solid rgba(255,255,255,0.35);
  padding: 4px 14px;
  border-radius: 2px;
  transition: background var(--transition);
  font-size: 13px;
}
.nav-cv:hover { background: rgba(255,255,255,0.15) !important; }

.lang-toggle {
  font-family: var(--mono);
  font-size: 10px;
  color: #FFE8EC;
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.3);
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background var(--transition);
  white-space: nowrap;
}
.lang-toggle:hover { background: rgba(255,255,255,0.1); }

/* ── SECTION SHARED ── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}
.section-title-sub {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  opacity: 0.45;
}

/* ── HERO ── */
.hero {
  background-color: var(--pink);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,0.1) 47px, rgba(255,255,255,0.1) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(255,255,255,0.1) 47px, rgba(255,255,255,0.1) 48px);
  border-bottom: 0.5px solid var(--pink-dark);
  position: relative;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: flex;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-photo-wrap { flex-shrink: 0; }
.hero-photo {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
}

.hero-text { flex: 1; }

.hero-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: #FFE8EC;
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.28);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.name-en, .name-zh { display: block; }
.name-zh {
  font-style: normal;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: rgba(255,255,255,0.75);
  margin-top: 0.1rem;
}

.hero-position {
  font-family: var(--mono);
  font-size: 13px;
  color: #fff;
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
}
.hero-position a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.6);
  text-underline-offset: 3px;
}
.hero-position a:hover { text-decoration-color: #fff; }

.hero-bio {
  font-size: 15px;
  color: var(--text-on-pink);
  line-height: 1.85;
  max-width: 580px;
  font-weight: 400;
  margin-bottom: 0;
}
.hero-bio-zh {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 0.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
.hero-bio a { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); }
.hero-bio a:hover { text-decoration-color: #fff; }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.hero-chip {
  font-family: var(--mono);
  font-size: 9px;
  color: #FFE8EC;
  border: 0.5px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}

/* ── PUBLICATIONS ── */
.pub-section {
  background-color: var(--beige);
  background-image: radial-gradient(circle at 1px 1px, rgba(160,130,100,0.15) 1px, transparent 0);
  background-size: 24px 24px;
  border-bottom: 0.5px solid var(--beige-mid);
  color: var(--beige-dark);
}
.pub-section .section-title { color: var(--beige-dark); }
.pub-section .section-title-sub { color: #B09878; }

/* Book feature card */
.book-feature {
  background: var(--white);
  border: 0.5px solid var(--beige-mid);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: 0 1px 0 var(--beige-mid);
}
.book-cover-wrap {
  width: 165px;
  height: 225px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-cover-placeholder {
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.5;
  padding: 0.5rem;
}
.book-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--pink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.book-title-en {
  font-family: var(--body);
  font-size: 15px;
  color: #6A5848;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  font-style: normal;
  font-weight: 400;
}
.book-title-zh {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--beige-dark);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.book-publisher {
  font-family: var(--mono);
  font-size: 11px;
  color: #C0A888;
}
.book-desc {
  font-size: 14px;
  color: #7A6858;
  line-height: 1.75;
  margin: 0.6rem 0 0.75rem;
  max-width: 640px;
}
.book-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  padding: 4px 12px;
  background: #FDF0F4;
  color: #C4547A;
  border: 0.5px solid #F2B4C0;
  border-radius: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: auto;
  align-self: flex-end;
  transition: background var(--transition), color var(--transition);
}
.book-link:hover { background: var(--pink); color: #fff; border-color: var(--pink); }

/* Pub tabs */
.pub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 0.5px solid var(--beige-mid);
}
.pub-tab {
  font-family: var(--mono);
  font-size: 15px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #B09878;
  cursor: pointer;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: all var(--transition);
  margin-bottom: -0.5px;
}
.pub-tab:hover { color: var(--beige-dark); }
.pub-tab.active {
  color: var(--beige-dark);
  border-bottom-color: var(--pink);
}

/* Pub list */
.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 0.5px solid var(--beige-mid);
  animation: fadeIn 0.2s ease;
}
.pub-item:last-child { border-bottom: none; }
.pub-item.hidden { display: none; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:none} }

.pub-expand-btn {
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 10px;
  padding: 8px 20px;
  background: transparent;
  border: 0.5px solid #C8B098;
  color: #B09878;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition);
  display: block;
}
.pub-expand-btn:hover {
  background: var(--beige-dark);
  color: var(--beige);
  border-color: var(--beige-dark);
}

.pub-year {
  font-family: var(--mono);
  font-size: 12px;
  color: #C8B098;
  min-width: 38px;
  padding-top: 3px;
  flex-shrink: 0;
}
.pub-body { flex: 1; }
.pub-title-en {
  font-size: 16px;
  color: var(--beige-dark);
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 0.2rem;
  font-style: normal;
}
.pub-title-zh {
  font-size: 16px;
  color: var(--beige-dark);
  line-height: 1.55;
  margin-bottom: 0.2rem;
}
.pub-venue {
  font-family: var(--mono);
  font-size: 11px;
  color: #B09878;
}
.pub-note {
  font-size: 13px;
  color: #B09878;
  margin-top: 0.2rem;
  font-style: italic;
}
.pub-badge {
  font-family: var(--mono);
  font-size: 9px;
  padding: 4px 9px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  background: #FDF0F4;
  color: #C4547A;
  border: 0.5px solid #F2B4C0;
  align-self: flex-start;
  margin-top: 3px;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.pub-badge:hover {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

/* ── RESEARCH PROJECTS ── */
.proj-section {
  background-color: var(--pink);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,0.08) 47px, rgba(255,255,255,0.08) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(255,255,255,0.08) 47px, rgba(255,255,255,0.08) 48px);
  border-bottom: 0.5px solid var(--pink-dark);
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.proj-card {
  background: rgba(255,255,255,0.13);
  border: 0.5px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), background var(--transition);
}
.proj-card:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}

.proj-image-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.proj-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.proj-card:hover .proj-image-wrap img { transform: scale(1.04); }

/* Icon fallback block */
.proj-icon-block {
  width: 100%;
  height: 160px;
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proj-icon-svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.proj-body { padding: 1.1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.proj-status-badge {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 2px;
  width: fit-content;
}
.proj-status-badge.ongoing {
  color: #FFE8EC;
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.28);
}
.proj-status-badge.completed {
  color: rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.1);
  border: 0.5px solid rgba(255,255,255,0.15);
}
.proj-status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.proj-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #fff;
  line-height: 1.3;
  font-weight: 600;
}
.proj-title-zh {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  font-family: var(--body);
  font-style: normal;
}
.proj-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  flex: 1;
}
.proj-desc.lang-zh { font-size: 15px; }

.proj-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.proj-funding { display: none; }
.proj-link {
  font-family: var(--mono);
  font-size: 9px;
  color: #FFE8EC;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
}
.proj-link:hover { text-decoration-color: #fff; }

/* ── CONTACT ── */
.contact-section {
  background-color: var(--pink-light);
  color: var(--beige-dark);
}
.contact-section .section-title { color: #2A0A10; }
.contact-section .section-title-sub { color: #C48090; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.contact-block {}
.contact-label {
  font-family: var(--mono);
  font-size: 9px;
  color: #C48090;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.contact-value {
  font-size: 13px;
  color: #5A2A34;
  line-height: 1.7;
  font-weight: 400;
}
.contact-link {
  display: block;
  font-size: 13px;
  color: #C4547A;
  line-height: 1.9;
  transition: color var(--transition);
}
.contact-link:hover { color: #8A1A3A; }

/* ── FOOTER ── */
.site-footer {
  background: var(--pink-deep);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-name {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,220,228,0.55);
  letter-spacing: 0.08em;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,220,228,0.35);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; gap: 2rem; padding: 3rem 1.25rem 2.5rem; }
  .hero-photo { width: 100px; height: 100px; }
  .nav-links { display: none; }
  .nav-name { font-size: 10px; }
  .section-inner { padding: 3rem 1.25rem; }
  .proj-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .book-feature { flex-direction: column; }
}
@media (max-width: 480px) {
  .contact-grid { grid-template-columns: 1fr; }
  .pub-tabs { overflow-x: auto; }
}
