:root {
  --ink: #e9f0f2;
  --muted: #9bacb2;
  --paper: #f2f5f3;
  --dark: #071019;
  --dark-2: #0b1720;
  --line: rgba(12, 30, 39, 0.16);
  --mint: #7ff4c2;
  --blue: #86b7ff;
  --content: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: #0a1720;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--mint);
  color: #061019;
  padding: .75rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.profile-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: 38%;
  min-width: 390px;
  color: var(--ink);
  background: var(--dark);
  overflow: hidden;
}

.profile-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -250px;
  bottom: -230px;
  border: 1px solid rgba(127, 244, 194, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(127, 244, 194, .035), 0 0 0 140px rgba(134, 183, 255, .025);
}

.profile-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.portrait {
  position: relative;
  width: min(300px, 78%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto auto;
  border: 1px solid rgba(255, 255, 255, .2);
  overflow: hidden;
  background: linear-gradient(145deg, #112a36, #081219 72%);
}

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

.portrait-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: .045;
  background-image: linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .3) 1px, transparent 1px);
  background-size: 22px 22px;
}

.identity {
  margin-top: 2.2rem;
}

.eyebrow,
.section-kicker,
.project-meta,
.card-top,
.timeline-date {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.eyebrow {
  font-size: .77rem;
  color: var(--mint);
}

.identity h1 {
  margin: .4rem 0 1rem;
  font-size: clamp(1.65rem, 2.8vw, 2.85rem);
  line-height: .95;
  letter-spacing: -.06em;
  font-weight: 600;
}

.affiliation {
  color: var(--muted);
  line-height: 1.5;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.profile-links a {
  text-decoration: none;
  font-size: .86rem;
  font-weight: 600;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  color: var(--mint);
}

main {
  margin-left: max(38%, 390px);
  min-height: 100vh;
}

.section-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  padding: 0 clamp(2rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(242, 245, 243, .91);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.section-header p {
  margin: 0;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .08em;
  white-space: nowrap;
}

.section-index {
  color: #087154;
  font-weight: 600;
}

.section-header nav {
  display: flex;
  gap: clamp(.9rem, 2vw, 1.8rem);
}

.section-header nav a {
  color: #536168;
  text-decoration: none;
  font-size: .77rem;
  font-weight: 600;
}

.section-header nav a.active,
.section-header nav a:hover {
  color: #071019;
}

.mobile-name {
  display: none;
  text-decoration: none;
  font-weight: 700;
}

.content {
  width: min(100%, calc(var(--content) + 10rem));
  padding: 0 clamp(2rem, 5vw, 5rem);
}

section {
  padding: clamp(5rem, 10vw, 8.5rem) 0;
  scroll-margin-top: 72px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin-bottom: 1.5rem;
  color: #087154;
  font-size: .75rem;
  font-weight: 500;
}

h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  line-height: 1.03;
  letter-spacing: -.06em;
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 4.5rem;
}

.about-grid p {
  margin-top: 0;
}

.lead {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.55;
  letter-spacing: -.02em;
}

.about-copy {
  color: #4d5d64;
}

.research-notes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 4rem;
}

.research-notes span {
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: .68rem;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: 4rem;
}

.section-heading h2 {
  font-size: clamp(2.6rem, 4.4vw, 4.6rem);
}

.section-heading p {
  color: #58686e;
  margin: 0 0 .4rem;
}

.featured-project {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.project-number {
  font-family: "DM Mono", monospace;
  font-size: .78rem;
  color: #087154;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #69777c;
  font-size: .69rem;
}

.project-main h3 {
  margin: .7rem 0 1.2rem;
  font-size: clamp(1.8rem, 3vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -.045em;
}

.project-main>p {
  max-width: 680px;
  color: #405158;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 2rem 0;
  list-style: none;
}

.project-details li {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  line-height: 1.5;
  color: #56676d;
}

.project-link {
  display: inline-flex;
  gap: .45rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

.project-link:hover {
  color: #087154;
}

.prior-research {
  margin-top: 4rem;
  padding: 2.5rem;
  background: #dfe8e5;
}

.prior-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(7, 16, 25, .13);
}

.prior-item>span {
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  color: #087154;
}

.prior-item h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
}

.prior-item p {
  margin: 0;
  color: #526268;
  font-size: .9rem;
}

.research-repo {
  display: inline-block;
  margin-top: .8rem;
  color: #087154;
  font-size: .82rem;
  font-weight: 700;
  text-underline-offset: .2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  min-height: 490px;
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--dark-2);
  transition: transform .25s ease, background .25s ease;
}

.project-card:nth-child(2) {
  background: #15324b;
}

.project-card:hover {
  transform: translateY(-6px);
  background: #102630;
}

.card-top {
  display: flex;
  justify-content: space-between;
  color: #a8bac0;
  font-size: .68rem;
}

.ellipse-mark,
.matrix-mark {
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
}

.ellipse-mark div {
  width: 75%;
  aspect-ratio: 1.65;
  border: 1px solid var(--mint);
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 0 0 35px rgba(127, 244, 194, .12);
}

.ellipse-mark i {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 3rem;
  color: var(--mint);
}

.matrix-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-family: "DM Mono", monospace;
  color: var(--blue);
}

