@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/bricolage.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --cream: #f4f0e6;
  --paper: #fbf8f0;
  --ink: #18342e;
  --muted: #4d5d55;
  --red: #aa382f;
  --red-deep: #842b24;
  --rule: #d7d1c2;
  --dark-rule: #446057;
  --light-text: #e2e6d9;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font: 16px/1.55 "DM Sans", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
a { color: inherit; text-underline-offset: 0.22em; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 2px solid var(--red-deep); outline-offset: 4px; }
[id] { scroll-margin-top: 1.5rem; }

.portfolio {
  container: portfolio / inline-size;
  max-width: 108rem;
  margin-inline: auto;
  background: var(--cream);
}

.phone-preview {
  background: #e5ded1;
}

.phone-preview .portfolio {
  max-width: 390px;
  outline: 1px solid var(--rule);
}

.gutter {
  padding-inline: clamp(1.25rem, 4.65cqi, 4.9rem);
}

.site-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  font: 800 clamp(1.55rem, 2.25cqi, 2.15rem)/1 var(--display);
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.site-name span { color: var(--red); }

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3.4cqi, 3rem);
}

.site-nav a, .header-contact {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover { color: var(--red); }

.header-contact {
  justify-content: center;
  gap: 0.7rem;
  padding-inline: 1rem;
  border: 1px solid #b9bdaf;
  border-radius: 999px;
}

.header-contact:hover { background: var(--paper); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.82rem;
  padding-block: clamp(1.6rem, 2.75cqi, 3.2rem) clamp(1.85rem, 3.1cqi, 3.4rem);
}

.hero:focus { outline: none; }

.intro {
  margin-bottom: clamp(0.4rem, 1.25cqi, 1.15rem);
}

.intro-role {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.25cqi, 1.12rem);
  font-weight: 700;
}

