@import url('./office-artifacts.css');
@import url('./office-atlas.css');
@import url('./office-notes.css');

.office-profile { padding-block: clamp(1.7rem, 3.6vw, 3.2rem) clamp(3.5rem, 5.5vw, 5.5rem); }
.office-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'portrait identity actions' 'portrait summary summary';
  align-items: center;
  gap: .8rem clamp(1rem, 2.8vw, 2.4rem);
}
.office-intro img { grid-area: portrait; align-self: start; width: clamp(5.5rem, 11vw, 9rem); height: auto; border-radius: 5px; }
.office-identity { grid-area: identity; }
.office-identity p span { margin-inline: .3em; color: #94a29e; }
.office-identity h1 { margin-top: .25rem; font-size: clamp(2.25rem, 4.3vw, 3.85rem); line-height: 1.03; letter-spacing: -.065em; font-weight: 620; }
.office-summary-copy { grid-area: summary; max-width: 75ch; }
.office-summary-copy p:first-child { font-size: clamp(1.04rem, 1.5vw, 1.22rem); line-height: 1.48; }
.office-summary-copy p + p { margin-top: .5rem; color: var(--muted); }
.office-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: .6rem; }
.office-download { color: var(--ink); background: var(--green); }
.office-download:hover { background: var(--mint); }
.office-biography {
  display: grid;
  grid-template-columns: clamp(5.5rem, 11vw, 9rem) minmax(0, 75ch);
  gap: .4rem clamp(1rem, 2.8vw, 2.4rem);
  margin-block: clamp(1.4rem, 3vw, 2.5rem);
  padding-block: 1.3rem .9rem;
  border-block: 1px solid var(--line);
}
.office-biography h2 { font-size: 1.12rem; font-weight: 590; }
.office-biography summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .65rem; width: fit-content; min-height: 44px; color: var(--mint); font-size: .95rem; font-weight: 550; }
.office-biography summary::after { content: '+'; font: 500 1.2rem/1 var(--font-mono); }
.office-biography details[open] summary::after { content: '−'; }
.office-biography .bio-less, .office-biography details[open] .bio-more { display: none; }
.office-biography details[open] .bio-less { display: inline; }
.office-biography summary::-webkit-details-marker { display: none; }
.office-biography p { color: var(--muted); font-size: .95rem; }
.office-biography details p { margin: .35rem 0 .85rem; }
.office-caption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .15rem 1.5rem; margin: 0 0 .75rem; }
.office-caption h2 { font-size: clamp(1.22rem, 2vw, 1.55rem); font-weight: 585; letter-spacing: -.038em; }
.office-caption p { color: var(--muted); font-size: .94rem; }

