/* shortcut: use an installed Geist Mono or system monospace until a font download is approved. */
@font-face {
  font-family: "Geist Mono";
  src: local("Geist Mono"), local("GeistMono-Regular");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #fff;
  background: #000;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  isolation: isolate;
  margin: 0;
  font-size: 12px;
  line-height: 20px;
}

.topography-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.2;
}

.topography-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

main {
  position: relative;
  z-index: 1;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .reveal-in {
    animation: fade-in 650ms ease-out;
  }
}

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

.page-header {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - 32px, 72ch);
  margin-inline: auto;
  padding-block: 80px;
}

.header-copy {
  flex: 1;
  min-width: 0;
}

.page-header h1 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  font-synthesis: weight;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.page-header .subtitle {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #292929;
  white-space: nowrap;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 12px 24px;
  margin-top: 24px;
}

.header-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.entry-header {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.entry-logo {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 12px;
}

.society-logo {
  width: 88px;
  height: 88px;
  margin: -4px;
  border-radius: 50%;
}

/* Compensate for transparent padding around the ambulance badge. */
.ambulance-logo {
  width: 100px;
  height: 100px;
  margin-top: -2px;
  margin-left: -10px;
  border-radius: 0;
}

.entry-header h3 {
  font-size: 16px;
  font-weight: 700;
  font-synthesis: weight;
  line-height: 1.4;
}

@media (min-width: 1200px) {
  .emt-title {
    white-space: nowrap;
  }
}

.lab-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  max-width: 100%;
}

.lab-link:hover {
  text-decoration: none;
}

.entry-header .date {
  margin-top: 8px;
}

.entry-affiliation {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.portrait {
  display: block;
  flex-shrink: 0;
  width: clamp(112px, 30vw, 176px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  font-synthesis: weight;
  line-height: 1.4;
}

section, footer {
  padding: 80px;
  border-top: 1px solid #222;
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 65ch) minmax(0, 1fr);
  align-items: start;
}

.experience-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 76ch) minmax(0, 1fr);
}

.publications-layout h2 {
  grid-column: 1 / -1;
}

.publications-status {
  grid-column: 1 / -1;
  margin-top: 16px;
  color: #999;
  text-align: center;
}

.activity-layout {
  grid-template-columns: minmax(160px, 1fr) minmax(0, 140ch) minmax(0, 1fr);
}

.projects-layout {
  grid-template-columns: minmax(160px, 1fr) minmax(0, 110ch) minmax(0, 1fr);
}

.activity-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid #222;
  border-radius: 12px;
  background: #080a0ddd;
}

.activity-cards {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.activity-header > span {
  color: #999;
  font-size: 11px;
}

.activity-scroll {
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: #3b4b61 #080a0d;
}

.activity-scroll:focus-visible {
  outline: 2px solid #7ca2d3;
  outline-offset: 4px;
}

.contribution-graph {
  display: block;
  width: max(100%, 900px);
}

.contribution-graph svg {
  display: block;
  width: 100%;
  height: auto;
}

.contribution-graph text {
  fill: #aaa;
  font-family: inherit;
  font-size: 10px;
}

.contribution-total {
  margin-top: 12px;
  color: #aaa;
  font-size: 11px;
}

.entries {
  min-width: 0;
}

article + article {
  margin-top: 40px;
}

.description {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 20px;
}

.paragraph-icon {
  justify-self: center;
  color: #777;
  font-size: 11px;
  font-weight: 400;
  line-height: 20px;
}

/* ChromaGrid adapted from React Bits. Copyright (c) 2026 David Haz. See REACT-BITS-LICENSE.md. */
.chroma-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  justify-items: center;
  align-items: start;
}

.chroma-grid > .chroma-card + .chroma-card {
  margin-top: 0;
}

.chroma-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 380px);
  padding: 8px;
  border-radius: 22px;
  background: linear-gradient(180deg, #202020, #111);
  box-shadow: inset 0 0 0 1px #ffffff14, 0 4px 10px -4px #000b;
}

