/* =========================================================
   BASE
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: #ffffff;
  color: #202124;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;

  font-size: 16px;
  line-height: 1.65;

  -webkit-font-smoothing: antialiased;
}

a {
  color: #245ca6;
  text-decoration: none;

  transition:
    opacity 0.15s ease,
    color 0.15s ease;
}

a:hover {
  opacity: 0.72;
}

strong {
  font-weight: 650;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.container {
  width: min(92%, 940px);

  margin: 0 auto;

  padding: 90px 0 42px;
}


/* =========================================================
   HOME — HERO
========================================================= */

.hero {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    180px;

  gap: 65px;

  align-items: start;

  margin-bottom: 105px;
}

.eyebrow {
  margin: 0 0 9px;

  color: #777b80;

  font-size: 0.9rem;
  font-weight: 550;

  text-transform: uppercase;
  letter-spacing: 0.055em;
}

h1 {
  margin: 0;

  color: #17181a;

  font-size: clamp(2.7rem, 6vw, 4rem);
  line-height: 1.05;

  font-weight: 720;

  letter-spacing: -0.045em;
}

.subtitle {
  margin: 16px 0 0;

  color: #54585d;

  font-size: 1.08rem;
}

.hero-links {
  display: flex;

  gap: 20px;

  margin-top: 21px;
}

.hero-links a {
  font-weight: 600;
}

.bio {
  max-width: 700px;

  margin-top: 43px;

  color: #34373a;
}

.bio p {
  margin: 0 0 17px;
}

.bio p:last-child {
  margin-bottom: 0;
}


/* Lab links in bio */

.bio a {
  color: inherit;

  text-decoration: none;
}

.bio a:hover {
  color: #245ca6;

  opacity: 1;
}


/* =========================================================
   PROFILE PHOTO
========================================================= */

.profile-photo {
  display: block;

  width: 180px;
  height: 180px;

  margin-top: 13px;

  border-radius: 50%;

  object-fit: cover;
  object-position: center;
}


/* =========================================================
   GENERAL SECTIONS
========================================================= */

.section {
  margin-bottom: 95px;
}

h2 {
  margin: 0 0 38px;

  color: #18191b;

  font-size: 1.55rem;
  line-height: 1.25;

  font-weight: 680;

  letter-spacing: -0.025em;
}


/* =========================================================
   HOME — RESEARCH
========================================================= */

.research-item {
  display: grid;

  grid-template-columns:
    300px
    minmax(0, 1fr);

  gap: 38px;

  align-items: center;

  margin-bottom: 62px;
}

.research-item:last-child {
  margin-bottom: 0;
}


/* Research image / placeholder */

.research-visual,
.research-image {
  width: 100%;

  border-radius: 10px;
}

.research-image {
  display: block;

  aspect-ratio: 16 / 10;

  object-fit: cover;
}

.research-visual {
  display: flex;

  align-items: flex-end;

  aspect-ratio: 16 / 10;

  padding: 19px;

  overflow: hidden;

  position: relative;

  color: rgba(255, 255, 255, 0.95);

  font-size: 0.88rem;
  font-weight: 600;

  letter-spacing: 0.01em;
}

.research-visual::before {
  content: "";

  position: absolute;

  inset: 0;

  opacity: 0.4;

  background:
    linear-gradient(
      120deg,
      transparent 25%,
      rgba(255, 255, 255, 0.25)
    );
}

.research-visual span {
  position: relative;

  z-index: 1;
}

.robot-learning {
  background:
    linear-gradient(
      145deg,
      #365d78,
      #8098a9
    );
}


/* Full-size perception figure */

.perception-full {
  width: 100%;
  height: auto;

  aspect-ratio: auto;

  object-fit: contain;

  background: #ffffff;
}


/* Research text */

.research-lab {
  margin: 0 0 5px;

  color: #81868b;

  font-size: 0.86rem;
}

.research-lab a {
  color: inherit;

  text-decoration: none;
}

.research-lab a:hover {
  color: #245ca6;

  opacity: 1;
}

.research-content h3 {
  margin: 0 0 7px;

  color: #202124;

  font-size: 1.25rem;
  line-height: 1.3;

  font-weight: 670;

  letter-spacing: -0.02em;
}

