/* Additive controls for the original homepage and publication cards. */
[hidden] { display: none !important; }
html { scroll-padding-top: 5rem; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 1000; background: #fff; padding: .7rem 1rem; border: 1px solid var(--accent); }
.skip-link:focus { top: .7rem; }
.profile-image-link { display: block; flex-shrink: 0; line-height: 0; border-radius: 50%; }
.profile-gallery { width: clamp(300px, 30vw, 420px); max-width: 100%; flex-shrink: 0; }
.profile-photo-stage { width: 100%; aspect-ratio: 1; touch-action: pan-y; }
.profile-img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.portrait-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.portrait-controls button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #bfdbfe; border-radius: 50%; background: #eff6ff; color: #1d4ed8; font: 600 1.7rem/1 'Inter', sans-serif; cursor: pointer; }
.portrait-controls button:hover { background: #dbeafe; border-color: var(--accent); }
.portrait-count { min-width: 3rem; color: #475569; text-align: center; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.profile-info { min-width: 0; }
.profile-subheading { display: flex; align-items: center; gap: 1rem; margin: 1.6rem 0 .9rem; color: #1e293b; font-size: 1.5rem; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.profile-subheading::after { content: ''; height: 1px; background: var(--border-color); flex: 1; }
.education-current, .education-previous { padding: 1rem 1.2rem; border: 1px solid #dbeafe; border-left: 4px solid var(--accent); border-radius: 10px; background: #f5f9ff; }
.education-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .4rem; }
.current-label { color: #1d4ed8; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.education-period { display: inline-block; padding: 2px 9px; border-radius: 20px; background: #dbeafe; color: #1d4ed8; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.education-degree { margin: 0 0 .3rem; color: #1e293b; font-size: 1.3rem; font-weight: 800; line-height: 1.45; }
.education-degree span { font-size: 1.05rem; font-weight: 700; }
.education-institution { margin: 0; font-size: .94rem; line-height: 1.65; }
.postech-name { color: var(--postech-color); }
.education-lab { display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin: .4rem 0 0; font-size: .88rem; color: #475569; }
.education-lab a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.education-lab .advisor-link { color: #475569; }
.education-previous { margin-top: .85rem; border-color: #e2e8f0; border-left-color: #cbd5e1; background: #f8fafc; color: #64748b; }
.graduated-label { color: #64748b; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.education-previous .education-degree { color: #475569; font-size: 1.02rem; font-weight: 700; }
.education-previous .education-institution { font-size: .88rem; }
.education-previous .education-period { background: #e2e8f0; color: #475569; font-size: .75rem; }
.profile-bio { margin: 0 0 1.2rem; font-size: 1rem; }
.profile-bio strong { color: #1e3a5f; font-weight: 700; }
.pub-main { width: 100%; }
.research-title { font-size: 1.1rem; }
.research-kw { font-size: .82rem; color: #1d4ed8; }
.pub-title { margin: 0 0 .65rem; font-size: 1.3rem; line-height: 1.45; letter-spacing: -.25px; }
.pub-title a { color: #0f172a; }
.pub-title a::after { content: none; }
.pub-authors { font-size: 1rem; line-height: 1.75; color: #334155; }
.pub-authors .me { color: #1d4ed8; font-weight: 700; }
.pub-venue-full { margin-top: .45rem; color: #475569; font-size: .95rem; font-style: normal; line-height: 1.65; }
.pub-category { font-size: 1.2rem; color: #1e40af; }
.venue-label { display: inline-block; padding: .35rem .75rem; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: .95rem; font-weight: 700; line-height: 1.5; }
.venue-label.conference { color: #9d174d; background: #fff1f7; border-color: #fbcfe8; }
.pub-badge { font-size: .75rem; }
.pub-badge.conf { background: #9d174d; }
.pub-category-count { display: inline-flex; align-items: center; padding: .2rem .7rem; margin-left: .25rem; border: 1px solid #dbeafe; border-radius: 999px; background: #eff6ff; color: #1e40af; font-size: .875rem; line-height: 1.5; font-weight: 600; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.publication-status { display: inline-block; padding: 2px 8px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; color: #475569; font-size: .8rem; font-weight: 600; font-style: normal; white-space: nowrap; }
.publication-status.to-appear { padding: 0; border: 0; border-radius: 0; background: none; color: #9d174d; font-size: 1.05rem; font-weight: 600; }
.publication-status[data-status="Submitted"] { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.publication-status[data-status="Writing"] { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.project-thumb::after { content: 'View Project'; }
.publication-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.publication-links a, .publication-links button, .citation-toolbar .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .5rem .9rem; min-height: 44px; min-width: 80px;
  border: 1px solid #bfdbfe; border-radius: 6px; color: #1d4ed8;
  background: var(--accent-light); font: 600 .85rem/1.6 'Inter', sans-serif; cursor: pointer;
}
.publication-links a:hover, .publication-links button:hover, .citation-toolbar .button:hover { border-color: var(--accent); background: #dbeafe; }
.publication-links .paper-link { color: #fff; background: #b45309; border-color: #b45309; }
.publication-links .paper-link:hover { background: #92400e; border-color: #92400e; }
.publication-links .project-link { color: #fff; background: #7e22ce; border-color: #7e22ce; }
.publication-links .project-link:hover { color: #fff; background: #6b21a8; border-color: #6b21a8; }
.publication-links .cite-copy, .citation-toolbar .button { color: #fff; background: #334155; border-color: #334155; }
.publication-links .cite-copy:hover, .citation-toolbar .button:hover { color: #fff; background: #1e293b; border-color: #1e293b; }
.publication-links button:disabled, .publication-links button:disabled:hover { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; cursor: not-allowed; }
.equal-note { display: inline; color: #475569; font-size: .875em; font-style: italic; white-space: nowrap; }
.equal-note b, .contribution-marker { font-weight: 700; }
.citation-disclosure { margin-top: .7rem; min-width: 0; }
.citation-disclosure summary { font-size: .8rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.has-js .citation-disclosure:not([open]) { margin-top: 0; }
.has-js .citation-disclosure:not([open]) > summary { display: none; }
.citation-box { padding: .9rem; border: 1px solid var(--border-color); border-radius: 8px; background: #f8fafc; margin-top: .5rem; min-width: 0; }
.citation-toolbar { display: flex; gap: .5rem .8rem; align-items: center; flex-wrap: wrap; }
.citation-toolbar { justify-content: space-between; }
.citation-label { font-size: .9rem; color: var(--text-light); }
.citation-box pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .85rem/1.75 Consolas, monospace; margin: .8rem 0 0; color: var(--text-main); }
.citation-source { color: var(--text-light); font-size: .8rem; margin: .7rem 0 0; }
.citation-source a { color: var(--accent); text-decoration: underline; }
.copy-status { font-size: .85rem; color: #166534; margin: .5rem 0 0; overflow-wrap: anywhere; }
.copy-status:empty { display: none; }
.copy-check { font-size: 1em; font-weight: 800; line-height: 1; }
.publication-links .copy-status, .citation-toolbar .copy-status { flex-basis: 100%; margin: 0; }
.archive-page { max-width: 1200px; }
.archive-toolbar, .archive-tools, .filter-group, .filter-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.archive-toolbar { justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.archive-tools { gap: 1rem; font-size: .9rem; }
.archive-tools a { color: var(--accent); text-decoration: underline; }
.archive-count { margin: 0; color: #1d4ed8; font-size: 1.3rem; font-weight: 750; line-height: 1.4; }
.filter-group button { font: 600 .9rem/1.5 'Inter', sans-serif; padding: .55rem .85rem; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; color: #475569; cursor: pointer; }
.filter-group button[aria-pressed="true"] { background: var(--accent-light); border-color: #bfdbfe; color: var(--accent); }
.filter-group button[data-filter="submitted"][aria-pressed="true"] { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.filter-group button[data-filter="writing"][aria-pressed="true"] { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.filter-group span { margin-left: .35rem; }
.secondary-filters { margin: .75rem 0 1.5rem; gap: .45rem; }
.secondary-filters button { padding: .35rem .7rem; font-size: .8rem; border-radius: 6px; min-height: 36px; }
.publication-empty { padding: 2rem; border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-light); }
.patents-section { margin-top: 2rem; }
.patent-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 1.5rem; align-items: center; }
.patent-applications { margin: 0; min-width: 0; }
.patent-applications a { overflow-wrap: anywhere; }
.patent-pending { border-style: dashed; }
.patent-pending .pub-title { margin-bottom: 0; }
.patent-pending .pub-badge { background: #059669; }
.patent-title-note { color: #64748b; font-size: .9rem; font-weight: 400; font-style: italic; }
.patent-inventors { margin: .5rem 0 .1rem; }
.patent-publication-note { margin: 0; color: #64748b; font-size: .88rem; }
.publication-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.publication-grid .pub-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: stretch; gap: 1.15rem 1.75rem; padding: 1.4rem; margin: 0; min-width: 0; border-top: 3px solid #93c5fd; box-shadow: 0 3px 14px #1e3a8a06; }
.publication-grid .pub-item[data-type="conference"] { border-top-color: #f9a8d4; }
.publication-grid .pub-venue { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .9rem; line-height: 1.55; font-style: normal; overflow-wrap: anywhere; text-wrap: pretty; }
.pub-venue-labels { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.pub-keywords { display: flex; flex: 1 1 180px; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; margin: 0; padding: 0; list-style: none; color: #4b5563; font-size: .8rem; font-weight: 500; line-height: 1.6; }
.pub-keywords li { padding: .12rem .45rem; border: 1px solid #e5e7eb; border-radius: 6px; background: #f3f4f6; white-space: nowrap; }
.publication-grid .pub-main { min-width: 0; min-height: 280px; display: flex; flex-direction: column; justify-content: center; overflow-wrap: anywhere; }
.publication-grid .citation-disclosure { grid-column: 1 / -1; margin-top: 0; }
.has-js .publication-grid .citation-disclosure:not([open]) { display: none; }
.publication-grid .pub-thumb { width: 100%; height: auto; min-height: 280px; align-self: stretch; aspect-ratio: auto; background: #fff; }
.publication-grid .pub-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.publication-grid .manuscript-placeholder { padding: 1rem; gap: .55rem; border-style: dashed; cursor: default; }
.publication-grid .manuscript-placeholder.submitted { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.publication-grid .manuscript-placeholder.writing { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.publication-grid .manuscript-placeholder:hover { transform: none; box-shadow: none; }
.publication-grid .manuscript-placeholder::after { content: none; }
.manuscript-placeholder .material-symbols-outlined { font-size: 2.8rem; }
.manuscript-placeholder strong { font-size: 1.5rem; line-height: 1.3; }
.manuscript-placeholder > span:last-child { font-size: .9rem; font-weight: 500; }
.research-topic-label { margin: 0 0 .55rem; color: #64748b; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.author-role { color: #475569; font-size: .9em; }
.portrait-dialog { border: 0; padding: 0; overflow: visible; border-radius: 16px; background: transparent; max-width: 94vw; max-height: 94vh; }
.portrait-dialog::backdrop { background: rgba(15, 23, 42, .82); backdrop-filter: blur(6px); }
.portrait-dialog img { display: block; width: auto; height: auto; max-width: min(960px, 94vw); max-height: calc(94vh - 76px); object-fit: contain; border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.45); touch-action: pan-y; }
.portrait-dialog:has([data-profile-controls][hidden]) img { max-height: 94vh; }
.portrait-dialog .portrait-close { position: absolute; right: .7rem; top: .7rem; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(15,23,42,.75); color: #fff; font-size: 1.4rem; cursor: pointer; }
.portrait-dialog .portrait-controls { width: fit-content; margin: .65rem auto 0; padding: .35rem .6rem; border-radius: 999px; background: #fff; }
body:has(.portrait-dialog[open]) { overflow: hidden; }
@media (max-width: 1100px) {
  .profile-section { gap: 2rem; }
  .col-left { width: 100%; }
}
@media (max-width: 768px) {
  .profile-gallery { width: min(360px, 100%); }
  .profile-subheading { font-size: 1.35rem; }
  .profile-education, .profile-introduction { text-align: left; }
  .education-current, .education-previous { padding: .9rem 1rem; }
  .education-degree span { display: block; margin-top: .2rem; }
  /* Match the original stacked mobile intent, overriding its column-specific rule. */
  .col-left .pub-item { flex-direction: column; align-items: flex-start; }
  .col-left .pub-thumb { width: 100%; height: 180px; }
  .research-item { gap: .8rem; padding: 1.2rem 1rem; }
  .research-body { min-width: 0; }
  .research-title { overflow-wrap: anywhere; }
  .nav-menu a { margin-left: 1rem; }
}
@media (max-width: 480px) {
  .nav-inner { padding-inline: 1rem; gap: .75rem; }
  .nav-logo { white-space: nowrap; }
  .nav-menu { display: flex; gap: .75rem; }
  .nav-menu a { margin: 0; font-size: .8rem; }
}
@media (max-width: 700px) {
  .patent-card { grid-template-columns: minmax(0, 1fr); }
  .patent-card { gap: 1rem; }
  .publication-grid .pub-item { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.1rem; }
  .publication-grid .pub-thumb { width: calc(100% + 2.2rem); margin: -1.1rem -1.1rem 0; min-height: 0; aspect-ratio: 4 / 3; border-width: 0 0 1px; border-radius: 8px 8px 0 0; }
  .publication-grid .pub-main { min-height: 0; }
  .pub-keywords { flex-basis: 100%; }
  .pub-title { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