.office { position: relative; }
.office-destination { display: block; height: 0; }
/* Fragment links land at the room controls, independently of the camera pose. */
.office[data-enhanced] .office-destination { position: absolute; top: 0; left: 0; }
.office-caption { min-height: 44px; align-items: center; }
.office-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .35rem 0 .35rem .8rem;
  border: 0;
  background: transparent;
  color: var(--mint);
  font: inherit;
  font-size: .93rem;
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
}
.office-back[hidden], .office[data-active] .office-caption p { display: none; }
.office-back span { font-size: 1.1em; }
.office-back:hover { color: white; }
.office-frame {
  position: relative;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 1.5;
  background: var(--ink);
  border-radius: 5px;
}
.office-stage { position: absolute; inset: 0; width: 100%; aspect-ratio: 1.5; }
.office[data-enhanced] .office-frame { max-height: max(24rem, calc(100svh - 10rem)); }
.office-illustration, .office-illustration svg { display: block; width: 100%; height: 100%; }
.office[data-enhanced] .office-stage {
  inset: 0 auto auto 0;
  width: 1536px; height: 1024px;
  transform-origin: 0 0;
}
.office[data-enhanced] .office-illustration { position: absolute; inset: 0; }
.office[data-enhanced] .office-map-underlay { display: none; }
.office-cover { display: none; }
.office[data-enhanced] .office-cover:not([hidden]) {
  display: block;
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.office-cover > svg { display: block; width: 100%; height: 100%; }
.office-cover .cover-heading { font-size: 26px; font-weight: 620; letter-spacing: -.04em; }
.office-cover .cover-mono { font-family: var(--font-mono); }
.office-hotspot { position: absolute; z-index: 2; pointer-events: none; outline: none; }
.office-hotspot::before { content: ''; position: absolute; inset: 0; clip-path: var(--shape); pointer-events: auto; cursor: zoom-in; }
.office-hotspot:is(:hover, :focus-visible)::before { background: #f1f5e817; }
.office-model-link::before { cursor: pointer; }
.office-model-link:focus-visible::before { background: #dbf4bf42; }
.office-model-link:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.office-hotspot .office-tag {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: .4em .72em;
  border: 1px solid #b7d89485;
  border-radius: 3px;
  color: var(--text);
  background: #212b32f5;
  font-size: 18px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
}
.office-hotspot:is(:hover, :focus-visible) .office-tag { opacity: 1; }
.office-hotspot:focus-visible .office-tag { outline: 3px solid var(--mint); outline-offset: 4px; }
.office[data-active] .office-hotspot { visibility: hidden; }
.office-directory { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.office-directory-link {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background-color: var(--surface);
  color: var(--text);
  font-size: .91rem;
}
.office-directory-link:is(:hover, :focus-visible, [aria-current='true']) { color: var(--mint); border-color: var(--green); }
.office-exhibit {
  color-scheme: light;
  color: #253a31;
  font-family: inherit;
  overflow-wrap: break-word;
}
.office-exhibits > .office-exhibit { margin-top: 1.5rem; padding: clamp(1rem, 3vw, 2.5rem); background: #efeee3; }
.office-exhibit :focus-visible { outline-color: #477953; }
.office-exhibit-head h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 590; letter-spacing: -.05em; line-height: 1.1; }
.office-exhibit-body { margin-top: .9rem; }
.office[data-enhanced] .office-exhibit {
  position: absolute;
  inset: 0 auto auto 0;
  box-sizing: border-box;
  margin: 0;
  padding: clamp(.65rem, 1.75vw, 1.45rem);
  transform-origin: 0 0;
  overflow: hidden;
  overflow-anchor: none;
  outline: none;
  pointer-events: none;
  container-type: inline-size;
  scrollbar-width: thin;
  scrollbar-color: #7485778c transparent;
}
.office[data-enhanced] .office-exhibit[data-visible]:not([inert]) {
  overflow: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}
.office[data-enhanced] .office-exhibit[inert] { opacity: 0; }
.office[data-enhanced] .office-exhibit-head h2 { font-size: clamp(1.25rem, 5cqi, 2.05rem); }
.office[data-enhanced] #surface-ausbildung { color: #2b4940; }
.office[data-enhanced] #surface-beruf { color: #2d3934; }
.office[data-enhanced] #surface-zertifikate .office-exhibit-head h2 {
  display: inline-block;
  padding: .2em .55em;
  background: #ede9da;
  color: #38453b;
  font: 560 clamp(.78rem, 2.6cqi, 1rem)/1.4 var(--font-mono);
  letter-spacing: .035em;
}
.office[data-enhanced] #surface-sprachen { background: #e9e5d6; }
.office[data-enhanced] #surface-beruf[inert] .career-index { display: none; }
.office[data-enhanced] #surface-werkzeuge { color-scheme: dark; color: #eff0e5; background: #222d3440; }
.office[data-enhanced] .office-tool-inventory { background: transparent; padding-inline: 0; }
#surface-werkzeuge :focus-visible { outline-color: var(--green); }
.office-directory-link:focus-visible, .office-back:focus-visible { outline-offset: 2px; }

@media (max-width: 700px) {
  .office-intro {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'portrait identity' 'summary summary' 'actions actions';
    gap: 1rem;
  }
  .office-intro img { width: clamp(3.55rem, 13vw, 5.5rem); align-self: center; }
  .office-identity .eyebrow { font-size: .65rem; }
  .office-biography { grid-template-columns: 1fr; }
  .office-caption { gap: .25rem .6rem; }
  .office-caption p { font-size: .88rem; }
  .office-back { font-size: .82rem; padding-left: .25rem; }
  .office[data-active] .office-frame { aspect-ratio: auto; height: max(21rem, min(69svh, 33rem)); }
  .office-directory-link { font-size: .86rem; padding-inline: .75rem; }
}
@media print {
  .office[data-enhanced] .office-frame { max-height: none; }
  .office-intro, .office-profile { padding-block: 0; }
  .office-frame, .office[data-active] .office-frame, .office[data-enhanced] .office-stage {
    display: block; position: static; width: auto; height: auto; aspect-ratio: auto; overflow: visible; transform: none !important; background: none;
  }
  .office-illustration, .office-directory, .office-caption, .office-hotspot, .office-actions,
  .office[data-enhanced] .office-cover:not([hidden]) { display: none; }
  .office[data-enhanced] .office-exhibit[inert] { opacity: 1; }
  .office[data-enhanced] .office-exhibit, .office-exhibits > .office-exhibit {
    position: static; display: block; opacity: 1; transform: none !important; width: auto !important; height: auto !important;
    overflow: visible; margin-block: 1.5rem; color: #222 !important; background: white !important; padding: 0;
  }
}
