@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --blue: #0b4a84;
  --brown: #84450b;
  --rule: rgb(11 74 132 / 15%);
  background: #fff;
  color: var(--blue);
  font-family: "Noto Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--blue);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brown);
  text-decoration-line: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: auto;
}

a:hover,
a:focus-visible {
  background: var(--blue);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #fff;
  outline: 0;
  text-decoration-color: #fff;
}

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 4px;
}

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

h1,
h2,
h3 {
  color: var(--blue);
  text-wrap: balance;
}

h1 {
  margin-bottom: 36px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
}

h2,
h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

p,
li {
  text-wrap: pretty;
}

p,
ul,
ol {
  margin-bottom: 1.95em;
}

img,
video,
iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 6px;
}

.project-media {
  width: 100%;
}

.project-media video {
  aspect-ratio: 16 / 9;
  height: auto;
  background: #fff;
  object-fit: contain;
}

figure {
  margin-right: 0;
  margin-bottom: 96px;
  margin-left: 0;
}

figcaption,
.project-meta,
.project-category,
.project-stack {
  font-size: 14px;
}

figcaption {
  margin-top: 12px;
}

time,
.project-meta {
  font-variant-numeric: tabular-nums;
}

.site-header,
.site-main {
  width: min(100% - 96px, 816px);
  margin-right: auto;
  margin-left: auto;
}

.site-header {
  padding-top: 48px;
  padding-bottom: 72px;
}

.site-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 36px;
  font-size: 16px;
}

.site-name {
  font-weight: 600;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.site-nav a {
  color: var(--blue);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background: var(--blue);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #fff;
  outline: 0;
  text-decoration: none;
}

.site-nav a:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 4px;
}

.site-main {
  min-height: 70vh;
}

.page-header {
  margin-bottom: 96px;
}

.about {
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  justify-content: center;
}

.about .page-header {
  margin-bottom: 48px;
}

.about .prose > p {
  margin-bottom: 1.4em;
}

.about .social-links {
  margin-top: 36px;
  margin-bottom: 0;
}

.about .prose a {
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
}

.about .prose a:hover,
.about .prose a:focus-visible {
  background: var(--blue);
  color: #fff;
  text-decoration-color: #fff;
}

.work-heading {
  margin-bottom: clamp(36px, 6vh, 60px);
}

.work-heading h1 {
  margin-bottom: 0;
}

.project-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
}

.internship-list {
  align-self: start;
  text-align: right;
}

.project-list li {
  margin: 0;
}

.project-list a {
  color: var(--blue);
  text-decoration: none;
}

.project-list a:hover,
.project-list a:focus-visible,
.project-list a[aria-current="page"] {
  background: var(--blue);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #fff;
  outline: 0;
}

.project-list a:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 4px;
}

.work-browser--project {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.project-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
}

.project-stage .project-media {
  position: absolute;
  right: 0;
  bottom: clamp(12px, 2vh, 18px);
  display: flex;
  width: min(50%, 46vh, 416px);
  aspect-ratio: 16 / 9;
  align-items: flex-end;
  justify-content: flex-end;
  margin: 0;
}

.project-stage .project-media video {
  width: auto;
  max-width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin-left: auto;
  object-fit: contain;
}

.project-stage .project-media--portrait video {
  aspect-ratio: 201 / 437;
}

.project-detail {
  flex: 0 0 auto;
  text-align: right;
}

.project-intro {
  margin-bottom: clamp(12px, 1.8vh, 18px);
}

.project-headline {
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  text-wrap: pretty;
}

.page-header .lede {
  margin-top: 36px;
  margin-bottom: 0;
}

.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
  font-size: 14px;
}

.project-external-link {
  display: inline-grid;
  width: 1.35em;
  height: 1.35em;
  align-items: center;
  justify-items: center;
  border: 1px solid currentcolor;
  border-radius: 2px;
  color: var(--blue);
  line-height: 1;
  text-decoration: none;
}

.project-external-link:hover,
.project-external-link:focus-visible {
  border-color: var(--blue);
}

.project-prose {
  margin-left: 25%;
  font-size: 16px;
  line-height: 1.6;
  text-align: justify;
  text-align-last: right;
}

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

.prose > section {
  margin-top: 108px;
}

.prose h2 {
  margin-top: 96px;
  margin-bottom: 24px;
}

.project-entry {
  padding-top: 48px;
  padding-bottom: 60px;
  border-top: 1px solid var(--rule);
}

.project-entry header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 36px;
}

.project-entry h2 {
  margin-bottom: 0;
}

.project-entry time {
  flex: 0 0 auto;
}

.project-category {
  margin-top: 6px;
}

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

.project-stack {
  margin-top: 36px;
}

.photo-library {
  columns: 2;
  column-gap: 24px;
}

.photo-library img {
  margin-bottom: 24px;
  break-inside: avoid;
}

.paper-viewer iframe {
  height: min(75vh, 1056px);
  min-height: 540px;
}

@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }

  h1 {
    font-size: 26px;
  }

  h2,
  h3 {
    font-size: 14px;
  }

  figcaption,
  .project-meta,
  .project-category,
  .project-stack {
    font-size: 13px;
  }

  .site-header,
  .site-main {
    width: min(100% - 60px, 816px);
  }

  .site-header {
    padding-top: 36px;
    padding-bottom: 60px;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    font-size: 14px;
  }

  .nav-links {
    gap: 30px;
  }

  .page-header {
    margin-bottom: 84px;
  }

  .about .prose > p {
    margin-bottom: 1.35em;
  }

  .about .social-links {
    margin-top: 24px;
  }

  .project-list-columns {
    gap: 18px;
  }

  .work-browser--project {
    display: block;
    height: auto;
  }

  .project-stage {
    min-height: 0;
  }

  .project-stage .project-media {
    position: static;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 60px;
  }

  .project-stage .project-media video {
    margin-right: auto;
    margin-left: auto;
  }

  .project-detail {
    margin-top: 36px;
    text-align: left;
  }

  .project-headline {
    font-size: 14px;
  }

  .project-meta {
    justify-content: flex-start;
    font-size: 13px;
  }

  .project-prose {
    margin-left: 0;
    font-size: 14px;
    text-align: left;
    text-align-last: auto;
  }

  .project-entry header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .photo-library {
    columns: 1;
  }

  .paper-viewer iframe {
    height: 70vh;
    min-height: 480px;
  }
}

@media (min-width: 641px) {
  body.project-page {
    display: grid;
    height: 100svh;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .project-page .site-header {
    padding-top: clamp(30px, 5.3vh, 48px);
    padding-bottom: clamp(42px, 8vh, 72px);
  }

  .project-page .site-main {
    min-height: 0;
    padding-bottom: clamp(44px, 7vh, 64px);
  }
}

@media (min-width: 641px) and (max-height: 680px) {
  .project-page .site-header {
    padding-top: 24px;
    padding-bottom: 30px;
  }

  .work-heading {
    margin-bottom: 30px;
  }

  .project-list {
    gap: 8px;
  }

  .project-stage .project-media {
    width: min(50%, 39vh, 416px);
  }

}
