/* HR-first hierarchy: work evidence leads, education stays compact. */
.hero-layout { min-height: 630px; gap: 7%; }
.section.work { padding-top: 72px; padding-bottom: 72px; }
.work .section-head h2 { font-size: 38px; }
.section.about { padding-top: 46px; padding-bottom: 46px; border-top: 1px solid var(--line); }
.about-brief { display: grid; grid-template-columns: 150px 1fr; gap: 36px; align-items: start; }
.about-brief h2 { font-size: 26px; }
.about-brief p { margin: 0; max-width: 800px; color: var(--secondary); line-height: 1.85; }
.about .match-banner { margin-top: 28px; padding: 20px 24px; }
.about .match-banner h3 { font-size: 18px; }
.section.education { padding-top: 50px; padding-bottom: 50px; background: #fff; }
.education .section-head { margin-bottom: 20px; }
.education .section-head h2 { font-size: 26px; }
.education .section-head p { font-size: 14px; }
.compact-schools { gap: 0; }
.compact-schools .school-row { display: grid; grid-template-columns: 50px minmax(0,1fr) auto 130px; align-items: center; gap: 22px; width: 100%; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 0; text-align: left; color: var(--ink); }
.compact-schools .school-row:hover { background: #f9f9fb; }
.compact-schools .school-mark { width: 44px; height: 44px; }
.compact-schools .school-mark img { max-width: 42px; max-height: 42px; object-fit: contain; }
.compact-schools .school-body { display: grid; gap: 3px; }
.compact-schools .school-body strong { font-size: 17px; font-weight: 600; }
.compact-schools .school-body>span { font-size: 14px; color: var(--secondary); }
.compact-schools time { font-size: 13px; color: var(--secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.school-open { text-align: right; color: var(--blue); font-size: 13px; }
.skills-layout { display: block; }
.section.skills { padding-top: 55px; padding-bottom: 55px; }
.skills .section-head h2 { font-size: 28px; }
.skills-list { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 30px; padding: 26px; }
.skills-list>div { margin: 0; padding-top: 0; padding-bottom: 0; border-bottom: 0; }
.skills-list>div>p, .tool-lines .tool-line { font-size: 14px; }
.tool-lines .tool-line+.tool-line { margin-top: 7px; }
.certificate-section { margin-top: 24px; padding-top: 20px; }
.certificate-section-head h3 { font-size: 17px; }
.certificate-card { grid-template-columns: 60px 1fr; border-radius: 14px; }
.certificate-preview { min-height: 112px; }
.certificate-card-heading strong { font-size: 14px; }
.certificate-description { font-size: 13px; }
.certificate-card-body { padding: 12px; }
.portfolio-grid { grid-template-columns: 1fr; }
.portfolio-card { grid-template-columns: 160px minmax(0,1fr); }
.portfolio-card>img { height: 155px; }
.compact-volunteer { display: flex; align-items: baseline; gap: 25px; margin-top: 10px; }
.compact-volunteer h3 { font-size: 15px; white-space: nowrap; }
.compact-volunteer .campus-link { text-align: left; font-size: 14px; }
.contact .xhs-card, #contact>.xhs-card { max-width: 1120px; width: calc(100% - 64px); margin: 24px auto 0; display: flex; align-items: center; gap: 24px; padding-top: 18px; }
.contact .xhs-account strong { font-size: 17px; }
.contact .xhs-actions { margin-top: 0; }

/* A portrait-led pass, with tones drawn from the original photograph. */
.hero-visual.badge-stage { width: 440px; max-width: 100%; height: 520px; padding: 0; justify-self: center; }
.badge-cord { position: absolute; inset: 0; width: 100%; height: 490px; overflow: visible; pointer-events: none; }
.badge-cord path { fill: none; stroke: #404b55; stroke-width: 9; stroke-linecap: round; }
.badge-cord path+path { stroke: #5a646d; }
.identity-badge { --badge-x: 0px; --badge-y: 0px; --badge-angle: 0deg; position: absolute; top: 80px; left: 50%; width: 284px; display: flex; flex-direction: column; padding: 7px; border: 1px solid #6e777b; border-radius: 17px; background: #27333d; color: #f3f0e9; box-shadow: 10px 24px 34px #263b5228, 0 2px 5px #24364b30, inset 0 0 0 1px #c1bcb01c; transform: translate(calc(-50% + var(--badge-x)),var(--badge-y)) rotate(calc(-4deg + var(--badge-angle))); transform-origin: 50% 0; touch-action: none; user-select: none; cursor: grab; text-align: left; will-change: transform; }
.identity-badge.is-dragging { cursor: grabbing; }
.badge-clasp { position: absolute; top: -18px; left: calc(50% - 6px); width: 12px; height: 24px; border: 2px solid #b3b5b4; border-radius: 4px; background: linear-gradient(90deg,#929b9d,#e5e7e1,#858f92); z-index: 2; box-shadow: 0 1px 2px #121c2450; }
.badge-photo { height: 342px; width: 100%; display: block; overflow: hidden; border-radius: 11px 11px 5px 5px; }
.badge-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; pointer-events: none; }
.badge-signature { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 17px 10px 13px; }
.badge-name { font-size: 21px; font-weight: 450; letter-spacing: .08em; line-height: 1.35; }
html[lang="en"] .badge-name { font-family: Georgia, 'Times New Roman', serif; font-size: 21px; font-weight: 400; letter-spacing: -.015em; }
.badge-caption { font-size: 10px; color: #bcc3c8; letter-spacing: .04em; max-width: 95px; line-height: 1.5; }
.interest-links { display: flex; align-items: baseline; gap: 24px; padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); font-size: 13px; }
.interest-label { color: #7c7c83; }
.interest-links>div { display: flex; flex-wrap: wrap; gap: 24px; }
.interest-links button { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 2px 0; background: transparent; color: #66666c; font-size: 13px; }
.interest-links button>span:last-child { font-size: 11px; opacity: .6; }
.interest-links button:hover { color: var(--blue); }
.compact-schools .sspu-mark { background: #176396; padding: 5px; border-radius: 9px; }
.compact-schools .sspu-mark img { width: 100%; height: 100%; }

/* Familiar window chrome and consistent opening, closing and restore. */
dialog.modal { padding: 0; border-radius: 21px; border: 1px solid #ffffffbd; overflow: auto; background: #fff; box-shadow: 0 28px 95px #172b4640, 0 5px 18px #172b4618; max-height: min(90vh,1000px); }
dialog.modal[open] { animation: window-open .26s cubic-bezier(.2,.8,.2,1); }
dialog.modal[open] .modal-inner { animation: none; }
dialog.modal.is-closing { animation: window-close .18s ease-in forwards; pointer-events: none; }
dialog.modal::backdrop { background: #34425239; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
dialog.modal.is-closing::backdrop { animation: backdrop-close .18s ease-in forwards; }
.window-bar { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: 84px minmax(0,1fr) 84px; align-items: center; height: 48px; padding: 0 19px; background: linear-gradient(#efede6f7,#e8e4d8f7); backdrop-filter: blur(20px); border-bottom: 1px solid #dedbd3; }
.window-controls { display: flex; align-items: center; gap: 8px; }
.window-dot { position: relative; width: 13px; height: 13px; padding: 0; border: 1px solid #0000000d; border-radius: 50%; }
.window-close { background: #ff5f57; }
.window-minimize { background: #febc2e; }
.window-expand { background: #28c840; }
.window-close:hover:after { content: '×'; }
.window-minimize:hover:after { content: '−'; }
.window-expand:hover:after { content: '+'; }
.window-dot:after { position: absolute; inset: -5px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #343434a8; }
.window-title { color: #77746b; text-align: center; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.modal.is-expanded { width: min(1180px,96vw); max-width: 1180px; height: 92vh; max-height: 92vh; }
.window-dock { position: fixed; z-index: 45; bottom: 17px; left: 18px; display: flex; flex-wrap: wrap; gap: 9px; max-width: calc(100% - 180px); }
.window-dock button { border: 1px solid #d6dde5; background: #ffffffed; backdrop-filter: blur(18px); color: #42596e; padding: 8px 14px; border-radius: 12px; box-shadow: 0 4px 14px #243e5819; font-size: 13px; }
@keyframes window-open { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes window-close { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.975); } }
@keyframes backdrop-close { to { background: transparent; backdrop-filter: blur(0); } }

/* Full-page resume image avoids embedded PDF toolbar and rendering delays. */
.resume-modal { width: min(1020px,94vw); max-width: 1020px; }
.resume-modal .modal-inner { padding: 26px 30px 30px; }
.resume-modal h2 { margin: 0; font-size: 25px; }
.resume-modal .modal-inner>p { font-size: 14px; color: var(--secondary); margin: 8px 0 23px; }
.resume-layout { display: grid; grid-template-columns: minmax(240px,.9fr) minmax(0,1.1fr); align-items: start; gap: 28px; }
.resume-list { display: grid; gap: 12px; }
.resume-option { position: relative; }
.resume-list a { display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 17px 20px; border: 1px solid #e3e7ec; background: #f7f8fa; border-radius: 14px; text-decoration: none; gap: 12px; color: var(--ink); }
.resume-list a>b { max-width: 235px; font-size: 15px; font-weight: 550; line-height: 1.65; }
.resume-list a>span { color: #708090; font-size: 12px; white-space: nowrap; }
.resume-list a.is-selected { background: #eef5fc; border-color: #9fc3e7; box-shadow: inset 3px 0 0 #0071e3; }
.resume-preview-toggle { display: none; }
.resume-preview { margin: 0; min-width: 0; }
.resume-preview figcaption { font-size: 13px; color: #4f5f70; margin-bottom: 9px; }
.resume-paper { background: #f0f2f5; border: 1px solid #e2e5e9; border-radius: 12px; padding: 13px; max-height: 53vh; overflow: auto; }
.resume-paper img { width: 100%; height: auto; box-shadow: 0 4px 18px #26384c12; }
.resume-preview>a { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--blue); text-decoration: none; }
.campus-certificates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.campus-certificates button { border: 1px solid #e2e2e8; background: #f7f7f9; border-radius: 12px; text-align: left; padding: 10px; color: var(--blue); font-size: 13px; line-height: 1.7; }
.campus-certificates img { height: 170px; width: 100%; object-fit: contain; margin-bottom: 8px; }
.education-photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 25px; }
.education-photos figure { margin: 0; }
.education-photos img { width: 100%; height: 260px; object-fit: contain; border-radius: 12px; background: #f5f5f7; }
.education-photos figcaption { color: var(--secondary); font-size: 13px; margin-top: 8px; }
.education-meta { color: var(--secondary); font-size: 15px; }
#education-dialog h3 { font-size: 18px; margin-bottom: 7px; }
#education-dialog p { line-height: 1.8; }

@media(max-width:1000px) {
  .nav-links { gap: 17px; }
  .skills-list { grid-template-columns: 1fr 1fr; }
  .skills-list .tools-block { grid-column: 1/-1; }
  .compact-schools .school-row { grid-template-columns: 44px minmax(0,1fr) auto; gap: 16px; }
  .compact-schools .school-open { grid-column: 2; text-align: left; }
}
@media(max-width:760px) {
  .hero-layout { min-height: auto; gap: 28px; padding-top: 36px; padding-bottom: 25px; }
  .hero-visual.badge-stage { width: 330px; height: 460px; overflow: visible; }
  .badge-cord { height: 367.5px; }
  .identity-badge { top: 62px; width: 238px; padding: 7px; }
  .badge-photo { height: 294px; }
  .badge-name { font-size: 19px; }
  .badge-signature { padding: 17px 7px 13px; }
  .badge-caption { font-size: 10px; max-width: 84px; }
  .section.work { padding-top: 45px; padding-bottom: 45px; }
  .work .section-head h2 { font-size: 30px; }
  .section.about { padding: 32px 0; }
  .about-brief { grid-template-columns: 1fr; gap: 12px; }
  .about-brief h2 { font-size: 24px; }
  .about-brief p { font-size: 15px; }
  .about .match-banner { padding: 18px; margin-top: 20px; }
  .section.skills,.section.education { padding: 38px 0; }
  .skills-list { display: grid; grid-template-columns: 1fr; gap: 25px; padding: 22px; }
  .skills-list .tools-block { grid-column: auto; }
  .compact-schools .school-row { grid-template-columns: 36px minmax(0,1fr); gap: 9px 13px; padding: 16px 0; }
  .compact-schools .school-mark { width: 34px; height: 34px; grid-row: 1/3; }
  .compact-schools .school-body strong { font-size: 15px; }
  .compact-schools .school-body>span { font-size: 13px; }
  .compact-schools time { grid-column: 2; font-size: 12px; }
  .compact-schools .school-open { grid-column: 2; font-size: 12px; }
  .compact-volunteer { display: block; }
  .compact-volunteer h3 { margin-bottom: 0; }
  #contact>.xhs-card { width: calc(100% - 40px); display: block; }
  #contact>.xhs-card .xhs-actions { margin-top: 14px; }
  .window-bar { height: 44px; padding: 0 14px; grid-template-columns: 70px minmax(0,1fr) 70px; }
  .window-controls { gap: 7px; }
  .window-title { font-size: 12px; }
  .resume-modal .modal-inner { padding: 22px 18px; }
  .resume-layout { grid-template-columns: 1fr; gap: 19px; }
  .resume-list { gap: 9px; }
  .resume-list a { min-height: 70px; padding: 12px 17px; padding-right: 68px; }
  .resume-list a>b { font-size: 14px; max-width: 190px; }
  .resume-list a>span { display: none; }
  .resume-preview-toggle { display: block; position: absolute; right: 12px; top: 20px; background: #fff; border: 1px solid #cfdeed; border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--blue); }
  .resume-paper { max-height: 50vh; padding: 8px; }
  .campus-certificates { grid-template-columns: 1fr; }
  .education-photos { grid-template-columns: 1fr; }
  .interest-links { display: block; padding-top: 13px; margin-top: 15px; }
  .interest-links>div { margin-top: 6px; gap: 22px; }
  .window-dock { left: 10px; bottom: 10px; }
  .window-dock button { padding: 7px 10px; font-size: 12px; }
}
@media(prefers-reduced-motion:reduce) {
  dialog.modal[open],dialog.modal.is-closing,dialog.modal.is-closing::backdrop { animation: none; }
}

.scroll-reveal { opacity: 0; transform: translateY(13px); filter: blur(2px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1), filter .65s ease; transition-delay: var(--reveal-delay,0ms); }
.scroll-reveal.is-revealed { opacity: 1; transform: none; filter: none; }
.scroll-char { transition: opacity .12s linear; }
.hero-reveal { animation: type-enter .75s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--reveal-delay,0ms); }
@keyframes type-enter { from { opacity: 0; transform: translateY(15px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@media(prefers-reduced-motion:reduce) {
  .scroll-reveal,.scroll-char,.hero-reveal { opacity: 1!important; transform: none; filter: none; transition: none; animation: none; }
}
@media print {
  .scroll-reveal,.scroll-char,.hero-reveal { opacity: 1!important; transform: none; filter: none; animation: none; }
}

/* Concrete methods carry more weight than the interest links below. */
.skill-method { margin-top: 17px; }
.skill-method strong { display: block; color: #363d45; font-size: 14px; font-weight: 550; margin-bottom: 3px; }
.skills-list .skill-method p { margin: 0; padding: 0; border: 0; font-size: 14px; color: var(--secondary); line-height: 1.8; }
.skills-list>div>span { font-size: 16px; font-weight: 600; }
@media(max-width:760px) { .skill-method { margin-top: 13px; } }
