/* Profile critical subset */
@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-display: swap;
  font-weight: 45 920;
  src: url('/fonts/pretendard-profile.b912998f5d0b.woff2') format('woff2-variations');
  unicode-range: U+20-7e, U+b7, U+2014, U+2018-2019, U+201c-201d, U+2026, U+2197, U+ac00-ac01, U+ac04, U+ac12, U+ac1c, U+ac74, U+ac80, U+ac83, U+ac8c, U+aca9, U+acb8, U+acbd, U+ace0, U+ace8, U+acf5, U+acfc, U+ad50, U+ad6c-ad6d, U+adf8, U+ae30, U+ae40, U+ae4c, U+ae68, U+aed8, U+b08c, U+b098, U+b0af, U+b0b4, U+b108, U+b141, U+b144, U+b178, U+b204, U+b208, U+b215, U+b290, U+b294, U+b2a5, U+b2c8, U+b2e4, U+b2e8, U+b2ec, U+b354-b355, U+b370, U+b3c5, U+b3d9, U+b418, U+b420, U+b4dc, U+b4e0, U+b4e4, U+b4ed, U+b4f1, U+b514, U+b54c, U+b611, U+b77c, U+b791, U+b798-b799, U+b7ab, U+b7ec, U+b7fd, U+b808, U+b824-b825, U+b838, U+b840, U+b85c, U+b8e8, U+b904, U+b978, U+b97c, U+b9ac, U+b9b0, U+b9bf, U+b9c1, U+b9c8, U+b9cc, U+b9d0, U+b9e4, U+ba40, U+ba70, U+ba74, U+baa8-baa9, U+bb34, U+bb38, U+bb3b, U+bb49, U+bbfc, U+bc00, U+bc0f, U+bc18, U+bc1c, U+bc31, U+bc34, U+bc88, U+bcbd, U+bccd, U+bcd1, U+bcf4-bcf5, U+bd07, U+bd80, U+be14, U+be44, U+be60, U+be68, U+c0ac, U+c0b0, U+c0b4, U+c0c1, U+c0c9, U+c0dd, U+c11c, U+c120, U+c124, U+c131, U+c138, U+c158, U+c18c, U+c190, U+c218, U+c21c, U+c220, U+c27d, U+c2a4, U+c2a8, U+c2ac, U+c2b5, U+c2dc-c2dd, U+c2e0, U+c2e4, U+c2ed, U+c3df, U+c544, U+c548, U+c57c-c57d, U+c5b4, U+c5bb, U+c5c5, U+c5c8, U+c5d0, U+c5d4, U+c5ec-c5ed, U+c5f0, U+c5f4, U+c601, U+c608, U+c624, U+c640, U+c654, U+c694, U+c6b4, U+c6b8, U+c6c0, U+c6d0, U+c6e8, U+c6f9, U+c704, U+c719, U+c73c, U+c744, U+c74c, U+c758, U+c774, U+c778, U+c77c, U+c785, U+c788, U+c790, U+c7a5, U+c7ac, U+c800-c801, U+c804, U+c810, U+c815, U+c81c-c81d, U+c88b, U+c8fc, U+c911, U+c988, U+c9c0, U+c9c4, U+c9d1, U+c9dd, U+cabd, U+cc45, U+cc98, U+cc9c, U+ccad, U+ccb4, U+cd5c, U+cd94-cd95, U+cd9c, U+cda9, U+ce58, U+ce5c, U+ce6d, U+ce90, U+cf13, U+cf54, U+cffc, U+d06c, U+d074, U+d0c0, U+d0dc, U+d130, U+d134, U+d15c, U+d1b5, U+d22c, U+d2b8-d2b9, U+d2f0, U+d300, U+d3b8, U+d3fc, U+d504, U+d508, U+d50c, U+d53c, U+d544, U+d558-d559, U+d55c, U+d568-d569, U+d574, U+d588, U+d604, U+d615, U+d654-d655, U+d658, U+d65c, U+d68c-d68d, U+d6c4;
}

