html{scrollbar-gutter:stable}
html.dialog-open{overflow:hidden}
.skill-dialog{width:calc(100% - 48px);max-width:1120px;max-height:calc(100dvh - 64px);padding:0;border:1px solid #c9d0c1;border-radius:20px;background:var(--paper);color:var(--ink);box-shadow:0 28px 100px #202a2433;overflow:auto;overscroll-behavior:contain}
.skill-dialog::backdrop{background:#222c2566;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.skill-dialog[open]::backdrop{animation:dialog-backdrop-in 300ms var(--ease-out)}
.skill-dialog.is-closing::backdrop{animation:dialog-backdrop-out 190ms ease-in both}
@keyframes dialog-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes dialog-backdrop-out{from{opacity:1}to{opacity:0}}
.skill-dialog{transform-origin:50% 45%}
.dialog-close{display:block;position:sticky;top:16px;margin:16px 18px 0 auto;padding:9px 16px;border:1px solid var(--line);border-radius:24px;background:var(--paper);font-size:13px;z-index:1}
.dialog-close:hover{background:var(--sage)}
.dialog-content{padding:20px 44px 44px}
.dialog-content h2{margin:16px 0 20px;font-size:36px;line-height:1.2}
.dialog-rating{display:flex;align-items:center;gap:20px;font-size:13px;line-height:22px;color:var(--muted);flex-wrap:wrap}
.dialog-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-top:30px;align-items:start}
.dialog-layout.without-gallery{grid-template-columns:1fr}
.dialog-description{font-size:15px;line-height:27px;white-space:pre-line;overflow-wrap:anywhere}
.education-document{margin-top:24px}
.education-document > .gallery-frame .gallery-stage{aspect-ratio:1.42;background:#eeede7}
.skill-gallery{min-width:0}
.gallery-frame{position:relative}
.gallery-stage{position:relative;width:100%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#e7eade}
.gallery-stage img,.gallery-stage video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.gallery-stage img.gallery-video-poster{object-fit:cover}
.gallery-stage>.gallery-slide{position:absolute;inset:0;width:100%;height:100%}
.gallery-placeholder{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#e1e7db;color:#697461}
.gallery-tone-1{background:#e8e3dc;color:#877969}
.gallery-tone-2{background:#e5e3e9;color:#7b7586}
.gallery-placeholder-number{font:400 70px/1 'IBM Plex Mono',monospace;opacity:.28;letter-spacing:-.07em}
.gallery-placeholder-label{font-size:12px;opacity:.8}
.gallery-dots{display:flex;justify-content:center;flex-wrap:wrap;gap:2px;margin-top:12px}
.gallery-dot{display:grid;place-items:center;width:28px;height:28px;border-radius:50%}
.gallery-dot::after{content:'';width:6px;height:6px;border-radius:50%;background:#bdc4b6;transition:background-color 160ms,transform 160ms}
.gallery-dot[aria-pressed='true']::after{background:#596650;transform:scale(1.3)}
.gallery-dot:hover::after{background:#79876f}
.gallery-dot:focus-visible{outline-offset:0}
.gallery-step{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border:1px solid #cbd2c388;border-radius:50%;background:#f8f6f0d9;font:30px/1 Onest,Arial,sans-serif;display:grid;place-items:center}
.gallery-previous{left:16px}.gallery-next{right:16px}
.gallery-step:hover{background:var(--sage)}
.gallery-step,.dialog-close{transition:background-color 180ms,border-color 180ms,box-shadow 180ms}
.gallery-step:active{background:#d7dfce;box-shadow:inset 0 1px 4px #29302712}
.gallery-dot::after{transition:background-color 180ms,transform 220ms var(--ease-out)}
@media(max-width:640px){
  .skill-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:16px}
  .dialog-content{padding:20px 24px 30px}
  .dialog-content h2{font-size:28px}
  .dialog-description{font-size:14px;line-height:24px}
  .dialog-rating{gap:8px 16px}
  .dialog-layout{margin-top:24px}
  .gallery-step{width:36px;height:36px;font-size:26px}
  .gallery-previous{left:10px}.gallery-next{right:10px}
}
@media(prefers-reduced-motion:reduce){.skill-dialog::backdrop{animation:none!important}.gallery-step,.dialog-close,.gallery-dot::after{transition:none}}

.dialog-actions{position:sticky;top:0;display:flex;align-items:center;justify-content:flex-end;gap:18px;padding:12px 18px;background:var(--paper);z-index:3;border-radius:20px 20px 0 0}
.dialog-actions .dialog-close{position:static;margin:0;min-height:40px}
.copy-control{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.copy-button{font-size:12px;min-height:40px;color:var(--muted);text-decoration:underline;text-underline-offset:4px}
.copy-fallback{max-width:100%;width:240px;padding:8px;border:1px solid var(--line);border-radius:6px;font:12px/20px Onest,sans-serif;background:var(--paper);color:var(--ink)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.gallery-stage{touch-action:pan-y}
.gallery-expand{position:absolute;right:14px;top:14px;width:44px;height:44px;display:grid;place-items:center;border:1px solid #cbd2c388;border-radius:50%;background:#f8f6f0e6}
.gallery-expand:hover{background:var(--sage)}
.gallery-expand svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.gallery-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;height:100%;padding:20px;text-align:center;color:var(--muted);font-size:14px;background:var(--paper)}
.gallery-retry{padding:10px 18px;border:1px solid var(--line);border-radius:24px;min-height:44px}
.gallery-viewer{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:16px 24px;border:0;color:#f8f6f0;background:#1f231f;overflow:hidden;overscroll-behavior:contain}
.gallery-viewer[open]{display:block}
.gallery-viewer-viewport{width:100%;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;background:#1f231f;color:#f8f6f0}
.gallery-viewer::backdrop{background:#1f231f}
.gallery-viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:44px}
.gallery-viewer-caption{font-size:14px;line-height:21px;color:#e1e5dc}
.gallery-viewer-close{flex-shrink:0;border:1px solid #ffffff60;border-radius:24px;padding:10px 16px;min-width:100px;min-height:44px;font-size:13px;background:#30372f}
.gallery-viewer .gallery-frame{min-height:0;width:100%;height:100%}
.gallery-viewer .gallery-stage{height:100%;aspect-ratio:auto;border-radius:0;background:transparent}
.gallery-viewer .gallery-slide img,.gallery-viewer .gallery-slide video{object-fit:contain}
.gallery-viewer .gallery-dots{margin:0}
.gallery-viewer .gallery-dot::after{background:#788073}
.gallery-viewer .gallery-dot[aria-pressed='true']::after{background:#fff}
.gallery-viewer .gallery-step{color:var(--ink)}
.gallery-viewer .gallery-placeholder{border-radius:10px}
@media(max-width:640px){
  .skill-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:14px}
  .dialog-actions{gap:12px;padding:8px 12px}
  .dialog-actions .dialog-close{min-height:44px;padding:9px 12px}
  .dialog-content{padding:12px 16px 28px}
  .dialog-content h2{font-size:26px;overflow-wrap:anywhere}
  .dialog-layout,.project-dialog-layout{gap:20px;margin-top:22px}
  .gallery-step{width:44px;height:44px}
  .gallery-previous{left:6px}.gallery-next{right:6px}
  .gallery-expand{top:6px;right:6px;width:44px;height:44px}
  .gallery-dot{width:36px;height:36px}
  .gallery-viewer{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .gallery-viewer-caption{font-size:12px;max-width:60%;overflow-wrap:anywhere}
  .gallery-viewer .gallery-placeholder-number{font-size:48px}
}
@media (pointer:coarse), (max-width:640px){
  .gallery-viewer-image .gallery-viewer-viewport{position:relative;grid-template-rows:minmax(0,1fr);gap:0}
  .gallery-viewer-image .gallery-viewer-toolbar{position:absolute;top:8px;left:12px;right:12px;z-index:2;pointer-events:none}
  .gallery-viewer-image .gallery-viewer-close{pointer-events:auto;background:#1f231fe6}
  .gallery-viewer-image .gallery-viewer-caption{background:#1f231fcc;padding:4px 8px;border-radius:8px}
  .gallery-viewer-image .gallery-dots{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);z-index:2;flex-wrap:nowrap;border-radius:24px;background:#1f231fb3}
}
@media (orientation:portrait) and (pointer:coarse), (orientation:portrait) and (max-width:640px){
  .gallery-viewer-image{padding:0}
  .gallery-viewer-image .gallery-viewer-viewport{position:absolute;left:50%;top:50%;width:100dvh;height:100vw;transform:translate(-50%,-50%) rotate(90deg);padding:max(8px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-top));box-sizing:border-box;gap:6px}
  .gallery-viewer-image .gallery-stage{touch-action:none}
  .gallery-viewer-image .gallery-viewer-caption{font-size:12px;max-width:70%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .gallery-viewer-image .gallery-dot{width:28px;height:28px}
}
