:root {
      --bg: #f6f5f2;          /* off-white */
      --panel: #ffffff;       /* white panels */
      --text: #1f2937;        /* dark slate */
      --muted: #6b7280;       /* muted gray */
      --accent: #0ea5e9;      /* sky-600 */
      --link: #0b5cab;        /* accessible blue */
      --border: #e5e7eb;      /* soft border */
      --shadow: 0 8px 24px rgba(2, 6, 23, .06);
      --radius: 14px;
      --maxw: 900px;
      --hero: #f3e8d4;        /* beige header */
    }
    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0;
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
      line-height: 1.6;
      color: var(--text);
      background: var(--bg);}
    a { color: var(--link); text-decoration: none; }
    a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
    .wrap { max-width: var(--maxw); padding: 32px 20px 80px; margin: 0 auto; }

header.profile { display: grid; grid-template-columns: 160px 1fr; grid-gap: 28px; align-items: center; margin-top: 32px; }
.avatar { width: 160px; height: 160px; border-radius: 50%; background: #fafaf9; border: 1px solid var(--border); box-shadow: var(--shadow); object-fit: cover; }
    h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -0.3px; }
    .tagline { color: var(--muted); margin: 2px 0 2px; }
    .links { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; }
    .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: #ffffff; }
    .pill svg { width: 16px; height: 16px; opacity: .9; }

    section { margin-top: 32px; background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
    section > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
    section > header h2 { margin: 0; font-size: 18px; letter-spacing: .2px; text-transform: uppercase; color: var(--muted); }
    .content { padding: 18px; }

    /* News */
    .news-list { list-style: none; margin: 0; padding: 0; }
    .news-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
    .news-item:last-child { border-bottom: none; }
    .news-date { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 10px; }
    .toggle { appearance: none; border: 1px solid var(--border); background: #ffffff; color: var(--text); border-radius: 10px; padding: 6px 10px; cursor: pointer; }

    .news-collapsed .news-item[data-idx="4"],
    .news-collapsed .news-item[data-idx="5"],
    .news-collapsed .news-item[data-idx="6"],
    .news-collapsed .news-item[data-idx="7"],
    .news-collapsed .news-item[data-idx="8"],
    .news-collapsed .news-item[data-idx="9"] { display: none; }

    /* Work / Publications */
    .pub { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
    .pub:last-child { border-bottom: none; }
    .pub-title { font-weight: 600; }
    .pub-meta { color: var(--muted); font-size: 14px; }
    .pub-links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; }

    /* Footer */
    footer { text-align: center; color: var(--muted); padding: 28px 0 0; font-size: 14px; }

    @media (min-width: 680px) {
      h1 { font-size: 38px; }
    }

/* Light theme enhancements */
header.profile {
  display: grid; grid-template-columns: 160px 1fr; grid-gap: 24px; align-items: center; margin-top: 24px;
  background: var(--hero); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.avatar { width: 160px; height: 160px; border-radius: 50%; border: 1px solid var(--border); box-shadow: var(--shadow); object-fit: cover; }
h1 { color: var(--text); }
.tagline { color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: #ffffff; color: var(--text); box-shadow: 0 1px 0 rgba(2,6,23,.04); }
.pill:hover { background: #f8fafc; text-decoration: none; }
.pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pill svg { width: 16px; height: 16px; opacity: .9; }

section { margin-top: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
section > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: #fbfbfb; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
section > header h2 { margin: 0; font-size: 16px; letter-spacing: .2px; text-transform: uppercase; color: var(--muted); }
.content { padding: 16px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.news-item:last-child { border-bottom: none; }
.news-date { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 10px; }
.toggle { appearance: none; border: 1px solid var(--border); background: #ffffff; color: var(--text); border-radius: 10px; padding: 8px 12px; cursor: pointer; box-shadow: 0 1px 0 rgba(2,6,23,.04); }
.toggle:hover { border-color: var(--accent); background: #f0f9ff; }
.toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

footer { text-align: center; color: var(--muted); padding: 28px 0 0; font-size: 14px; }