:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #17243b;
  background: #f4f6fa;
  --accent: #244eb8;
  --line: #dfe5ef;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #5878e8; outline-offset: 4px; }
.topbar {
  max-width: 1380px; margin: auto; padding: 20px clamp(16px, 5vw, 70px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 9px; align-items: center; color: inherit; font-weight: 750; white-space: nowrap; }
.mark { width: 16px; height: 16px; border: 2px solid var(--accent); transform: rotate(30deg); border-radius: 3px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions button, .download, .controls button, .dialog-heading button {
  padding: 9px 13px; border-radius: 9px; border: 1px solid var(--line);
  color: #243758; background: white; font-weight: 650;
}
.download { background: #203f98; color: white; border-color: #203f98; }
.layout {
  max-width: 1380px; margin: auto; padding: clamp(24px, 5vw, 66px) clamp(16px, 5vw, 70px);
  display: grid; grid-template-columns: minmax(270px, .85fr) minmax(0, 1.28fr);
  align-items: start; gap: clamp(25px, 6vw, 100px);
}
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.15rem, 5.2vw, 4.65rem); line-height: 1; letter-spacing: -.06em; }
#summary { font-size: .99rem; line-height: 1.62; color: #44536c; margin: 18px 0 12px; }
.contact { display: flex; flex-wrap: wrap; gap: 7px 14px; font-size: .85rem; color: #44536c; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 24px; }
.btn { text-align: left; padding: 10px 9px; border: 1px solid var(--line); background: white; color: #344769; border-radius: 8px; font-size: .83rem; font-weight: 650; }
.btn:hover, .controls button:hover { border-color: #8297c9; }
.btn[aria-pressed="true"] { background: #e4ecff; border-color: #91a9ec; color: #183b9b; }
.experience { --size: min(100%, 560px); min-width: 0; }
.stage {
  width: var(--size); margin: 0 auto; aspect-ratio: 1; position: relative;
  perspective: 1350px; display: grid; place-items: center;
}
.cube {
  width: 100%; height: 100%; position: absolute;
  transform-style: preserve-3d; transition: transform .65s cubic-bezier(.22,.72,.22,1);
  --depth: calc(var(--edge, 400px) / 2);
}
.show-front { transform: translateZ(calc(-1 * var(--depth))) rotateY(0deg); }
.show-right { transform: translateZ(calc(-1 * var(--depth))) rotateY(-90deg); }
.show-back { transform: translateZ(calc(-1 * var(--depth))) rotateY(-180deg); }
.show-left { transform: translateZ(calc(-1 * var(--depth))) rotateY(90deg); }
.show-top { transform: translateZ(calc(-1 * var(--depth))) rotateX(-90deg); }
.show-bottom { transform: translateZ(calc(-1 * var(--depth))) rotateX(90deg); }
.face {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  backface-visibility: hidden; border-radius: 15px; border: 1px solid #bdcbea;
  background: #fff; box-shadow: 0 10px 26px #1d35651c;
}
#face-view { position: absolute; inset: 0; pointer-events: none; }
#face-view .face { transform: none; pointer-events: auto; }
.stage:has(#face-view .face) .cube { visibility: hidden; }
.face-front { transform: translateZ(var(--depth)); }
.face-right { transform: rotateY(90deg) translateZ(var(--depth)); }
.face-back { transform: rotateY(180deg) translateZ(var(--depth)); }
.face-left { transform: rotateY(-90deg) translateZ(var(--depth)); }
.face-top { transform: rotateX(90deg) translateZ(var(--depth)); }
.face-bottom { transform: rotateX(-90deg) translateZ(var(--depth)); }
.face-header { padding: clamp(12px, 3vw, 25px); background: #e7efff; border-bottom: 1px solid #d7e3fb; }
.face-right .face-header { background: #e3f3f3; }
.face-back .face-header { background: #e9e7fa; }
.face-left .face-header { background: #e9f2e6; }
.face-top .face-header { background: #fff0e3; }
.face-bottom .face-header { background: #e4eff6; }
.face h2 { margin: 0 0 4px; font-size: clamp(1.12rem, 2.4vw, 1.8rem); line-height: 1.13; letter-spacing: -.035em; }
.face-header p { margin: 0; color: #415376; font-size: .83rem; line-height: 1.4; }
.face-content { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 10px clamp(13px, 3vw, 25px) 17px; scrollbar-color: #9aafd8 #f4f6fb; }
.face-content:focus-visible { outline-offset: -4px; }
h3 { margin: 12px 0 5px; font-size: .93rem; }
.face-content ul { padding-left: 18px; margin: 0 0 12px; }
.face-content li { margin: 0 0 6px; color: #344661; font-size: .89rem; line-height: 1.46; }
.controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 15px; }
.controls button { min-width: 43px; padding: 6px 10px; font-size: 1.15rem; }
#position { min-width: 210px; text-align: center; color: #405477; font-size: .85rem; }
dialog { width: min(92vw, 680px); max-height: 86vh; border: 1px solid var(--line); border-radius: 15px; padding: 21px; color: inherit; }
dialog::backdrop { background: #17243b99; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-heading h2 { margin: 0; }
#profile-content p, #profile-content li { line-height: 1.55; color: #44536c; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  h1 br { display: none; }
  .experience { --size: min(100%, 490px); width: 100%; }
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .top-actions button, .download { padding: 7px; font-size: .75rem; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #position { min-width: 155px; }
}
@media (prefers-reduced-motion: reduce) { .cube { transition: none; } }

.brand .mark { display: block; width: 26px; height: 26px; border: 0; transform: none; }
.resume-nav { margin-top: 25px; }
.resume-nav h2, .profile-nav-section h2 { margin: 0 0 8px; font-size: .93rem; color: #243758; }
.roles { margin-top: 0; }
.role-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 104px; padding: 9px; }
.card-copy { display: grid; gap: 3px; min-width: 0; }
.card-title { font-size: .82rem; line-height: 1.24; color: #203450; }
.card-company, .card-period, .card-tenure { font-size: .72rem; line-height: 1.25; font-weight: 500; color: #475b78; }
.card-tenure { color: #24468e; font-weight: 700; }
.profile-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 15px; }
.profile-nav-section button { width: 100%; min-height: 70px; }
.nav-icon {
  width: 28px; height: 28px; border-radius: 7px; display: inline-block;
  background-color: #e8efff; background-image: url('/icons.png');
  background-repeat: no-repeat; background-size: 224px 28px;
  background-position-x: calc(var(--icon) * -28px);
}
.face-icon-heading { display: flex; align-items: flex-start; gap: 10px; }
.face-icon-heading .nav-icon { flex: 0 0 28px; }
.face-header .face-company { font-weight: 650; }
.face-header .face-dates { margin-top: 4px; }
.profile-entry { border: 1px solid #dce6f5; background: #f8faff; border-radius: 8px; margin: 10px 0; padding: 9px 11px; }
.profile-entry h3 { margin: 0 0 4px; }
.profile-entry p { margin: 0; font-size: .86rem; line-height: 1.45; color: #455977; }
.profile-skills .face-header { background: #e2eefb; }
.profile-certifications .face-header { background: #eee7f9; }
#profile-content dd { margin: 3px 0 10px; }
@media (max-width: 760px) {
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .role-card { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (min-height: 660px) {
  .experience { position: sticky; top: 20px; }
}

.profile-navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-nav-section .role-card { grid-template-columns: 1fr; min-height: 98px; }
.profile-education .face-header { background: #e4f1e7; }
.nav-icon { background-size: 308px 28px; }
.meta-line { display: flex; align-items: center; gap: 4px; }
.meta-line .nav-icon {
  flex: 0 0 17px; width: 17px; height: 17px; background-color: transparent;
  background-size: 187px 17px; background-position-x: calc(var(--icon) * -17px);
}
.profile-entry { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
.profile-entry p + p { margin-top: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .role-card { transition: background-color .18s, border-color .18s, box-shadow .18s, translate .18s; }
  .role-card .nav-icon { transition: scale .18s, background-color .18s; }
  .role-card:hover, .role-card:focus-visible { translate: 0 -2px; box-shadow: 0 5px 13px #24375818; }
  .role-card:hover .nav-icon, .role-card:focus-visible .nav-icon { scale: 1.1; background-color: #dae6ff; }
  .role-card:active { translate: 0 1px; }
  .face-arrival .face-icon-heading .nav-icon { animation: icon-arrival .32s ease-out; }
  .face-arrival .profile-entry { animation: entry-arrival .29s ease-out both; }
  .face-arrival .profile-entry:nth-child(2) { animation-delay: .04s; }
  .face-arrival .profile-entry:nth-child(3) { animation-delay: .08s; }
  .face-arrival .profile-entry:nth-child(4) { animation-delay: .12s; }
  .face-arrival .profile-entry:nth-child(5) { animation-delay: .16s; }
  @keyframes icon-arrival {
    from { transform: rotate(-16deg) scale(.82); }
    to { transform: rotate(0) scale(1); }
  }
  @keyframes entry-arrival {
    from { opacity: .55; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.viewer-toolbar {
  display: flex; justify-content: flex-end;
  width: var(--size); margin: 0 auto 8px;
}
#toggle-viewer {
  border: 1px solid var(--line); background: white; color: #243758;
  padding: 6px 11px; border-radius: 8px; font-weight: 650; font-size: .8rem;
}
#toggle-viewer:hover { border-color: #8297c9; }
.viewer-locked { overflow: hidden; }
.experience:is(:fullscreen, .viewer-expanded) {
  position: fixed; inset: 0; z-index: 10; width: 100%; height: 100%;
  height: 100dvh; margin: 0; padding: clamp(12px, 3vw, 30px);
  display: flex; flex-direction: column;
  background: #f4f6fa; color: #17243b;
  --size: min(100%, 1040px);
}
.experience:is(:fullscreen, .viewer-expanded) .stage {
  flex: 1; min-height: 0; aspect-ratio: auto;
}
.experience:is(:fullscreen, .viewer-expanded) .cube {
  width: min(100%, calc(100dvh - 135px)); height: auto; aspect-ratio: 1;
}
.experience:is(:fullscreen, .viewer-expanded) .face-content {
  padding-left: clamp(14px, 4vw, 38px); padding-right: clamp(14px, 4vw, 38px);
}
