:root {
  --bg: #fbfbf8;
  --paper: #ffffff;
  --ink: #121212;
  --muted: #686c67;
  --line: #deded7;
  --soft: #f0f0ea;
  --blue: black;
  --title-font: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 18px 54px rgba(25, 28, 32, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(31, 111, 235, 0.08), transparent 24rem),
    linear-gradient(90deg, rgba(18, 18, 18, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(18, 18, 18, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 36px 36px, 36px 36px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img,
video {
  max-width: 100%;
}

main,
footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.nav {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -18px 30px rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(18, 18, 18, 0.12);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transform: translateX(-50%);
}

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

.nav--home {
  left: 50%;
  width: min(1120px, calc(100% - 36px));
  min-width: 0;
  height: 56px;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 34px);
  border-radius: 0 0 26px 26px;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
}

.home-page main,
body:has(.nav--home) main {
  padding-top: 78px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #000;
  font-weight: 850;
  line-height: 1;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 3.4vw, 42px);
  color: #000;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.nav--home .logo,
.nav--home .nav-links,
.nav--project .logo,
.nav--project .nav-home,
.nav--project .nav-back {
  color: #000;
  text-shadow: none;
  font-weight: 400;
  font-size: 1.2em;
}

.nav--project {
  right: clamp(16px, 4vw, 46px);
  left: auto;
  min-width: 190px;
  gap: 7px;
  transform: none;
}

.nav-home,
.nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #000;
}

.nav-home svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-back svg {
  width: 26px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
  transform: rotate(-7deg);
}

.nav a:focus-visible,
a.nav:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.nav a:hover {
  opacity: 0.72;
}

footer a:hover,
footer a:focus-visible {
  color: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  grid-template-areas:
    "name contact"
    "copy contact";
  column-gap: clamp(28px, 7vw, 96px);
  row-gap: 12px;
  align-items: center;
  min-height: auto;
  padding: 24px 0 12px;
}

.hero-name-block {
  grid-area: name;
  align-self: end;
}

.hero-copy {
  grid-area: copy;
  align-self: start;
}

.hero-copy .summary:first-child {
  margin-top: 0;
}

.kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-family: var(--title-font);
  font-weight: 300;
  font-size: clamp(2.35rem, 5.2vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-name {
  max-width: 820px;
  font-size: clamp(3.85rem, 5.9vw, 5.35rem);
  line-height: 0.94;
  white-space: nowrap;
}

h2 {
  max-width: 680px;
  margin-bottom: 0;
  font-family: var(--title-font);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.12;
}

.summary {
  max-width: 520px;
  margin-bottom: 24px;
  margin-top: 2em;
  color: rgb(7, 29, 58);
  font-size: 1.4rem;
}

.summary-jump {
  font-size: 1.2rem;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 1.72em;
  margin: 0 2px;
  padding: 0.0em 0.38em 0.2em;
  overflow: hidden;
  border: 1px solid rgba(31, 111, 235, 0.34);
  border-radius: 999px;
  background: rgba(31, 111, 235, 0.08);
  box-shadow: 0 7px 22px rgba(31, 111, 235, 0.08);
  color: #1559c7;
  font-weight: 400;
  line-height: 0.5;
  vertical-align: baseline;
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.summary-jump::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #1f6feb, #5ea3ff);
  transform: translateX(-104%);
  transition: transform 220ms ease;
}

.summary-jump:hover,
.summary-jump:focus-visible {
  border-color: #1f6feb;
  box-shadow: 0 12px 30px rgba(31, 111, 235, 0.18);
  color: #fff;
  transform: translateY(-1px);
}

.summary-jump:hover::before,
.summary-jump:focus-visible::before {
  transform: translateX(0);
}

.summary-jump:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.28);
  outline-offset: 3px;
}

.resume-open {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.resume-open:hover,
.resume-open:focus-visible {
  border-color: var(--ink);
}

.contact-panel {
  grid-area: contact;
  display: grid;
  justify-items: center;
  gap: 22px;
}

.contact-panel img {
  width: min(78vw, 300px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  box-shadow: var(--shadow);
}

.contact-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.contact-list a {
  flex: 0 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 800;
  white-space: nowrap;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.collage,
.work,
.resume-section,
.personal-section {
  padding: 28px 0;
}

.collage {
  padding-top: 6px;
}

.collage .section-title {
  display: none;
}

.section-title {
  margin-bottom: 14px;
}

.mosaic-wall {
  position: relative;
  width: 100%;
  min-height: 520px;
  margin-top: 4px;
  background: transparent;
  isolation: isolate;
}

.mosaic-tile {
  position: absolute;
  overflow: visible;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  will-change: transform;
  transition: z-index 180ms ease, filter 180ms ease;
}

.mosaic-tile::after {
  position: absolute;
  inset: -1px;
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(0deg, rgba(18, 18, 18, 0.08), transparent 32%);
  pointer-events: none;
}

.mosaic-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: 0px solid var(--ink);
}

.is-prize img {
  object-position: left center;
}

.mosaic-tile:hover {
  z-index: 4;
  filter: saturate(1.06) contrast(1.03);
}

.mosaic-tile figcaption {
  position: absolute;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  font-family: Montserrat, var(--title-font);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.08);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.is-anchor figcaption {
  right: 14px;
  bottom: 14px;
}

.is-prize figcaption {
  right: 10px;
  bottom: 10px;
}

.is-build figcaption {
  right: 10px;
  bottom: 10px;
}

.work-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.work-title > p {
  max-width: 330px;
  margin-bottom: 4px;
  color: var(--muted);
}

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

.project-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-color: darkslategray;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: darkslategrey;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 72px rgba(25, 28, 32, 0.14);
}

.project-tile:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.project-tile img,
.project-tile canvas,
.project-tile video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-bottom: 0px solid var(--line);
}

.project-tile video[hidden] {
  display: none !important;
}

.project-sequence-canvas {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.project-tile .project-media-crop {
  object-fit: cover;
}

.project-tile div {
  position: relative;
  isolation: isolate;
  padding: 16px 48px 16px 16px;
}

.project-tile div::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 0;
  background: #d7d7d7;
  transition: width 1000ms linear;
}

.project-tile.is-hover-arming div::before,
.project-tile.is-hover-playing div::before {
  width: 100%;
}

.project-tile:not(.is-hover-arming, .is-hover-playing) div::before {
  transition-duration: 180ms;
}

.project-link-icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  pointer-events: none;
}