.research-status {
  margin: 0 0 15px !important;

  color: #78828b !important;

  font-size: 0.82rem;

  font-weight: 550;

  letter-spacing: 0.01em;
}

.research-content > p:not(.research-lab):not(.research-status) {
  margin: 0;

  color: #3f4246;
}

.research-detail {
  margin-top: 12px !important;

  color: #555a5f !important;

  font-size: 0.94rem;
}


/* Tags */

.research-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 7px 8px;

  margin-top: 18px;
}

.research-tags span {
  padding: 4px 10px;

  border-radius: 100px;

  background: #f1f3f5;
  color: #666b70;

  font-size: 0.76rem;
}


/* =========================================================
   HOME — PUBLICATIONS
========================================================= */

.publication {
  max-width: 820px;

  margin-bottom: 30px;
}

.publication-title {
  margin: 0 0 7px;

  color: #202124;

  font-size: 1.03rem;
  font-weight: 650;

  line-height: 1.5;
}

.publication-authors {
  margin: 0 0 3px;

  color: #505459;

  font-size: 0.93rem;
}

.publication-venue {
  margin: 0;

  color: #777c81;

  font-size: 0.9rem;
}


/* =========================================================
   HOME — PROJECTS
========================================================= */

.project-item {
  max-width: 820px;

  margin-bottom: 48px;
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-item h3 {
  margin: 4px 0 12px;

  color: #202124;

  font-size: 1.14rem;
  font-weight: 660;

  letter-spacing: -0.015em;
}

.project-item > p:not(.project-meta):not(.project-award) {
  margin: 0;

  color: #414549;
}

.project-meta {
  margin: 0;

  color: #858a8f;

  font-size: 0.85rem;
}

.project-award {
  margin: 12px 0 0;

  color: #555a5f;

  font-size: 0.9rem;
  font-weight: 550;
}

.project-item .project-link {
  display: inline-block;

  margin-top: 18px;
}


/* =========================================================
   EDUCATION
========================================================= */

.education {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 40px;
}

.education h3 {
  margin: 0 0 5px;

  font-size: 1.05rem;

  font-weight: 650;
}

.education p {
  margin: 2px 0;
}

.education-location {
  flex-shrink: 0;

  color: #83878b;

  font-size: 0.88rem;
}

.muted {
  color: #74787d;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-top: 120px;

  padding-top: 25px;

  border-top: 1px solid #eceeef;

  color: #999da1;

  font-size: 0.8rem;
}

.footer-links {
  display: flex;

  gap: 16px;
}


/* =========================================================
   PROJECT PAGE — GENERAL
========================================================= */

.project-page {
  max-width: 860px;
}


/* Project navigation */

.project-nav {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 90px;

  font-size: 0.9rem;
}

.project-nav > a {
  font-weight: 600;
}

.project-nav-links {
  display: flex;

  gap: 18px;
}


/* =========================================================
   PROJECT PAGE — HERO
========================================================= */

.project-hero {
  max-width: 760px;

  margin-bottom: 90px;
}

.project-kicker {
  margin: 0 0 14px;

  color: #7c8288;

  font-size: 0.85rem;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-title {
  margin: 0;

  color: #18191b;

  font-size: clamp(2.4rem, 6vw, 3.7rem);
  line-height: 1.08;

  font-weight: 720;

  letter-spacing: -0.045em;
}

.project-subtitle {
  max-width: 680px;

  margin: 22px 0 0;

  color: #565c62;

  font-size: 1.15rem;
  line-height: 1.55;
}

.project-tags {
  margin-top: 28px;
}


/* =========================================================
   PROJECT PAGE — SECTIONS
========================================================= */

.project-section {
  max-width: 760px;

  margin-bottom: 80px;
}

.project-section h2 {
  margin-bottom: 22px;
}

.project-section > p {
  margin: 0 0 16px;

  color: #3e4348;
}

.project-section > p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   PROJECT PAGE — IMPLEMENTATION CARDS
========================================================= */

.project-points {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.project-point {
  padding: 22px 23px;

  border: 1px solid #e8eaed;

  border-radius: 10px;

  background: #fafbfc;
}

.project-point h3 {
  margin: 0 0 8px;

  color: #26292c;

  font-size: 0.98rem;
  font-weight: 650;
}

.project-point p {
  margin: 0;

  color: #5d6267;

  font-size: 0.9rem;
  line-height: 1.6;
}


/* =========================================================
   PROJECT PAGE — FLOW
========================================================= */

.solver-flow {
  display: flex;

  align-items: center;

  gap: 9px;

  overflow-x: auto;

  padding: 8px 0;
}

.solver-step {
  flex: 0 0 auto;

  padding: 10px 14px;

  border-radius: 7px;

  background: #f1f3f5;

  color: #4c5257;

  font-size: 0.8rem;
  font-weight: 550;

  white-space: nowrap;
}

.solver-arrow {
  flex: 0 0 auto;

  color: #a1a6ab;
}


/* =========================================================
   PROJECT PAGE — VIDEO
========================================================= */

.project-video-wrap {
  margin-top: 6px;
}

.project-video {
  display: block;

  width: 100%;
  max-width: 760px;

  background: #000000;

  border-radius: 10px;
}

.project-caption {
  margin-top: 12px !important;

  color: #6a7076 !important;

  font-size: 0.9rem;
  line-height: 1.55;
}


/* =========================================================
   CANAL — EQUATIONS
========================================================= */

.equation-block {
  margin-bottom: 34px;
}

.equation-block:last-child {
  margin-bottom: 0;
}

.equation-title {
  margin: 0 0 10px;

  color: #25282c;

  font-size: 0.98rem;
  font-weight: 650;
}

.equation {
  margin: 0 0 14px;

  padding: 18px 20px;

  overflow-x: auto;

  border: 1px solid #e8eaed;

  border-radius: 10px;

  background: #fafbfc;
}

.equation-block p:not(.equation-title) {
  margin: 0;

  color: #565c62;
}


/* =========================================================
   CANAL — NOTATION
========================================================= */

.notation-box {
  margin: 0 0 42px;

  padding: 22px 24px;

  border: 1px solid #e8eaed;

  border-radius: 10px;

  background: #fafbfc;
}

.notation-title {
  margin: 0 0 18px;

  color: #303438;

  font-size: 0.92rem;
  font-weight: 650;
}

.notation-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 11px 28px;
}

.notation-grid > div {
  display: grid;

  grid-template-columns: 72px 1fr;

  gap: 8px;

  align-items: baseline;

  color: #5a6066;

  font-size: 0.82rem;
  line-height: 1.45;
}

.notation-symbol {
  color: #292d31;

  font-weight: 600;
}


/* =========================================================
   PROJECT PAGE — REFERENCE
========================================================= */

.project-reference {
  padding-top: 8px;
}

.project-reference em {
  color: #44494e;
}

.project-link {
  display: inline-block;

  margin-top: 5px;

  font-size: 0.9rem;
  font-weight: 600;
}


/* =========================================================
   CIRCA — AWARD
========================================================= */

.circa-award {
  display: inline-block;

  margin: 26px 0 0;

  padding: 7px 12px;

  border-radius: 7px;

  background: #f3f1ff;
  color: #5d50a8;

  font-size: 0.86rem;
  font-weight: 650;
}


/* =========================================================
   CIRCA — HERO IMAGE
========================================================= */

.circa-hero-image {
  display: block;

  width: 100%;
  max-width: 760px;
  height: auto;

  margin: 0 auto;

  border-radius: 12px;

  object-fit: contain;
}


/* =========================================================
   CIRCA — REGULAR FIGURES
========================================================= */

.project-figure {
  display: block;

  width: 78%;
  max-width: 600px;
  height: auto;

  margin: 0 auto;

  border-radius: 10px;

  object-fit: contain;
}


/* Align captions with smaller figures */

.project-figure + .project-caption {
  width: 78%;
  max-width: 600px;

  margin-left: auto !important;
  margin-right: auto !important;
}


/* Optional finer image control */

.figure-diagram {
  max-width: 540px;
}

.figure-lidar {
  max-width: 620px;
}

.figure-sound {
  max-width: 620px;
}


/* =========================================================
   CIRCA — MY ROLE
========================================================= */

.project-role {
  max-width: 760px;

  padding: 22px 24px;

  border: 1px solid #e8eaed;

  border-radius: 10px;

  background: #fafbfc;
}

.project-role-label {
  margin: 0 0 10px;

  color: #303438;

  font-size: 0.9rem;
  font-weight: 650;

  text-transform: uppercase;

  letter-spacing: 0.04em;
}

.project-role p:last-child {
  margin: 0;

  color: #555b61;
}


/* =========================================================
   CIRCA — SYSTEM FLOW
========================================================= */

.circa-flow {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr)
    auto
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 12px;

  overflow-x: auto;
}

.circa-flow-group {
  min-width: 145px;
}

.circa-flow-label {
  margin: 0 0 9px;

  color: #858a8f;

  font-size: 0.76rem;
  font-weight: 650;

  text-transform: uppercase;

  letter-spacing: 0.05em;
}

.circa-flow-box {
  margin-bottom: 7px;

  padding: 10px 12px;

  border: 1px solid #e7e9ec;

  border-radius: 7px;

  background: #fafbfc;

  color: #4d5257;

  font-size: 0.78rem;
  font-weight: 550;

  text-align: center;
}

.circa-flow-box:last-child {
  margin-bottom: 0;
}

.circa-flow-arrow {
  color: #a2a7ac;

  font-size: 1.15rem;
}


/* =========================================================
   CIRCA — SIGNAL FLOW
========================================================= */

.circa-signal-flow {
  margin-top: 4px;
}

.circa-section-note {
  margin-top: 18px !important;

  color: #686e74 !important;

  font-size: 0.9rem;
}


/* =========================================================
   CIRCA — IoT CARDS
========================================================= */

.circa-iot-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 16px;

  margin-top: 30px;
}