.matrix-mark>b {
  font-size: 1.7rem;
  font-weight: 400;
}

.matrix {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem 1rem;
  padding: .65rem .85rem;
  font-size: 1.35rem;
}

.matrix::before,
.matrix::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: .5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.matrix::before {
  left: 0;
  border-left: 1px solid currentColor;
}

.matrix::after {
  right: 0;
  border-right: 1px solid currentColor;
}

.project-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.6rem;
  letter-spacing: -.035em;
}

.project-card p {
  margin: 0;
  color: #b7c3c7;
  font-size: .9rem;
}

.timeline article {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}

.timeline-date {
  font-size: .7rem;
  color: #087154;
}

.timeline h3 {
  margin: -.25rem 0 .2rem;
  font-size: 1.25rem;
  letter-spacing: -.025em;
}

.timeline p {
  margin: .4rem 0 0;
  color: #53646a;
}

.timeline-place {
  font-family: "DM Mono", monospace;
  font-size: .76rem;
  color: #223940 !important;
}

footer {
  padding: 6rem 0 3rem;
}

footer>p {
  font-size: 1.15rem;
  color: #53646a;
}

footer>a {
  display: inline-block;
  max-width: 100%;
  font-size: clamp(1.6rem, 3.5vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: -.05em;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: .7rem;
  text-transform: uppercase;
}

.footer-bottom a {
  text-decoration: none;
}

.page-hero { margin-bottom: 4.5rem; }
.page-hero .lead { max-width: 700px; margin-top: 2.5rem; color: #405158; }
.page-footer { padding-top: 0; }
.teaching-list article:first-child { border-top-color: #087154; }
.service-section { margin-top: 5rem; }
.service-section > h3 { margin: 0 0 1.5rem; font-size: 1.6rem; letter-spacing: -.035em; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { min-height: 230px; padding: 1.6rem; background: var(--paper); }
.service-card span { font-family: "DM Mono", monospace; color: #087154; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.service-card h4 { margin: 1.2rem 0 .6rem; font-size: 1.15rem; line-height: 1.3; }
.service-card p { margin: 0; color: #53646a; font-size: .9rem; }
.mobile-page-nav { display: none; }

@media (max-width: 1050px) {
  .profile-panel {
    width: 34%;
    min-width: 320px;
  }

  main {
    margin-left: max(34%, 320px);
  }

  .profile-inner {
    padding: 2.4rem;
  }

  .section-header nav {
    display: none;
  }

  .mobile-page-nav { position: sticky; top: 74px; z-index: 19; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(242,245,243,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
  .mobile-page-nav a { padding: .75rem .3rem; color: #5b686d; text-align: center; text-decoration: none; font-size: .72rem; font-weight: 600; }
  .mobile-page-nav a.active { color: #071019; box-shadow: inset 0 -2px #087154; }

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

@media (max-width: 760px) {
  .profile-panel {
    position: relative;
    inset: auto;
    width: 100%;
    min-width: 0;
    min-height: 92vh;
  }

  .profile-inner {
    padding: 2rem 1.4rem 3rem;
    min-height: 92vh;
  }

  .portrait {
    width: 145px;
    margin-bottom: auto;
  }

  .portrait.cropped {
    width: 100px;
    object-fit: cover;
    aspect-ratio: 1;
  }

  .identity h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  main {
    margin-left: 0;
  }

  .section-header {
    padding: 0 1.4rem;
  }

  .mobile-name {
    display: block;
  }

  .content {
    padding: 0 1.4rem;
  }

  section {
    padding: 5rem 0;
  }

  .about-grid,
  .section-heading {
    grid-template-columns: 1fr;
    margin-top: 3rem;
  }

  .section-heading {
    align-items: start;
    margin-bottom: 2.5rem;
  }

  .featured-project {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

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

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

  .project-card {
    min-height: 440px;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
