:root {
  --bg: #fbfaf7;
  --panel: rgba(255, 255, 255, 0.55);
  --ink: #111;
  --muted: #535353;
  --soft: #8d8d8d;
  --line: #e7e2db;
  --pill: #f3f2ef;
  --shadow: 0 16px 50px rgba(26, 24, 21, 0.06);
  --content-rhythm: 18px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 18%, rgba(239, 233, 222, 0.45), transparent 22%),
    radial-gradient(circle at 81% 16%, rgba(240, 238, 231, 0.4), transparent 23%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 24px 46px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  line-height: 1;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #494949;
  font-size: 15px;
  letter-spacing: 0;
}

.top-nav a {
  transition: color 160ms ease;
}

.top-nav a:hover {
  color: #000;
}

.site-shell {
  width: min(100%, 1440px);
  margin: 26px auto 0;
  padding: 0 46px 18px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--shadow);
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
}

.profile-intro {
  text-align: center;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 22px;
  background: #eee9df;
}

.profile-card h2 {
  margin: 0;
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 520;
  letter-spacing: 0;
}

.tagline {
  margin: 13px 0 0;
  color: #484848;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.rule {
  width: 28px;
  height: 1px;
  background: #dedbd4;
  margin: 34px auto 0;
}

.rule.lower {
  margin-top: 34px;
}

.bio {
  margin: 28px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.68;
}

.social-links svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-links {
  margin-top: 22px;
  padding-top: 0;
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #1c1c1c;
  transition: transform 160ms ease, color 160ms ease;
}

.social-links a:hover {
  color: #000;
  transform: translateY(-2px);
}

.content {
  min-width: 0;
  max-width: 1040px;
}

.hero-copy {
  max-width: 720px;
  padding-top: 4px;
}

.hero-copy h1 {
  margin: 0;
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 2.75vw, 48px);
  line-height: 1.02;
  font-weight: 560;
  letter-spacing: 0;
  text-wrap: balance;
}

.research-blog {
  max-width: 910px;
  margin: var(--content-rhythm) 0;
  border-block: 1px solid var(--line);
}

.research-blog > h2 {
  margin: 0;
  padding: 12px 0 10px;
  color: #6d6a65;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.research-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.research-link {
  display: block;
  padding: 14px 18px 14px 0;
  color: inherit;
  transition: color 160ms ease, background 160ms ease;
}

.research-link + .research-link {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.research-link:hover {
  color: #000;
  background: rgba(255, 255, 255, 0.24);
}

.research-link h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0;
}

.research-link p {
  margin: 6px 0 0;
  color: #555;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: 0;
}