.project-tile span {
  display: block;
  margin-bottom: 7px;
  color: black;
  font-size: 1.0rem;
  font-weight: 850;
text-transform: uppercase;
}

.funding-section {
  display: grid;
  gap: 18px;
  margin: 18px 0 8px;
  padding: 28px 0;
  border-top: 0px solid var(--line);
  border-bottom: 0px solid var(--line);
}

.funding-section h2,
.personal-section h2 {
  margin: 0;
  font-family: Montserrat, var(--title-font);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 300;
  letter-spacing: 0;
  text-align: left;
}

.funding-logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
  align-items: center;
}

.funding-logos img {
  display: block;
  width: 100%;
  max-width: none;
  max-height: 120px;
  margin: 0 auto;
  object-fit: contain;
  filter: saturate(0.9) contrast(1.02);
}

.resume-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.resume-large {
  display: block;
  padding: 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.resume-large img {
  display: block;
  width: min(100%, 900px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.personal-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2.4vw, 24px);
  align-items: start;
  padding-top: clamp(34px, 7vw, 78px);
}

.personal-copy {
  align-self: center;
}

.personal-copy .summary {
  max-width: 100%;
  margin: 0;
}

.personal-photos {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.personal-photo {
  margin: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.personal-photo img {
  display: block;
  width: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.personal-photo figcaption {
  margin: 0;
  padding: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.personal-photo--nature {
  aspect-ratio: auto;
}

.personal-photo--nature img {
  aspect-ratio: 4 / 5;
  object-position: 37% center;
}

.personal-photo--quizbowl {
  aspect-ratio: auto;
}

.personal-photo--quizbowl img {
  aspect-ratio: 5 / 4;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: var(--ink);
  font-weight: 850;
}

.footer-made-by {
  color: var(--muted);
}

.project-page {
  padding-bottom: 42px;
}

.project-top-media {
  display: grid;
  justify-items: center;
  padding: 0 0 28px;
}

.project-top-media[hidden] {
  display: none;
}

.project-top-media-frame {
  width: min(100%, var(--project-top-media-width, 720px));
}

.project-top-media-asset {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-top-media-asset.is-upside-down {
  transform: rotate(180deg);
}

.project-top-media--capstone {
  padding-bottom: 0;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: clamp(22px, 5vw, 60px);
  align-items: end;
  padding: 36px 0 26px;
}

.project-hero--bridge {
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(14px, 2.4vw, 30px);
  align-items: center;
}

.project-hero--bridge .project-hero-copy,
.project-hero--bridge .project-hero-media {
  min-width: 0;
}

.project-hero--bridge .project-hero-copy {
  display: grid;
  place-items: center;
  padding: 0;
}

.bridge-title-image {
  display: block;
  width: 100%;
  height: auto;
}

.project-hero--bridge .slideshow {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-hero--bridge .slideshow img {
  height: 100%;
  object-fit: cover;
}

.project-hero--capstone {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.2fr);
  gap: 0;
  align-items: start;
  padding-top: 0;
}

.project-hero--capstone .project-hero-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--ink);
  background: #d7d7d7;
  box-shadow: var(--shadow);
}

.project-hero--capstone .project-hero-media {
  align-self: start;
  display: grid;
  gap: 0;
  width: 100%;
  border-left: 0;
}

.project-hero--capstone .project-media {
  aspect-ratio: auto;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.project-hero-caption-media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--soft);
}

.project-hero--thesis {
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.72fr);
  align-items: stretch;
  gap: clamp(18px, 4vw, 48px);
  padding: clamp(24px, 4vw, 48px) 0 30px;
}

.project-hero--thesis .project-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(420px, 58vw, 640px);
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 10px 10px 0 rgba(18, 18, 18, 0.1);
}

.project-hero--thesis h1 {
  font-family: Montserrat, var(--title-font);
  font-size: clamp(3rem, 5.2vw, 5.2rem);
  font-weight: 300;
  line-height: 0.9;
  max-width: 740px;
  margin-bottom: 20px;
  color: var(--ink);
}

.project-hero--thesis .kicker {
  font-size: clamp(0.76rem, 1.55vw, 1.55rem);
}

.project-hero--thesis h1 span {
  display: block;
  font-size: 0.78em;
  line-height: 0.94;
}

.project-hero--thesis .project-subtitle {
  max-width: 600px;
  margin-bottom: 22px;
  color: #3b3f3d;
  font-size: clamp(1.02rem, 1.8vw, 1.3rem);
}

.project-hero--thesis .project-hero-media {
  display: flex;
  align-items: center;
}

.project-hero--thesis .project-media {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  background: #050505;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.thesis-hero-video {
  min-height: 0;
}

.thesis-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thesis-highlights li {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(18, 18, 18, 0.2);
  background: #f2f2eb;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.project-page--thesis .project-blocks {
  gap: clamp(16px, 2.2vw, 24px);
}

.project-page--thesis .project-block--text {
  border-left: 0;
  border-top: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.project-page--thesis .project-block--text h2 {
  max-width: 760px;
  font-size: clamp(2rem, 3.8vw, 3rem);
}

.project-page--thesis .project-copy {
  max-width: 820px;
  font-size: 1.02rem;
}

.thesis-console-shot {
  margin-top: clamp(28px, 6vw, 72px);
}

.thesis-console-shot .project-figure,
.thesis-inline-video .project-figure {
  padding: 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.thesis-console-shot img,
.thesis-inline-video video {
  aspect-ratio: 1;
  object-fit: cover;
}

.thesis-paper-strip {
  margin: clamp(4px, 1vw, 12px) 0;
}

.thesis-paper-strip .project-figure--paper-preview {
  background: var(--paper);
}

.thesis-technical-aim {
  margin-top: clamp(4px, 1vw, 14px);
}

.thesis-diagram {
  align-self: center;
}

.thesis-diagram .project-figure {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.thesis-diagram img {
  aspect-ratio: 1;
  object-fit: contain;
}

.thesis-inline-video {
  margin-top: clamp(24px, 5vw, 64px);
}

.thesis-study {
  margin-top: clamp(4px, 1vw, 14px);
}

.project-hero-copy h1 {
  margin-bottom: 10px;
}

.project-subtitle {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.project-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-hero-media {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  background: transparent;
}

.project-blocks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  padding-top: 10px;
}

.project-block {
  min-width: 0;
}

.span-full {
  grid-column: 1 / -1;
}

.span-wide {
  grid-column: 2 / span 10;
}

.span-narrow {
  grid-column: 3 / span 8;
}

.span-half {
  grid-column: span 6;
}

.project-block--image,
.project-block--slideshow,
.project-block--embed {
  padding-inline: clamp(8px, 1.4vw, 18px);
}

.project-block--text {
  padding: clamp(18px, 3vw, 30px);
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.project-block--text h2,
.project-block--slideshow h2,
.project-block--embed h2 {
  margin-bottom: 16px;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
}

.project-copy {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

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

.project-references {
  padding-inline: clamp(8px, 1.4vw, 18px);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.project-references a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(18, 18, 18, 0.42);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.project-references a:hover,
.project-references a:focus-visible {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.project-figure,
.slideshow {
  margin: 0;
  overflow: visible;
}

.project-figure--link {
  position: relative;
  display: block;
}

.project-figure--link .project-link-icon {
  right: 12px;
  bottom: 12px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.78);
}

.project-figure--paper-preview {
  border: 1px solid var(--ink);
}

.project-figure--paper-preview .project-link-icon {
  right: 18px;
  bottom: 18px;
  z-index: 2;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  transition: transform 180ms ease;
}

.paper-link-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 38px 8px 12px;
  border: 1px solid rgba(18, 18, 18, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(18, 18, 18, 0.14);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-figure--paper-preview:hover .paper-link-label,
.project-figure--paper-preview:focus-visible .paper-link-label {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(18, 18, 18, 0.18);
  transform: translateY(-2px);
}

.project-figure--paper-preview:hover .project-link-icon,
.project-figure--paper-preview:focus-visible .project-link-icon {
  transform: translate(2px, -2px);
}

.project-figure img,
.project-figure video,
.slideshow img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-figure figcaption,
.slideshow figcaption {
  margin: 0;
  padding: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.project-figure figcaption:empty,
.slideshow figcaption:empty {
  display: none;
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.slide-counter {
  min-width: 48px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.project-embed {
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--project-embed-ratio, 16 / 9);
  border: 0;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.project-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--soft);
}

.project-embed--article-preview iframe {
  width: calc(100% / var(--project-embed-scale, 0.75));
  height: calc(100% / var(--project-embed-scale, 0.75));
  transform: scale(var(--project-embed-scale, 0.75));
  transform-origin: top left;
}

.project-embed--fixed-viewport iframe {
  width: calc(var(--project-embed-viewport-width, 430px));
  height: calc(100% / var(--project-embed-fit-scale, 1));
  transform: scale(var(--project-embed-fit-scale, 1));
}

.project-embed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 0;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.project-embed-footer p {
  margin: 0;
}

.project-embed-footer a {
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
}

.viewer-title {
  margin-bottom: 3px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 850;
  line-height: 1.1;
}

.viewer-subtitle {
  max-width: 780px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.viewer-wrap {
  position: relative;
  width: 100%;
  height: clamp(320px, 55vw, 620px);
  margin: 0 auto;
}

.viewer-wrap--compact {
  max-width: 520px;
  height: clamp(300px, 42vw, 460px);
}

.viewer-wrap--medium {
  max-width: 780px;
}

.viewer-wrap--wide {
  max-width: 100%;
}

model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: #03031c;
  box-shadow: var(--shadow);
}

.load-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  pointer-events: auto;
}

.load-overlay-inner {
  text-align: center;
}

.load-btn {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #000;
  cursor: pointer;
  padding: 0.9rem 1.3rem;
  font-size: 1rem;
  font-weight: 850;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.load-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 12px auto 0;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.reset-btn,
.fullscreen-btn {
  position: absolute;
  top: 12px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  cursor: pointer;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1;
}

.reset-btn {
  right: 66px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 120ms ease;
}

.viewer-wrap:hover .reset-btn,
.viewer-wrap:focus-within .reset-btn,
.reset-btn:hover,
.reset-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.fullscreen-btn {
  right: 12px;
}

.fullscreen-btn svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

.reset-btn:focus-visible,
.fullscreen-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.viewer-wrap.is-fs {
  position: fixed !important;
  inset: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0) !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999 !important;
  display: flex;
  width: auto !important;
  max-width: none !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  align-items: center;
  justify-content: center;
  border-radius: 0 !important;
  background: #000 !important;
  backface-visibility: hidden;
}

.viewer-wrap.is-fs model-viewer {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
}

.viewer-wrap.is-fs,
.viewer-wrap.is-fs model-viewer {
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
}

html.fs-open,
body.fs-open {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

@supports not (height: 100dvh) {
  .viewer-wrap.is-fs {
    height: calc(100vh - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100vh - env(safe-area-inset-bottom, 0px)) !important;
  }

  html.fs-open,
  body.fs-open {
    height: 100vh;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "contact"
      "copy";
    row-gap: 14px;
    min-height: auto;
    padding-top: 14px;
  }

  .hero-name {
    max-width: 100%;
    font-size: clamp(3.1rem, 17vw, 4.1rem);
    line-height: 0.92;
  }

  .contact-panel {
    gap: 14px;
    justify-items: start;
  }

  .contact-panel img {
    width: min(62vw, 250px);
  }

  .contact-list {
    justify-content: start;
  }

  .mosaic-wall {
    min-height: 680px;
  }

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

  .personal-section {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .personal-photos {
    grid-template-columns: 1fr 1fr;
  }

  .project-hero--thesis .project-hero-copy {
    min-height: auto;
  }

  .project-hero--thesis h1 {
    font-size: clamp(3rem, 7vw, 6.9rem);
  }

  .project-hero--thesis .kicker {
    font-size: 0.76rem;
  }

  .project-hero--thesis .project-media {
    max-width: 520px;
    margin: 0 auto;
  }

  .thesis-highlights {
    grid-template-columns: 1fr;
  }

  .thesis-highlights li {
    min-height: auto;
  }

  .span-wide,
  .span-narrow,
  .span-half {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .home-page .nav--home {
    display: none;
  }

  .home-page main {
    padding-top: 0;
  }

  footer,
  .work-title {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    min-width: 116px;
    height: 48px;
    padding: 0 18px;
    border-radius: 0 0 22px 22px;
  }

  .nav--home {
    width: calc(100% - 18px);
    min-width: 0;
    height: 52px;
    gap: clamp(14px, 4vw, 22px);
    padding: 0 12px;
    border-radius: 0 0 20px 20px;
  }

  .nav-links {
    gap: clamp(10px, 3vw, 16px);
    font-size: clamp(0.72rem, 3.1vw, 0.86rem);
  }

  .nav--project {
    right: 12px;
    left: auto;
    min-width: 178px;
  }

  .hero {
    row-gap: 12px;
  }

  .hero-name {
    font-size: clamp(2.7rem, 16vw, 3.55rem);
  }

  .summary {
    max-width: 100%;
    font-size: clamp(1.05rem, 5vw, 1.28rem);
  }

  .summary-jump {
    font-size: 1em;
  }

  .contact-list {
    gap: 5px;
  }

  .contact-list a {
    padding: 6px 7px;
    font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  }

  .personal-photos {
    grid-template-columns: 1fr;
  }

  .project-grid {
    gap: 10px;
  }

  .funding-section {
    gap: 16px;
    padding: 20px 0;
  }

  .funding-logos {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .funding-logos img {
    max-width: 100%;
    max-height: 72px;
  }

  .funding-logos img:nth-child(1),
  .funding-logos img:nth-child(3),
  .funding-logos img:nth-child(4) {
    grid-column: span 2;
  }

  .funding-logos img:nth-child(2),
  .funding-logos img:nth-child(5) {
    grid-column: span 3;
  }

  .project-tile div {
    padding: 12px;
  }
}