:root {
  color-scheme: light;
  --surface: #faf9f6;
  --surface-dark: #171c1a;
  --ink: #202824;
  --ink-dark: #edf2ee;
  --muted: #5f6b65;
  --muted-dark: #b3beb7;
  --divider: #dce2dc;
  --divider-dark: #47544b;
  --accent: #b42318;
  --accent-dark: #ff8c7d;
  --role-red: #b42318;
  --accent-tint: #f9ece9;
  --accent-tint-dark: #33231f;
  --focus: #b42318;
  --brand-black: #000000;
  --brand-light: #f5f7f5;
  --brand-linkedin: #0a66c2;
  --brand-youtube: #ff0033;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --content-width: 720px;
  --profile-column: 272px;
  --flip-duration: 600ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --surface: var(--surface-dark);
    --ink: var(--ink-dark);
    --muted: var(--muted-dark);
    --divider: var(--divider-dark);
    --accent: var(--accent-dark);
    --role-red: var(--accent-dark);
    --accent-tint: var(--accent-tint-dark);
    --focus: var(--accent-dark);
    --brand-black: var(--brand-light);
  }
  :root:not([data-theme]) .icon-link img { filter: grayscale(1) brightness(0) invert(.72); }
  :root:not([data-theme]) .link-card img[src^="/covers/"] { filter: invert(1) hue-rotate(180deg); }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --surface: var(--surface-dark);
    --ink: var(--ink-dark);
    --muted: var(--muted-dark);
    --divider: var(--divider-dark);
    --accent: var(--accent-dark);
    --role-red: var(--accent-dark);
    --accent-tint: var(--accent-tint-dark);
    --focus: var(--accent-dark);
    --brand-black: var(--brand-light);
  }
  :root[data-theme="dark"] .icon-link img { filter: grayscale(1) brightness(0) invert(.72); }
  :root[data-theme="dark"] .link-card img[src^="/covers/"] { filter: invert(1) hue-rotate(180deg); }

* { box-sizing: border-box; }
html { background: var(--surface); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface);
  font-family: Pretendard, "Pretendard Extended", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, .link-track:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
h1, h2, p, ul { margin-top: 0; }
.page { min-height: 100dvh; }
.container { width: 100%; max-width: var(--content-width); margin-inline: auto; padding: var(--space-16) var(--space-6); }

.profile-header { display: flex; position: relative; align-items: flex-start; gap: var(--space-8); margin-bottom: var(--space-12); }
.profile-controls { display: flex; position: absolute; top: 0; right: 0; }
.language-switch, .theme-switch { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: none; cursor: pointer; }
.language-switch svg, .theme-switch svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.language-switch:hover, .theme-switch:hover { color: var(--accent); }
.theme-switch .theme-sun { display: none; }
:root[data-theme="dark"] .theme-switch .theme-moon { display: none; }
:root[data-theme="dark"] .theme-switch .theme-sun { display: block; }
.portrait-flip { display: block; width: 120px; height: 127px; flex: 0 0 120px; padding: 0; border: 0; border-radius: var(--space-6); background: none; perspective: 900px; cursor: pointer; }
.portrait-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform var(--flip-duration) cubic-bezier(.22, .61, .36, 1); }
.portrait-flip.is-flipped .portrait-inner { transform: rotateY(180deg); }
.portrait-face { display: block; position: absolute; inset: 0; overflow: hidden; border-radius: var(--space-6); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.portrait-face--back { transform: rotateY(180deg); }
.portrait-face img { display: block; width: 120px; height: 127px; object-fit: cover; }
.profile-details { min-width: 0; flex: 1; }
.eyebrow { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); color: var(--role-red); font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: .06em; }
.role-emoji { font-size: 15px; line-height: 1; letter-spacing: normal; }
h1 { margin-bottom: var(--space-3); font-size: 40px; font-weight: 700; line-height: 46px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.social-links { display: flex; align-items: center; margin-left: -10px; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; color: var(--muted); }
.icon-link svg, .icon-link img { display: block; width: 20px; height: 20px; }
.icon-link svg { fill: currentColor; }
.icon-link img { filter: grayscale(1) brightness(.55); }
.icon-link[data-platform="huggingface"] img { width: 24px; height: 24px; }
.icon-link[data-platform="huggingface"]:is(:hover, :focus-visible) img,
.icon-link[data-platform="instagram"]:is(:hover, :focus-visible) img { filter: none; }
.icon-link[data-platform="github"]:is(:hover, :focus-visible) { color: var(--brand-black); }
.icon-link[data-platform="linkedin"]:is(:hover, :focus-visible) { color: var(--brand-linkedin); }
.icon-link[data-platform="x"]:is(:hover, :focus-visible) { color: var(--brand-black); }
.icon-link[data-platform="youtube"]:is(:hover, :focus-visible) { color: var(--brand-youtube); }

.bio { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-12); font-size: 16px; line-height: 24px; }
.bio p { margin-bottom: 0; }
.bio a { text-decoration: underline; text-underline-offset: 1px; }
.bio a:hover { color: var(--accent); }
.bio ul { margin-bottom: 0; padding-left: 0; list-style: none; }
.bio li { position: relative; padding-left: var(--space-6); }
.bio li + li { margin-top: var(--space-3); }
.bio li::before { position: absolute; top: var(--space-2); left: var(--space-1); width: var(--space-1); height: var(--space-1); border-radius: 50%; background: var(--accent); content: ''; }
html[lang="ko"] .bio { overflow-wrap: anywhere; word-break: keep-all; }