.filter-bar {
  margin: 0 0 var(--content-rhythm);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill {
  border: 1px solid #e0ddd7;
  background: rgba(255, 255, 255, 0.68);
  color: #424242;
  border-radius: 999px;
  min-width: 78px;
  height: 32px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 170ms ease, color 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.filter-pill:hover {
  border-color: #cfcac2;
  transform: translateY(-1px);
}

.filter-pill.is-active {
  background: #050505;
  border-color: #050505;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  margin: 0;
  gap: 11px 12px;
}

.project-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(25, 22, 18, 0.025);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #d7d1c7;
  box-shadow: 0 14px 34px rgba(25, 22, 18, 0.055);
}

.project-card.is-hidden {
  display: none;
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  min-height: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}

.screenshot-thumb {
  display: block;
  background: #f4f1ec;
}

.screenshot-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-card h3 {
  margin: 10px 2px 3px;
  font-size: 16px;
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.project-card p {
  margin: 0 2px;
  color: #444;
  font-size: 13.5px;
  line-height: 1.2;
  letter-spacing: 0;
}

.tags {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.tags li {
  border-radius: 999px;
  background: var(--pill);
  color: #555;
  min-height: 19px;
  padding: 3px 9px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.site-footer {
  color: #9a9a9a;
  font-size: 12px;
  text-align: center;
  margin-top: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nanochat {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(235, 216, 190, 0.3)),
    #f2dfc5;
}

.nano-window {
  position: absolute;
  left: 13%;
  top: 9%;
  width: 74%;
  height: 82%;
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 20px 35px rgba(73, 55, 35, 0.28);
  border: 1px solid rgba(143, 121, 95, 0.2);
  overflow: hidden;
}

.window-bar {
  height: 23px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: #252525;
  font-size: 10px;
  border-bottom: 1px solid rgba(80, 70, 55, 0.12);
}

.window-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6257;
}

.window-bar span:nth-child(2) {
  background: #ffbd2e;
}

.window-bar span:nth-child(3) {
  background: #28c840;
}

.window-bar strong {
  font-weight: 500;
  margin-left: 6px;
}

.window-bar i {
  margin-left: auto;
  width: 14px;
  height: 14px;
  border: 1px solid #9a9a9a;
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
  line-height: 11px;
  text-align: center;
}

.nano-body {
  padding: 12px 10px;
  color: #222;
  font-size: 11px;
}

.nano-body p {
  margin: 0;
  color: #222;
  font-size: 11px;
  line-height: 1.25;
}

.nano-input {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 30px;
  border: 1px solid #dedbd4;
  border-radius: 5px;
  background: #fff;
  color: #9a9a9a;
  padding: 8px 8px;
  font-size: 10px;
}

.nano-input b {
  float: right;
  color: #8b8b8b;
  font-weight: 500;
}

.tabpilot {
  background:
    radial-gradient(circle at 38% 15%, rgba(255, 255, 255, 0.72), transparent 23%),
    linear-gradient(135deg, #d7c2f2, #c9c6e9 52%, #d9cdeb);
}

.menu-bar {
  position: absolute;
  left: 38%;
  top: 0;
  right: 4%;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #252525;
  font-size: 9px;
}

.menu-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
}

.menu-bar .active-pill {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: #5267ff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.menu-bar b {
  margin-left: auto;
  font-weight: 500;
}

.tab-menu {
  position: absolute;
  left: 24%;
  top: 19%;
  width: 50%;
  padding: 9px 11px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 32px rgba(45, 37, 68, 0.27);
  color: #333;
  font-size: 11px;
}

.tab-menu strong {
  display: block;
  color: #111;
  font-size: 12px;
  margin-bottom: 6px;
}

.tab-menu p {
  margin: 0;
  padding: 5px 0;
  font-size: 10.5px;
  color: #3d3d3d;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.tab-menu p:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.safari {
  background: linear-gradient(135deg, #eef2f4, #e7eaec 55%, #d7d8d8);
}

.browser-window {
  position: absolute;
  left: 7%;
  top: 8%;
  width: 86%;
  height: 88%;
  border-radius: 10px 10px 0 0;
  background: #fff;
  box-shadow: 0 18px 28px rgba(63, 72, 78, 0.24);
  overflow: hidden;
}

.browser-bar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: #f3f3f3;
  border-bottom: 1px solid #d6d6d6;
}

.browser-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8c0c4;
}

.browser-bar b {
  margin-left: 26px;
  width: 58px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid #d7d7d7;
  text-align: center;
  color: #333;
  font-size: 8px;
  line-height: 14px;
  font-weight: 500;
}

.browser-page {
  padding: 17px 23px;
}

.browser-page h4 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.25;
  color: #1e1e1e;
}

.browser-page p {
  margin: 0;
  max-width: 160px;
  color: #434343;
  font-size: 12px;
  line-height: 1.33;
}

.sunshift {
  background:
    radial-gradient(circle at 95% 88%, rgba(255, 190, 103, 0.7), transparent 36%),
    linear-gradient(150deg, #ffe8cf 0%, #ffc68b 48%, #ff873d 100%);
}

.sunshift::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, transparent 46%, rgba(255, 255, 255, 0.15) 46.4%, transparent 47%);
}

.sun-status {
  position: absolute;
  right: 8%;
  top: 5%;
  color: #282828;
  font-size: 9px;
}

.sun-menu {
  position: absolute;
  right: 8%;
  top: 31%;
  width: 54%;
  padding: 8px 11px 10px;
  border-radius: 7px;
  background: rgba(255, 245, 232, 0.86);
  box-shadow: 0 16px 30px rgba(118, 62, 20, 0.25);
  color: #454545;
}

