:root {
  color-scheme: light;
  --ink: #282b2b;
  --secondary: #616866;
  --muted: #777d7b;
  --caption-on-dark: rgb(255 255 255 / .7);
  --accent: #4b9dd8;
  --line: #e9ecea;
  --text-heading: 24px;
  --text-body: 15px;
  --text-detail: 13px;
  --text-label: 11px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --section-gap: var(--space-16);
  --heading-gap: var(--space-6);
  --entry-gap: var(--space-8);
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; text-decoration-color: currentColor; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; }
p, figure, h1, h2, h3 { margin: 0; }
p + p { margin-top: var(--space-4); }

.page {
  --portrait-size: 184px;
  display: grid;
  grid-template-columns: var(--portrait-size) minmax(0, 1fr);
  gap: 72px;
  width: min(calc(100% - 80px), 1040px);
  margin-inline: auto;
  padding-block: 88px 40px;
  align-items: start;
}
.sidebar { position: sticky; top: 56px; display: flex; flex-direction: column; min-height: calc(100svh - 112px); }
.sidebar-signature { position: fixed; bottom: 56px; width: 80px; }
.sidebar-signature[data-signature-visible="false"] { visibility: hidden; }
.sidebar-signature img { display: block; width: 80px; height: auto; }
.signature-pending .sidebar-signature > img { visibility: hidden; }
.signature-replay { display: block; width: 80px; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.signature-replay svg { display: block; width: 100%; height: auto; overflow: visible; }
.signature-replay:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
.profile-photo { display: block; width: var(--portrait-size); height: var(--portrait-size); object-fit: cover; border-radius: 0; }
.portrait-link { position: relative; display: block; width: fit-content; user-select: none; }
.profile-photo--efros { position: absolute; inset: 0; visibility: hidden; }
.page:has(.portrait-efros-trigger:is(:hover, :focus-visible)) .portrait-link > :not(.profile-photo--efros) { visibility: hidden; }
.page:has(.portrait-efros-trigger:is(:hover, :focus-visible)) .profile-photo--efros { visibility: visible; }
.portrait-pending .profile-photo { visibility: hidden; }
.portrait-reveal { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.portrait-regions { position: absolute; inset: 0; pointer-events: none; }
.portrait-pending .portrait-regions { visibility: hidden; }
.portrait-region { position: absolute; pointer-events: auto; }
.portrait-region--jorge { left: 28.5%; top: 10.5%; width: 59%; height: 88%; z-index: 1; }
.portrait-region--companion { left: 42%; top: 58%; width: 19.5%; height: 28%; z-index: 2; }
.portrait-link[data-portrait="projects"] .portrait-region--jorge { left: 1%; top: 11%; width: 76%; height: 87.5%; }
.portrait-link[data-portrait="projects"] .portrait-region--companion { left: 29.5%; top: 38%; width: 47%; height: 21.5%; }
.portrait-link[data-portrait="photography"] .profile-photo { object-position: 50% 65%; }
.portrait-link[data-portrait="photography"] .portrait-region--jorge { left: 1.5%; top: 9%; width: 97%; height: 89.5%; }
.portrait-link[data-portrait="photography"] .portrait-region--companion { left: 20.5%; top: 43%; width: 42%; height: 35%; }
.portrait-link[data-portrait="skiing"] .profile-photo { object-position: 50% 50%; }
.portrait-link[data-portrait="skiing"] .portrait-region--jorge { left: 23%; top: 31.5%; width: 56.5%; height: 67%; }
.portrait-link[data-portrait="skiing"] .portrait-region--companion { left: 28%; top: 32%; width: 16.5%; height: 66.5%; }
.portrait-box { position: absolute; inset: 0; border: 1px solid #fff; color: #fff; opacity: 0; pointer-events: none; transition: opacity 140ms ease; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }
.portrait-label { position: absolute; bottom: calc(100% + 1px); left: -1px; padding: 2px 4px; background: rgb(24 29 29 / .75); color: #fff; font-style: normal; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 10px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.portrait-link:focus-visible .portrait-box { opacity: 1; }
.name-region { position: relative; display: inline-block; white-space: nowrap; outline: none; }
.name-box { position: absolute; inset: 1px -3px; border: 1px solid var(--ink); opacity: 0; pointer-events: none; transition: opacity 140ms ease; }
.name-box .portrait-label { letter-spacing: normal; }
.name-region:focus-visible .name-box { opacity: 1; }
@media (hover: hover) {
  .portrait-region:hover .portrait-box { opacity: 1; }
  .name-region:hover .name-box { opacity: 1; }
}
.profile h1 { margin-top: var(--space-6); font-size: var(--text-heading); line-height: 1.2; letter-spacing: -0.045em; font-weight: 550; }
.email { display: block; width: fit-content; margin-top: var(--space-4); color: var(--accent); font-size: inherit; text-decoration: none; }
.email:hover { text-decoration: underline; }
.email, .social, .section-nav { font-style: normal; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.section-nav { display: grid; gap: var(--space-1); margin-top: var(--space-8); }
.section-nav a { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 16px; width: 100%; min-height: 32px; color: var(--secondary); text-decoration: none; transition: color 160ms; }
.section-nav a:hover, .section-nav a:focus-visible { color: var(--ink); }
.section-nav a:hover { text-decoration: none; }
.pixel-icon { display: block; justify-self: center; width: auto; height: auto; max-width: none; image-rendering: pixelated; opacity: 0; pointer-events: none; transition: opacity 140ms ease, filter 140ms ease; }
.section-nav a:focus-visible .pixel-icon { opacity: 1; }
.section-nav a[aria-current="location"] .pixel-icon { opacity: 1; }
@media (hover: hover) {
  .section-nav a:hover .pixel-icon { opacity: 1; }
  .section-nav:has(a:hover) a:not(:hover) .pixel-icon { filter: grayscale(1); }
  .section-nav:has(a:hover) a:is([aria-current="location"], :focus-visible):not(:hover) .pixel-icon { opacity: .55; }
}
.social { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); color: var(--muted); font-size: inherit; }
.social a { color: var(--accent); text-decoration: none; }
.social a:hover { color: var(--accent); text-decoration: underline; }
.content { min-width: 0; }
.about { font-size: var(--text-body); line-height: 1.7; padding-top: 1px; }
.about > p + p { margin-top: var(--space-4); }
.hello-inline { display: inline-block; width: auto; height: 1em; vertical-align: -.08em; margin-right: .15em; user-select: none; }
.about > p, .about > .email, .about > .social, .content > section:not(.about) { animation: content-arrive 700ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes content-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.content > section { display: flow-root; }
.content > section + section { margin-top: var(--section-gap); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--heading-gap); }
.section-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: var(--text-heading); line-height: 1.3; font-weight: 400; font-style: italic; letter-spacing: -0.035em; }
.section-heading .pixel-icon { display: none; }
.section-heading > span { color: var(--muted); font-size: var(--text-label); letter-spacing: .02em; }
.work { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.work + .work { margin-top: var(--entry-gap); }
.work-visual { position: relative; overflow: hidden; display: grid; align-items: center; min-height: 88px; background: #f7f8f7; border-radius: 3px; }
.work-visual img { display: block; width: 100%; height: auto; }
.work-visual .overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 250ms ease; }
.work:hover .overlay { opacity: 1; }
/* Show work entries as text for now. */
#research .work, #projects .work { display: block; }
#research .work-visual, #projects .work-visual { display: none; }
#research .work--thumbnail, #projects .work--thumbnail { display: grid; }
#research .work--thumbnail .work-visual, #projects .work--thumbnail .work-visual { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); aspect-ratio: 1; min-height: 0; background: transparent; }
#research .work--thumbnail .work-visual img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.work-visual video { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
h3 { font-size: var(--text-body); line-height: 1.45; font-weight: 550; letter-spacing: -.015em; }
h3 a { color: var(--ink); text-decoration: none; }
h3 a:hover { color: var(--ink); text-decoration: underline; }
.authors, .description { margin-top: var(--space-2); font-size: var(--text-detail); line-height: 1.7; color: var(--secondary); }
.authors a { color: inherit; text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.authors strong { color: var(--ink); font-weight: 550; }
.paper-venue { margin-top: var(--space-1); color: var(--muted); font-size: var(--text-detail); line-height: 1.7; }
sup { font-size: .75em; line-height: 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-2); font-size: var(--text-detail); }
.actions a { text-decoration: none; }
.actions a:hover { text-decoration: underline; }
.disabled { color: var(--muted); }
.paper-tldr { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); background: #f6f7f6; border-radius: 3px; color: var(--secondary); font-size: var(--text-detail); line-height: 1.7; }
.tldr-label { margin-right: 5px; color: var(--ink); font-size: var(--text-label); font-weight: 600; }
.course + .course { margin-top: var(--entry-gap); }
.course { font-size: var(--text-body); line-height: 1.7; }
.course a { color: var(--accent); text-decoration: none; }
.course a:hover { color: var(--accent); text-decoration: underline; }
.course p + p { font-size: var(--text-detail); margin-top: var(--space-1); color: var(--muted); }
.photo-mosaic { --photo-columns: 3; --photo-gap: var(--space-2); position: relative; display: grid; grid-template-columns: repeat(var(--photo-columns), minmax(0, 1fr)); gap: var(--photo-gap); align-items: start; }
.photo-mosaic.is-masonry { display: block; }
.photo-mosaic.is-masonry .photograph { position: absolute; }
.photograph { display: block; overflow: hidden; border-radius: 2px; background: #f4f5f4; }
.photograph img { display: block; width: 100%; height: auto; transition: opacity 200ms ease; }
.photograph:hover img { opacity: .9; }
.photo-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 28px 28px 48px; border: 0; background: transparent; overflow: hidden; touch-action: none; cursor: zoom-out; outline: none; }
.photo-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.photo-lightbox::backdrop { background: rgb(0 0 0 / .94); }
.photo-lightbox-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: center; user-select: none; pointer-events: none; }
.photo-lightbox p { position: absolute; bottom: 14px; left: 16px; right: 16px; margin: 0; color: var(--caption-on-dark); text-align: center; font-size: var(--text-label); pointer-events: none; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 8px 16px; background: white; }
.skip-link:focus { top: 16px; }

@media (max-width: 900px) {
  .page { gap: 40px; width: calc(100% - 64px); }
  .work { grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-4); }
}
/* Compact profile header when width or height cannot accommodate a sidebar. */
@media (max-width: 680px), (max-height: 600px) {
  :root { --section-gap: var(--space-12); }
  html { scroll-padding-top: 24px; }
  .page { --portrait-size: min(152px, 40vw); display: block; width: min(calc(100% - 40px), 1040px); padding-block: 40px 24px; }
  .sidebar { position: static; display: grid; grid-template-columns: var(--portrait-size) minmax(0, 1fr); column-gap: var(--space-6); row-gap: var(--space-2); min-height: 0; margin-bottom: var(--space-8); }
  .profile { display: contents; }
  .profile .portrait-link { grid-column: 1; grid-row: 1 / 3; }
  .profile h1 { grid-column: 2; grid-row: 1; align-self: end; margin: 0; }
  .profile h1 .name-region { display: table; }
  .name-region[aria-describedby="last-name-label"] .portrait-label { top: calc(100% + 1px); bottom: auto; }
  .sidebar-signature { position: static; bottom: auto; width: auto; grid-column: 2; grid-row: 2; align-self: start; }
  .sidebar-signature img, .signature-replay { width: 60px; }
  .section-nav { display: none; }
  .section-heading h2 { display: flex; align-items: center; gap: 12px; }
  .section-heading .pixel-icon { display: block; opacity: 1; }
}
@media (max-height: 600px) {
  .sidebar-signature img, .signature-replay { width: 44px; }
}
@media (max-width: 680px) {
  .work { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .work--thumbnail .work-visual { width: 152px; max-width: 100%; }
  .work-visual { min-height: 72px; }
  .photo-mosaic { --photo-columns: 2; --photo-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .about > p, .about > .email, .about > .social, .content > section:not(.about) { animation: none; }
  html { scroll-behavior: auto; }
  .portrait-pending .profile-photo { visibility: visible; }
  .signature-pending .sidebar-signature > img { visibility: visible; }
  *, *::before, *::after { transition: none !important; }
}
