:root {
  --paper: var(--color-paper);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --line: var(--color-line);
  --accent: var(--color-ink);
  --font: var(--font-ui);
  --text-small: .875rem;
  --text-body: 1rem;
  --text-entry: 1.25rem;
  --text-section: 1.75rem;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--text-body)/1.8 var(--font); -webkit-font-smoothing: antialiased; }
html[lang="ko"] .lang-en, html[lang="en"] .lang-ko { display: none !important; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.4; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
h2 { font-size: var(--text-section); }
h3 { font-size: var(--text-entry); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--color-selection); color: var(--ink); }
.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 30; padding: 8px 16px; color: var(--paper); background: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Shared type roles: sans-serif for structure, serif for descriptions. */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.navigation { display: grid; grid-template-columns: 1fr auto; align-items: center; padding-top: var(--space-1); }
.wordmark { display: inline-flex; align-items: center; width: fit-content; min-height: 44px; color: var(--ink); font-family: var(--font-reading); font-size: 1.625rem; font-weight: 500; font-optical-sizing: auto; line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.wordmark:hover { text-decoration: none; opacity: .7; }
.primary-nav { display: flex; justify-content: space-between; gap: var(--space-1); grid-column: 1 / -1; grid-row: 2; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-small); color: var(--ink); }
.primary-nav a[aria-current="location"] { text-decoration: underline; }
.language-switch { display: flex; grid-column: 2; grid-row: 1; }
.language-switch button { min-width: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--muted); font-size: var(--text-small); cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

.profile { display: grid; grid-template-columns: minmax(0,max-content) 104px; align-items: center; gap: var(--space-3); width: fit-content; max-width: 100%; margin-inline: auto; padding-top: var(--space-6); animation: settle-in 550ms var(--ease-out) both; }
.profile-copy { min-width: 0; max-width: 400px; }
.profile h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -.05em; }
.profile-name { margin-top: 12px; color: var(--muted); font-size: var(--text-small); letter-spacing: .01em; }
.profile-affiliation { margin-top: var(--space-3); font-size: var(--text-small); color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.profile-field { margin-top: var(--space-2); font-size: var(--text-small); color: var(--muted); word-break: keep-all; }
.profile-topic { display: inline-block; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0; }

.section { margin-top: var(--space-8); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.section > h2 { padding-bottom: var(--space-4); }
.entry { display: grid; gap: var(--space-3); padding-block: var(--space-4); }
.entry:first-child { padding-top: 0; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry h3 { font-weight: 600; }
.entry-description { margin-top: 12px; font-family: var(--font-reading); font-size: 1rem; line-height: 1.85; font-weight: 400; font-optical-sizing: auto; letter-spacing: 0; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.entry-facts { list-style: none; padding: 0; margin-top: var(--space-2); font-size: var(--text-small); color: var(--muted); line-height: 1.85; font-variant-numeric: tabular-nums; }
.entry-links, .contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--space-3); }
.entry-links { margin-top: var(--space-2); row-gap: var(--space-1); }
.entry-links a, .contact-links a { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; font-size: var(--text-small); }
.entry-links a > [aria-hidden], .contact-links a > [aria-hidden] { transition: transform 220ms var(--ease-out); }
.entry-links a:hover > [aria-hidden], .contact-links a:hover > [aria-hidden] { transform: translate(2px,-2px); }
.entry-links .entry-link-button { padding: 8px 14px; border: 1px solid var(--color-strong-line); transition: background 220ms ease, border-color 220ms ease; }
.entry-links .entry-link-button:hover { background: var(--color-surface); border-color: var(--ink); text-decoration: none; }
.entry-media { display: grid; gap: var(--space-2); align-content: start; }
.entry-image { display: flex; align-items: center; justify-content: center; width: min(100%,360px); align-self: start; }
.entry-image img { width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: opacity 220ms ease; }
.entry-image:hover img { opacity: .82; }

.background-grid { display: grid; gap: var(--space-4); }
.education, .skills { display: grid; gap: var(--space-4); align-content: start; }
.education h3, .skills dt { font-size: var(--text-body); font-weight: 500; letter-spacing: -.015em; }
.detail-label, .detail-text, .skills dd { font-size: var(--text-small); color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.detail-label { margin-bottom: var(--space-1); font-variant-numeric: tabular-nums; }
.detail-text, .skills dd { margin-top: var(--space-1); }
.contact-links { margin-top: -10px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); width: 100%; max-width: none; margin-top: 80px; padding: 24px max(24px,calc((100% - 1200px)/2)); background: var(--ink); color: var(--paper); font-size: var(--text-small); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); }

@media (min-width: 640px) {
  :root { --text-entry: 1.375rem; --text-section: 2rem; }
  .container { width: min(1200px, calc(100% - 80px)); }
  .navigation { grid-template-columns: 1fr auto auto; gap: var(--space-3); min-height: 80px; padding: 0; }
  .primary-nav { grid-column: 2; grid-row: 1; gap: var(--space-3); }
  .language-switch { grid-column: 3; }
  .profile { grid-template-columns: minmax(0,max-content) 176px; gap: var(--space-6); padding-top: 72px; }
  .profile h1 { font-size: 3.25rem; }
  .profile-name { font-size: 1rem; }
  .profile-affiliation, .profile-field { font-size: var(--text-body); }
  .section { margin-top: 80px; padding-top: 40px; }
  .entry { padding-block: 40px; }
  .entry-description { font-size: 1.125rem; line-height: 1.8; }
  .background-grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-6); }
  .site-footer { width: 100%; padding-inline: max(40px,calc((100% - 1200px)/2)); }
}
@media (min-width: 900px) {
  .navigation { gap: var(--space-6); }
  .profile { grid-template-columns: minmax(0,max-content) 192px; }
  .entry { grid-template-columns: minmax(0,1fr) 272px; gap: 40px; }
  .entry-image { width: 100%; }
}
@media (min-width: 1100px) {
  .section { display: grid; grid-template-columns: 192px minmax(0,1fr); gap: 40px; padding-top: 44px; }
  .section > h2 { padding-bottom: 0; }
  .entry { grid-template-columns: minmax(0,1fr) 248px; gap: 32px; }
  .entry:last-child { padding-bottom: 0; }
  .background-grid { gap: 56px; }
  .contact-links { align-self: start; margin-top: -3px; }
}
@keyframes settle-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .skip-link, .site-footer { display: none; }
  body { background: white; }
  .container { width: 100%; }
  .profile { padding-top: 0; grid-template-columns: 1fr 120px; animation: none; }
  .section { display: block; margin-top: var(--space-4); padding-top: var(--space-2); }
  .entry { break-inside: avoid; padding-block: var(--space-2); }
}