.sun-menu strong {
  font-size: 11px;
}

.sun-menu p {
  margin: 4px 0 10px;
  color: #4d4d4d;
  font-size: 10px;
  line-height: 1.3;
}

.slider {
  height: 4px;
  border-radius: 999px;
  background: #d5bda6;
}

.slider span {
  display: block;
  width: 47%;
  height: 100%;
  border-radius: inherit;
  background: #ff782f;
  position: relative;
}

.slider span::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
}

.sun-symbol {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #ff7a29;
  border-radius: 50%;
}

.sun-symbol::before,
.sun-symbol::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-top: 2px solid #ff7a29;
  border-bottom: 2px solid #ff7a29;
  transform: scaleX(0.35);
}

.sun-symbol::after {
  transform: rotate(90deg) scaleX(0.35);
}

.sun-symbol.one {
  left: 39%;
  top: 24%;
}

.sun-symbol.two {
  left: 58%;
  top: 22%;
}

.sun-symbol.three {
  left: 60%;
  top: 38%;
  transform: scale(0.78);
}

.proofgrade {
  background: linear-gradient(145deg, #f4f7ed, #f1f5ed);
}

.proof-panel {
  position: absolute;
  left: 4%;
  top: 8%;
  width: 92%;
  height: 84%;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.65);
  display: grid;
  grid-template-columns: 43% 1fr;
  align-items: center;
  padding: 11px;
}

.gauge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #f8faf5 51%, transparent 52%),
    conic-gradient(#2fab67 0 306deg, #d8e8d5 306deg 360deg);
  color: #222;
  font-weight: 700;
}

.gauge span {
  font-size: 23px;
  line-height: 1;
}

.gauge small {
  display: block;
  margin-top: -19px;
  color: #555;
  font-size: 11px;
  font-weight: 500;
}

.proof-copy {
  color: #2c2c2c;
}

.proof-copy strong {
  font-size: 11px;
}

.proof-copy p {
  margin: 5px 0 10px;
  font-size: 10.5px;
  color: #333;
  line-height: 1.35;
}

.proof-copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 10.5px;
}

.proof-copy li {
  display: flex;
  justify-content: space-between;
}

.proof-copy b {
  color: #2fab67;
}

.hypothesis {
  background-color: #fffdf9;
  background-image: radial-gradient(#ddd3c8 1px, transparent 1px);
  background-size: 13px 13px;
}

.node {
  position: absolute;
  border: 1px solid #bfc5c3;
  border-radius: 5px;
  background: #f7faf7;
  color: #4b4b4b;
  padding: 7px 10px;
  font-size: 11px;
  box-shadow: 0 8px 15px rgba(70, 70, 70, 0.08);
  z-index: 2;
}

.node.root {
  left: 35%;
  top: 4%;
  background: #f0e5f5;
  border-color: #bdaed0;
}

.node.experiment {
  left: 10%;
  top: 49%;
}

.node.result {
  right: 16%;
  top: 49%;
}

.edge {
  position: absolute;
  height: 2px;
  background: #9da5a5;
  transform-origin: left center;
  z-index: 1;
}

.edge::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 7px solid #9da5a5;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.edge.e1 {
  width: 105px;
  left: 35%;
  top: 26%;
  transform: rotate(138deg);
}

.edge.e2 {
  width: 105px;
  left: 55%;
  top: 26%;
  transform: rotate(42deg);
}

.edge.e3 {
  width: 105px;
  left: 22%;
  top: 71%;
  transform: rotate(90deg);
}

.edge.e4 {
  width: 105px;
  left: 73%;
  top: 71%;
  transform: rotate(90deg);
}

