/* The light interface: type, buttons, cards, 3D logo chips, forms, motion
   and the About sheet. Everything is scoped under .ui-light (native CSS
   nesting), so the same sheet renders on the /about page (body.ui-light)
   and inside the 3D world without leaking into the world's own UI. */

@keyframes chip-float {
  0%, 100% { transform: rotateY(-28deg) rotateX(12deg) translateY(0); }
  50% { transform: rotateY(-10deg) rotateX(5deg) translateY(-7px); }
}

@keyframes box-wipe {
  0% { clip-path: inset(0 100% 0 0); }
  50% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}

@keyframes box-content {
  to { opacity: 1; }
}

/* ------------------------------------------------------------- cursor */
/* Shared by the light pages and the About sheet inside the world. */
.has-cursor,
.has-cursor * {
  cursor: none !important;
}

.cursor-jelly,
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 600;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  backdrop-filter: invert(100%);
  -webkit-backdrop-filter: invert(100%);
}

.cursor-jelly {
  width: 50px;
  height: 50px;
  border: 2px solid #000;
  border-radius: 25px;
  box-sizing: border-box;
}

.cursor-dot {
  z-index: 601;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ---------------------------------------------------------- reactions */
.reactions {
  position: fixed;
  z-index: 700;
  width: 0;
  height: 0;
  pointer-events: none;
  font-family: system-ui, -apple-system, 'Inter', sans-serif;
}

.reactions > * {
  position: absolute;
  opacity: 0;
  transition: opacity 0.15s;
}

.reactions.is-open > * {
  opacity: 1;
}

.reactions-ring {
  left: 0;
  top: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.reactions-center {
  left: -24px;
  top: -24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(23, 23, 23, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.35);
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.15s;
}

.reactions.is-open .reactions-center {
  transform: none;
}

.reactions-dot {
  border-radius: 50%;
}

.reactions-label {
  left: 0;
  top: 32px;
  transform: translateX(-50%);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.reactions-item {
  left: -28px;
  top: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #262626;
  box-shadow: 0 0 0 1px #404040, 0 10px 20px rgba(0, 0, 0, 0.3);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.2s, opacity 0.15s;
}

.reactions-item span {
  font-size: 24px;
  line-height: 1;
}

.reactions-item em {
  position: absolute;
  top: 64px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}

.reactions-item.is-active {
  background: var(--color);
  box-shadow: 0 0 0 1px var(--color), 0 10px 20px rgba(0, 0, 0, 0.3);
}

.reactions-item.is-active em {
  opacity: 1;
}

.reactions.is-open .reactions-item {
  transform: translate(var(--x), var(--y));
}

.reactions.is-open .reactions-item.is-active {
  transform: translate(var(--x), var(--y)) scale(1.2);
}

.reactions.is-disabled .reactions-item {
  opacity: 0.4;
  filter: grayscale(1);
}

.reactions-hint {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 650;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.84);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 24px rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.78);
  font-family: system-ui, -apple-system, 'Inter', sans-serif;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.4s, transform 0.4s;
}

.reactions-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reactions-wave {
  position: fixed;
  z-index: 690;
  width: 0;
  height: 0;
  pointer-events: none;
}

.reactions-wave i {
  --size: calc(300px * var(--s));
  position: absolute;
  left: 0;
  top: 0;
  border: 3px solid var(--color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: reaction-wave 1.4s ease-out forwards;
}

.reactions-wave i:nth-child(2) {
  --size: calc(200px * var(--s));
  border-width: 2px;
  animation-duration: 1.1s;
  animation-delay: 0.1s;
}

.reactions-wave i:nth-child(3) {
  --size: calc(120px * var(--s));
  border-width: 1px;
  animation-duration: 0.8s;
  animation-delay: 0.2s;
}

.reactions-wave b {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  animation: reaction-flash 1.2s ease-out forwards;
}

.is-shaking {
  animation: reaction-shake 0.36s linear;
}

@keyframes reaction-wave {
  from { width: 0; height: 0; opacity: 1; }
  to { width: var(--size); height: var(--size); opacity: 0; }
}

@keyframes reaction-flash {
  from { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  to { transform: translate(-50%, -50%) scale(var(--flash)); opacity: 0; }
}

@keyframes reaction-shake {
  0% { transform: translate(calc(1.2px * var(--shake)), calc(-0.75px * var(--shake))); }
  33% { transform: translate(calc(-0.9px * var(--shake)), calc(0.6px * var(--shake))); }
  66% { transform: translate(calc(0.45px * var(--shake)), calc(-0.3px * var(--shake))); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .is-shaking {
    animation: none;
  }
}

.ui-light {
  /* ---------------------------------------------------------------- type */
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.55;

  h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1.08;
  }

  h1 {
    font-size: clamp(42px, 7vw, 96px);
    letter-spacing: -0.045em;
    line-height: 0.98;
    color: #1e293b;
  }

  h2 {
    font-size: clamp(34px, 6vw, 72px);
    letter-spacing: -0.035em;
    line-height: 1.05;
  }

  h3 {
    font-size: 21px;
    letter-spacing: -0.025em;
    line-height: 1.2;
  }

  h4 {
    font-size: 17px;
    letter-spacing: -0.02em;
  }

  p {
    margin: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  button {
    font: inherit;
    color: inherit;
  }

  img {
    max-width: 100%;
    display: block;
  }

  ::selection {
    background: var(--ink);
    color: #fff;
  }

  .lede {
    font-size: 20px;
    color: var(--muted);
    max-width: 60ch;
  }

  .mono-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .mono-note {
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
  }

  .muted {
    color: var(--muted);
  }

  .name-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    font-size: 15px;
    color: var(--muted);
  }

  .name-variants [lang='bn'] { font-family: var(--font-bengali); }
  .name-variants [lang='sa'] { font-family: var(--font-devanagari); }

  .text-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: rgba(100, 116, 139, 0.45);
    text-underline-offset: 4px;
    cursor: pointer;
    transition: text-decoration-color 0.2s;
  }

  .text-link:hover {
    text-decoration-color: var(--ink);
  }

  .text-link:hover .arrow,
  .card:hover .arrow {
    opacity: 1;
    transform: none;
  }

  .arrow {
    flex: none;
    margin-left: 3px;
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity 0.2s, transform 0.25s var(--ease);
  }

  .slash {
    margin: 0 9px;
    opacity: 0.4;
  }

  .section-header {
    margin-bottom: 56px;
    text-align: center;
  }

  .section-header h2 {
    padding: 2px 6px 6px;
  }

  .section-header p {
    margin-top: 14px;
    font-size: 17px;
    color: var(--muted);
  }

  @media (max-width: 760px) {
    .section-header {
      margin-bottom: 36px;
    }

    .lede {
      font-size: 17px;
    }
  }

  /* -------------------------------------------------------------- motion */
  /* Entrances only run once JS marks the container `is-animated`, so
     content is never hidden for crawlers or without JS. */
  .is-animated .blur-in {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(8px);
    transition: opacity 0.9s ease, filter 0.9s ease, transform 0.9s var(--ease);
    transition-delay: calc(0.12s + var(--d, 0) * 0.13s);
  }

  .is-animated .blur-in.is-in {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .is-animated .fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.6s var(--ease), border-color 0.3s, box-shadow 0.3s;
    transition-delay: calc(var(--i, 0) * 0.07s);
  }

  .is-animated .fade-up.is-in {
    opacity: 1;
    transform: none;
  }

  .box-reveal {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
  }

  .is-animated .box-reveal > * {
    opacity: 0;
  }

  .is-animated .box-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: var(--ink);
    clip-path: inset(0 100% 0 0);
    pointer-events: none;
  }

  .is-animated .box-reveal.is-in > * {
    animation: box-content 0.01s linear forwards;
    animation-delay: calc(0.3s + var(--d, 0) * 0.13s);
  }

  .is-animated .box-reveal.is-in::after {
    animation: box-wipe 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    animation-delay: calc(var(--d, 0) * 0.13s);
  }

  .is-animated .swing-in {
    opacity: 0;
    transform: perspective(700px) translateZ(-160px) rotateY(-70deg) rotateX(18deg) scale(0.6);
    transition: opacity 0.5s ease, transform 1.1s var(--ease-spring);
    transition-delay: calc(0.15s + var(--d, 0) * 0.12s);
  }

  .is-animated .swing-in.is-in {
    opacity: 1;
    transform: perspective(700px);
  }

  @media (prefers-reduced-motion: reduce) {
    .is-animated .blur-in,
    .is-animated .fade-up,
    .is-animated .swing-in {
      opacity: 1;
      filter: none;
      transform: none;
      transition: none;
    }

    .is-animated .box-reveal > * {
      opacity: 1;
    }

    .is-animated .box-reveal::after {
      display: none;
    }
  }

  /* -------------------------------------------------------------- buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
  }

  .btn:hover {
    background: var(--sunken);
  }

  .btn:active {
    transform: scale(0.97);
  }

  .btn.is-solid {
    border-color: var(--ink);
    background: var(--ink);
    color: #f8fafc;
  }

  .btn.is-solid:hover {
    background: #1e293b;
  }

  .btn.is-small {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn svg {
    flex: none;
  }

  .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.2s, transform 0.3s var(--ease);
  }

  .icon-button:hover {
    background: var(--sunken);
    transform: translateY(-2px);
  }

  /* ----------------------------------------------------------------- card */
  .card {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: inherit;
    text-align: left;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
  }

  .card:hover {
    border-color: rgba(15, 23, 42, 0.3);
    box-shadow: var(--shadow-hover);
  }

  .card.is-lift:hover {
    transform: translateY(-4px);
  }

  .card-pad {
    padding: 28px 32px;
  }

  @media (max-width: 760px) {
    .card-pad {
      padding: 22px 20px;
    }
  }

  /* ---------------------------------------------------------------- badge */
  .badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--sunken);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ink-soft);
  }

  .badge.is-current {
    background: var(--ink);
    color: #f8fafc;
  }

  .pill-tag {
    padding: 4px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
  }

  .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ------------------------------------------------------------ logo chips */
  /* A logo on a small 3D slab: seven slices give it thickness, the face
     carries the image, a sheen follows the pointer (profile.js). */
  .chip {
    --size: 64px;
    --depth: 14px;
    position: relative;
    display: block;
    flex: none;
    width: var(--size);
    height: var(--size);
    perspective: calc(var(--size) * 4);
  }

  .chip.is-large {
    --size: 92px;
    --depth: 18px;
  }

  .chip.is-hero {
    --size: 128px;
    --depth: 26px;
  }

  .chip.is-small {
    --size: 44px;
    --depth: 10px;
  }

  .chip-shadow {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -9%;
    height: 18%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0) 70%);
  }

  .chip-float,
  .chip-tilt {
    position: absolute;
    inset: 0;
    display: block;
    transform-style: preserve-3d;
  }

  .chip-float {
    transform: rotateY(-22deg) rotateX(9deg);
    animation: chip-float calc(8s + var(--n, 0) * 0.6s) ease-in-out infinite;
    animation-delay: calc(var(--n, 0) * -1.3s);
    animation-play-state: paused;
  }

  .chip.is-floating .chip-float {
    animation-play-state: running;
  }

  .chip-tilt {
    transform: rotateX(calc(var(--py, 0) * -44deg)) rotateY(calc(var(--px, 0) * 56deg));
    transition: transform 0.45s var(--ease);
  }

  .chip-slice,
  .chip-face {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: 23%;
  }

  .chip-slice {
    transform: translateZ(calc((var(--t) - 0.5) * var(--depth)));
  }

  .chip-face {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--chip-bg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(15, 23, 42, 0.07);
    transform: translateZ(calc(var(--depth) * 0.5));
  }

  .chip-face img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12%;
    object-fit: contain;
    user-select: none;
  }

  .chip-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
  }

  .chip-text {
    font-family: var(--font-display);
    font-size: calc(var(--size) * 0.2);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
  }

  .chip-sheen {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -50%;
    width: 50%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(calc(50% - var(--px, 0) * 160%)) skewX(12deg);
    transition: transform 0.45s var(--ease);
    pointer-events: none;
  }



  @media (prefers-reduced-motion: reduce) {
    .chip-float {
      animation: none;
    }
  }

  /* ----------------------------------------------------------------- forms */
  .field {
    margin-bottom: 20px;
  }

  .field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
  }

  .input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  textarea.input {
    height: auto;
    min-height: 150px;
    padding: 12px 14px;
    resize: vertical;
  }

  .input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
  }

  .input::placeholder {
    color: var(--faint);
  }

  /* ------------------------------------------------------------- filters */
  .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-pill {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }

  .filter-pill:hover {
    color: var(--ink);
  }

  .filter-pill.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
  }

  /* ------------------------------------------------------------- lists */
  .rows {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .rows > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 32px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
  }

  .rows > li:last-child {
    border-bottom: 0;
  }

  .rows-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
  }

  .rows-meta {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-soft);
  }

  .rows-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
  }

  @media (max-width: 560px) {
    .rows > li {
      grid-template-columns: 1fr;
    }
  }

  /* Metrics strip (role cards, awards). */
  .metrics {
    display: flex;
    flex-wrap: wrap;
    margin: 22px 0 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .metrics div {
    flex: 1 1 0;
    min-width: 130px;
    padding: 14px 18px 14px 0;
  }

  .metrics div + div {
    padding-left: 18px;
    border-left: 1px solid var(--border);
  }

  .metrics dt {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--ink);
  }

  .metrics dd {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--muted);
  }

  @media (max-width: 760px) {
    .metrics div {
      flex: 1 1 100%;
      padding: 11px 0;
    }

    .metrics div + div {
      padding-left: 0;
      border-left: 0;
      border-top: 1px solid var(--border);
    }
  }

  .points {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
  }

  .points li {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink-soft);
  }

  .points li::before {
    content: '';
    position: absolute;
    top: 0.68em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border-strong);
  }

  /* ---------------------------------------------------------- big email */
  .contact-block {
    text-align: center;
  }

  .contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(19px, 3.6vw, 44px);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: rgba(100, 116, 139, 0.35);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
    transition: text-decoration-color 0.25s;
  }

  .contact-email:hover {
    text-decoration-color: var(--ink);
  }

  .contact-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
  }


  /* The About sheet: hero, experience, research, projects, education, outside
     work, contact. Used twice: inside the world as the "profile" modal, and
     as the /about page. Ported from the reference sheet, section for section. */

  .about-section {
    padding-top: 120px;
  }

  @media (max-width: 760px) {
    .about-section {
      padding-top: 84px;
    }
  }

  /* ------------------------------------------------------------------ hero */
  .about-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 40px;
    min-height: calc(100vh - var(--nav-height));
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .sheet .about-hero {
    min-height: 100vh;
    padding-top: 90px;
  }

  @media (max-width: 980px) {
    .about-hero {
      grid-template-columns: 1fr;
      min-height: 0;
      padding-top: 60px;
    }

    .sheet .about-hero {
      padding-top: 110px;
    }
  }

  .hero-hi,
  .hero-line {
    font-size: 20px;
    color: var(--muted);
  }

  .hero-copy h1 {
    margin: 6px 0 14px -5px;
    font-size: clamp(52px, 7.4vw, 112px);
  }

  @media (max-width: 760px) {
    .hero-hi,
    .hero-line {
      font-size: 17px;
    }
  }

  .credentials {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 26px 0 0;
    padding: 0 0 0 16px;
    border-left: 1px solid var(--border-strong);
    list-style: none;
    font-size: 16px;
    color: var(--muted);
  }

  .credential-label {
    color: var(--ink-soft);
  }

  .credential-detail {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
  }

  a.credential-detail {
    text-decoration: underline;
    text-decoration-color: rgba(100, 116, 139, 0.45);
    text-underline-offset: 4px;
    transition: color 0.2s, text-decoration-color 0.2s;
  }

  a.credential-detail:hover {
    color: var(--ink);
    text-decoration-color: var(--ink);
  }

  @media (max-width: 760px) {
    .credentials {
      font-size: 14px;
    }

    .credential-detail {
      font-size: 12px;
    }
  }

  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
  }

  .hero-socials {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .hero-chips {
    display: grid;
    grid-template-columns: repeat(2, 128px);
    justify-content: center;
    gap: 54px 62px;
  }

  .hero-chips .hero-chip:nth-child(odd) { margin-top: 46px; }
  .hero-chips .hero-chip:nth-child(even) { margin-top: -18px; }

  @media (max-width: 980px) {
    .hero-chips {
      display: none;
    }
  }

  /* ------------------------------------------------------------ experience */
  .timeline {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 940px;
    margin: 0 auto;
  }

  .role {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 26px;
    padding: 30px 32px;
  }

  .role h3 {
    font-size: 21px;
  }

  .role-logo {
    padding-top: 2px;
  }

  .role-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .role-company {
    margin-top: 6px;
    font-size: 16px;
    color: var(--ink-soft);
  }

  .role-company a {
    display: inline-flex;
    align-items: center;
  }

  .role-company a:hover {
    color: var(--ink);
  }

  .role-company a:hover .arrow {
    opacity: 1;
    transform: none;
  }

  .role-more {
    display: none;
    align-items: center;
    height: 34px;
    margin-top: 14px;
    padding: 0 14px;
    border: 0;
    border-radius: 17px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }

  @media (max-width: 760px) {
    .role {
      grid-template-columns: 1fr;
      gap: 18px;
      padding: 22px 20px;
    }

    .role h3 {
      font-size: 18px;
    }

    .role-top {
      flex-direction: column;
      gap: 12px;
    }
  }

  @media (max-width: 640px) {
    .role.is-older .role-more {
      display: inline-flex;
    }

    .role.is-older:not(.is-open) .metrics,
    .role.is-older:not(.is-open) .points {
      display: none;
    }
  }

  /* -------------------------------------------------------------- research */
  .papers {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 940px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
  }

  .paper {
    padding: 28px 32px;
  }

  .paper h3 {
    margin-top: 14px;
    font-size: 19px;
    line-height: 1.32;
  }

  .paper-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
    color: var(--muted);
  }

  .paper-year {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 12px;
  }

  .paper-authors {
    margin-top: 9px;
    font-size: 14px;
    color: var(--muted);
  }

  .paper-authors strong {
    font-weight: 600;
    color: var(--ink);
  }

  .paper-abstract {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink-soft);
  }

  .paper-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 16px;
  }

  .paper .project-strip {
    margin-bottom: 20px;
  }

  @media (min-width: 901px) {
    .paper.has-strip {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 380px;
      column-gap: 36px;
    }

    .paper.has-strip > * {
      grid-column: 1;
    }

    .paper.has-strip .project-strip {
      grid-column: 2;
      grid-row: 1 / span 6;
      align-self: center;
      margin-bottom: 0;
    }
  }

  @media (max-width: 760px) {
    .paper {
      padding: 22px 20px;
    }

    .paper h3 {
      font-size: 16px;
    }
  }

  /* Interests, under the papers */
  .interests {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 940px;
    margin: 18px auto 0;
  }

  .interest {
    padding: 22px 24px;
  }

  .interest h3 {
    font-size: 17px;
  }

  .interest p {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink-soft);
  }

  .interest .tag-row {
    margin-top: 14px;
  }

  @media (max-width: 900px) {
    .interests {
      grid-template-columns: 1fr;
    }
  }

  /* -------------------------------------------------------------- projects */
  .featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  @media (max-width: 900px) {
    .featured {
      grid-template-columns: 1fr;
    }
  }

  .project-strip {
    display: block;
    width: 100%;
    aspect-ratio: 1496 / 482;
    border-radius: 16px;
    background: #fbfbfd;
    box-shadow: 0 0 0 1px var(--border);
    object-fit: cover;
  }

  .project-strip.is-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--strip-bg, #0f172a);
    overflow: hidden;
  }

  .project-strip.is-mark .chip {
    --size: 76px;
  }

  .project-strip.is-mark .strip-word {
    position: absolute;
    right: 6%;
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 54px);
    font-weight: 700;
    letter-spacing: -0.05em;
    color: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    pointer-events: none;
  }

  .featured-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 18px 18px 30px;
    cursor: pointer;
  }

  .featured-body {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 0 16px;
  }

  .featured-body h3 {
    margin-top: 14px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.04em;
  }

  .featured-main {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .featured-tagline {
    max-width: 34ch;
    margin-top: 14px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink-soft);
  }

  .featured-meta {
    margin-top: auto;
    padding-top: 26px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
  }

  .meta-strong {
    font-weight: 600;
    color: var(--ink);
  }

  .project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
  }

  .project-grid.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  @media (max-width: 900px) {
    .project-grid.is-three {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 640px) {
    .project-grid,
    .project-grid.is-three {
      grid-template-columns: 1fr;
    }
  }

  .project {
    display: flex;
    flex-direction: column;
    padding: 16px 16px 24px;
    cursor: pointer;
  }

  .project .project-top,
  .project .project-main,
  .project .project-foot {
    padding-left: 10px;
    padding-right: 10px;
  }

  .project .project-top {
    margin-top: 20px;
  }

  .project h3 {
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: -0.035em;
  }

  .project-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
  }

  .project-top span:last-child {
    flex: none;
    white-space: nowrap;
  }

  .project-main {
    margin-top: 14px;
  }

  .project-tagline {
    margin-top: 10px;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink-soft);
  }

  .project-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 22px;
  }

  .project-foot > div {
    flex: 1;
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .project-proof {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
  }

  .project-role {
    display: flex;
    align-items: center;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
  }

  /* ---------------------------------------------------------- education */
  .edu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 940px;
    margin: 0 auto;
  }

  .edu {
    display: flex;
    gap: 18px;
    padding: 22px 24px;
  }

  .edu img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--sunken);
  }

  .edu h3 {
    font-size: 17px;
  }

  .edu p {
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
  }

  @media (max-width: 760px) {
    .edu-list {
      grid-template-columns: 1fr;
    }
  }

  /* ---------------------------------------------------------- galleries */
  .galleries {
    display: grid;
    gap: 48px;
    max-width: 940px;
    margin: 0 auto;
  }

  .gallery-group h3 {
    font-size: 19px;
  }

  .gallery-group > p {
    margin-top: 8px;
    max-width: 62ch;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink-soft);
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
  }

  .gallery button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: var(--tile-bg, var(--sunken));
    box-shadow: 0 0 0 1px var(--border);
    cursor: zoom-in;
  }

  .gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
  }

  .gallery button:hover img {
    transform: scale(1.04);
  }

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

  /* -------------------------------------------------------------- contact */
  .about-contact .contact-block {
    padding-top: 20px;
  }


  /* --------------------------------------------------- additions to the sheet */
  /* The 3D skills keyboard (static/js/keyboard.js); the logo chips stand in
     where it cannot run (phones, reduced motion, no WebGL). */
  .hero-keyboard {
    display: none;
    position: relative;
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-height: 560px;
  }

  .hero-keyboard canvas {
    position: absolute;
    top: 0;
    left: -18%;
    width: 136% !important;
    height: 100% !important;
    outline: none;
    cursor: grab;
  }

  .about-hero.has-keyboard .hero-keyboard {
    display: block;
  }

  .about-hero.has-keyboard .hero-chips {
    display: none;
  }

  .keyboard-caption {
    position: absolute;
    left: 50%;
    bottom: 4%;
    z-index: 2;
    width: min(380px, 90%);
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.25s, transform 0.3s var(--ease);
    pointer-events: none;
  }

  .keyboard-caption.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .keyboard-caption b {
    display: block;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
  }

  .keyboard-caption span {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--muted);
  }

  .stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }

  .stat-strip div {
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 9%, #fff);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 24%, #e2e8f0);
  }

  .stat-strip b {
    display: block;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: color-mix(in srgb, var(--accent) 62%, #0f172a);
  }

  .stat-strip span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--muted);
  }

  @media (min-width: 901px) {
    .paper.has-strip .stat-strip {
      grid-column: 2;
      grid-row: 1 / span 6;
      align-self: center;
      grid-template-columns: 1fr;
      margin-bottom: 0;
    }
  }

  .venue-status {
    font-size: 13px;
    color: var(--muted);
  }

  .leadership {
    max-width: 940px;
    margin: 28px auto 0;
  }

  .featured-tagline,
  .featured-meta,
  .project-main,
  .project-tagline,
  .project-proof {
    display: block;
  }

  .featured-card,
  .project {
    font: inherit;
  }

  .featured-card h3,
  .project h3 {
    text-align: left;
  }

  .soft {
    color: var(--ink-soft);
    font-weight: 400;
  }
}
