*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-brush: 'Ma Shan Zheng', cursive;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Crimson Pro', serif;
}

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  /* background: var(--paper); */
  background: transparent;
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

    ::selection { background: var(--selection-bg); color: var(--selection-fg); }
    a { color: inherit; text-decoration: none; }

.page {
  background: transparent !important; /* Forces the main content area to be see-through */
}

.bg-ink {
  z-index: -1; /* Moves it behind everything */
  opacity: 1 !important; /* Ensure the container itself isn't hidden */
}


/* Ensure the page itself is see-through */
.page {
  background: transparent !important;
}
.bg-ink img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* hide both by default */
}

body.light-theme .bg-ink .light-img {
  display: block;
}

body.dark-theme .bg-ink .dark-img {
  display: block;
}
/* Force the background container to stay behind and be visible */
.bg-ink {
  position: fixed;
  inset: 0;
  z-index: -1; /* Move behind the card */
  background: var(--paper); /* The base parchment color */
}



/* Ensure the page container is transparent so we can see the background */
.page {
  position: relative;
  z-index: 1;
  background: transparent !important;
}
/* ─── Page ─── */
    .page {
      position: relative;
      z-index: 1; /* Keeps content above the background */
      background: transparent !important; /* Forces the background to show through */
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      min-height: 100svh;
      padding: 60px 40px;
    }
/* glass box around profile */
.card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  /* Add these lines for better readability against Gargantua */
  background: var(--glass-bg); 
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}
    /* ─── Profile ─── */
    .profile-photo {
      position: relative;
      width: 110px;
      height: 110px;
      border-radius: 50%;
      overflow: hidden;
      margin: 0 auto 28px;
      box-shadow: var(--photo-shadow);
      border: 3px solid var(--photo-border);
      cursor: pointer;
    }

    .profile-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .profile-photo .name-cn {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--overlay-bg);
      font-family: var(--font-brush);
      font-size: 36px;
      color: #f4efe6;
      opacity: 0;
      transition: opacity 1s ease;
      margin: 0;
    }

    .profile-photo:hover .name-cn { opacity: 1; }

   /* ─── Photo Lightbox ─── */
    .lightbox {
      position: fixed; 
      inset: 0; 
      z-index: 300;
      display: flex; 
      align-items: center; 
      justify-content: center;
      background: var(--overlay-bg);
      cursor: pointer;
      opacity: 0; 
      pointer-events: none;
      transition: opacity 1s ease;
      will-change: opacity;
    }
    
    /* This triggers when JavaScript adds the .open class */
    .lightbox.open { 
      opacity: 1; 
      pointer-events: auto; 
    }

    .lightbox img {
      max-width: 90vw; 
      max-height: 85vh;
      border-radius: 6px;
      box-shadow: 0 12px 60px rgba(0,0,0,0.3);
      transform: scale(0.92);
      transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: transform;
    }

    /* Animation: Image grows to full size when opened */
    .lightbox.open img { 
      transform: scale(1); 
    }

    .lightbox-close {
      position: absolute; 
      top: 20px; 
      right: 20px;
      width: 36px; 
      height: 36px;
      display: flex; 
      align-items: center; 
      justify-content: center;
      background: rgba(255,255,255,0.15); 
      border: none; 
      border-radius: 50%;
      color: var(--paper); 
      cursor: pointer;
      transition: background 1s ease;
    }

    .lightbox-close:hover { 
      background: rgba(255,255,255,0.25); 
    }

    .lightbox-close svg { 
      width: 18px; 
      height: 18px; 
    }
    /* ─── Bio ─── */
    .bio {
      font-size: 15px;
      font-weight: 300;
      line-height: 1.8;
      color: var(--ink-light);
      text-align: left;
      margin-bottom: 28px;
    }

    /* ─── Info List ─── */
    .info-list {
      list-style: none;
      text-align: left;
      margin-bottom: 36px;
      border-top: 1px solid var(--border);
    }

    .info-list li {
      display: flex;
      align-items: baseline;
      gap: 12px;
      padding: 10px 0;
      font-size: 14px;
      color: var(--ink-light);
      border-bottom: 1px solid var(--border);
    }

    .info-label {
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-faint);
      min-width: 64px;
      flex-shrink: 0;
    }

    .info-list a {
      color: var(--vermillion);
      transition: opacity 1s ease;
    }

    .info-list a:hover { opacity: 0.7; }

    /* ─── Nav Buttons ─── */
    .nav-buttons {
      display: flex;
      justify-content: center;
      gap: 12px;
    }

    .nav-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 28px;
      font-family: var(--font-body);
      font-size: 15px;
      color: var(--ink);
      background: var(--btn-bg);
      backdrop-filter: blur(16px) saturate(1.3);
      -webkit-backdrop-filter: blur(16px) saturate(1.3);
      border: 1px solid var(--btn-border);
      border-radius: 100px;
      box-shadow: var(--btn-shadow), var(--btn-inset);
      transition: background 1s ease, box-shadow 1s ease;
    }

    .nav-btn:hover {
      background: var(--btn-hover-bg);
    }

    .nav-btn .cn {
      font-family: var(--font-brush);
      font-size: 18px;
      line-height: 1;
    }

    /* ─── Seal ─── */
    .seal {
      position: fixed;
      bottom: 28px;
      right: 28px;
      z-index: 2;
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--vermillion);
      color: var(--seal-color);
      font-family: var(--font-brush);
      font-size: 22px;
      border-radius: 3px;
      opacity: 0.75;
    }

    /* ─── Theme Toggle ─── */
    .theme-toggle {
      position: fixed;
      bottom: 28px;
      left: 28px;
      z-index: 2;
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: none;
      border: 1px solid var(--border);
      color: var(--ink-faint);
      font-size: 18px;
      border-radius: 50%;
      cursor: pointer;
      transition: color 1s ease, border-color 1s ease;
    }
    .theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }

    /* ─── Fade ─── */
    .fade { opacity: 0; animation: fadeIn 0.8s ease forwards; }
    .fade:nth-child(2) { animation-delay: 0.1s; }
    .fade:nth-child(3) { animation-delay: 0.15s; }
    .fade:nth-child(4) { animation-delay: 0.2s; }
    .fade:nth-child(5) { animation-delay: 0.25s; }
    .fade:nth-child(6) { animation-delay: 1s; }
    .fade:nth-child(7) { animation-delay: 0.35s; }
    .fade:nth-child(8) { animation-delay: 0.4s; }
    @keyframes fadeIn { to { opacity: 1; } }

    /* ─── Responsive ─── */
    @media (max-width: 600px) {
      .page { padding: 48px 24px; align-items: flex-start; padding-top: 60px; }
      .profile-photo { width: 88px; height: 88px; margin-bottom: 24px; }
      .name { font-size: 30px; }
      .seal { bottom: 20px; right: 20px; width: 32px; height: 32px; font-size: 18px; }
      .theme-toggle { bottom: 20px; left: 20px; width: 32px; height: 32px; font-size: 15px; }
    }
	
.name {
  font-family: 'Outfit', sans-serif;
  font-weight: 200;
  font-size: 42px;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.subtitle {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink-wash);
  margin-bottom: 36px;
}

.bio {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8; /* More space between lines for better readability */
  color: var(--ink-light);
  text-align: left;
  margin-bottom: 32px;
}