/* Jun Hao: cool-white editorial layout, restrained liquid-glass surfaces. */
:root {
  color-scheme: light;
  --ink: #152437;
  --muted: #526174;
  --blue: #245bc5;
  --line: #dce3eb;
  --glass: rgba(255,255,255,.82);
  --shadow: 0 5px 20px rgba(24,43,70,.045);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px; color: var(--ink); background: #f5f7fa;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; line-height: 1.65; background: radial-gradient(ellipse at 88% 0,#dce9f7 0,transparent 700px),linear-gradient(#f8fafc,#f5f7fa 1100px); }
a { color: var(--blue); text-underline-offset: .22em; }
button,input { font: inherit; }
img { display: block; max-width: 100%; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { color: var(--ink); line-height: 1.25; }
h2 { font-size: clamp(1.6rem,2.5vw,2rem); letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
h3 { font-size: 1.2rem; letter-spacing: -.025em; font-weight: 650; }
p { color: var(--muted); }
.container { width: min(1180px,calc(100% - 72px)); margin-inline: auto; }
.glass { border: 1px solid #ffffff; outline: 1px solid #dae2eb; background: var(--glass); border-radius: 20px; box-shadow: var(--shadow),inset 0 1px 0 #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.eyebrow { color: #536984; font-size: .75rem; font-weight: 650; letter-spacing: .095em; line-height: 1.6; text-transform: uppercase; }
.section { padding-top: 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 26px; }
.section-heading h2 { margin-top: 8px; }
.section-heading > p { font-size: .875rem; max-width: 300px; }
.skip-link { position: fixed; top: -90px; left: 16px; z-index: 200; background: #fff; padding: 12px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #3574e0; outline-offset: 5px; }
[id] { scroll-margin-top: 96px; }
.site-header { position: sticky; top: 14px; z-index: 20; width: min(1212px,calc(100% - 40px)); margin: 14px auto 0; padding: 11px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #ffffffe0; border: 1px solid #fff; outline: 1px solid #e1e7ef; border-radius: 18px; box-shadow: 0 5px 22px #15243708,inset 0 1px 0 #fff; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.identity { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 650; line-height: 1.25; text-decoration: none; }
.identity img { border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9e2eb; }
.identity small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; margin-top: 3px; }
#main-nav { display: flex; align-items: center; gap: 6px; }
#main-nav a { padding: 10px 13px; min-height: 44px; font-size: .875rem; text-decoration: none; color: #47556b; border-radius: 10px; }
#main-nav a:hover { background: #edf2f9; color: var(--blue); }
#main-nav .nav-cta { color: #fff; background: var(--ink); margin-left: 8px; }
.menu-toggle { display: none; }
.hero { padding-top: 48px; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 64px; align-items: center; }
.hero-intro { margin-top: 30px; color: var(--ink); font-size: 1rem; font-weight: 550; }
.hero h1 { margin-top: 10px; font-size: clamp(2rem,3.9vw,3rem); line-height: 1.15; font-weight: 650; letter-spacing: -.047em; }
.hero h1 span { color: var(--blue); }
.hero-summary { max-width: 545px; margin-top: 20px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: #26736d; box-shadow: 0 0 0 4px #26736d0c; vertical-align: 1px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 600; font-size: .875rem; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 5px 12px #245bc51a; }
.primary:hover { background: #18469e; }
.secondary { color: var(--ink); background: #ffffffc9; border-color: var(--line); }
.hero-caption { margin-top: 20px; font-size: .8125rem; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-card { padding: 26px; background: linear-gradient(145deg,#213c59f5,#152437fa); outline: none; border-color: #ffffff36; color: #f6f9ff; box-shadow: 0 18px 40px #15243720,inset 0 1px 0 #ffffff22; }
.profile-top { display: flex; align-items: center; gap: 18px; }
.profile-top img { width: 82px; height: 96px; border-radius: 14px; object-fit: cover; border: 1px solid #ffffff55; }
.profile-top strong { display: block; font-size: 1.45rem; font-weight: 600; letter-spacing: -.025em; }
.profile-top span { display: block; margin-top: 4px; color: #c9d6e7; font-size: .8125rem; }
dl { margin: 20px 0; }
dl > div { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 12px; padding: 10px 0; border-top: 1px solid #ffffff1f; font-size: .875rem; }
dt { color: #bccce0; } dd { margin: 0; font-weight: 500; } dd span { font-size: .8125rem; color: #c9d6e7; font-weight: 400; }
.scholarship-mini { display: flex; align-items: center; gap: 10px; padding: 13px; background: #ffffff0e; border: 1px solid #ffffff22; color: #edf5ff; border-radius: 12px; text-decoration: none; }
.scholarship-mini:hover { background: #ffffff18; }
.scholarship-mini strong { display: block; font-size: .8125rem; font-weight: 600; }
.scholarship-mini small { display: block; color: #c9d6e7; font-size: .75rem; }
.scholarship-mini > span:last-child { margin-left: auto; }
.award-icon { font-size: 1.4rem; color: #b4d2ff; }
.project-grid { display: grid; gap: 22px; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
.project-card { min-width: 0; overflow: hidden; background: #ffffffdf; border: 1px solid #dce3eb; border-radius: 18px; box-shadow: var(--shadow); transition: border-color .2s,box-shadow .2s; }
.project-preview { padding: 14px; background: #eaf0f6; border-bottom: 1px solid #e0e6ef; }
.project-preview img { width: 100%; aspect-ratio: 1.8; object-fit: contain; background: #fff; border-radius: 8px; box-shadow: 0 5px 16px #20395810; }
.project-body { padding: 22px; }
.project-body .eyebrow { font-size: .75rem; letter-spacing: .055em; }
.project-body h3 { margin-top: 8px; }
.project-summary { margin: 12px 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li { padding: 3px 8px; border: 1px solid #e1e7ef; background: #f3f6fa; color: #486078; border-radius: 6px; font-size: .8125rem; }
.project-details { margin-top: 18px; border-top: 1px solid #e3e8ef; }
summary { cursor: pointer; }
.project-details summary { min-height: 46px; padding: 12px 0; color: #3b5270; font-size: .875rem; font-weight: 550; }
.role { font-size: .875rem; margin-bottom: 8px; }
.contributions { margin: 0 0 16px; padding-left: 18px; color: var(--muted); font-size: .875rem; }
.contributions li + li { margin-top: 8px; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.private-note { padding-block: 10px; color: var(--muted); font-size: .8125rem; }
.featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.featured-grid > .project-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: center; background: #fff; }
.featured-grid > .project-card:first-child .project-preview { height: 100%; display: flex; align-items: center; padding: 24px; border-bottom: 0; border-right: 1px solid var(--line); background: #e7edf3; }
.featured-grid > .project-card:first-child .project-body { padding: 28px; }
.featured-grid > .project-card:first-child h3 { font-size: 1.55rem; }
.featured-grid > .project-card:not(:first-child) .project-preview { padding: 20px; }
.project-archive { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.archive-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 22px; }
.archive-heading h3 { font-size: 1.2rem; }
.archive-heading p { font-size: .875rem; margin-top: 6px; }
.archive-count { flex-shrink: 0; font-size: .8125rem; color: #47617d; border: 1px solid #d7e1ee; background: #edf2f8; padding: 5px 11px; border-radius: 20px; }
#experience { display: grid; grid-template-columns: 255px minmax(0,1fr); gap: 40px; align-items: start; }
#experience > .section-heading { display: block; position: sticky; top: 120px; }
#experience > .section-heading > p { margin-top: 16px; }
.experience-list { padding: 0 28px; }
.experience-row { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
.experience-row + .experience-row { border-top: 1px solid var(--line); }
.period { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: #526174; }
.period span { margin-left: auto; background: #edf2f8; border-radius: 6px; padding: 3px 9px; }
.experience-row h3 { margin-top: 7px; }
.experience-row ul { margin: 14px 0; padding-left: 18px; color: var(--muted); }
.experience-row li + li { margin-top: 7px; }
.inline-tags { font-size: .8125rem; color: #31588b; }
.skills-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.skill-card { padding: 24px; border-radius: 16px; position: relative; }
.skill-number { float: right; display: grid; place-items: center; width: 32px; height: 32px; background: #edf3fc; border-radius: 9px; color: #3d6093; font-size: .75rem; }
.skill-card h3 { padding-top: 4px; padding-right: 42px; font-size: 1.1rem; }
.skill-card p { margin: 14px 0 18px; }
.about-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 32px; align-items: start; }
.about-text { padding: 28px; border-left: 2px solid #608ed0; background: linear-gradient(110deg,#eaf0f7,transparent); border-radius: 0 20px 20px 0; }
.about-text h2 { margin: 12px 0 22px; }
.about-text > p + p { margin-top: 17px; }
.languages { display: grid; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #d4deea; }
.languages > div { display: flex; justify-content: space-between; gap: 16px; font-size: .875rem; }
.languages strong { font-weight: 550; }
.languages span { color: var(--muted); }
.education-stack { display: grid; gap: 18px; }
.education-card { padding: 26px; }
.education-card h3 { margin-top: 9px; }
.education-card > p:not(.eyebrow) { margin-top: 9px; font-size: .875rem; }
.award { padding: 18px 0; }
.award strong { display: block; font-size: 1.9rem; font-weight: 600; color: var(--blue); letter-spacing: -.035em; }
.award p { margin-top: 5px; font-size: .875rem; max-width: 370px; }
.award span { font-size: .75rem; color: var(--muted); }
.award-proof { display: flex; align-items: center; gap: 16px; border: 1px solid #e0e6ef; padding: 10px; border-radius: 12px; background: #f4f7fb; text-decoration: none; }
.award-proof img { width: 105px; height: 92px; object-fit: contain; border-radius: 5px; background: #fff; }
.award-proof span { font-size: .875rem; font-weight: 500; }
.merit { display: inline-block; padding: 4px 10px; margin-top: 14px; background: #eaf2ee; color: #2f624a; border-radius: 6px; font-size: .8125rem; }
.contact-card { display: grid; grid-template-columns: minmax(0,1fr) 225px; gap: 56px; padding: 36px; background: linear-gradient(120deg,#182a40,#25415d); border-color: #ffffff30; outline: none; box-shadow: 0 12px 34px #15243715,inset 0 1px 0 #ffffff20; }
.contact-card h2 { color: #f5f8ff; margin: 12px 0 14px; }
.contact-card p { color: #cedbea; max-width: 560px; }
.contact-card .eyebrow { color: #a8c8f2; }
.contact-email { display: inline-block; color: #f4f8ff; margin-top: 20px; font-size: clamp(1rem,2.2vw,1.45rem); font-weight: 550; overflow-wrap: anywhere; }
.contact-email span { margin-left: 10px; color: #adceff; }
.contact-side { display: grid; gap: 8px; }
.social-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 13px; color: #213b59; background: #f5f8fc; border: 1px solid #ffffff; border-radius: 10px; font-size: .875rem; font-weight: 550; text-decoration: none; }
.social-link > span { margin-left: auto; }
.brand-logo { width: 18px; height: 18px; flex: 0 0 18px; }
.freelance { font-size: .8125rem; padding-top: 6px; }
.personal-links { display: flex; gap: 20px; padding: 20px 0; font-size: .8125rem; }
.personal-links > span { color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 10px; padding: 24px 0; color: var(--muted); font-size: .8125rem; }
@media (hover: hover) { .project-card:hover { border-color: #afc3dd; box-shadow: 0 10px 26px #233d6410; } }
@media (max-width: 1050px) {
  .hero { gap: 32px; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
  .hero h1 { font-size: 2.5rem; }
  #main-nav { gap: 0; }
  #main-nav a { padding-inline: 9px; }
  .archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #experience { grid-template-columns: 220px minmax(0,1fr); gap: 28px; }
  .about-grid { gap: 24px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 36px); }
  .site-header { top: 8px; width: calc(100% - 20px); margin-top: 8px; padding: 9px 12px; }
  .menu-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 12px; border: 1px solid #d4deed; background: #fff; color: var(--ink); border-radius: 10px; font-size: .875rem; }
  #main-nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 10px; border: 1px solid #d9e3ef; border-radius: 16px; background: #f9fbff; box-shadow: 0 14px 30px #233d6420; }
  #main-nav.is-open { display: grid; }
  #main-nav a { padding: 12px; min-height: 46px; }
  #main-nav .nav-cta { margin: 4px 0 0; }
  .hero { grid-template-columns: 1fr; padding-top: 34px; gap: 28px; }
  .hero-intro { margin-top: 23px; }
  .hero h1 { font-size: clamp(1.85rem,7.7vw,2.6rem); }
  .hero-summary { margin-top: 16px; }
  .hero-actions { margin-top: 22px; }
  .profile-card { padding: 22px; }
  .profile-top img { width: 70px; height: 80px; }
  .section { padding-top: 48px; }
  .section-heading { display: block; margin-bottom: 22px; }
  .section-heading > p { margin-top: 12px; max-width: none; }
  .section-heading br { display: none; }
  .featured-grid,.archive-grid { grid-template-columns: 1fr; gap: 18px; }
  .featured-grid > .project-card:first-child { display: block; }
  .featured-grid > .project-card:first-child .project-preview { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .featured-grid > .project-card:first-child .project-body { padding: 22px; }
  .featured-grid > .project-card:first-child h3 { font-size: 1.3rem; }
  .featured-grid > .project-card:not(:first-child) .project-preview { padding: 14px; }
  .project-archive { margin-top: 30px; padding-top: 24px; }
  .archive-heading { gap: 14px; }
  .archive-count { white-space: nowrap; padding: 4px 8px; }
  #experience { grid-template-columns: 1fr; gap: 0; }
  #experience > .section-heading { position: static; }
  .experience-list { padding-inline: 22px; }
  .skills-grid { gap: 14px; }
  .skill-card { padding: 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-text { padding: 8px 0 8px 20px; background: none; }
  .education-card { padding: 22px; }
  .contact-card { grid-template-columns: 1fr; padding: 26px 22px; gap: 26px; }
  .site-footer { flex-wrap: wrap; gap: 12px; }
  .site-footer > span:nth-child(2) { display: none; }
}
@media (max-width: 520px) {
  .skills-grid { grid-template-columns: 1fr; }
  .archive-heading { flex-wrap: wrap; gap: 12px; }
  .project-body,.featured-grid > .project-card:first-child .project-body { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition: none !important; }
}
@supports not (backdrop-filter: blur(1px)) {
  .glass,.site-header { background-color: #fff; }
  .profile-card,.contact-card { background-color: #182a40; }
}
@media print {
  body { background: #fff; }
  .site-header,.hero-actions,.menu-toggle,.project-preview,.personal-links,.site-footer { display: none; }
  .container { width: 100%; }
  .hero,.about-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .glass,.project-card,.contact-card,.profile-card { background: #fff; color: #152437; box-shadow: none; backdrop-filter: none; outline: none; border: 1px solid #ddd; }
  .profile-card *,.contact-card * { color: #152437; }
  .section { padding-top: 24px; }
  #experience { display: block; }
  #experience > .section-heading { position: static; }
  .experience-row,.education-card,.skill-card { break-inside: avoid; }
  .hero h1 { font-size: 26pt; }
  h2 { font-size: 19pt; }
}