.circa-iot-item {
  padding: 20px;

  border: 1px solid #e8eaed;

  border-radius: 10px;

  background: #fafbfc;
}

.circa-iot-icon {
  display: inline-block;

  margin-bottom: 19px;

  color: #8273d3;

  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.05em;
}

.circa-iot-item h3 {
  margin: 0 0 7px;

  color: #282b2e;

  font-size: 0.98rem;
  font-weight: 650;
}

.circa-iot-item p {
  margin: 0;

  color: #62676c;

  font-size: 0.87rem;
  line-height: 1.55;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 780px) {

  .container {
    padding-top: 60px;
  }

  .hero {
    grid-template-columns:
      minmax(0, 1fr)
      140px;

    gap: 35px;

    margin-bottom: 80px;
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }

  .research-item {
    grid-template-columns:
      250px
      minmax(0, 1fr);

    gap: 28px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {

  body {
    font-size: 15.5px;
  }

  .container {
    width: 88%;

    padding-top: 42px;
  }


  /* Home hero */

  .hero {
    display: flex;

    flex-direction: column-reverse;

    gap: 30px;

    margin-bottom: 75px;
  }

  .profile-photo {
    width: 115px;
    height: 115px;

    margin-top: 0;
  }

  .eyebrow {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 2.65rem;
  }

  .bio {
    margin-top: 35px;
  }


  /* Sections */

  .section {
    margin-bottom: 75px;
  }

  h2 {
    margin-bottom: 30px;

    font-size: 1.4rem;
  }


  /* Home research */

  .research-item {
    display: block;

    margin-bottom: 55px;
  }

  .research-visual,
  .research-image {
    margin-bottom: 24px;
  }


  /* Education */

  .education {
    display: block;
  }

  .education-location {
    margin-top: 10px !important;
  }


  /* Project page */

  .project-nav {
    margin-bottom: 60px;
  }

  .project-hero {
    margin-bottom: 70px;
  }

  .project-title {
    font-size: 2.45rem;
  }

  .project-subtitle {
    font-size: 1.02rem;
  }

  .project-section {
    margin-bottom: 65px;
  }

  .project-points {
    grid-template-columns: 1fr;
  }


  /* Notation */

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


  /* Circa images */

  .project-figure,
  .project-figure + .project-caption {
    width: 100%;
    max-width: 100%;
  }


  /* Circa flow */

  .circa-flow {
    grid-template-columns: 1fr;
  }

  .circa-flow-arrow {
    transform: rotate(90deg);

    text-align: center;
  }

  .circa-iot-grid {
    grid-template-columns: 1fr;
  }


  /* Footer */

  footer {
    align-items: flex-start;

    flex-direction: column;

    gap: 8px;

    margin-top: 80px;
  }

}
