:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #161616;
  --sub: #5d5d5d;
  --line: #e4e4e4;
  --rule: #d0d0d0;
  --sans: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #181818; outline-offset: 4px; }
.container { width: min(1120px, calc(100% - 112px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; left: 12px; top: 12px; padding: 7px 15px; background: var(--paper); border: 1px solid var(--ink); }

.mast { position: sticky; z-index: 5; top: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.mast-inner { height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: 1rem; line-height: 1.2; font-weight: 760; letter-spacing: -.04em; overflow-wrap: anywhere; }
.brand-icon { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border-radius: 50%; color: #fff; background: var(--ink); }
.brand-icon svg { width: 15px; height: 15px; }
.mast nav { display: flex; height: 100%; align-items: stretch; gap: clamp(15px, 3vw, 42px); white-space: nowrap; }
.mast nav a { display: grid; place-items: center; position: relative; color: var(--sub); font-size: .92rem; }
.mast nav a:hover, .mast nav a[aria-current] { color: var(--ink); }
.mast nav a[aria-current]::after { position: absolute; content: ''; inset: auto 0 -1px; height: 1px; background: var(--ink); }

.hero { padding-block: clamp(62px, 8vw, 116px) 59px; }
.hero-kicker, .section-label { color: var(--sub); font-size: .78rem; line-height: 1.4; font-weight: 650; letter-spacing: .14em; }
.hero-kicker { margin-bottom: 22px; overflow-wrap: anywhere; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) min(42%, 420px); align-items: start; gap: clamp(22px, 5vw, 74px); }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 6rem); font-weight: 690; line-height: 1.12; letter-spacing: -.065em; overflow-wrap: anywhere; }
.hero-identity { display: grid; justify-items: center; text-align: center; }
.profile-avatar { width: min(100%, clamp(196px, 19vw, 244px)); aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; overflow: hidden; }
.profile-avatar.is-placeholder { background: var(--paper); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: var(--portrait-x, 50%) var(--portrait-y, 50%); transform: scale(var(--portrait-zoom, 1)); transform-origin: var(--portrait-x, 50%) var(--portrait-y, 50%); }
.profile-avatar span { display: grid; place-items: center; width: 100%; height: 100%; color: #888; }
.profile-avatar svg { width: clamp(27px, 3vw, 39px); height: auto; }
.profile-nickname { margin-top: 7px; font-size: clamp(1.3rem, 2.25vw, 1.8rem); font-weight: 680; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; max-width: 100%; }
.profile-intro { max-width: 36rem; margin-top: 18px; color: var(--sub); line-height: 1.75; text-align: left; white-space: pre-line; overflow-wrap: anywhere; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; font-size: .92rem; line-height: 1.45; transition: background .18s, border-color .18s, color .18s; overflow-wrap: anywhere; }
.button svg { width: 16px; height: 16px; flex: none; }
.button.primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.button.primary:hover { background: #373737; }
.button.secondary { color: var(--ink); background: var(--paper); border-color: var(--rule); }
.button.secondary:hover { border-color: var(--ink); }

.color-band { position: relative; overflow: hidden; isolation: isolate; background: #fbafbf; }
.color-band::before {
  content: ''; position: absolute; inset: -75% -21%; will-change: transform;
  background:
    radial-gradient(ellipse at 24% 88%, #a85dff 0%, #a85dff00 37%),
    radial-gradient(ellipse at 13% 34%, #6becfb 2%, #63e4ffdd 16%, #6becfb00 39%),
    radial-gradient(ellipse at 59% 10%, #ffa93a 0%, #ffb746 18%, #ffb74700 41%),
    radial-gradient(ellipse at 80% 70%, #f65693 7%, #f6569300 43%),
    radial-gradient(ellipse at 90% 18%, #fff29c 2%, #ffe387 15%, #ffe38700 39%),
    linear-gradient(118deg, #a9deff 8%, #df99fb 36%, #fe80a2 57%, #ffc675 85%);
  animation: color-drift 16s ease-in-out infinite alternate;
}
.color-band::after {
  content: ''; position: absolute; inset: -100% -18%; mix-blend-mode: screen; opacity: .86;
  background: radial-gradient(ellipse at 44% 12%, #ffe8ba 0%, #ffe8ba00 38%),
    radial-gradient(ellipse at 27% 74%, #a4e9fd 0%, #a4e9fd00 30%),
    radial-gradient(ellipse at 88% 68%, #ffac70 0%, #ffac7000 30%);
  animation: color-light 22s ease-in-out infinite alternate;
}
@keyframes color-drift {
  0% { transform: translate3d(-5%, -2%, 0) rotate(-8deg) scale(1.02); }
  52% { transform: translate3d(4%, 8%, 0) rotate(3deg) scale(1.07); }
  100% { transform: translate3d(8%, -7%, 0) rotate(-3deg) scale(1.15); }
}
@keyframes color-light {
  from { transform: translate3d(0, 1%, 0) rotate(3deg); }
  to { transform: translate3d(-9%, 12%, 0) rotate(-7deg); }
}
.color-band--hero {
  height: clamp(104px, 13.4vw, 184px);
  border-radius: 13px;
  margin-top: 39px;
  background: linear-gradient(112deg, #5BCEFA 5%, #FFFFFF 51%, #F5A9B8 93%);
}
.color-band--hero::before {
  background:
    radial-gradient(ellipse at 19% 33%, #5BCEFA 8%, #5BCEFA00 47%),
    radial-gradient(ellipse at 78% 69%, #F5A9B8 10%, #F5A9B800 47%),
    radial-gradient(ellipse at 58% 36%, #FFFFFF 4%, #FFFFFF00 35%),
    radial-gradient(ellipse at 34% 77%, #F5A9B8 5%, #F5A9B800 38%),
    linear-gradient(128deg, #5BCEFA, #F5A9B8 36%, #FFFFFF 52%, #5BCEFA 71%, #F5A9B8);
}
.color-band--hero::after {
  inset: -30% 0;
  background: linear-gradient(112deg, #FFFFFF00 34%, #FFFFFF40 45%, #FFFFFFC0 50%, #FFFFFF50 55%, #FFFFFF00 66%);
  animation: hero-shine 13s ease-in-out infinite alternate;
}
@keyframes hero-shine {
  from { transform: translate3d(-44%, -7%, 0); }
  to { transform: translate3d(44%, 7%, 0); }
}
.color-band--index {
  height: clamp(16px, 1.9vw, 24px);
  border-radius: 999px;
  margin-bottom: 31px;
  background: linear-gradient(90deg, #5BCEFA 0% 14%, #F5A9B8 28% 34%, #FFFFFF 46% 54%, #F5A9B8 66% 72%, #5BCEFA 86% 100%) center / 120% 100%;
  animation: notes-band-drift 12s ease-in-out infinite alternate;
}
.color-band--index::before, .color-band--index::after { content: none; }
@keyframes notes-band-drift {
  from { background-position: 25% center; }
  to { background-position: 75% center; }
}
.color-band--contact { height: clamp(42px, 6vw, 72px); border-radius: 9px; margin-bottom: 29px; }
.hero-photo { margin-top: 25px; border-radius: 11px; overflow: hidden; }
.hero-photo img { width: 100%; max-height: 520px; object-fit: cover; }

.bio { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; border-top: 1px solid var(--line); padding-top: 42px; margin-bottom: 86px; }
.bio h2 { margin-top: 8px; font-size: clamp(1.9rem, 3.2vw, 2.65rem); line-height: 1.2; letter-spacing: -.055em; font-weight: 650; }
.resume { min-height: 280px; }
.resume .prose img { max-height: none; width: auto; }
.resume-download { margin-top: 21px; }
.resume-sidebar { min-width: 0; align-self: start; }
.photo-wall { max-width: 400px; margin-top: 27px; }
.photo-wall h3 { font-size: .98rem; margin-bottom: 10px; font-weight: 640; }
.photo-wall-frame { background: #f5f5f5; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; aspect-ratio: 4 / 5; }
.photo-wall-frame.landscape { aspect-ratio: 4 / 3; }
.photo-wall-frame.square { aspect-ratio: 1; }
.photo-wall-slide, .photo-wall-slide img { width: 100%; height: 100%; }
.photo-wall-slide { animation: photo-wall-reveal .28s ease-out both; }
.photo-wall-slide img { object-fit: cover; }
.photo-wall-frame.contain img { object-fit: contain; }
@keyframes photo-wall-reveal { from { opacity: .45; } to { opacity: 1; } }
.photo-wall-empty { display: grid; justify-items: center; align-content: center; gap: 8px; height: 100%; background: #fafafa; color: var(--sub); font-size: .85rem; }
.photo-wall-empty svg { width: 24px; height: 24px; }
.photo-wall-caption { font-size: .88rem; color: var(--sub); margin-top: 8px; overflow-wrap: anywhere; }
.photo-wall-caption:empty { display: none; }
@media (min-width: 781px) and (min-height: 800px) {
  .resume-sidebar { position: sticky; top: 91px; }
}
.resume-file-setting { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.resume-file-setting h3 { font-size: 1rem; margin-bottom: 4px; }
.resume-file-setting > .tool-button { margin-top: 10px; }
.gallery-editor > .editor-tip { margin-bottom: 12px; }
.bio-body, .bio-block, .hero-inner > * { min-width: 0; }
.bio-block + .bio-block { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
.bio-block.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px; align-items: start; }
.bio-block.split.left figure { grid-area: 1 / 1; }
.bio-block.split figure img { width: 100%; }

.separate { min-height: 76vh; }
.section { padding-block: 62px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 19px; margin-bottom: 29px; }
.section h1, .studio h1 { font-size: clamp(2.65rem, 5vw, 4.45rem); font-weight: 660; line-height: 1.13; letter-spacing: -.065em; margin-top: 8px; }
.section h2 { font-size: clamp(2rem, 4vw, 3.45rem); font-weight: 650; line-height: 1.14; letter-spacing: -.06em; margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button, .editor-tabs button { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 13px; font-size: .88rem; }
.filters button:hover, .editor-tabs button:hover { border-color: var(--ink); }
.filters button[aria-pressed=true], .editor-tabs button[aria-pressed=true] { color: #fff; background: var(--ink); border-color: var(--ink); }
.masonry { display: flex; align-items: flex-start; gap: 24px; }
.masonry-col { display: grid; gap: 24px; flex: 1 1 0; min-width: 0; }
.masonry:not(:has(.masonry-col)) { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.note { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); overflow: hidden; transition: border-color .18s; }
.note:hover { border-color: #9a9a9a; }
.note-link { display: block; }
.note-link:focus-visible { outline-offset: -3px; }
.note-image { position: relative; overflow: hidden; }
.note-image.tall { aspect-ratio: 1.11; }
.note-image.mid { aspect-ratio: 1.36; }
.note-image.short { aspect-ratio: 1.62; }
.note-image img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .35s; }
.note:hover img { transform: scale(1.025); }
.note-copy { padding: 20px 22px 21px; overflow-wrap: anywhere; }
.note-copy h3 { font-size: 1.25rem; line-height: 1.4; font-weight: 660; letter-spacing: -.028em; }
.note-copy p, .project p { color: var(--sub); margin-top: 8px; font-size: .95rem; }
.note-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; color: var(--sub); font-size: .81rem; font-variant-numeric: tabular-nums; }
.note-open { display: flex; width: fit-content; align-items: center; gap: 5px; font-weight: 600; font-size: .83rem; margin-top: 19px; }
.note-open svg { width: 13px; }
.note:hover .note-open { text-decoration: underline; }

.projects { padding-bottom: 46px; }
.project-list { border-block: 1px solid var(--line); }
.project { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 19px; align-items: center; padding: 19px 0; }
.project+.project { border-top: 1px solid var(--line); }
.project:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.project h3 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.04em; line-height: 1.17; overflow-wrap: anywhere; }
.project p { overflow-wrap: anywhere; }
.project-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 9px; }
.project-icon svg { width: 24px; height: 24px; }
.project-tag { display: inline-block; width: fit-content; white-space: nowrap; color: var(--sub); font-size: .84rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.project-open { display: grid; place-items: center; width: 33px; height: 33px; }
.empty { color: var(--sub); padding: 16px 0; }
.contact { padding-block: 7px 72px; }
.contact p { color: var(--sub); margin-top: 13px; }
.contact p.contact-empty { font-size: .87rem; margin-top: 8px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 20px; }
.contact-links a { max-width: 100%; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 77px; color: var(--sub); font-size: .83rem; }
.footer .brand { color: var(--ink); }
.footer .brand svg { flex: none; }
.footer a:hover { text-decoration: underline; }
.footer-inner > span { letter-spacing: .08em; }

.detail { max-width: 780px; margin: 0 auto; padding: 58px 0 80px; min-height: 63vh; overflow-wrap: anywhere; }
.back-link { display: inline-block; margin-bottom: 27px; color: var(--sub); border-bottom: 1px solid var(--rule); font-size: .92rem; }
.back-link:hover { color: var(--ink); border-color: var(--ink); }
.detail h1 { font-size: clamp(2.45rem, 5.3vw, 4.45rem); font-weight: 680; line-height: 1.14; letter-spacing: -.06em; margin: 11px 0 16px; }
.detail-meta { display: flex; gap: 13px; align-items: center; color: var(--sub); font-size: .88rem; margin-top: 17px; }
.detail-intro { font-size: 1.18rem; color: var(--sub); margin-bottom: 27px; }
.detail-cover { border-radius: 11px; overflow: hidden; margin-bottom: 30px; }
.detail-cover img { width: 100%; max-height: 570px; object-fit: cover; }
.detail .button { margin-top: 24px; }
.bio-block img, .prose img { border-radius: 8px; max-height: 700px; object-fit: contain; }
figcaption { color: var(--sub); font-size: .84rem; margin-top: 7px; }
.prose { color: #3c3c3c; line-height: 1.85; overflow-wrap: anywhere; }
.prose > * { margin: 0 0 1em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose :is(h2,h3,h4,h5,h6) { line-height: 1.3; color: var(--ink); margin-bottom: .5em; letter-spacing: -.025em; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose code, .prose pre { color: var(--ink); border: 1px solid var(--line); border-radius: 5px; font-family: ui-monospace, Consolas, monospace; }
.prose code { padding: 2px 5px; }
.prose pre { overflow: auto; padding: 14px 16px; }
.prose pre code { padding: 0; border: 0; }
.prose blockquote { border-left: 2px solid var(--ink); padding: 3px 16px; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.table-scroll { overflow: auto; }
.prose table { border-collapse: collapse; }
.prose :is(th,td) { border: 1px solid var(--line); padding: 5px 12px; }

.studio { padding-block: 48px 76px; min-height: 70vh; }
.studio-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.admin-login { padding-block: 75px; width: min(100%, 340px); margin: 0 auto; min-height: 66vh; }
.admin-login h1 { font-size: 2.35rem; letter-spacing: -.06em; line-height: 1.15; }
.admin-login form { display: grid; gap: 9px; margin-top: 25px; }
.admin-login input { width: 100%; border: 1px solid var(--rule); border-radius: 7px; padding: 9px 12px; }
.admin-login form .button { margin-top: 5px; }
.admin-login-error { color: #a12032; margin-top: 13px; }
.admin-login .back-link { margin: 18px 0 0; }
.studio h2 { font-size: 1.45rem; letter-spacing: -.035em; }
.editor-bar, .editor-tabs, .editor-actions, .block-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editor-bar { position: sticky; z-index: 2; top: 69px; justify-content: space-between; border-block: 1px solid var(--line); background: var(--paper); padding: 12px 0; margin-bottom: 24px; }
.editor-status { color: var(--sub); font-size: .88rem; }
.editor-status.error { color: #a12032; }
.editor-panel { display: grid; gap: 16px; }
.editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.editor-fields .wide { grid-column: 1 / -1; }
.editor-panel label { display: block; margin-bottom: 6px; color: var(--ink); font-size: .92rem; }
.editor-panel :is(input:not([type=file],[type=checkbox],[type=range]),textarea,select) { width: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; }
.editor-panel input[type=checkbox] { accent-color: var(--ink); }
.editor-panel textarea { min-height: 85px; resize: vertical; }
.editor-panel textarea.markdown-source { min-height: 154px; font: .9rem/1.55 ui-monospace, Consolas, monospace; }
.edit-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.edit-card + .edit-card { margin-top: 13px; }
.edit-card-head, .editor-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; }
.edit-card-head h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.tool-button { padding: 5px 9px; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; color: var(--ink); font-size: .83rem; }
.tool-button:hover { border-color: var(--ink); }
.tool-button.danger { color: #a12032; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 8px; }
.upload-label { cursor: pointer; margin-bottom: 0 !important; }
.editor-preview { min-height: 45px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 13px; }
.media-thumb { width: 112px; max-height: 70px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.editor-tip { color: var(--sub); font-size: .9rem; }
.companion-test { border-top: 1px solid var(--line); padding-top: 15px; }
.companion-test-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.companion-test .editor-tip { margin-top: 7px; }
.companion-test-result { margin-top: 9px; padding: 9px 11px; border-radius: 8px; background: #f4f4f4; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.companion-test-result.error { background: #fff1f1; color: #8b2525; }
.companion-test-result:empty { display: none; }
.resume-editor .markdown-editor { margin-top: 14px; }
.resume-editor textarea.markdown-source { min-height: 22rem; }
.portrait-editor { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 25px; align-items: start; }
.portrait-preview-area { display: grid; justify-items: center; min-width: 0; }
#portrait-crop-preview { width: min(100%, 196px); }
.portrait-preview-name { margin-top: 8px; font-weight: 650; overflow-wrap: anywhere; max-width: 100%; text-align: center; }
.markdown-tools { margin: 8px 0; }
.note-markdown textarea.markdown-source { min-height: 19rem; }
.note-markdown .editor-preview { min-height: 19rem; margin-top: 0; }
.note-markdown .markdown-workspace.has-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; }
.avatar-size-control > div { display: flex; align-items: center; gap: 10px; min-height: 31px; }
.avatar-size-control input { flex: 1; min-width: 0; accent-color: var(--ink); }
.avatar-size-control output { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; }
.avatar-preview { border-top: 1px solid var(--line); padding-top: 13px; }
.avatar-preview .tool-button[aria-pressed=true] { color: #fff; background: var(--ink); }
.avatar-preview-viewport { position: relative; width: 100%; height: 260px; overflow: hidden; background: #f7f7f7; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 8px; }
.avatar-preview-viewport iframe { display: block; position: absolute; top: 0; left: 50%; transform-origin: center top; border: 0; outline: 1px solid var(--line); background: #fff; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 70px); }
}
@media (max-width: 780px) {
  .photo-wall { width: min(100%, 390px); }
  .container { width: calc(100% - 44px); }
  .hero { padding-block: 62px 41px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(180px, 42%); }
  .hero h1 { font-size: clamp(2.65rem, 8.6vw, 4.7rem); }
  .profile-avatar { width: min(100%, 176px); }
  .hero-actions { margin-top: 17px; }
  .color-band--hero { margin-top: 26px; }
  .bio { grid-template-columns: 1fr; gap: 23px; padding-top: 28px; margin-bottom: 48px; }
  .masonry:not(:has(.masonry-col)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section { padding-block: 41px 49px; }
  .contact { padding-top: 0; }
}
@media (max-width: 620px) {
  .hero-kicker { text-align: center; }
  .portrait-editor, .note-markdown .markdown-workspace.has-preview { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 30px; text-align: center; }
  .hero-actions { justify-content: center; }
  .profile-avatar { width: clamp(135px, 37vw, 174px); }
}
@media (max-width: 520px) {
  html { scroll-padding-top: 105px; }
  .mast-inner { grid-template-columns: 1fr auto; min-height: 87px; height: auto; gap: 0 8px; }
  .mast .brand { margin-top: 9px; }
  .mast nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 8px; height: 42px; }
  .mast nav a { font-size: .88rem; }
  .editor-bar { top: 88px; }
  .hero { padding-top: 44px; }
  .hero-kicker { margin-bottom: 16px; }
  .section-head { align-items: start; flex-direction: column; }
  .masonry:not(:has(.masonry-col)) { grid-template-columns: 1fr; }
  .masonry, .masonry-col { gap: 15px; }
  .project { grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; }
  .project-icon { width: 42px; height: 42px; }
  .project > .project-tag, .project > span:not(.project-open) { display: none; }
  .footer-inner > span { display: none; }
  .bio-block.split, .editor-fields { grid-template-columns: 1fr; }
  .editor-fields .wide { grid-column: auto; }
  .bio-block.split.left figure { grid-area: auto; order: -1; }
  .detail { padding-block: 36px 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation: none !important; }
}
