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

  :root {
    --bg:        #F7F6F2;
    --surface:   #FFFFFF;
    --surface2:  #F2F1ED;
    --border:    #E2E0DA;
    --text:      #1A1A18;
    --muted:     #8A8980;
    --accent:    #1A56DB;
    --accent-bg: #EEF3FD;
    --accent-text: #1A56DB;
    --success-bg: #EDFAF0;
    --success-text: #1A7F3C;
    --warn-bg:   #FFF8E6;
    --warn-text: #835A00;
    --pro-bg:    #F3EEFF;
    --pro-text:  #5B21B6;
    --radius:    8px;
    
    
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg:        #18181A;
      --surface:   #232325;
      --surface2:  #2A2A2C;
      --border:    #3A3A3C;
      --text:      #F0EFEA;
      --muted:     #787774;
      --accent:    #4B8EF0;
      --accent-bg: #1A2540;
      --accent-text: #7FB3F8;
      --success-bg: #142518;
      --success-text: #4ADE80;
      --warn-bg:   #2A2010;
      --warn-text: #FBB040;
      --pro-bg:    #1E1230;
      --pro-text:  #C084FC;
      
      
    }
  }

  body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem 1rem;
  }

  .container { max-width: 700px; margin: 0 auto; }

  

  /* ── Card ── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
  }

  /* ── Header ── */
  .header {
    padding: 1.75rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
  }

  .avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--accent-bg);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 26px; font-weight: 600; color: var(--accent-text); flex-shrink: 0;
  }

  .header-info { flex: 1; }

  .person-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 4px;
  }

  .person-role { font-size: 14px; color: var(--muted); margin-bottom: 12px; }

  .tags { display: flex; flex-wrap: wrap; gap: 6px; }

  .tag {
    font-size: 12px; padding: 3px 10px;
    border-radius: var(--radius); border: 1px solid var(--border);
    color: var(--muted); background: var(--surface2);
  }

  /* ── Stats ── */
  .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); }

  .stat-cell { padding: 1rem 1.25rem; border-right: 1px solid var(--border); }
  .stat-cell:last-child { border-right: none; }

  .stat-label {
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px;
  }
  .stat-value { font-size: 22px; font-weight: 500; }

  /* ── Info grid ── */
  .section { padding: 1.5rem 1.75rem; border-bottom: 1px solid var(--border); }
  .section:last-child { border-bottom: none; }

  .section-label {
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted); margin-bottom: 1rem;
  }

  .info-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  }

  .info-cell {
    padding: 12px 16px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .info-cell:nth-child(2n) { border-right: none; }
  .info-cell:nth-last-child(-n+2) { border-bottom: none; }

  .info-label { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
  .info-val   { font-size: 14px; font-weight: 500; }

  /* ── Timeline ── */
  .filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.25rem; }

  .filter-btn {
    font-size: 12px; padding: 5px 12px;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface2); color: var(--muted);
    cursor: pointer; font-family: inherit;
    transition: background .12s, border-color .12s, color .12s;
  }
  .filter-btn.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-text); }
  .filter-btn:hover:not(.active) { border-color: var(--muted); color: var(--text); }

  .timeline { position: relative; padding-left: 24px; }

  .tl-line {
    position: absolute; left: 7px; top: 8px; bottom: 8px;
    width: 1px; background: var(--border);
  }

  .tl-item { position: relative; margin-bottom: 16px; }
  .tl-item:last-child { margin-bottom: 0; }

  .tl-dot {
    position: absolute; left: -20px; top: 10px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border);
  }

  .tl-card {
    border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; background: var(--surface);
  }

  .tl-header {
    padding: 12px 14px; display: flex;
    align-items: flex-start; justify-content: space-between;
    gap: 12px;
  }

  .tl-title    { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
  .tl-subtitle { font-size: 13px; color: var(--muted); }
  .tl-date     { font-size: 12px; color: var(--muted); white-space: nowrap; }

  .tl-badge {
    display: inline-block; font-size: 11px; padding: 2px 8px;
    border-radius: var(--radius); font-weight: 500; margin-top: 6px;
  }
  .badge-work  { background: var(--accent-bg);  color: var(--accent-text);  }
  .badge-edu   { background: var(--success-bg); color: var(--success-text); }
  .badge-award { background: var(--warn-bg);    color: var(--warn-text);    }
  .badge-life  { background: var(--pro-bg);     color: var(--pro-text);     }

  .tl-chevron { font-size: 16px; line-height: 1; color: var(--muted); transition: transform .15s; }
  .tl-item.open .tl-chevron { transform: rotate(180deg); }

  .tl-detail {
    border-top: 1px solid var(--border); padding: 12px 14px;
    font-size: 13px; color: var(--muted); line-height: 1.65; display: none;
  }
  .tl-item.open .tl-detail { display: block; }

  

  

  

  .top-bar {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 1.5rem;
  }
  .page-title {
    font-family: 'Playfair Display', serif; font-size: 17px;
    font-weight: 500; color: var(--muted);
  }

  /* Email popup */
  .email-popup {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease both;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .email-popup-inner {
    position: relative; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem 2.2rem 1.8rem;
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; min-width: 280px; max-width: 90vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  }
  .email-popup-addr {
    color: var(--accent-text); font-size: 0.95rem;
    letter-spacing: 0.03em; margin-bottom: 0.3rem;
  }
  .email-popup-btn {
    width: 100%; padding: 0.65rem 1.2rem; border-radius: 100px;
    font-family: 'Inter', sans-serif; font-size: 0.85rem;
    letter-spacing: 0.05em; cursor: pointer; transition: opacity 0.2s;
    border: none; text-align: center; text-decoration: none; display: block;
  }
  .email-popup-btn:hover { opacity: 0.8; }
  .email-popup-btn.primary { background: var(--accent); color: #fff; font-weight: 700; }
  .email-popup-btn.secondary {
    background: transparent; border: 1px solid var(--border); color: var(--accent-text);
  }
  .email-popup-close {
    position: absolute; top: 0.6rem; right: 0.8rem;
    background: none; border: none; color: var(--muted);
    font-size: 0.9rem; cursor: pointer; padding: 0.2rem 0.4rem; transition: color 0.2s;
  }
  .email-popup-close:hover { color: var(--text); }
  .ep-desktop-only { display: none; }
  .ep-mobile-only  { display: block; }
  @media (min-width: 641px) {
    .ep-desktop-only { display: block; }
    .ep-mobile-only  { display: none; }
  }
  #ep-copy-btn.copied { border-color: #4caf50; color: #4caf50; }

  @media (max-width: 600px) {
    body { padding: 1rem 0.625rem; }
    .container { max-width: 100%; }
    .header { padding: 1.25rem; gap: 1rem; }
    .avatar { width: 58px; height: 58px; font-size: 20px; }
    .person-name { font-size: 18px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-cell:nth-child(2) { border-right: none; }
    .stat-cell:nth-child(3) {
      grid-column: 1 / -1;
      border-top: 1px solid var(--border);
      border-right: none;
    }
    .stat-value { font-size: 20px; }
    .section { padding: 1.25rem; }
    .info-grid { grid-template-columns: 1fr; }
    .info-cell { border-right: none; }
    .info-cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
    .info-cell:last-child { border-bottom: none; }
    .timeline { padding-left: 20px; }
    .tl-dot { left: -17px; }
    .tl-header { padding: 10px 12px; gap: 8px; }
    .tl-title { font-size: 13px; }
    .tl-date { font-size: 11px; }
    .filter-row { gap: 5px; }
    .filter-btn { font-size: 11px; padding: 4px 10px; }
    .top-bar { margin-bottom: 1rem; }
    .card { border-radius: 12px; margin-bottom: 1rem; }
  }
