:root {
      --ink: #17202f;
      --muted: #5c6879;
      --line: #d8dee8;
      --paper: #f7f9fc;
      --surface: #ffffff;
      --teal: #087f8c;
      --cyan: #48d6c4;
      --green: #126b4e;
      --amber: #9b6508;
      --shadow: 0 18px 46px rgba(23, 32, 47, .10);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--ink);
      background: var(--paper);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
      line-height: 1.72;
    }
    a { color: var(--teal); text-decoration: none; }
    a:hover { text-decoration: underline; }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 20;
      border-bottom: 1px solid rgba(216, 222, 232, .92);
      background: rgba(247, 249, 252, .93);
      backdrop-filter: blur(12px);
    }
    .nav {
      width: min(1120px, calc(100% - 48px));
      min-height: 62px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }
    .brand { color: var(--ink); font-weight: 850; white-space: nowrap; }
    .nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
    .nav-links a { color: #334155; }
    .hero {
      min-height: 74vh;
      display: grid;
      align-items: center;
      color: #fff;
      background-image:
        linear-gradient(90deg, rgba(9, 16, 28, .94) 0%, rgba(9, 16, 28, .74) 43%, rgba(9, 16, 28, .20) 100%),
        url("hero-security-portfolio.png");
      background-size: cover;
      background-position: center right;
    }
    .inner {
      width: min(1120px, calc(100% - 48px));
      margin: 0 auto;
    }
    .hero-copy { max-width: 740px; padding: 74px 0 84px; }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 2px 10px;
      border: 1px solid rgba(255, 255, 255, .30);
      border-radius: 4px;
      color: #b8f2e6;
      background: rgba(255, 255, 255, .08);
      font-size: 13px;
      font-weight: 800;
    }
    h1, h2, h3 { margin: 0; line-height: 1.22; }
    h1 { margin-top: 18px; font-size: 56px; }
    .hero-subtitle {
      max-width: 680px;
      margin: 18px 0 0;
      color: rgba(255, 255, 255, .86);
      font-size: 18px;
    }
    .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 9px 14px;
      border: 1px solid rgba(255, 255, 255, .32);
      border-radius: 6px;
      color: #fff;
      background: rgba(255, 255, 255, .12);
      font-weight: 800;
    }
    .button.primary { border-color: var(--cyan); color: #062d33; background: var(--cyan); }
    .button:hover { text-decoration: none; filter: brightness(1.04); }
    .section { padding: 68px 0; }
    .section.alt { background: #eef2f6; }
    .section-title {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 28px;
      margin-bottom: 26px;
    }
    .section-title h2 { font-size: 30px; }
    .section-title p { max-width: 650px; margin: 0; color: var(--muted); }
    .metrics {
      position: relative;
      z-index: 3;
      margin-top: -34px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
    }
    .card, .metric, .link-card, .project {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }
    .metric { padding: 20px; }
    .metric strong { display: block; color: var(--ink); font-size: 30px; line-height: 1.1; }
    .metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
    .metric small { display: block; margin-top: 4px; color: #7b8797; font-size: 12px; line-height: 1.35; }
    .rank-link {
      display: inline-block;
      width: max-content;
      text-decoration: none;
      cursor: pointer;
    }
    .rank-link:hover,
    .rank-link:focus-visible {
      text-decoration: none;
    }
    .rank-link:focus-visible {
      outline: 2px solid rgba(8, 127, 140, .45);
      outline-offset: 7px;
      border-radius: 4px;
    }
    .rank-link:hover .live-rank {
      filter: drop-shadow(0 0 12px rgba(72, 214, 196, .32));
    }
    .live-rank {
      position: relative;
      width: max-content;
      min-width: 4.4ch;
      color: var(--teal);
      background: linear-gradient(90deg, #087f8c, #126b4e 45%, #0f766e);
      background-size: 180% 100%;
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum";
      letter-spacing: .02em;
      animation: rankGlow 3.2s ease-in-out infinite;
    }
    .live-rank::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -5px;
      height: 2px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(8, 127, 140, .10), rgba(72, 214, 196, .92), rgba(18, 107, 78, .10));
      transform-origin: left;
      animation: rankScan 1.7s ease-in-out infinite;
    }
    .live-rank.is-updating { animation-duration: 1.15s; }
    .rank-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .rank-status::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--cyan);
      box-shadow: 0 0 0 0 rgba(72, 214, 196, .58);
      animation: rankPulse 1.9s ease-out infinite;
    }
    .project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .card, .project { padding: 22px; }
    .link-card {
      min-height: 94px;
      padding: 18px;
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 18px;
    }
    .link-card strong { display: block; margin-bottom: 4px; color: var(--ink); }
    .link-card span { display: block; color: var(--muted); font-size: 14px; }
    .arrow { flex: 0 0 auto; color: var(--teal); font-weight: 850; }
    .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
    .tag {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      padding: 2px 9px;
      border: 1px solid var(--line);
      border-radius: 4px;
      color: #425064;
      background: #f7f9fc;
      font-size: 13px;
      font-weight: 700;
    }
    .label {
      display: inline-flex;
      min-height: 26px;
      align-items: center;
      padding: 2px 8px;
      border-radius: 4px;
      color: #fff;
      background: var(--teal);
      font-size: 12px;
      font-weight: 850;
    }
    .label.green { background: var(--green); }
    .label.amber { background: var(--amber); }
    .card h3, .project h3 { margin-top: 10px; font-size: 18px; }
    .card p, .project p { margin: 10px 0 0; color: var(--muted); }
    .vuln-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
    .id-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
    .id-link {
      display: block;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #f7f9fc;
      font-family: "Cascadia Mono", Consolas, monospace;
      font-size: 13px;
      overflow-wrap: anywhere;
    }
    ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
    li + li { margin-top: 8px; }
    .footer { padding: 34px 0; color: #cbd5e1; background: #152033; font-size: 14px; }
    .footer .inner { display: flex; justify-content: space-between; gap: 20px; }
    .footer a { color: #78e4d4; }
    @keyframes rankGlow {
      0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 0 rgba(72, 214, 196, 0)); }
      50% { background-position: 100% 50%; filter: drop-shadow(0 0 10px rgba(72, 214, 196, .20)); }
    }
    @keyframes rankScan {
      0%, 100% { transform: scaleX(.20); opacity: .40; }
      50% { transform: scaleX(1); opacity: .95; }
    }
    @keyframes rankPulse {
      0% { box-shadow: 0 0 0 0 rgba(72, 214, 196, .58); }
      72%, 100% { box-shadow: 0 0 0 7px rgba(72, 214, 196, 0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .live-rank,
      .live-rank::after,
      .rank-status::before,
      .hero::after {
        animation: none;
      }
    }
    @media (max-width: 920px) {
      .nav { min-height: auto; padding: 14px 0; align-items: start; flex-direction: column; gap: 10px; }
      .nav-links { flex-wrap: wrap; gap: 12px; }
      h1 { font-size: 42px; }
      .metrics, .project-grid, .link-grid, .vuln-layout { grid-template-columns: 1fr; }
      .section-title { align-items: start; flex-direction: column; }
      .id-grid { grid-template-columns: 1fr; }
      .footer .inner { flex-direction: column; }
    }
    @media (max-width: 560px) {
      body {
        overflow-x: hidden;
      }
      .inner, .nav { width: min(100% - 32px, 1120px); }
      .hero { min-height: 72vh; background-position: center; }
      .hero-copy { padding: 58px 0 68px; }
      h1 { font-size: 32px; }
      .hero-subtitle { font-size: 16px; }
      .section { padding: 48px 0; }
      .link-card { flex-direction: column; gap: 8px; }
    }

    :root {
      --ink: #111317;
      --muted: #5f6570;
      --line: #1f232b;
      --paper: #e7e9ed;
      --surface: #f7f7f2;
      --surface-hard: #ffffff;
      --dark: #080b10;
      --dark-2: #121720;
      --teal: #008ea3;
      --cyan: #00c2df;
      --green: #177261;
      --amber: #c7922c;
      --red: #e3322a;
      --shadow: 10px 10px 0 rgba(17, 19, 23, .12);
    }

    body {
      color: var(--ink);
      background-color: var(--paper);
      background-image:
        linear-gradient(rgba(17, 19, 23, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 19, 23, .045) 1px, transparent 1px),
        linear-gradient(135deg, rgba(227, 50, 42, .06), transparent 28%),
        linear-gradient(315deg, rgba(0, 194, 223, .055), transparent 34%);
      background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
      font-family: "Inter", "Barlow", "DIN Alternate", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
      letter-spacing: .005em;
    }

    a {
      color: var(--teal);
      text-underline-offset: 4px;
    }

    .topbar {
      border-bottom: 1px solid rgba(255, 255, 255, .10);
      background: rgba(8, 11, 16, .94);
      box-shadow: 0 1px 0 rgba(227, 50, 42, .46);
    }

    .nav {
      width: min(1220px, calc(100% - 48px));
      min-height: 66px;
    }

    .brand {
      position: relative;
      color: #f3f5f7;
      font-size: 14px;
      font-weight: 900;
      letter-spacing: .22em;
      text-transform: uppercase;
    }

    .brand::before {
      content: "";
      display: inline-block;
      width: 9px;
      height: 22px;
      margin-right: 12px;
      vertical-align: -5px;
      background: var(--red);
      clip-path: polygon(0 0, 100% 0, 100% 78%, 60% 100%, 0 100%);
    }

    .nav-links {
      gap: 8px;
      font-size: 12px;
      font-weight: 850;
      letter-spacing: .12em;
      text-transform: uppercase;
      min-width: 0;
    }

    .nav-links a {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      padding: 0 12px;
      color: #cfd5dd;
      border: 1px solid transparent;
    }

    .nav-links a:hover {
      color: #fff;
      text-decoration: none;
      border-color: rgba(255, 255, 255, .20);
      background: rgba(255, 255, 255, .07);
    }

    .hero {
      position: relative;
      min-height: 78vh;
      overflow: hidden;
      align-items: stretch;
      background:
        radial-gradient(circle at 76% 38%, rgba(0, 194, 223, .22), transparent 26%),
        linear-gradient(104deg, #07090d 0%, #0d1118 45%, rgba(13, 17, 24, .82) 67%, rgba(13, 17, 24, .48) 100%);
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        repeating-linear-gradient(115deg, transparent 0 28px, rgba(227, 50, 42, .14) 29px 31px, transparent 32px 72px);
      background-size: 56px 56px, 56px 56px, auto;
      mask-image: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .34));
    }

    .hero::after {
      display: none;
    }

    .hero-particle-canvas {
      position: absolute;
      top: 108px;
      right: max(5vw, 58px);
      width: min(36vw, 520px);
      aspect-ratio: 1;
      z-index: 1;
      border: 1px solid rgba(255, 255, 255, .20);
      background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, rgba(227, 50, 42, .22), transparent 58%),
        url("pixel_crab_transparent.png");
      background-size: 22px 22px, 22px 22px, 100% 100%, 76% 76%;
      background-position: center, center, center, center;
      background-repeat: repeat, repeat, no-repeat, no-repeat;
      image-rendering: pixelated;
      opacity: .92;
      clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
      box-shadow:
        -16px 16px 0 rgba(227, 50, 42, .18),
        18px -18px 0 rgba(0, 194, 223, .08);
      display: block;
      image-rendering: pixelated;
      pointer-events: none;
      touch-action: none;
    }

    .hero-particle-canvas.is-ready {
      background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, rgba(227, 50, 42, .22), transparent 58%);
      background-size: 22px 22px, 22px 22px, 100% 100%;
      background-position: center, center, center;
      background-repeat: repeat, repeat, no-repeat;
    }

    .inner,
    .nav {
      width: min(1220px, calc(100% - 48px));
    }

    .hero .inner {
      position: relative;
      z-index: 2;
      display: grid;
      align-items: center;
    }

    .hero-copy {
      max-width: 760px;
      padding: 96px 0 106px 28px;
      border-left: 6px solid var(--red);
    }

    .eyebrow {
      min-height: 30px;
      padding: 3px 11px;
      border: 1px solid rgba(255, 255, 255, .22);
      border-left: 4px solid var(--red);
      border-radius: 0;
      color: #f6f8fb;
      background: rgba(8, 11, 16, .72);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    h1,
    h2,
    h3 {
      font-weight: 950;
      letter-spacing: .02em;
    }

    h1 {
      max-width: 760px;
      margin-top: 24px;
      color: #f8fafc;
      font-size: clamp(56px, 8vw, 112px);
      line-height: .88;
      text-transform: uppercase;
      text-shadow: 14px 14px 0 rgba(0, 0, 0, .22);
    }

    .hero-subtitle {
      max-width: 700px;
      margin-top: 24px;
      color: rgba(239, 244, 250, .82);
      font-size: 17px;
      line-height: 1.72;
    }

    .actions {
      gap: 10px;
      margin-top: 34px;
    }

    .button {
      min-height: 44px;
      padding: 9px 16px;
      border: 1px solid rgba(255, 255, 255, .30);
      border-radius: 0;
      color: #f8fafc;
      background: rgba(255, 255, 255, .08);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
      clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    }

    .button.primary {
      border-color: var(--red);
      color: #fff;
      background: var(--red);
    }

    .button:hover {
      filter: none;
      transform: translateY(-1px);
      box-shadow: 5px 5px 0 rgba(0, 194, 223, .28);
    }

    .section {
      position: relative;
      padding: 88px 0;
      background: transparent;
    }

    .section.alt {
      background:
        linear-gradient(90deg, rgba(17, 19, 23, .035), transparent 34%),
        rgba(247, 247, 242, .74);
    }

    .section-title {
      align-items: flex-start;
      margin-bottom: 30px;
      padding-top: 18px;
      border-top: 4px solid var(--ink);
    }

    .section-title h2 {
      max-width: 470px;
      font-size: clamp(34px, 4.6vw, 58px);
      line-height: .92;
      text-transform: uppercase;
    }

    .section-title p {
      max-width: 610px;
      padding-left: 18px;
      border-left: 3px solid var(--red);
      color: #505660;
      line-height: 1.65;
    }

    .metrics {
      margin-top: -44px;
      gap: 12px;
    }

    .metric,
    .link-card,
    .project {
      position: relative;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 0;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .metric {
      min-height: 132px;
      padding: 22px 20px;
      color: #eef2f7;
      background:
        linear-gradient(135deg, rgba(227, 50, 42, .16), transparent 38%),
        linear-gradient(180deg, #151a23, #0d1016);
      border-color: rgba(255, 255, 255, .16);
      box-shadow: 8px 8px 0 rgba(227, 50, 42, .18);
    }

    .metric::before {
      content: "";
      position: absolute;
      top: 0;
      right: 0;
      width: 34px;
      height: 34px;
      background: var(--red);
      clip-path: polygon(100% 0, 0 0, 100% 100%);
    }

    .metric strong {
      color: #f8fafc;
      font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
      font-size: clamp(30px, 4vw, 42px);
      font-weight: 900;
      letter-spacing: -.02em;
    }

    .metric span {
      margin-top: 10px;
      color: #aeb7c4;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .10em;
      text-transform: uppercase;
    }

    .metric small {
      color: #8e99a8;
      font-family: "Cascadia Mono", Consolas, monospace;
      font-size: 11px;
    }

    .rank-link:focus-visible {
      outline-color: rgba(227, 50, 42, .72);
    }

    .live-rank {
      color: #f8fafc;
      background: transparent;
      text-shadow:
        2px 2px 0 rgba(227, 50, 42, .62),
        -1px -1px 0 rgba(255, 255, 255, .18),
        0 0 12px rgba(227, 50, 42, .26);
    }

    .live-rank::after {
      bottom: -7px;
      height: 3px;
      border-radius: 0;
      background: linear-gradient(90deg, rgba(227, 50, 42, .08), var(--red) 42%, rgba(248, 250, 252, .82) 58%, rgba(227, 50, 42, .18));
    }

    .rank-status::before {
      background: var(--red);
      box-shadow: 0 0 0 0 rgba(227, 50, 42, .58);
    }

    .link-grid {
      gap: 12px;
    }

    .link-card {
      min-height: 112px;
      padding: 18px 18px 18px 20px;
      background:
        linear-gradient(90deg, rgba(227, 50, 42, .10), transparent 28%),
        var(--surface-hard);
      clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
      transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    }

    .link-card::before,
    .project::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 5px;
      height: 100%;
      background: var(--red);
    }

    .link-card:hover {
      text-decoration: none;
      transform: translate(-2px, -2px);
      box-shadow: 14px 14px 0 rgba(17, 19, 23, .16);
      background: #fff;
    }

    .link-card strong,
    .project h3 {
      color: var(--ink);
      font-size: 15px;
      font-weight: 950;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .link-card span {
      color: #59606b;
      line-height: 1.45;
    }

    .arrow {
      min-width: 52px;
      color: var(--red);
      font-family: "Cascadia Mono", Consolas, monospace;
      font-size: 12px;
      letter-spacing: .12em;
      text-align: right;
      text-transform: uppercase;
    }

    .project-grid {
      gap: 12px;
    }

    .project {
      padding: 24px 24px 24px 26px;
      background:
        linear-gradient(135deg, rgba(17, 19, 23, .045), transparent 28%),
        var(--surface-hard);
    }

    .project h3 {
      margin-top: 8px;
      font-size: 18px;
    }

    .project p,
    .card p {
      color: #535a65;
    }

    .label,
    .tag {
      border-radius: 0;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .label {
      background: var(--ink);
    }

    .label.green {
      background: var(--green);
    }

    .tag {
      color: #1f2630;
      background: #eceff3;
      border-color: #b9bec7;
    }

    .vuln-layout {
      gap: 12px;
    }

    .id-grid {
      gap: 8px;
    }

    .id-link {
      border-color: #222831;
      border-radius: 0;
      color: #101216;
      background:
        linear-gradient(90deg, rgba(0, 194, 223, .14), transparent 34%),
        #f4f6f8;
      font-weight: 850;
    }

    .id-link:hover {
      text-decoration: none;
      color: #fff;
      background: #111317;
    }

    ul {
      color: #555d68;
    }

    .footer {
      border-top: 4px solid var(--red);
      color: #c7cdd6;
      background:
        linear-gradient(90deg, rgba(227, 50, 42, .12), transparent 28%),
        #080b10;
    }

    .footer a {
      color: #f0f4f8;
    }

    @media (max-width: 920px) {
      .nav {
        width: min(100% - 32px, 1220px);
      }

      .topbar {
        overflow-x: hidden;
      }

      .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
      }

      .nav-links a {
        flex: 0 0 auto;
        padding: 0 10px;
      }

      .hero-particle-canvas {
        top: auto;
        right: -44px;
        bottom: 28px;
        width: 58vw;
        height: auto;
        opacity: .32;
      }

      .hero-copy {
        padding-left: 20px;
      }

      .section-title p {
        padding-left: 14px;
      }
    }

    @media (max-width: 560px) {
      .inner,
      .nav {
        width: min(100% - 28px, 1220px);
      }

      .hero {
        min-height: 78vh;
      }

      .hero .inner {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
      }

      .hero-copy {
        max-width: calc(100vw - 48px);
        width: calc(100vw - 48px);
        min-width: 0;
        padding: 72px 0 78px 14px;
      }

      h1 {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 30px;
      }

      .hero-subtitle {
        max-width: 100%;
        width: 100%;
        font-size: 11px;
        line-height: 1.62;
        overflow-wrap: anywhere;
        word-break: break-word;
      }

      .hero-particle-canvas {
        right: -32px;
        bottom: 20px;
        width: 78vw;
        opacity: .24;
      }

      .eyebrow {
        max-width: 100%;
        display: block;
        width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
        line-height: 1.4;
        font-size: 9px;
      }

      .button {
        width: 100%;
      }

      .nav-links {
        gap: 4px;
        font-size: 11px;
        letter-spacing: .08em;
      }

      .nav-links a {
        padding: 0 9px;
      }

      .metric,
      .link-card,
      .project {
        box-shadow: 6px 6px 0 rgba(17, 19, 23, .12);
      }
    }

    /* Portfolio records and responsive project layout. */
    section[id], #links { scroll-margin-top: 108px; }
    .project { min-width: 0; }
    .project h3 a { color: inherit; }
    .project p, .project li, .advisory-id { overflow-wrap: anywhere; }
    .project-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
    .project-meta span:last-child { flex-shrink: 0; color: var(--ink); font-weight: 800; }
    .reference-records, .research-links { margin-top: 24px; }
    @media (min-width: 921px) {
      .selected-projects { grid-template-columns: repeat(6, minmax(0, 1fr)); }
      .selected-projects > article { grid-column: span 2; }
      .selected-projects > article:nth-child(-n+2) { grid-column: span 3; }
    }
    @media (max-width: 920px) { section[id], #links { scroll-margin-top: 172px; } }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Shared navigation across the portfolio and research pages. */
.nav-links { flex-wrap: nowrap; }
.nav-links a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--red);
  background: rgba(227, 50, 42, .1);
}
a:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

/* Research uses the same palette and components with a reading layout. */
.research-page { line-height: 1.85; }
.research-page .hero {
  display: block;
  min-height: 0;
  background: #0d1118;
}
.research-page .hero-copy {
  max-width: 1000px;
  margin: 46px 0;
  padding: 12px 0 16px 28px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: #b5bcc8;
  font-size: 12px;
  letter-spacing: .06em;
}
.breadcrumb a { color: #dce1e8; }
.research-page .eyebrow {
  min-height: 28px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
}
.research-page h1 {
  max-width: 980px;
  margin: 20px 0 0;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.35;
  letter-spacing: -.015em;
  text-transform: none;
  text-shadow: none;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.research-page .subtitle {
  max-width: 870px;
  margin: 20px 0 0;
  color: #bbc3cf;
  font-size: 16px;
  line-height: 1.9;
}
.research-page .actions { margin-top: 26px; }
.research-page .button { letter-spacing: .04em; }
.research-page .layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 48px 0 88px;
}
.research-page .toc {
  position: sticky;
  top: 88px;
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  color: #eef2f7;
  background: var(--dark-2);
  box-shadow: var(--shadow);
}
.toc summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
}
.toc summary::marker { color: var(--red); }
.toc-content { padding-top: 14px; }
.research-page .toc a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #c5cdd8;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.research-page .toc a:hover { color: #fff; }
.research-page .toc .small {
  margin: 18px 0 0;
  color: #9ba6b6;
  font-size: 12px;
  line-height: 1.85;
}
.research-page article {
  min-width: 0;
  padding: 36px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 0;
  background: var(--surface-hard);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.research-page .article-list { display: grid; min-width: 0; gap: 28px; }
.research-page article h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.5;
}
.research-page article h3 {
  margin: 28px 0 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.6;
  letter-spacing: 0;
}
.research-page article p {
  margin: 16px 0 0;
  color: #414853;
  line-height: 1.95;
}
.research-page article :is(ul, ol) {
  margin: 16px 0 0;
  padding-left: 24px;
  color: #414853;
  line-height: 1.9;
}
.research-page article li + li { margin-top: 8px; }
.research-page article section + section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #d5d9e0;
}
.research-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.research-page .tag {
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  line-height: 1.5;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.research-page blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--red);
  background: #f0f1f3;
  color: #343b46;
}
.research-page code, .research-page pre {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, Menlo, monospace;
}
.research-page code {
  padding: 2px 5px;
  border-radius: 0;
  color: #006c7c;
  background: #edf0f3;
  font-size: .9em;
}
.research-page pre {
  max-width: 100%;
  margin: 20px 0 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #242c39;
  border-radius: 0;
  color: #dce4ee;
  background: var(--dark-2);
  font-size: 13px;
  line-height: 1.75;
  tab-size: 4;
}
.research-page pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  overflow-wrap: normal;
}
.table-scroll {
  max-width: 100%;
  margin-top: 20px;
  overflow-x: auto;
}
.research-page table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.75;
}
.research-page :is(th, td) {
  padding: 12px 14px;
  border: 1px solid #c6ccd5;
  text-align: left;
  vertical-align: top;
}
.research-page th { color: #fff; background: #222833; }
.research-page tr:nth-child(even) td { background: #f4f5f7; }
.research-page .note {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #c6ccd5;
  border-left: 3px solid var(--teal);
  border-radius: 0;
  color: #505967;
  background: #f4f5f7;
  font-size: 14px;
}
.research-index .section { padding: 48px 0 88px; }
.research-index .grid { display: grid; gap: 20px; }
.research-index .card { border-top: 1px solid var(--line); border-left: 5px solid var(--red); }
.research-index .card h2 { max-width: 1000px; }
.research-index .card h2 a { color: var(--ink); }
.research-index .card p { max-width: 1000px; }
.research-index .tag-row { margin-top: 20px; }
.research-index .arrow {
  display: inline-block;
  margin-top: 24px;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: .02em;
}
.research-page [id] { scroll-margin-top: 110px; }
@media (max-width: 920px) {
  .research-page .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .research-page .toc { position: static; max-height: none; }
  .research-page .hero-copy { margin: 36px 0; }
  .research-page [id] { scroll-margin-top: 148px; }
}
@media (max-width: 560px) {
  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    padding: 0;
  }
  .nav-links a { justify-content: center; min-height: 36px; padding: 0 8px; }
  .research-page .inner { width: calc(100% - 28px); }
  .research-page .hero-copy { margin: 28px 0; padding: 12px 0 16px 16px; }
  .research-page h1 { font-size: clamp(23px, 6.7vw, 28px); line-height: 1.45; }
  .research-page .subtitle { font-size: 14px; }
  .research-page .eyebrow { font-size: 10px; }
  .research-page .layout, .research-index .section { padding-top: 28px; padding-bottom: 56px; }
  .research-page article { padding: 22px 18px; box-shadow: 6px 6px 0 rgba(17, 19, 23, .12); }
  .research-page article h2 { font-size: 22px; }
  .research-page article h3 { font-size: 18px; }
  .research-page pre { padding: 14px; font-size: 12px; }
  .research-page blockquote { padding: 14px; }
  .research-page .toc { padding: 16px; }
  .research-page .footer .inner { gap: 12px; }
}
