:root {
      --bg: #f4f5fb;
      --bg-alt: #ffffff;
      --primary: #111827;
      --secondary: #4b5563;
      --accent: #2563eb;
      --accent-soft: #e0ecff;
      --border: #e5e7eb;
      --muted: #9ca3af;
      --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
      --radius-lg: 14px;
      --radius-sm: 8px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
      background: var(--bg);
      color: var(--primary);
      line-height: 1.6;
    }

    a {
      color: var(--accent);
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    /* Layout */

    .page {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    header {
      position: sticky;
      top: 0;
      z-index: 50;
      backdrop-filter: blur(12px);
      background: rgba(244, 245, 251, 0.9);
      border-bottom: 1px solid var(--border);
    }

    .nav-inner {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0.5rem 1.25rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }

    .brand {
      display: flex;
      flex-direction: column;
    }

    .brand-name {
      font-weight: 650;
      font-size: 1.05rem;
      letter-spacing: 0.03em;
    }

    .brand-role {
      font-size: 0.78rem;
      color: var(--muted);
    }

    nav ul {
      list-style: none;
      display: flex;
      gap: 0.9rem;
      margin: 0;
      padding: 0;
      font-size: 0.85rem;
    }

    nav a {
      padding: 0.35rem 0.6rem;
      border-radius: 999px;
      color: var(--secondary);
      font-weight: 500;
    }

    nav a:hover {
      background: var(--accent-soft);
      text-decoration: none;
      color: var(--accent);
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .nav-icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.35rem;
  padding-right: 0.6rem;
  border-right: 1px solid var(--border);
}

.icon-link {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 3px;
}

.icon-link img {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-link:hover {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.55);
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav-icons {
    display: none;
  }
}


    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.35rem 0.9rem;
      border-radius: 999px;
      border: 1px solid var(--accent);
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--accent);
      background: #eef3ff;
      text-decoration: none;
      box-shadow: 0 0 0 rgba(37, 99, 235, 0);
      transition: background 0.15s ease, color 0.15s ease,
        box-shadow 0.15s ease, transform 0.05s ease;
      white-space: nowrap;
    }

    .btn-primary {
      background: var(--accent);
      color: #ffffff;
    }

    .btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
      text-decoration: none;
    }

    main {
      flex: 1;
    }

    .section {
      max-width: 1100px;
      margin: 0 auto;
      padding: 1.8rem 1.25rem;
    }

    .section + .section {
      padding-top: 0.6rem;
    }

    .section-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 0.9rem;
    }

    .section-title {
      font-size: 1.1rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .section-subtitle {
      font-size: 0.8rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.18em;
    }

    /* Hero */

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
      gap: 1.75rem;
      align-items: stretch;
    }

    .hero-card {
      background: var(--bg-alt);
      border-radius: var(--radius-lg);
      padding: 1.5rem 1.7rem;
      box-shadow: var(--shadow-soft);
      border: 1px solid rgba(148, 163, 184, 0.18);
    }

    .hero-name {
      font-size: 1.75rem;
      margin: 0 0 0.25rem;
      letter-spacing: 0.04em;
    }

    .hero-title {
      margin: 0;
      font-size: 0.98rem;
      color: var(--secondary);
    }

    .hero-links {
      margin-top: 0.7rem;
      font-size: 0.85rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.75rem;
      color: var(--secondary);
    }

    .hero-links span {
      color: var(--muted);
    }

    .hero-bio {
      margin-top: 0.85rem;
      font-size: 0.9rem;
      color: var(--secondary);
    }

    .hero-bio b {
      font-weight: 600;
    }

    .hero-tags {
      margin-top: 0.8rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .tag {
      padding: 0.15rem 0.55rem;
      border-radius: 999px;
      font-size: 0.73rem;
      background: #eef2ff;
      color: #4f46e5;
      border: 1px solid rgba(129, 140, 248, 0.35);
    }

    .hero-side-card {
      background: linear-gradient(135deg, #111827, #1f2937);
      color: #e5e7eb;
      border-radius: var(--radius-lg);
      padding: 1.2rem 1.4rem;
      box-shadow: var(--shadow-soft);
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
      height: 100%;
      justify-content: space-between;
    }

    .hero-side-title {
      font-size: 0.85rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: #9ca3af;
      text-align: center;
      margin-top: 0.35rem;
    }

    .hero-metrics {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.7rem;
      font-size: 0.8rem;
    }

    .metric {
      padding: 0.55rem 0.65rem;
      border-radius: var(--radius-sm);
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(148, 163, 184, 0.35);
    }

    .metric-label {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: #9ca3af;
    }

    .metric-value {
      font-weight: 600;
      margin-top: 0.2rem;
    }

    .hero-side-footer {
      font-size: 0.78rem;
      color: #d1d5db;
    }

    /* Photo inside hero-side-card */
    .photo-wrapper {
      width: 120px;
      height: 120px;
      border-radius: 999px;
      overflow: hidden;
      margin: 0 auto 0.6rem;
      border: 2px solid rgba(229, 231, 235, 0.9);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
      background: #111827;
    }

    .photo-wrapper img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .hero-side-name {
      text-align: center;
      font-size: 0.95rem;
      font-weight: 600;
      margin: 0.15rem 0 0.05rem;
    }

    .hero-side-role {
      text-align: center;
      font-size: 0.8rem;
      color: #9ca3af;
      margin: 0 0 0.4rem;
    }

    /* Cards & lists */

    .two-column {
      display: grid;
      grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
      gap: 1.5rem;
      align-items: stretch;
    }

    .two-column .card {
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .card {
      background: var(--bg-alt);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1.4rem;
      border: 1px solid var(--border);
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
    }

    .item-title {
      font-weight: 600;
    }

    .item-meta {
      font-size: 0.82rem;
      color: var(--muted);
    }

    .item-body {
      margin-top: 0.35rem;
      font-size: 0.9rem;
      color: var(--secondary);
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      border-radius: 999px;
      padding: 0.15rem 0.55rem;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 0.75rem;
      font-weight: 500;
      border: 1px solid rgba(37, 99, 235, 0.3);
    }

    .list-compact {
      list-style: none;
      margin: 0;
      padding: 0;
      font-size: 0.9rem;
    }

    .list-compact li + li {
      margin-top: 0.45rem;
      padding-top: 0.45rem;
      border-top: 1px dashed var(--border);
    }

    .subtle {
      color: var(--muted);
      font-size: 0.83rem;
    }

    /* News */

    .news-list {
      list-style: none;
      margin: 0;
      padding: 0;
      font-size: 0.9rem;
    }

    .news-item + .news-item {
      margin-top: 0.6rem;
      padding-top: 0.6rem;
      border-top: 1px dashed var(--border);
    }

    .news-date {
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: var(--muted);
      margin-bottom: 0.1rem;
    }

    /* Footer */

    footer {
      border-top: 1px solid var(--border);
      padding: 1.3rem 1.25rem 1.6rem;
      margin-top: 1rem;
      font-size: 0.8rem;
      color: var(--muted);
      text-align: center;
    }

    footer a {
      color: var(--accent);
    }

    .side-column {
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    .news-card {
      background: linear-gradient(135deg, #eef2ff, #ffffff);
      border-color: rgba(37, 99, 235, 0.18); /* tie to accent */
      box-shadow: 0 10px 30px rgba(37, 99, 235, 0.07);
    }

    .news-card .news-date {
      color: #6b7280; /* a bit stronger so it stays readable */
    }


    /* Responsive */

    @media (max-width: 900px) {
      .hero,
      .two-column {
        grid-template-columns: minmax(0, 1fr);
      }

      .hero-side-card {
        order: -1;
      }

      nav ul {
        display: none;
      }
    }

    @media (max-width: 640px) {
      .section {
        padding-inline: 1rem;
      }

      .hero-card {
        padding: 1.2rem 1.25rem;
      }

      .hero-name {
        font-size: 1.45rem;
      }
    }

    /* Security findings */

    .findings-lead {
      font-size: 0.92rem;
      color: var(--secondary);
      max-width: 62ch;
      margin: 0 0 1.1rem;
    }

    .findings-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.75rem;
      margin-bottom: 1.2rem;
    }

    .fstat {
      background: var(--bg-alt);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 0.85rem 0.9rem;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
    }

    .fstat-value {
      font-size: 1.45rem;
      font-weight: 700;
      color: var(--accent);
      line-height: 1.1;
    }

    .fstat-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
      margin-top: 0.2rem;
    }

    .findings-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.9rem;
    }

    .finding-card {
      background: var(--bg-alt);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 0.95rem 1.05rem;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    .finding-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.6rem;
    }

    .finding-project {
      font-weight: 650;
      font-size: 0.98rem;
    }

    .finding-title {
      font-size: 0.86rem;
      color: var(--secondary);
    }

    .finding-title code {
      font-size: 0.82rem;
      background: #f1f5f9;
      padding: 0.05rem 0.3rem;
      border-radius: 5px;
    }

    .finding-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.4rem;
      margin-top: 0.15rem;
    }

    .badge {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.03em;
      padding: 0.12rem 0.5rem;
      border-radius: 999px;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .badge-cwe {
      background: #eef2ff;
      color: #4f46e5;
      border-color: rgba(129, 140, 248, 0.35);
    }

    .badge-method {
      background: #f1f5f9;
      color: var(--secondary);
      border-color: var(--border);
    }

    .st-fixed {
      background: #dcfce7;
      color: #166534;
      border-color: rgba(22, 101, 52, 0.25);
    }

    .st-pr {
      background: #fef3c7;
      color: #92400e;
      border-color: rgba(146, 64, 14, 0.25);
    }

    .finding-card a {
      font-size: 0.82rem;
      font-weight: 500;
    }

    .findings-aggregate {
      margin-top: 1.1rem;
      background: linear-gradient(135deg, #eef2ff, #ffffff);
      border: 1px solid rgba(37, 99, 235, 0.18);
      border-radius: var(--radius-lg);
      padding: 1rem 1.2rem;
      box-shadow: 0 10px 30px rgba(37, 99, 235, 0.06);
      font-size: 0.9rem;
      color: var(--secondary);
    }

    .findings-note {
      margin-top: 0.7rem;
      font-size: 0.8rem;
      color: var(--muted);
    }

    @media (max-width: 760px) {
      .findings-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .findings-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* Demo video embed */

    .demo-embed {
      position: relative;
      width: 100%;
      padding-top: 56.25%;
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: #000000;
      border: 1px solid rgba(148, 163, 184, 0.35);
    }

    .demo-embed iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
    }

    .demo-label {
      font-size: 0.72rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: #9ca3af;
      margin-bottom: 0.4rem;
    }

/* ===== Multi-page additions ===== */
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumbs a { color: var(--secondary); }
.page-title { font-size: 2.1rem; line-height: 1.2; margin: 0.1rem 0 0.4rem; letter-spacing: -0.01em; }
.page-sub { font-size: 1.05rem; color: var(--secondary); margin: 0 0 0.9rem; }
.lede { font-size: 1.08rem; color: #1f2937; max-width: 68ch; margin: 0 0 0.8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.chip { font-size: 0.78rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--accent-soft); color: #1e40af; border: 1px solid rgba(37,99,235,0.25); }
.chip-warn { background: #fff7ed; color: #9a3412; border-color: rgba(234,88,12,0.3); }
.link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; }
.page-block { margin-top: 2.2rem; }
.page-block h2 { font-size: 1.25rem; margin: 0 0 0.6rem; letter-spacing: 0.01em; }
.prose p, .prose li { max-width: 72ch; }
.prose ul { padding-left: 1.2rem; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin: 1.2rem 0; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.9rem 1rem; box-shadow: var(--shadow-soft); }
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: var(--secondary); margin-top: 0.25rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: inherit; box-shadow: var(--shadow-soft); transition: transform 0.15s, border-color 0.15s; }
.project-card:hover { transform: translateY(-2px); border-color: rgba(37,99,235,0.5); text-decoration: none; }
.project-thumb { background: #fff; border-bottom: 1px solid var(--border); height: 170px; display: flex; align-items: center; justify-content: center; padding: 0.7rem; }
.project-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.project-thumb.noimg { background: linear-gradient(135deg, #eef3ff, #f8fafc); font-weight: 700; color: #1e3a8a; font-size: 1.3rem; }
.project-body { padding: 0.9rem 1rem 1rem; }
.project-name { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.project-venue { font-size: 0.78rem; color: var(--muted); margin: 0.1rem 0 0.4rem; }
.project-text { font-size: 0.9rem; color: var(--secondary); margin: 0; }
.figure { margin: 1.2rem 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.9rem; box-shadow: var(--shadow-soft); }
.figure img { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: 0.85rem; color: var(--secondary); margin-top: 0.6rem; }
.fig-narrow { max-width: 760px; }
.fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.fig-row .figure { margin: 0; }
.callout { border-left: 4px solid var(--accent); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 0.8rem 1rem; box-shadow: var(--shadow-soft); max-width: 72ch; }
.cite { font-size: 0.85rem; color: var(--secondary); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; max-width: 72ch; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.9rem 1.1rem; margin-bottom: 0.8rem; box-shadow: var(--shadow-soft); }
.pub-title { font-weight: 600; }
.pub-authors { font-size: 0.9rem; color: var(--secondary); margin: 0.15rem 0; }
.pub-venue { font-size: 0.9rem; font-style: italic; color: var(--secondary); }
.pub-links { margin-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; font-size: 0.85rem; }
.pub-note { font-size: 0.85rem; color: var(--secondary); margin-top: 0.3rem; }
.mentee { text-decoration: underline; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 500; margin: 0.8rem 0 0.2rem; }
.bullets-tight li + li { margin-top: 0.3rem; }
@media (max-width: 900px) {
  .nav-inner { flex-wrap: wrap; row-gap: 0.4rem; }
  nav { order: 3; width: 100%; }
  nav ul { display: flex !important; overflow-x: auto; white-space: nowrap; gap: 0.2rem; padding-bottom: 0.2rem; -webkit-overflow-scrolling: touch; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-title { font-size: 1.7rem; }
}
nav a.active { background: var(--accent-soft); color: var(--accent); }

.hero-now { margin: 1.1rem 0 0.9rem; padding: 0.85rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.hero-now-title { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted, #64748b); margin-bottom: 0.35rem; }
.hero-now ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.55; }
.hero-now li { margin: 0.15rem 0; }

@media (max-width: 640px) {
  header .btn-primary { display: none; }
}
