* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fbfbfa; color: #202b32; font: 16px/1.72 "Helvetica Neue", Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #275a88; }
a:focus-visible, object:focus-visible { outline: 3px solid #458dc8; outline-offset: 4px; }
::selection { background: var(--accent); color: #152330; }
.site-shell { width: min(100% - 56px, 1040px); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 9px 14px; background: #fff; }
.skip-link:focus { top: 10px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 100px; border-bottom: 1px solid #d8e0e4; }
.wordmark { font-size: 29px; font-weight: 780; letter-spacing: -.07em; text-decoration: none; white-space: nowrap; }
.wordmark span, .accent-dot { color: var(--accent); }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 26px; font-size: 14px; font-weight: 560; }
.site-header nav a { text-decoration: none; border-bottom: 2px solid transparent; padding: 7px 0 5px; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); color: #162632; }
.site-header nav .sidequests-link { display: inline-flex; gap: 3px; align-items: baseline; color: #275a88; }
.site-header nav .sidequests-link span { font-size: 13px; }
main { flex: 1; padding: 70px 0 100px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.035em; }
h1 { font-size: clamp(52px, 6.7vw, 76px); font-weight: 700; }
h2 { font-size: 23px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { max-width: 760px; }
.entry-meta { color: #56738d; font-size: 12px; font-weight: 740; letter-spacing: .14em; text-transform: uppercase; }
.about-hero { display: grid; grid-template-columns: minmax(0, 1fr) 235px; align-items: center; gap: 64px; max-width: 800px; margin: 0 auto; padding: 18px 0 52px; }
.about-hero h1 { margin-bottom: 18px; font-size: clamp(58px, 7vw, 78px); }
.hero-description { max-width: 540px; color: #425361; font-size: clamp(19px, 2.3vw, 25px); line-height: 1.45; letter-spacing: -.025em; }
.about-hero .hero-description { margin-bottom: 0; }
.portrait-note { position: relative; width: 235px; align-self: center; }
.portrait-frame { aspect-ratio: 1995 / 2144; background: #e4e6e7; border-radius: 8px; overflow: hidden; }
.portrait-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait-doodle { position: absolute; left: -30px; bottom: -20px; width: 94px; height: 94px; padding: 4px; border: 1px solid #dce3e6; border-radius: 8px; background: #edf2f5; box-shadow: 0 6px 18px #20293618; }
.portrait-doodle img { display: block; width: 100%; height: 100%; object-fit: contain; }
.about-copy { max-width: 800px; margin: 0 auto; color: #3f4e57; font-size: 17px; line-height: 1.85; }
.about-copy p { max-width: none; margin-bottom: 18px; }
.about-copy p, .off-duty p, .contact-box > p:not(.contact-label), .content-section p, .research-entry > p:not(.entry-meta, .entry-subtitle, .entry-people, .entry-recognition), .publication-entry > p:not(.entry-meta, .entry-recognition) { text-align: justify; text-justify: inter-word; hyphens: auto; }
.about-copy strong, .content-section strong { color: #233747; font-weight: 680; }
.about-links { display: flex; gap: 30px; flex-wrap: wrap; max-width: 800px; margin: 32px auto 62px; }
.text-link { font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 1px solid #698ea7; padding-bottom: 3px; }
.text-link span { margin-left: 3px; }
.contact-box { max-width: 800px; background: #f4f6f6; border: 1px solid #dce3e6; border-left: 3px solid #7796aa; border-radius: 8px; padding: 26px 32px; margin: 52px auto 75px; }
.contact-box p { margin: 0; font-size: 18px; line-height: 1.6; }
.contact-box .contact-label { margin-bottom: 12px; color: #52758c; font-size: 11px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.contact-box a { color: #174e7b; font-weight: 700; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 25px; list-style: none; border-top: 1px solid #d8e1e5; margin: 22px 0 0; padding: 17px 0 0; font-size: 14px; }
.off-duty { max-width: 800px; margin: 0 auto; border-top: 1px solid #d8e0e4; padding-top: 36px; color: #465562; }
.off-duty h3 { color: #202936; }
.page-heading { max-width: 800px; margin: 0 auto 48px; }
.page-heading h1 { margin-bottom: 13px; }
.page-intro { font-size: clamp(19px, 2.2vw, 24px); color: #526371; }
.research-list, .publication-list { max-width: 800px; margin: 0 auto; }
.research-list { border-top: 1px solid #dce4eb; }
.research-entry { padding: 36px 0 38px; border-bottom: 1px solid #d8e0e4; }
.research-entry h2, .publication-entry h3 { margin: 8px 0 12px; }
.research-entry > p:not(.entry-meta, .entry-recognition), .publication-entry p:not(.entry-meta, .entry-recognition) { color: #485968; }
.research-entry h2 { font-size: 22px; }
.research-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 26px 0 24px; }
.research-figure { min-width: 0; margin: 0; }
.research-figure a { display: flex; align-items: center; justify-content: center; height: 190px; padding: 8px; overflow: hidden; border: 1px solid #dce3e6; border-radius: 8px; background: #fff; }
.research-figure a:hover { border-color: #91acbd; }
.research-figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.research-figure figcaption { margin-top: 7px; color: #627482; font-size: 12px; }
.entry-subtitle { font-size: 17px; font-weight: 600; }
.entry-people { margin: 20px 0 0; font-size: 14px; }
.entry-people span { color: #346c99; font-weight: 750; margin-right: 8px; }
.entry-recognition { max-width: none; margin: 19px 0 0; color: #465967; font-size: 14px; line-height: 1.6; }
.entry-recognition strong { font-weight: 700; }
.entry-recognition .recognition-award { color: #800020; }
.entry-recognition .recognition-acceptance, .entry-recognition .recognition-grade { color: #276b9a; }
.recognition-separator { color: #7f94a5; font-style: normal; font-weight: 400; white-space: pre; }
.entry-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; font-size: 14px; font-weight: 700; }
.entry-links a { border-bottom: 1px solid #698ea7; padding-bottom: 2px; text-decoration: none; }
.entry-links a span { margin-left: 3px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 5px 0; padding: 0; margin: 20px 0 0; }
.tags li { color: #607581; font-size: 12px; font-weight: 600; line-height: 1.4; }
.tags li + li::before { content: "/"; margin: 0 11px; color: #a7b5bd; font-weight: 400; }
.publication-year-group { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 24px; border-top: 1px solid #d8e0e4; padding-top: 34px; }
.publication-year { margin: 3px 0 0; color: #577387; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; }
.publication-entry { padding: 0 0 40px; }
.publication-entry h3 { font-size: 20px; }
.publication-people { border-left: 2px solid #d6e0e5; padding-left: 16px; margin: 18px 0 18px; }
.publication-entry .detail-label { margin-bottom: 6px; color: #56738d; font-size: 11px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.publication-entry .publication-authors { margin-bottom: 5px; color: #384a5a; font-size: 15px; line-height: 1.6; }
.publication-authors strong { color: #202936; font-weight: 780; }
.publication-authors sup, .publication-affiliations sup { font-size: 10px; }
.publication-entry .publication-affiliations { margin: 5px 0 0; color: #657686; font-size: 12px; line-height: 1.6; }
.github-card-container { display: flex; justify-content: center; }
.github-card { display: flex; flex-direction: column; align-items: center; gap: 11px; width: min(100%, 640px); padding: 30px 34px; border: 1px solid #d8e0e4; border-left: 3px solid #7796aa; border-radius: 8px; background: #f7f8f8; text-align: center; text-decoration: none; }
.github-card:hover { border-color: #9fb4c1; background: #f2f5f6; }
.github-card .entry-meta { margin: 0; }
.github-handle { font-size: 27px; font-weight: 720; letter-spacing: -.04em; }
.github-handle span { color: #3884bd; font-size: 22px; }
.content-section { max-width: 800px; border-top: 1px solid #d8e0e4; margin: 55px auto 0; padding-top: 31px; color: #485968; }
.content-section h2 { color: #202936; }
.cv-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; max-width: 850px; margin: 0 auto 20px; color: #526371; font-size: 14px; }
.cv-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.button { display: inline-block; padding: 9px 17px; background: #29495e; border: 1px solid #29495e; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.button:hover { background: #3c637c; color: #fff; }
.cv-viewer { max-width: 850px; margin: 0 auto; background: #e9eef2; border: 1px solid #d7e1e8; border-radius: 8px; overflow: hidden; }
.cv-viewer object { display: block; width: 100%; height: min(75vh, 950px); min-height: 550px; }
.pdf-fallback { padding: 40px; text-align: center; }
.pdf-fallback p { margin: 0 auto 20px; }
.quiet-note { max-width: 850px; margin: 16px auto 0; color: #64747f; font-size: 13px; }
.site-footer { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; border-top: 1px solid #d8e0e4; padding: 23px 0 28px; color: #586875; font-size: 12px; }

/* A playful visual language reserved for the personal-project section. */
.is-sidequests { background: #f3f8fd; }
.is-sidequests .site-header, .is-sidequests .site-footer { border-color: #bcd8ef; }
.sidequests-intro { position: relative; min-height: 395px; padding: 60px 7% 70px; overflow: hidden; border: 2px solid #203346; border-radius: 12px; background: #88bdf2; box-shadow: 10px 10px 0 #203346; }
.sidequests-intro::before, .sidequests-intro::after { content: ""; position: absolute; border: 2px solid #203346; border-radius: 50%; pointer-events: none; }
.sidequests-intro::before { width: 250px; height: 250px; right: -80px; bottom: -95px; }
.sidequests-intro::after { width: 145px; height: 145px; right: 60px; top: -80px; }
.sidequests-intro h1 { position: relative; z-index: 1; font-size: clamp(50px, 9vw, 112px); letter-spacing: -.075em; margin-bottom: 19px; }
.sidequests-intro h1 span { display: inline-block; margin-left: 6px; transform: rotate(-18deg); font-size: .55em; vertical-align: top; }
.sidequests-description { position: relative; z-index: 1; font-size: 23px; font-weight: 540; line-height: 1.5; }
.field-note { position: absolute; right: 80px; bottom: 55px; transform: rotate(-9deg); font-size: 17px; font-style: italic; }
.empty-curation { max-width: 620px; margin: 100px auto 60px; padding: 44px 20px 48px; border: 1.5px dashed #88bdf2; border-radius: 10px; text-align: center; }
.empty-symbol { display: block; color: #4b90c7; font-size: 50px; line-height: 1; }
.empty-curation p { margin: 12px auto 3px; font-size: 24px; font-weight: 600; }
.empty-curation > span:last-child { color: #526371; font-size: 15px; }
.sidequests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 56px 0 20px; }
.quest-card { border: 2px solid #203346; border-radius: 8px; background: #fff; padding: 26px; box-shadow: 5px 5px 0 var(--accent); }
.quest-card h2 { margin: 10px 0; }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 32px, 1040px); }
  .site-header { align-items: flex-start; flex-direction: column; gap: 2px; padding: 16px 0 17px; }
  .site-header nav { gap: 2px 18px; font-size: 13px; }
  main { padding: 40px 0 70px; }
  .about-hero { grid-template-columns: minmax(0, 1fr) 170px; gap: 24px; padding: 15px 0 40px; }
  .about-hero h1 { font-size: clamp(45px, 8.7vw, 65px); }
  .portrait-note { width: 170px; }
  .portrait-doodle { left: -24px; bottom: -15px; width: 72px; height: 72px; }
  .hero-description { font-size: 19px; }
  .contact-box { margin: 45px auto 60px; padding: 22px; }
  .sidequests-intro { min-height: 330px; padding: 40px 26px 65px; box-shadow: 6px 6px 0 #203346; }
  .sidequests-description { font-size: 19px; }
  .field-note { right: 25px; bottom: 25px; font-size: 14px; }
  .empty-curation { margin: 80px 0 20px; }
}
@media (max-width: 600px) {
  .about-copy p, .off-duty p, .contact-box > p:not(.contact-label), .content-section p, .research-entry > p:not(.entry-meta, .entry-subtitle, .entry-people, .entry-recognition), .publication-entry > p:not(.entry-meta, .entry-recognition) { text-align: left; }
  .research-figures { grid-template-columns: 1fr; }
  .research-figure a { height: auto; }
  .research-figure img { width: 100%; max-height: none; }
}
@media (max-width: 510px) {
  .page-heading h1 { font-size: clamp(42px, 11vw, 54px); }
  .about-hero { grid-template-columns: minmax(0, 1fr) 108px; gap: 14px; }
  .about-hero h1 { font-size: clamp(36px, 9vw, 46px); }
  .portrait-note { width: 108px; }
  .portrait-doodle { left: -14px; bottom: -10px; width: 54px; height: 54px; padding: 2px; }
  .about-copy { font-size: 16px; }
  .about-links { margin-bottom: 35px; }
  .publication-year-group { grid-template-columns: 1fr; gap: 14px; }
  .publication-year { margin: 0; }
  .cv-actions { width: 100%; }
  .cv-viewer object { min-height: 460px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