.rag {
  background: linear-gradient(135deg, #edf5f8, #e6edf1);
}

.rag-box {
  position: absolute;
  top: 32%;
  width: 18%;
  height: 30%;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 12px 18px rgba(76, 91, 104, 0.16);
  color: #444;
  font-size: 10.5px;
}

.rag-box.q {
  left: 6%;
}

.rag-box.r {
  left: 37%;
}

.rag-box.g {
  right: 7%;
}

.arrow {
  position: absolute;
  top: 46%;
  width: 45px;
  height: 2px;
  background: #8ba8c8;
}

.arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 7px solid #8ba8c8;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.arrow.a1 {
  left: 26%;
}

.arrow.a2 {
  left: 59%;
}

.feedback {
  position: absolute;
  bottom: 23%;
  width: 80px;
  height: 34px;
  border-bottom: 2px solid #8ba8c8;
}

.feedback::before {
  content: "";
  position: absolute;
  top: -6px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #8ba8c8;
  border-left: 2px solid #8ba8c8;
}

.feedback.f1 {
  left: 19%;
  border-left: 2px solid #8ba8c8;
  border-radius: 0 0 0 18px;
}

.feedback.f1::before {
  left: -6px;
  transform: rotate(45deg);
}

.feedback.f2 {
  right: 20%;
  border-right: 2px solid #8ba8c8;
  border-radius: 0 0 18px 0;
}

.feedback.f2::before {
  right: -6px;
  transform: rotate(135deg);
}

.rag p {
  position: absolute;
  left: 35%;
  bottom: 16%;
  margin: 0;
  color: #526e9c;
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
}

.terminal {
  background: #0f1417;
  color: #aeb7bb;
  padding: 14px 21px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-title {
  color: #e4e9eb;
  font-size: 15px;
  margin-bottom: 13px;
}

.terminal p {
  margin: 0 0 7px;
  color: #899196;
  font-size: 13px;
  line-height: 1.15;
}

.terminal strong {
  display: block;
  color: #35c46b;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .profile-card,
  .hero-copy,
  .filter-bar,
  .project-card {
    animation: rise-in 520ms ease both;
  }

  .hero-copy {
    animation-delay: 70ms;
  }

  .filter-bar {
    animation-delay: 130ms;
  }

  .project-card:nth-child(1) { animation-delay: 180ms; }
  .project-card:nth-child(2) { animation-delay: 220ms; }
  .project-card:nth-child(3) { animation-delay: 260ms; }
  .project-card:nth-child(4) { animation-delay: 300ms; }
  .project-card:nth-child(5) { animation-delay: 340ms; }
  .project-card:nth-child(6) { animation-delay: 380ms; }
  .project-card:nth-child(7) { animation-delay: 420ms; }
  .project-card:nth-child(8) { animation-delay: 460ms; }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1320px) {
  .site-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 36px;
  }

  .profile-card {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 3.4vw, 46px);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding: 26px 26px 0;
  }

  .top-nav {
    gap: 24px;
  }

  .site-shell {
    padding: 0 26px 24px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-card {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(180px, 0.65fr) 1fr;
    column-gap: 22px;
    align-items: center;
  }

  .profile-intro {
    text-align: left;
  }

  .avatar {
    margin-left: 0;
  }

  .profile-card .rule {
    display: none;
  }

  .bio,
  .social-links {
    grid-column: 2;
  }

  .bio {
    margin-top: 0;
  }

  .social-links {
    margin-top: 14px;
    padding-top: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .wordmark {
    font-size: 15px;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
    font-size: 16px;
  }

  .site-shell {
    margin-top: 25px;
  }

  .profile-card {
    display: flex;
    padding: 26px;
  }

  .profile-intro {
    text-align: center;
  }

  .avatar {
    width: 96px;
    height: 96px;
    margin-left: auto;
  }

  .profile-card .rule {
    display: block;
    margin-top: 26px;
  }

  .bio {
    margin-top: 22px;
    font-size: 14px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1;
  }

  .research-links {
    grid-template-columns: 1fr;
  }

  .research-link {
    padding-right: 0;
  }

  .research-link + .research-link {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .filter-bar {
    gap: 10px;
  }

  .filter-pill {
    min-width: auto;
    flex: 1 1 44%;
    height: 40px;
    font-size: 14px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card h3 {
    font-size: 16px;
  }

  .social-links a {
    width: 40px;
    height: 40px;
  }
}