.chroma-card::before,
.chroma-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.chroma-card::before {
  background: radial-gradient(130% 70% at 50% 100%, #7ca2d340, transparent 72%);
}

.chroma-card::after {
  box-shadow: inset 0 0 0 1px #7ca2d3, inset 0 0 16px -8px #7ca2d3;
}

.chroma-card:hover::before,
.chroma-card:hover::after {
  opacity: 1;
}

.chroma-media {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  background: #c1c1c1;
  color: #292929;
  transition: color 0.6s ease;
}

.chroma-media::before {
  content: "";
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 25% 30%, #e0efff, transparent 55%),
    radial-gradient(ellipse at 80% 75%, #598ac5, transparent 60%),
    #afcce9;
  filter: grayscale(1) blur(40px);
  transition: filter 0.6s ease;
}

.chroma-card:hover .chroma-media {
  color: #152b50;
}

.chroma-card:hover .chroma-media::before {
  filter: grayscale(0) blur(40px);
}

.faulty-terminal-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.16;
  filter: grayscale(1) blur(0.25px);
  transition: filter 0.6s ease;
}

.chroma-card:hover .faulty-terminal-canvas {
  filter: grayscale(0) blur(0.25px);
}

.chroma-media h3,
.chroma-media .organization {
  position: relative;
}

.chroma-media h3 {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(20px, 3vw, 38px);
  font-weight: 700;
  font-synthesis: weight;
  line-height: 1;
  letter-spacing: -0.05em;
}

.chroma-info {
  position: relative;
  padding: 16px 56px 12px 12px;
}

.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.project-card-link:focus-visible {
  outline-offset: -3px;
}

.project-details summary {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #ffffff26;
  border-radius: 8px;
  color: #b9b9b9;
  font-size: 20px;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.project-details summary::-webkit-details-marker {
  display: none;
}

.project-details summary::after {
  content: "+";
}

.project-details[open] summary::after {
  content: "−";
}

.project-details summary:hover {
  color: #fff;
  border-color: #7ca2d3;
}

.project-details summary:focus-visible {
  outline: 2px solid #7ca2d3;
  outline-offset: 3px;
}

.project-expanded {
  position: relative;
  z-index: 4;
  margin: 8px 12px 48px;
  padding-top: 16px;
  border-top: 1px solid #ffffff1a;
  color: #b7bec9;
  font-size: 11px;
  line-height: 1.7;
}

.artwork-credit {
  margin-top: 24px;
  font-size: 10px;
  font-weight: 700;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.project-tags li {
  padding: 3px 8px;
  border: 1px solid #7ca2d32e;
  border-radius: 999px;
  background: #7ca2d30c;
  color: #bbcde3;
  font-size: 10px;
  line-height: 1.5;
}

.project-languages {
  margin-top: 20px;
}

.project-languages h4 {
  margin: 0 0 10px;
  color: #e1e5eb;
  font-size: 11px;
  font-weight: 600;
}

.language-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
}

.language-bar span {
  flex: var(--share) 1 0;
  min-width: 6px;
  background: var(--language-color);
}

.language-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
}

.language-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #ffffff12;
  border-radius: 7px;
  background: #ffffff04;
}

.language-legend li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--language-color);
}

.language-legend strong {
  color: var(--language-color);
  font-weight: 600;
}

.language-legend li > span {
  margin-left: auto;
  color: #d9dfe7;
}

.chroma-status {
  font-size: 15px;
}

.status-development {
  color: #c49a70;
}

.status-deployed {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8aaf91;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

.chroma-date {
  margin-top: 4px;
  color: #a9b7ca;
}

.chroma-media .organization {
  font-size: 11px;
  line-height: 1.5;
  text-wrap: balance;
}

.alpine-media .project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(1);
  transition: filter 0.6s ease;
}

.chroma-card:hover .alpine-media .project-image {
  filter: grayscale(0);
}

.alpine-media::before {
  z-index: 1;
  inset: 0;
  background: linear-gradient(#07172735, #071727a6);
  filter: grayscale(1);
}

.alpine-media h3,
.alpine-media .organization {
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 8px #000;
}

.alpine-media h3 {
  font-size: clamp(20px, 2.3vw, 28px);
}

.chroma-card:hover .alpine-media::before {
  filter: grayscale(0);
}

@media (prefers-reduced-motion: reduce) {
  .chroma-card::before,
  .chroma-card::after,
  .chroma-media,
  .chroma-media::before,
  .alpine-media .project-image,
  .faulty-terminal-canvas {
    transition: none;
  }
}

footer {
  position: relative;
}

.site-credit {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  margin: 0;
  color: #999;
  font-size: 8px;
  line-height: 1.5;
  text-align: right;
}

.profiles > div {
  display: grid;
  grid-template-columns: 12ch minmax(0, 1fr);
  gap: 16px;
}

.profiles > div + div {
  margin-top: 10px;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

a span {
  margin-left: 3px;
}

@media (max-width: 1023px) {
  section, footer {
    padding-inline: 16px;
  }

  .section-layout {
    display: block;
    max-width: 65ch;
    margin-inline: auto;
  }

  .experience-layout {
    max-width: 76ch;
  }

  .activity-layout {
    max-width: 140ch;
  }

  .projects-layout {
    max-width: 110ch;
  }

  h2 {
    margin-bottom: 40px;
  }
}

@media (max-width: 520px) {
  .chroma-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 16px;
    padding-block: 48px;
  }

  .header-copy {
    display: contents;
  }

  .header-copy p {
    grid-column: 1 / -1;
  }

  .page-header .subtitle {
    font-size: clamp(11px, 3vw, 12px);
  }

  .portrait {
    grid-column: 2;
    grid-row: 1;
  }

  section, footer {
    padding-block: 48px;
  }

}