h2 { margin-bottom: var(--space-1); font-size: 24px; font-weight: 700; line-height: 32px; }
h2.section-heading { margin-bottom: var(--space-6); }
.link-preview { position: fixed; z-index: 10; box-sizing: border-box; width: min(320px, calc(100vw - 24px)); overflow: hidden; border: 1px solid var(--divider); border-radius: var(--space-4); background: var(--surface); pointer-events: none; }
.link-preview[hidden], .link-preview-image[hidden], .link-preview-description[hidden] { display: none; }
.link-preview-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.link-preview-copy { display: grid; gap: var(--space-2); padding: var(--space-4); }
.link-preview-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; font-weight: 600; line-height: 24px; }
.link-preview-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--muted); font-size: 14px; line-height: 20px; }
.link-preview-domain { color: var(--muted); font-size: 14px; line-height: 20px; }
.link-track { display: flex; gap: var(--space-4); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0 0 var(--space-3); scrollbar-color: var(--divider) transparent; scrollbar-width: thin; }
.link-card { display: block; flex: 0 0 260px; overflow: hidden; border: 1px solid var(--divider); border-radius: var(--space-4); background: var(--surface); scroll-snap-align: start; text-decoration: none; }
.link-card:hover { border-color: var(--accent); }
.link-card:active { background: var(--accent-tint); }
.link-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--accent-tint); }
.card-copy { display: block; padding: var(--space-4); }
.card-domain { display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: 14px; line-height: 20px; }
.card-title { display: -webkit-box; min-height: 48px; margin-bottom: var(--space-1); overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; word-break: keep-all; text-wrap: balance; font-size: 16px; font-weight: 600; line-height: 24px; }
.card-description { display: -webkit-box; min-height: 60px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; word-break: keep-all; text-wrap: balance; color: var(--muted); font-size: 14px; line-height: 20px; }
.link-card:hover .card-title { color: var(--accent); }
.empty-message { color: var(--muted); font-size: 14px; line-height: 20px; }

@media (min-width: 640px) { .container { padding: var(--space-20) var(--space-8); } }
@media (min-width: 640px) and (max-width: 959px) { .profile-details { padding-right: calc(var(--space-20) + var(--space-2)); } }
@media (min-width: 960px) {
  .container { max-width: 1088px; }
  main { display: grid; grid-template-columns: var(--profile-column) minmax(0, 1fr); column-gap: var(--space-16); }
  .profile-header { position: sticky; top: var(--space-20); grid-column: 1; grid-row: 1 / span 2; align-self: start; flex-direction: column; gap: var(--space-6); margin-bottom: 0; }
  .profile-details { flex: none; }
  h1 { font-size: 48px; line-height: 56px; }
  .bio { grid-column: 2; grid-row: 1; }
  .links-section { grid-column: 2; grid-row: 2; }
}
@media (max-width: 639px) {
  .profile-header { flex-direction: column; gap: var(--space-4); }
}
@media (max-width: 359px) {
  .link-card { flex-basis: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .link-track { scroll-behavior: auto; }
  .portrait-inner, .portrait-flip.is-flipped .portrait-inner { transform: none; transition: none; }
  .portrait-face--back { display: none; transform: none; }
  .portrait-flip.is-flipped .portrait-face--front { display: none; }
  .portrait-flip.is-flipped .portrait-face--back { display: block; }
}
