
:root{
  --bg:#0b0f19; --card:#0f1423; --text:#e6ecff; --muted:#9db0d1; --accent:#5eead4;
  --max:980px;
}
@media (prefers-color-scheme: light){
  :root{ --bg:#ffffff; --card:#f8fafc; --text:#0f172a; --muted:#475569; --accent:#0ea5e9; }
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg); color:var(--text); line-height:1.6}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:var(--max); margin:0 auto; padding:0 20px}
.site-header{position:sticky;top:0;background:rgba(15,20,35,.8);backdrop-filter:saturate(180%) blur(6px); z-index:50}
@media (prefers-color-scheme: light){ .site-header{background:#fff} }
.header-inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0}
.identity h1{margin:0;font-size:22px}
.identity p{margin:2px 0 0;color:var(--muted);font-size:14px}
.nav a{margin-left:14px; font-weight:600}
.card{background:var(--card); padding:24px; border-radius:16px; box-shadow: 0 4px 18px rgba(0,0,0,.18); margin:24px 0}
.card h2{margin-top:0}
.pub-list{padding-left:20px}
.twocol{display:grid; grid-template-columns: 160px 1fr; gap:12px 20px}
@media (max-width:720px){ .twocol{grid-template-columns:1fr} }
.twocol .date{color:var(--muted); font-weight:600; white-space:nowrap}
.twocol .text{min-width:0}
.footer{color:var(--muted); padding:28px 0; text-align:center}

/* Teaching block */
.role{margin:0 0 2px;font-weight:700}
.role a{color:inherit;text-decoration:underline}
.org{color:var(--muted);margin-bottom:6px}

/* Bảng nhãn 2 cột trong phần mô tả */
.labelled{
  display:grid;
  grid-template-columns: 180px 1fr;  /* cột nhãn | cột nội dung */
  gap:6px 12px;
  margin:8px 0 2px;
}
.labelled dt{margin:0;font-style:italic;color:var(--muted)}
.labelled dd{margin:0}

/* ========== Header base (desktop) ========== */
.site-header{position:sticky;top:0;background:rgba(15,20,35,.8);backdrop-filter:saturate(180%) blur(6px);z-index:50}
@media (prefers-color-scheme: light){ .site-header{background:#fff} }
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.identity h1{margin:0;font-size:22px}
.identity .tagline{margin:2px 0 0;color:var(--muted);font-size:14px}

/* Nút hamburger ẩn trên desktop */
.nav-toggle{display:none;border:0;background:transparent;font-size:28px;line-height:1;padding:6px;margin-left:auto;cursor:pointer}

/* ========== Mobile styles ========== */
@media (max-width: 720px){
  .header-inner{flex-wrap:wrap;gap:8px}
  .identity{flex:1 0 100%;text-align:center}
  .identity h1{font-size:24px}
  .identity .tagline{font-size:13px}

  .nav-toggle{display:block}   /* hiện nút ☰ trên mobile */

  /* Menu đóng mặc định */
  .nav{display:none;flex-basis:100%;flex-direction:column;align-items:center;gap:10px;padding:8px 0}
  .nav a{font-size:18px}

  /* Khi mở */
  .nav.open{display:flex}
}

/* Căn đều 2 bên cho nội dung About Me (chỉ cột phải) */
.about-text p{
  text-align: justify;
  text-justify: inter-word;   /* phân bố khoảng trắng hợp lý */
  hyphens: auto;              /* tự ngắt từ cho mobile nếu cần */
  line-height: 1.7;           /* đọc dễ hơn */
}
