/* Portfolio layout. Hand-drawn treatments live in doodle.css. */
:root {
  --sidebar-width: 258px; --toolbar-height: 0px; --mobile-height: 0px;
  --paper: #fffefa; --surface: #fff; --side: #f4f2e9; --ink: #1b1b19;
  --muted: #62625c; --rule: #d8d8ce; --accent: #2455e5;
  --red: #ef3e2b; --yellow: #f3c900; --blue: #2455e5;
  --font: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; scroll-padding-top: calc(var(--toolbar-height) + var(--mobile-height) + 24px); overflow-anchor: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
section:focus, main:focus { outline: none; }
section:focus-visible > .section-heading { outline: 2px solid var(--accent); outline-offset: 8px; }
main:focus-visible > :first-child { outline: 2px solid var(--accent); outline-offset: 6px; }
::selection { background: var(--yellow); color: #161616; }
img { display: block; max-width: 100%; object-fit: cover; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 20px; }
.skip-link:focus { top: 12px; }
.no-script { margin: 40px; }
.tiny-label, .eyebrow, .sidebar-topline, .page-intro, .nav-index, .item-folio, .project-foot, .game-category > span, .page-footer { font-family: 'Segoe UI', var(--font); }
.tiny-label, .eyebrow { font-size: 10px; letter-spacing: .15em; font-weight: 700; }
.eyebrow { color: var(--muted); line-height: 1.4; margin-bottom: 7px; }
.media { position: relative; display: inline-flex; flex: 0 0 auto; overflow: hidden; background: var(--side); }
.media img { position: relative; z-index: 1; width: 100%; height: 100%; }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.media-fallback .icon { width: 32px; height: 32px; }
.sidebar { width: var(--sidebar-width); height: 100dvh; position: fixed; inset: 0 auto 0 0; z-index: 30; background: var(--side); border-right: 1px solid var(--rule); padding: 26px 25px 22px; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; }
.sidebar-topline { display: flex; align-items: center; justify-content: space-between; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.profile-cross { font-size: 22px; line-height: 1; }
.profile { text-align: center; padding: 34px 0 24px; }
.avatar { width: 108px; height: 108px; border-radius: 50%; border: 2px solid var(--ink); }
.profile-name { font-size: 25px; font-weight: 800; line-height: 1.4; margin-top: 17px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.profile-school { font-size: 13px; margin-top: 4px; color: var(--muted); }
.profile-direction { font-size: 10px; margin: 14px auto 0; padding: 3px 9px; border: 1px solid var(--ink); display: inline-block; letter-spacing: .04em; }
.desktop-navigation { display: grid; gap: 7px; margin: 15px 0 32px; }
.nav-link { display: flex; align-items: center; gap: 14px; padding: 12px 13px; min-height: 48px; font-size: 14px; border: 1px solid transparent; transition: background .15s, color .15s; position: relative; }
.nav-index { margin-left: auto; font-size: 10px; color: var(--muted); }
.nav-link:hover { background: #00000008; }
.nav-link.active { background: var(--ink); color: var(--paper); font-weight: 700; }
.nav-link.active .nav-index { color: inherit; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--rule); padding-top: 18px; }
.sidebar-bottom .tiny-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 9px; }
.contact-row { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 11px; }
.contact-row > .icon { width: 16px; height: 16px; }
.contact-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-button { border: none; background: transparent; width: 32px; height: 32px; display: grid; place-items: center; }
.copy-button .icon { width: 14px; height: 14px; }
.copy-button:disabled { opacity: .32; }
.copy-button:not(:disabled):hover { background: var(--yellow); }
.profile-note { font-size: 9px; color: var(--muted); margin-top: 17px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 5px; height: 5px; background: var(--ink); border-radius: 50%; }
.main-content { margin-left: var(--sidebar-width); padding: calc(var(--toolbar-height) + 28px) clamp(28px, 4.1vw, 70px) 0; max-width: 1640px; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 9px; letter-spacing: .1em; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 19px; }
.intro-right { display: inline-flex; align-items: center; gap: 15px; font-size: 10px; letter-spacing: .06em; }
.intro-square { display: inline-block; width: 9px; height: 9px; background: var(--red); }
.content-section { padding: 43px 0 51px; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--toolbar-height) + var(--mobile-height) + 26px); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 30px; }
.section-heading-main { display: flex; align-items: center; gap: 20px; min-width: 0; }
.section-number { font: 800 48px/.95 'Arial', sans-serif; letter-spacing: -.065em; }
.section-heading h2 { font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -.035em; }
.section-motif { display: inline-flex; align-items: center; gap: 6px; }
.section-motif i { width: 12px; height: 12px; background: var(--blue); }
.section-motif i:nth-child(2) { background: var(--red); border-radius: 50%; }
.section-motif i:nth-child(3) { background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.school-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.school-line h3 { font-size: 20px; font-weight: 700; }
.placeholder-badge { display: inline-block; border: 1px solid var(--rule); color: var(--muted); font-size: 10px; padding: 1px 7px; line-height: 1.7; font-weight: 400; white-space: nowrap; vertical-align: middle; }
.education-period { margin-left: auto; font-size: 11px; color: var(--muted); }
.major-line { margin-top: 9px; font-size: 13px; }
.vertical-divider { color: var(--muted); padding: 0 13px; }
.course-row { display: flex; align-items: baseline; gap: 23px; border-top: 1px solid var(--rule); padding-top: 17px; margin-top: 24px; font-size: 13px; }
.field-label { font-weight: 700; flex-shrink: 0; }
.course-row p { color: var(--muted); }
.course-dot { padding: 0 12px; color: var(--muted); opacity: .6; }
.experience-item { position: relative; padding: 0 0 27px; }
.experience-item + .experience-item { border-top: 1px solid var(--rule); padding-top: 29px; }
.experience-item:last-child { padding-bottom: 0; }
.experience-heading { display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: var(--side); }
.company-logo { width: 43px; height: 43px; border: 1px solid var(--ink); }
.company-info { min-width: 0; }
.company-info h3 { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.company-info .placeholder-badge { margin-left: 10px; }
.company-info p { font-size: 12px; color: var(--muted); }
.job-period { margin-left: auto; flex-shrink: 0; font-size: 10px; color: var(--muted); }
.experience-body { padding: 24px 18px 0; }
.text-block { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; }
.text-block + .text-block { margin-top: 17px; }
.text-block h4 { font-size: 12px; font-weight: 700; line-height: 2.1; padding-top: 1px; }
.text-block > p, .duties { font-size: 15px; line-height: 1.95; color: var(--muted); overflow-wrap: anywhere; }
.duties { padding-left: 15px; }
.duties li + li { margin-top: 6px; }
.duties li::marker { color: var(--ink); font-size: 9px; }
.duties strong { color: var(--ink); font-weight: 600; }
.item-folio { display: block; text-align: right; margin: 18px 18px 0; font-size: 8px; letter-spacing: .16em; color: var(--muted); }
.project-list { display: grid; gap: 25px; }
.project-item { border: 1px solid var(--rule); position: relative; background: var(--surface); min-width: 0; }
.project-heading { display: flex; align-items: center; gap: 19px; padding: 22px 25px; border-bottom: 1px solid var(--rule); position: relative; isolation: isolate; }
.project-logo { height: 64px; width: 64px; border: 2px solid var(--ink); transition: transform .18s, border-color .18s; }
.project-title { min-width: 0; }
.project-category { font-size: 10px; color: var(--muted); display: block; margin-bottom: 5px; letter-spacing: .04em; }
.project-heading h3 { font-size: 23px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.project-entry-arrow { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--ink); flex-shrink: 0; transition: transform .18s, background .18s; }
.project-entry-arrow .icon { width: 23px; height: 23px; }
.project-heading:hover, .project-heading:focus-visible { background: var(--side); }
.project-heading:is(:hover, :focus-visible) .project-entry-arrow { transform: translateX(4px); background: var(--yellow); }
.project-heading:is(:hover, :focus-visible) .project-logo { border-color: var(--accent); transform: translateY(-2px); }
.project-body { padding: 24px 25px 20px; }
.project-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 25px 17px; font-size: 8px; letter-spacing: .14em; color: var(--muted); }
.skill-list { list-style: none; }
.skill-list li { display: grid; grid-template-columns: 28px 110px minmax(0, 1fr); gap: 16px; padding: 20px 0; align-items: baseline; }
.skill-list li + li { border-top: 1px solid var(--rule); }
.list-tick { font: 11px/1 'Arial', sans-serif; color: var(--muted); }
.skill-list strong { font-size: 14px; }
.skill-list p { font-size: 14px; color: var(--muted); }
.section-description { color: var(--muted); margin: -9px 0 20px; font-size: 13px; }
.game-list { list-style: none; }
.game-list li { display: grid; grid-template-columns: 32px 150px minmax(0, 1fr); gap: 18px; align-items: start; border-top: 1px solid var(--rule); padding: 23px 0; }
.game-number { font: 12px/1 'Arial', sans-serif; color: var(--muted); }
.game-category h3 { font-size: 15px; }
.game-category > span { font-size: 8px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.game-description p { font-size: 13px; white-space: pre-line; }
.game-description small { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; }
.game-description small:empty:not([contenteditable]) { display: none; }
.page-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 28px 0; color: var(--muted); font-size: 9px; }
.page-footer > span:last-child { display: flex; align-items: center; gap: 15px; font-size: 8px; letter-spacing: .08em; }
.footer-mark { font-size: 23px; color: var(--ink); line-height: 1; }
.detail-content { min-height: calc(100dvh - var(--toolbar-height) - 110px); }
.detail-topline { display: flex; justify-content: space-between; align-items: center; padding: 9px 0 27px; border-bottom: 1px solid var(--rule); }
.back-link { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; min-height: 40px; }
.back-link:hover { color: var(--accent); }
.back-link .icon { width: 18px; height: 18px; }
.detail-heading { position: relative; padding: 48px 100px 35px 0; }
.detail-heading h1 { font-size: clamp(28px, 3vw, 45px); line-height: 1.4; margin: 10px 0 12px; overflow-wrap: anywhere; }
.detail-logo { position: absolute; right: 0; top: 50px; width: 72px; height: 72px; border: 2px solid var(--ink); }
.detail-placeholder { text-align: center; border: 1px solid var(--rule); background: var(--surface); padding: 42px 24px 50px; }
.placeholder-art { width: 220px; height: 170px; margin: 0 auto 30px; position: relative; }
.art-grid { position: absolute; inset: 22px 15px 10px 25px; border: 2px solid var(--ink); }
.art-circle { position: absolute; width: 58px; height: 58px; border-radius: 50%; left: 0; top: 0; background: var(--yellow); }
.art-square { position: absolute; width: 42px; height: 42px; background: var(--blue); right: 0; bottom: 0; }
.art-line { width: 65px; height: 9px; background: var(--red); position: absolute; right: 4px; top: 11px; }
.art-number { position: absolute; font: 900 82px/1 'Arial', sans-serif; inset: 48px 0 auto; color: var(--ink); }
.detail-placeholder h2 { font-size: 22px; margin-bottom: 9px; }
.detail-placeholder > p:last-child { color: var(--muted); font-size: 13px; }
.invalid-project { padding-top: 12px; }
.invalid-project .eyebrow { margin-top: 70px; }
.invalid-project h1 { font-size: 34px; margin: 15px 0; }
.invalid-project > p:last-child { color: var(--muted); }
.toast { position: fixed; bottom: 28px; left: calc(50% + var(--sidebar-width) / 2); transform: translate(-50%, 12px); padding: 11px 20px; background: #202020; color: #fff; border: 1px solid #fff; z-index: 100; opacity: 0; pointer-events: none; font-size: 13px; max-width: calc(100vw - 36px); width: max-content; transition: opacity .15s, transform .15s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1680px) { .main-content { margin-inline: calc(var(--sidebar-width) + (100vw - 1680px) / 2) auto; max-width: 1400px; } }
@media (max-width: 1200px) {
  :root { --sidebar-width: 230px; }
  .sidebar { padding-inline: 19px; }
  .main-content { padding-inline: 32px; }
  .company-info .placeholder-badge { display: none; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 164px; }
  .sidebar { padding: 22px 12px 18px; }
  .sidebar-topline { font-size: 8px; letter-spacing: .05em; }
  .profile { padding: 25px 0 18px; }
  .avatar { width: 82px; height: 82px; }
  .profile-name { font-size: 20px; }
  .profile-direction { font-size: 9px; padding-inline: 5px; }
  .nav-link { padding: 10px 7px; gap: 8px; font-size: 12px; }
  .nav-index { display: none; }
  .nav-link .icon { width: 17px; height: 17px; }
  .main-content { padding: 26px 24px 0; }
  .content-section { padding-block: 35px 42px; }
  .contact-row { gap: 4px; font-size: 10px; flex-wrap: wrap; }
  .contact-row > .icon { display: none; }
  .contact-value { flex-basis: 75px; }
  .copy-button { min-width: 32px; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }

  .main-content { padding-inline: 22px; padding-top: calc(var(--mobile-height) + var(--toolbar-height) + 21px); }
  .page-intro { font-size: 8px; padding-bottom: 15px; }
  .intro-right { font-size: 0; gap: 0; }
  .intro-square { width: 8px; height: 8px; }
  .content-section { padding-block: 30px 35px; }
  .section-heading { margin-bottom: 25px; }
  .section-heading-main { gap: 13px; }
  .section-number { font-size: 39px; }
  .section-heading h2 { font-size: 24px; }
  .eyebrow { font-size: 8px; margin-bottom: 5px; }
  .section-motif { gap: 4px; }
  .section-motif i { width: 8px; height: 8px; }
  .school-line { gap: 7px; }
  .school-line h3 { font-size: 18px; }
  .education-period { flex-basis: 100%; margin-left: 0; font-size: 10px; }
  .major-line { font-size: 12px; }
  .vertical-divider { padding-inline: 7px; }
  .course-row { display: block; margin-top: 18px; padding-top: 14px; }
  .course-row p { font-size: 12px; margin-top: 7px; }
  .course-dot { padding-inline: 6px; }
  .experience-heading { padding: 13px; gap: 11px; flex-wrap: wrap; }
  .company-logo { width: 37px; height: 37px; }
  .company-info { flex: 1; }
  .company-info h3 { font-size: 14px; }
  .company-info p { font-size: 11px; }
  .job-period { flex-basis: 100%; padding-left: 48px; line-height: 1.3; }
  .experience-body { padding: 19px 1px 0; }
  .text-block { display: block; }
  .text-block h4 { margin-bottom: 6px; font-size: 12px; }
  .text-block > p, .duties { font-size: 14px; line-height: 1.95; }
  .text-block + .text-block { margin-top: 14px; }
  .item-folio { margin: 15px 0 0; font-size: 7px; }
  .project-heading { padding: 18px 14px; gap: 12px; }
  .project-logo { width: 49px; height: 49px; }
  .project-heading h3 { font-size: 19px; }
  .project-category { font-size: 9px; margin-bottom: 4px; letter-spacing: 0; }
  .project-entry-arrow { width: 30px; height: 34px; border-width: 0; }
  .project-entry-arrow .icon { width: 23px; }
  .project-body { padding: 18px 16px; }
  .project-foot { padding: 0 16px 14px; }
  .skill-list li { grid-template-columns: 21px 1fr; gap: 6px 10px; padding: 17px 0; }
  .skill-list strong { font-size: 13px; }
  .skill-list p { grid-column: 2; font-size: 14px; }
  .game-list li { grid-template-columns: 20px 1fr; gap: 6px 12px; padding-block: 20px; }
  .game-category { display: flex; align-items: baseline; gap: 12px; }
  .game-category h3 { font-size: 14px; }
  .game-description { grid-column: 2; }
  .game-description p { font-size: 12px; }
  .game-description small { font-size: 10px; }
  .section-description { font-size: 12px; line-height: 1.9; }
  .page-footer { padding: 24px 0; font-size: 8px; }
  .page-footer > span:last-child { font-size: 6px; gap: 7px; }
  .detail-heading { padding-top: 34px; padding-right: 70px; }
  .detail-heading h1 { font-size: 28px; }
  .detail-logo { width: 54px; height: 54px; top: 35px; }
  .detail-placeholder { padding: 32px 16px 38px; }
  .detail-placeholder h2 { font-size: 20px; }
  .detail-placeholder > p:last-child { font-size: 12px; }
  .detail-topline .tiny-label { font-size: 8px; }
  .placeholder-art { transform: scale(.85); margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