.intro h1 {
  font-size: clamp(2.15rem, 3.65cqi, 4.35rem);
  font-weight: 750;
  line-height: 1.01;
  letter-spacing: -0.027em;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 1.14rem;
  border-radius: 0.45rem;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.button-primary { color: var(--paper); background: var(--red); }
.button-primary:hover { background: var(--red-deep); }

.model-frame {
  min-width: 0;
  padding: 0 0.6rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 0.9rem;
  background: var(--paper);
  box-shadow: 0 1.2rem 3rem -1.5rem #532d2542;
  scroll-margin-top: 1rem;
}

.model-caption {
  display: flex;
  min-height: 3rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  color: var(--muted);
  font-size: clamp(0.8rem, 1.28cqi, 0.96rem);
}

.model-caption strong { color: var(--ink); }

.model-scene {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #c8b298;
}

.model-artwork { position: relative; }
.model-artwork picture { display: block; }

.model-effects {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .model-effects { visibility: hidden; }
}

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

.marker {
  position: absolute;
  z-index: 1;
  top: var(--pin-y);
  left: var(--pin-x);
}

.marker:focus-within, .marker.is-selected { z-index: 2; }

/* The pin coordinates refer to the full, uncropped model image. */
.marker-muro {
  --pin-x: 29%;
  --pin-y: 23%;
  --shift-x: -5.5cqw;
  --shift-y: -3cqw;
  --tilt: -151.39deg;
  --label-align: -100%;
}

.marker-voice {
  --pin-x: 70%;
  --pin-y: 30%;
  --shift-x: 6.5cqw;
  --shift-y: -3.3cqw;
  --tilt: -26.91deg;
}

.marker-rootally {
  --pin-x: 31.6%;
  --pin-y: 65.6%;
  --shift-x: -8cqw;
  --shift-y: -1.55cqw;
  --tilt: -169.03deg;
  --label-align: -100%;
}

.marker-publications {
  --pin-x: 72.4%;
  --pin-y: 69.3%;
  --shift-x: 7.05cqw;
  --shift-y: -1.9cqw;
  --tilt: -15.08deg;
}

@container (width < 39rem) {
  .marker-publications {
    --shift-x: 3cqw;
    --shift-y: -0.81cqw;
  }
}

.pin-dot {
  position: absolute;
  z-index: 2;
  width: clamp(0.7rem, 2.05cqw, 1.1rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 1px 3px #42271e52;
  pointer-events: none;
}

.marker.is-selected .pin-dot { box-shadow: 0 0 0 4px #aa382f80, 0 0 0 6px #fffaf0b3; }

.map-control {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  translate: -50% -50%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.map-control:focus-visible { outline: none; }

.pin-label {
  position: absolute;
  z-index: 1;
  top: calc(50% + var(--shift-y));
  left: calc(50% + var(--shift-x));
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding-inline: clamp(0.55rem, 1.45cqw, 1rem);
  translate: var(--label-align, 0%) -50%;
  border: 1px solid #fff9ee;
  border-radius: 0.32rem;
  background: var(--paper);
  box-shadow: 0 2px 12px #261e1a29;
  font: 800 clamp(0.81rem, 2.05cqw, 1.22rem)/1 var(--display);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.pin-line {
  position: absolute;
  top: calc(50% - 1px);
  left: 50%;
  width: hypot(var(--shift-x), var(--shift-y));
  height: 2px;
  rotate: var(--tilt);
  transform-origin: left center;
  background: var(--red);
  box-shadow: 0 0 0 1px #fff9eea6;
  pointer-events: none;
}

.map-control:focus-visible .pin-label {
  outline: 2px solid var(--red-deep);
  outline-offset: 3px;
}

.map-control:hover .pin-label,
.map-control[aria-expanded="true"] .pin-label {
  color: var(--paper);
  border-color: var(--red);
  background: var(--red);
}

.room-list {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  overflow-anchor: none;
}

.hero.has-selection .room-list { display: grid; }

.room-list button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 0.38rem;
  background: var(--paper);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.room-list button::before {
  flex: none;
  width: 0.53rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.room-list button:hover { border-color: var(--red); }

.room-list button[aria-expanded="true"] {
  border-color: var(--red-deep);
  color: var(--paper);
  background: var(--red-deep);
}

.room-list button[aria-expanded="true"]::before { background: var(--paper); }


.room-preview {
  z-index: 1;
  min-width: 0;
  padding: clamp(1.05rem, 2.3cqi, 2.35rem);
  border: 1px solid var(--dark-rule);
  border-radius: 0.75rem;
  color: var(--paper);
  background: var(--ink);
  overflow-anchor: none;
}

.room-preview article { max-width: 70ch; }

.preview-bar {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.3rem -0.3rem 0.65rem 0;
}

.preview-role {
  color: var(--light-text);
  font-size: 0.87rem;
  font-weight: 700;
}

.close-room {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #73867a;
  border-radius: 50%;
  background: transparent;
  font-family: system-ui, sans-serif;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.close-room:hover { background: #33514a; }

.room-preview h2 {
  font-size: clamp(1.9rem, 3.15cqi, 3.6rem);
  line-height: 1;
  letter-spacing: -0.027em;
  overflow-wrap: anywhere;
}

.room-preview article > p {
  margin-top: 0.7rem;
  color: var(--light-text);
  font-size: clamp(0.94rem, 1.25cqi, 1.08rem);
}

.room-preview p.preview-lead {
  margin-top: 1.05rem;
  color: var(--paper);
  font-weight: 700;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  gap: 0.65rem;
  margin-top: 0.52rem;
  font-size: 0.94rem;
  font-weight: 700;
}

.share-room {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0 0.75rem;
  border: 1px solid #73867a;
  border-radius: 0.35rem;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.share-room:hover { background: #33514a; }

.room-preview :focus-visible, .experience :focus-visible { outline-color: #f6caba; }

.profile-section {
  padding-block: clamp(3.5rem, 6.4cqi, 7rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: clamp(1.55rem, 3.25cqi, 3.1rem);
}

.section-heading h2, .site-footer h2 {
  font-size: clamp(2.55rem, 5.05cqi, 5.05rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.section-heading p {
  max-width: 51ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4cqi, 1.2rem);
}

.timeline-entry, .paper-list li {
  display: grid;
  grid-template-columns: minmax(9.5rem, 0.66fr) minmax(0, 2.1fr);
  gap: 1rem clamp(1rem, 4.15cqi, 4.7rem);
  padding-block: clamp(1.3rem, 2.4cqi, 2.35rem);
  border-top: 1px solid var(--rule);
}

.paper-list li:last-child { border-bottom: 1px solid var(--rule); }

.timeline-date, .paper-venue, .project-date {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.timeline-entry h3, .paper-list h3, .project-grid h3, .about-grid h3 {
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -0.026em;
  text-wrap: pretty;
}

.paper-list h3 a:hover { color: var(--red-deep); }

.paper-list div > p, .project-grid article > p:not(.project-date) {
  max-width: 64ch;
  margin-top: 0.65rem;
  color: var(--muted);
}

.experience {
  color: var(--paper);
  background: var(--ink);
}

.timeline-entry { border-color: var(--dark-rule); }
.timeline-entry:last-child { border-bottom: 1px solid var(--dark-rule); }
.timeline-entry h3 { font-size: clamp(1.55rem, 2.6cqi, 2.65rem); }

.timeline-date { color: #ccdbca; }

.timeline-company {
  display: flex;
  align-items: center;
  gap: clamp(0.72rem, 1.25cqi, 1.15rem);
}

.company-logo {
  flex: none;
  display: block;
  width: clamp(2.8rem, 4.1cqi, 3.7rem);
  height: auto;
  aspect-ratio: 1;
  padding: 0.35rem;
  border-radius: 0.55rem;
  background: #fffdf7;
  object-fit: contain;
}

.timeline-role {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.1rem;
  margin-top: 0.35rem;
  font-weight: 700;
}

.timeline-role span {
  color: #ccdbca;
  font-weight: 400;
}

.timeline-entry div > p:not(.timeline-role) {
  max-width: 71ch;
  margin-top: 0.78rem;
  color: var(--light-text);
}

.link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.35rem;
}

.text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.96rem;
  font-weight: 700;
}

.timeline-entry .text-link {
  margin-top: 0.32rem;
  color: var(--paper);
}

.paper-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.paper-list h3 { font-size: clamp(1.26rem, 2.06cqi, 2.12rem); }
.paper-list h3 a { text-decoration-thickness: 1px; }
.paper-list h3 span { font: 0.72em/1 system-ui, sans-serif; white-space: nowrap; }

.paper-venue span {
  display: block;
  font-weight: 400;
}

#projects { padding-top: 0; }

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.25cqi, 2.45rem);
}

.project-grid article { border-top: 1px solid var(--rule); padding-top: 1rem; }
.project-grid h3 { font-size: clamp(1.35rem, 2.17cqi, 2.25rem); }
.project-date { margin-bottom: 0.4rem; }

.project-grid .project-feature {
  grid-row: span 2;
  border: 1px solid #ccd4c5;
  border-radius: 0.65rem;
  padding: clamp(1.3rem, 2.6cqi, 3rem);
  background: #e9ece1;
}

.project-feature h3 { font-size: clamp(1.9rem, 3.35cqi, 3.4rem); }

.project-feature .text-link { margin-top: 0.6rem; }

.about { background: var(--paper); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3.2cqi, 3.6rem);
}

.about-grid article {
  border-top: 1px solid var(--rule);
  padding-top: 1.15rem;
}

.about-grid h3 { margin-bottom: 0.66rem; font-size: clamp(1.35rem, 2.3cqi, 2.05rem); }
.about-grid p, .about-grid ul { color: var(--muted); }
.about-grid ul { padding-left: 1.2rem; }
.about-grid li + li { margin-top: 0.65rem; }

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.35rem 2rem;
  padding-block: clamp(2.75rem, 5.5cqi, 5rem);
  border-top: 1px solid var(--rule);
}

.site-footer h2 { font-size: clamp(2.35rem, 4.65cqi, 4.2rem); }
.site-footer p { margin-top: 0.8rem; color: var(--muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  z-index: 4;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--paper);
  background: var(--ink);
}

@container portfolio (max-width: 58rem) {
  .map-control { display: none; }
  .room-list { display: grid; }
  .room-preview h2 { font-size: clamp(2.2rem, 5.4cqi, 4.05rem); }
  .room-preview article > p { font-size: 1rem; }
}

@container portfolio (max-width: 40rem) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.3rem 0.9rem;
    padding-top: 0.7rem;
  }

  .header-contact {
    grid-row: 1;
    grid-column: 2;
    font-size: 0.85rem;
    padding-inline: 0.75rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 0.4rem;
  }

  .site-nav a { font-size: 0.86rem; }
  .hero { padding-top: 1.25rem; }
  .intro-role { margin-bottom: 0.55rem; }
  .intro h1 { max-width: 18ch; font-size: clamp(2.15rem, 9.6cqi, 3.4rem); }
  .model-frame { padding: 0 0.35rem 0.35rem; }
  .model-caption { min-height: 2.35rem; padding-inline: 0.45rem; }
  .room-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }


  .section-heading, .site-footer { flex-direction: column; align-items: start; gap: 1rem; }
  .timeline-entry, .paper-list li { grid-template-columns: minmax(0, 1fr); gap: 0.38rem; }
  .timeline-entry { padding-block: 1.55rem; }
  .paper-venue span { display: inline; margin-left: 0.25rem; }
  .project-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .project-grid .project-feature { grid-row: auto; margin-bottom: 0.25rem; }
}

@media (min-width: 440px) {
  .phone-preview .portfolio {
    margin-block: 1.25rem;
    box-shadow: 0 1.4rem 4rem #45352726;
  }
}
