:root {
  --background: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f3f5;
  --text: #1f2328;
  --text-soft: #45505b;
  --muted: #6c757d;
  --line: #e6e9ec;
  --line-strong: #dddddd;
  --accent: #0563bb;
  --accent-hover: #067ded;
  --accent-soft: #eef7ff;
  --home-background: #20263a;
  --green: #18845b;
  --green-soft: #eaf7f1;
  --orange: #a85416;
  --orange-soft: #fff2e8;
  --purple: #7650b3;
  --purple-soft: #f5efff;
  --rose: #b03a63;
  --rose-soft: #fdeef4;
  --teal: #0d6b78;
  --teal-soft: #e6f6f8;
  --amber: #7a5900;
  --amber-soft: #fff8e0;
  --crimson: #992222;
  --crimson-soft: #f9e4dc;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-heading: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-identity: "IBM Plex Sans", "IBM Plex Sans KR", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar-width: 300px;
  --mobile-header-height: calc(64px + env(safe-area-inset-top));
  --content-width: clamp(65rem, calc(100vw - var(--sidebar-width) - (2 * var(--page-gutter))), 87.5rem);
  --page-gutter: clamp(1.25rem, 4vw, 4rem);
  --section-space: clamp(5rem, 9vw, 8.5rem);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(25, 26, 29, 0.04);
  --shadow-md: 0 18px 45px rgba(25, 26, 29, 0.08);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-fast: 180ms;
  --motion-medium: 320ms;
  --motion-slow: 520ms;
  --sidebar-motion: 140ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  background: var(--background);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text-soft);
  background: var(--background);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

body.nav-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.skip-link {
  position: fixed;
  z-index: 1200;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--surface);
  border-radius: var(--radius-sm);
  background: var(--accent);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.mobile-header {
  display: none;
}

.sidebar-mobile-heading {
  display: none;
}

.site-shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.profile-sidebar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  width: 100%;
  height: 100svh;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
  padding: 15px;
  overscroll-behavior: contain;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  transition:
    width 160ms var(--ease-out),
    border-color var(--sidebar-motion) ease,
    background-color var(--sidebar-motion) ease;
}

.sidebar-profile {
  padding: 0 18px 22px;
  border-bottom: 1px solid var(--line);
  transition:
    padding 160ms var(--ease-out),
    border-color var(--sidebar-motion) ease;
}

.portrait-link {
  display: block;
  width: 108px;
  height: 108px;
  margin: 12px auto;
  transition:
    width 160ms var(--ease-out),
    height 160ms var(--ease-out),
    margin 160ms var(--ease-out);
}

.portrait-link img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 14%;
  box-shadow: 0 0 0 8px var(--surface-soft);
}

.sidebar-name {
  margin: 0;
  color: var(--text);
  font-family: var(--font-identity);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  transition: opacity var(--sidebar-motion) ease;
}

.sidebar-role {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-family: var(--font-identity);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transition: opacity var(--sidebar-motion) ease;
}

.sidebar-location {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: center;
  transition: opacity var(--sidebar-motion) ease;
}

.sidebar-nav {
  display: grid;
  gap: 0;
  padding: 22px 0 0;
}

.sidebar-nav a {
  display: flex;
  height: 50px;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  margin-bottom: 6px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 3px;
  font-family: var(--font-identity);
  font-size: 15px;
  font-weight: 400;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  transition:
    width 160ms var(--ease-out),
    color var(--sidebar-motion) ease,
    background-color var(--sidebar-motion) ease,
    transform var(--sidebar-motion) var(--ease-out);
}

.sidebar-nav .nav-index {
  flex: 0 0 20px;
  width: 20px;
  color: var(--line-strong);
  font-family: var(--font-identity);
  font-size: 12px;
  font-weight: 500;
  transition: color var(--sidebar-motion) ease;
}

.sidebar-nav .nav-label {
  display: block;
  opacity: 1;
  transition: opacity var(--sidebar-motion) ease;
}

.sidebar-nav .nav-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.05;
}

.sidebar-nav .nav-meta {
  display: block;
  overflow: hidden;
  color: #8a929a;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--sidebar-motion) ease;
}

.sidebar-nav a:hover {
  color: var(--surface);
  background: var(--accent);
  transform: translateX(2px);
}

.sidebar-nav a[aria-current="page"] {
  color: var(--surface);
  background: var(--accent);
}

.sidebar-nav a:hover span,
.sidebar-nav a[aria-current="page"] span {
  color: var(--surface);
}

.sidebar-nav a:hover .nav-meta,
.sidebar-nav a[aria-current="page"] .nav-meta {
  color: rgba(255, 255, 255, 0.68);
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.65rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  transition: opacity var(--sidebar-motion) ease;
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.sidebar-footer a {
  color: var(--accent);
  font-weight: 700;
}

.sidebar-footer a:hover {
  text-decoration: underline;
}

.sidebar-backdrop {
  display: none;
}

.site-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

.content-section {
  width: min(100%, calc(var(--content-width) + var(--page-gutter) * 2));
  margin-inline: auto;
  padding-top: clamp(5rem, 8vw, 8rem);
  padding-right: var(--page-gutter);
  padding-bottom: clamp(5rem, 8vw, 8rem);
  padding-left: var(--page-gutter);
  border-bottom: 1px solid var(--line);
}

#research,
#recognition,
#contact {
  position: relative;
  isolation: isolate;
}

#research::before,
#recognition::before,
#contact::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #fafbfc;
  content: "";
}

.home-section {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  padding: 60px var(--page-gutter);
  overflow: hidden;
  background-color: var(--home-background);
  background-image:
    linear-gradient(
      100deg,
      rgba(32, 38, 58, 0.94) 0%,
      rgba(32, 38, 58, 0.82) 46%,
      rgba(32, 38, 58, 0.55) 100%
    ),
    url("/hero-background.svg");
  background-repeat: no-repeat;
  background-position: 78% 22%;
  background-size: cover;
}

.home-content {
  width: min(100%, 920px);
  margin-inline: auto;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-kicker span {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.62);
}

.home-english-name {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-identity);
  font-size: 16px;
  font-weight: 400;
}

.home-section .profile-name {
  color: var(--surface);
}

.home-section .profile-role {
  color: var(--surface);
}

.typed-role {
  display: inline;
}

.typed-cursor {
  display: inline-block;
  margin-left: 0.08em;
  font-weight: 300;
}

.typed-cursor.is-blinking {
  animation: typed-cursor 700ms infinite;
}

.home-statement {
  max-width: 650px;
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.home-meta {
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.5rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.home-meta div {
  min-width: 0;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.home-meta div:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-meta dt {
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.home-meta dd {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.home-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 750;
  transition:
    color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out);
}

.home-action:hover,
.home-action:focus-visible {
  transform: translateY(-2px);
}

.home-action--primary {
  color: var(--text);
  border-color: var(--surface);
  background: var(--surface);
}

.home-action--primary:hover,
.home-action--primary:focus-visible {
  color: var(--accent);
}

.home-action--secondary {
  color: var(--surface);
  background: rgba(255, 255, 255, 0.07);
}

.home-action--secondary:hover,
.home-action--secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.13);
}

@keyframes typed-cursor {
  50% {
    opacity: 0;
  }
}

.home-scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  width: 80px;
  height: 60px;
  transform: translateX(-50%);
}

.scroll-arrow {
  position: absolute;
  bottom: 30px;
  left: 10px;
  width: 60px;
  height: 7px;
  opacity: 0;
  animation: scroll-cue 3s ease-out 5s infinite;
}

.scroll-arrow::before,
.scroll-arrow::after {
  position: absolute;
  width: 50%;
  height: 100%;
  background: var(--surface);
  content: "";
}

.scroll-arrow::before {
  left: 0;
  transform: skew(0deg, 30deg);
}

.scroll-arrow::after {
  right: 0;
  transform: skew(0deg, -30deg);
}

@keyframes scroll-cue {
  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.intro-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.eyebrow,
.section-number {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-identity);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-name {
  margin: 0.6rem 0 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: 0;
}

.profile-role {
  margin: 10px 0 0;
  color: var(--accent);
  font-family: var(--font-identity);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.mobile-portrait {
  display: none;
}

.intro-lead {
  max-width: 840px;
  margin: 50px 0 0;
  color: var(--text);
  font-family: var(--font-identity);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.intro-description {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.current-card {
  display: grid;
  grid-template-columns: 0.7fr 1.4fr 1.4fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 40px;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
}

.current-card > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.current-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.current-card strong {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 16px;
}

.current-card > span {
  color: var(--text-soft);
  font-size: 14px;
}

.current-card time {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-facts div {
  padding: 1.25rem 1.25rem 1.25rem 0;
}

.profile-facts div + div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.section-heading {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  text-align: left;
}

.section-number {
  display: block;
  padding-top: 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.section-heading h2 {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-heading h2::before,
.section-heading h2::after {
  display: none;
}

.section-heading h2::before {
  bottom: 1px;
  left: calc(50% - 60px);
  width: 120px;
  height: 1px;
  background: var(--line-strong);
}

.section-heading h2::after {
  bottom: 0;
  left: calc(50% - 20px);
  width: 40px;
  height: 3px;
  background: var(--accent);
}

.section-heading div > p {
  max-width: 660px;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.timeline {
  border-top: 1px solid var(--line-strong);
}

.timeline-extra[hidden],
.timeline-secondary[hidden] {
  display: none;
}

.year-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid var(--line-strong);
}

.year-group > h3 {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  margin: 0;
  padding: 1.65rem 1rem 1.65rem 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.year-events {
  border-left: 1px solid var(--line);
}

.timeline-event {
  display: grid;
  grid-template-columns: 92px 66px 1fr;
  gap: 1rem;
  align-items: start;
  min-height: 104px;
  padding: 1.45rem 0 1.45rem 1.7rem;
  border-bottom: 1px solid var(--line);
}

.timeline-event:last-child {
  border-bottom: 0;
}

.timeline-event time {
  padding-top: 0.18rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.timeline-event time span,
.timeline-event time small {
  display: block;
}

.timeline-event time small {
  margin-top: 0.2rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.35;
}

.event-type {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
}

.event-type--career {
  color: var(--accent);
  background: var(--accent-soft);
}

.event-type--research {
  color: var(--green);
  background: var(--green-soft);
}

.event-type--paper {
  color: var(--purple);
  background: var(--purple-soft);
}

.event-type--award {
  color: var(--orange);
  background: var(--orange-soft);
}

.event-type--ip {
  color: var(--amber);
  background: var(--amber-soft);
}

.event-type--talk {
  color: var(--rose);
  background: var(--rose-soft);
}

.event-type--project {
  color: var(--teal);
  background: var(--teal-soft);
}

.event-type--advisory {
  color: var(--crimson);
  background: var(--crimson-soft);
}

.timeline-event h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.timeline-event p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 16px;
}

.timeline-toggle {
  display: flex;
  width: min(100%, 320px);
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  margin: 2rem auto 0;
  padding: 0 1.15rem;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
  transition:
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out);
}

.timeline-toggle:hover,
.timeline-toggle:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.timeline-toggle i {
  font-style: normal;
  transition: transform var(--motion-medium) var(--ease-out);
}

.timeline-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.timeline-extra.is-entering {
  animation: timeline-enter var(--motion-slow) var(--ease-out) both;
}

@keyframes timeline-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.experience-list {
  border-top: 1px solid var(--line-strong);
}

.experience-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  padding-top: 2rem;
}

.experience-period {
  padding-right: 1.5rem;
}

.experience-period time {
  display: inline-block;
  padding: 5px 15px;
  color: var(--text);
  background: var(--surface-soft);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.current-badge {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.18rem 0.55rem;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.experience-body {
  position: relative;
  padding: 0 0 2.5rem 2rem;
  border-left: 2px solid var(--line-strong);
}

.experience-body::before {
  position: absolute;
  top: 0.25rem;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--background);
  content: "";
}

.experience-item:first-child .experience-body::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.experience-org {
  margin: 0 0 0.35rem;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 400;
}

.experience-body h3 {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-identity);
  font-size: 18px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
}

.experience-body > p:not(.experience-org) {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 16px;
}

.experience-projects {
  display: grid;
  max-width: 760px;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.experience-details > summary {
  display: none;
}

.experience-project {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.experience-project h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}

.experience-project p {
  max-width: 68ch;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 15px;
}

.experience-project ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.experience-project li {
  max-width: 68ch;
  position: relative;
  padding-left: 0.9rem;
  color: var(--text-soft);
  font-size: 14px;
}

.experience-project li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

/* Inline links sit inside running text, so they carry their own affordance
   rather than inheriting the global colour-less anchor reset. */
.timeline-event p a,
.recognition-list article p a,
.experience-project p a,
.experience-project li a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.timeline-event p a:hover,
.recognition-list article p a:hover,
.experience-project p a:hover,
.experience-project li a:hover {
  color: var(--accent-hover);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.project-links a {
  padding: 0.34rem 0.7rem;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 700;
  transition:
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}

.project-links a:hover {
  border-color: #c8d6fa;
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* The featured card is dark, so the light pill would disappear on it. */
.project-card--featured .project-links a {
  color: #b9d3ff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.project-card--featured .project-links a:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

/* Outranks the generic `.project-card p` rule that follows it. */
.project-card .project-subhead {
  margin: 1.2rem 0 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card .project-subhead + ul {
  margin-top: 0.5rem;
}

.project-card .project-links {
  margin-top: 1.1rem;
}

.experience-media,
.project-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.project-media {
  margin-top: 1.25rem;
}

.experience-media a,
.project-media a {
  display: block;
}

.experience-media img,
.project-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.experience-media a:hover img,
.project-media a:hover img {
  transform: scale(1.02);
}

.experience-media figcaption,
.project-media figcaption {
  padding: 0.7rem 1rem 0.85rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .experience-media img,
  .project-media img {
    transition: none;
  }

  .experience-media a:hover img,
  .project-media a:hover img {
    transform: none;
  }
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.project-card {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 1.5rem;
  min-height: 100%;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 180ms ease,
    box-shadow 240ms ease,
    transform 240ms var(--ease);
}

.project-card--featured {
  grid-template-columns: 190px minmax(0, 1fr);
  grid-column: 1 / -1;
  padding: clamp(2rem, 4vw, 3.25rem);
  color: var(--surface);
  border-color: transparent;
  background:
    radial-gradient(circle at 82% 20%, rgba(76, 139, 245, 0.24), transparent 34%),
    linear-gradient(135deg, #182033 0%, #242e49 100%);
  box-shadow: 0 24px 70px rgba(18, 27, 47, 0.18);
}

.project-card--featured li {
  max-width: 68ch;
}

.project-card--featured h3,
.project-card--featured p,
.project-card--featured li {
  color: inherit;
}

.project-card--featured p,
.project-card--featured li {
  color: rgba(255, 255, 255, 0.72);
}

.project-card--featured > div:last-child {
  max-width: 68ch;
}

.project-card--featured p {
  max-width: 68ch;
}

.project-card--featured .project-time time,
.project-card--featured .project-index {
  color: #8db8ff;
}

.project-card--featured .project-time > span:not(.project-index) {
  color: rgba(255, 255, 255, 0.56);
}

.project-index {
  order: -1;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card:hover {
  border-color: #c8d6fa;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.project-card:focus-within {
  border-color: #a9c1fb;
  box-shadow: var(--shadow-md);
}

.project-time {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.project-time time {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 750;
}

.project-time span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.project-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 16px;
}

.project-card ul {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.project-card li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.project-card li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.project-card.project-card--featured h3 {
  color: var(--surface);
}

.project-card.project-card--featured p,
.project-card.project-card--featured li {
  color: rgba(255, 255, 255, 0.76);
}

.project-card.project-card--featured li::before {
  background: #66a1ff;
}

.publication-groups {
  border-top: 1px solid var(--line-strong);
}

.publication-year {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line-strong);
}

.publication-year > h3 {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.35rem;
}

.publication-item {
  grid-column: 2;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.publication-year > .publication-item:nth-child(2) {
  padding-top: 0;
  border-top: 0;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.publication-meta span:first-child {
  color: var(--accent);
  font-weight: 750;
}

.publication-item h4 {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
}

.publication-item p {
  max-width: 68ch;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.publication-item a {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
}

.publication-item a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.publication-item {
  transition:
    background-color var(--motion-fast) ease,
    padding-inline var(--motion-medium) var(--ease-out);
}

.publication-item:hover,
.publication-item:focus-within {
  padding-inline: 0.8rem;
  background: var(--accent-soft);
}

.recognition-list {
  border-top: 1px solid var(--line-strong);
}

.recognition-list article {
  display: grid;
  grid-template-columns: 90px 82px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--line);
  transition:
    background-color var(--motion-fast) ease,
    padding-inline var(--motion-medium) var(--ease-out);
}

.recognition-list article:hover {
  padding-inline: 0.8rem;
  background: var(--surface);
}

.recognition-list time {
  padding-top: 0.15rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 750;
}

.recognition-kind {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.recognition-list h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.recognition-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-groups article {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-medium) ease,
    transform var(--motion-medium) var(--ease-out);
}

.skill-groups article:hover {
  border-color: #c8d6fa;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.skill-groups article > p {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
}

.skill-groups h3 {
  min-height: 3.1em;
  margin: 0.8rem 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
}

.skill-groups ul {
  display: grid;
  gap: 0.6rem;
  margin: 1.35rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.skill-groups li {
  color: var(--muted);
  font-size: 0.8rem;
}

.github-block {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
  padding: 2rem;
  color: var(--surface);
  border-radius: var(--radius-md);
  background: var(--text);
}

.github-block h3 {
  margin: 0.45rem 0 0;
  font-size: 1.35rem;
}

.github-block p:last-child {
  max-width: 68ch;
  margin: 0.5rem 0 0;
  color: #b8bec7;
  font-size: 0.85rem;
}

.github-block a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 750;
  white-space: nowrap;
}

.contact-section {
  border-bottom: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.contact-card h3 {
  max-width: 68ch;
  margin: 1rem 0 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: 0;
}

.contact-card dl {
  margin: 0;
}

.contact-card dl > div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-card dl > div:first-child {
  padding-top: 0;
}

.contact-card dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.contact-card dd {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.contact-card a {
  color: var(--accent);
}

.contact-card a:hover {
  text-decoration: underline;
}

.site-footer {
  display: flex;
  width: min(100%, calc(var(--content-width) + var(--page-gutter) * 2));
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  padding: 2rem var(--page-gutter) 3rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

.back-to-top {
  position: fixed;
  z-index: 80;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--surface);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 12px 30px rgba(31, 35, 40, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity var(--motion-medium) ease,
    transform var(--motion-medium) var(--ease-out);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--accent);
}

.motion-ready .reveal-target {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--motion-slow) ease,
    transform var(--motion-slow) var(--ease-out);
}

.motion-ready .reveal-target.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.error-page {
  min-height: 100svh;
}

.error-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1100px);
  min-height: 100svh;
  margin-inline: auto;
  padding: 2rem var(--page-gutter) clamp(3rem, 7vw, 6rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--surface);
  border-radius: var(--radius-sm);
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.brand-word {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.error-signal {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
  color: var(--text);
  font-size: clamp(7rem, 24vw, 22rem);
  font-weight: 750;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.error-signal i {
  position: relative;
  height: 2px;
  background: var(--line-strong);
}

.error-signal i::after {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.error-copy {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: end;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.error-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.signal-period {
  color: var(--accent);
}

.error-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  color: var(--surface);
  border-radius: var(--radius-sm);
  background: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
}

.error-copy .contact-link {
  grid-column: 3;
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════════
 * LONG-TOKEN OVERFLOW PROTECTION
 *
 * Confirmed failures (real Chromium):
 *   de@320, de@360  — .timeline-event h4
 *                     "Patentanmeldung: Zeitliches Merkmals-
 *                      kodierungsverfahren"  rect.right = 370
 *   nl@320          — .recognition-list h3
 *                     "1. Platz — Abschlussprojektwettbewerb /
 *                      Dongyang Mirae University"  rect.right = 344-360
 *
 * Root cause: CSS Grid sizes 1fr tracks from each item's min-content
 * width (= the longest unbreakable token) BEFORE overflow-wrap takes
 * effect.  <body> already carries overflow-wrap:break-word, but that
 * property cannot override the grid track-sizing phase.
 *
 * Fix:
 *   1. min-width:0 on the grid items that contain prose headings —
 *      this removes the automatic min-content floor so the 1fr track
 *      can shrink to the available space rather than to the word width.
 *   2. overflow-wrap:break-word on the text elements — once the
 *      containing block is properly constrained (step 1), this breaks
 *      long tokens at the container boundary instead of pushing the
 *      document wider than the viewport.
 *   3. hyphens:auto on headings — uses <html lang> (set per locale by
 *      i18n.js) to insert soft hyphens for de/nl/fr/etc., making the
 *      break look intentional rather than raw.  hyphens:auto is a
 *      no-op for ja/zh-CN/zh-TW (no browser hyphenation dictionary)
 *      and mostly unused for ar/ur, so no per-script exclusion needed.
 *
 * Explicit exclusions:
 *   .language-control  — clipped by overflow:hidden; no headings
 *   <time> elements    — carry white-space:nowrap already
 *   font-mono labels   — event-type badges, section-numbers, nav-meta,
 *                        publication-meta: short tokens, no issue
 * ══════════════════════════════════════════════════════════════════ */

/* 1 ── Grid-item containment ──────────────────────────────────────
   Removes the automatic min-content floor on the prose-containing
   grid items so the enclosing 1fr track is free to shrink.
   Extended to cover the project-card subtree (ja@320-414 failure:
   .project-time blown to 895px) and the experience-project subtree
   (zh-CN/zh-TW@320-414 failure: .experience-project blown to 581px).
   Root cause in both cases: body { word-break: keep-all } treats
   katakana / Chinese phrases as unbreakable tokens; the grid track
   auto-minimum = the item's min-content, which equals the full token
   width before overflow-wrap can act. */
.timeline-event > div,
.recognition-list article > div,
.section-heading > div,
.project-card > *,
.project-time > *,
.project-card li,
.skill-groups article,
.skill-groups li,
.github-block > *,
.contact-card > *,
.experience-item > *,
.experience-project,
.experience-project li {
  min-width: 0;
}

.timeline-event > div {
  max-width: 68ch;
}

.recognition-list article > div {
  max-width: 68ch;
}

/* 4 ── flex-wrap on metadata rows ──────────────────────────────────
   .project-time is a flex column whose min-content width equals the
   widest child.  CJK tag chips (e.g. "コンピュータビジョン · アノテーション")
   have no word-break opportunity under keep-all, so the chip drives
   the column's min-content to 895px, which propagates into the parent
   .project-card 1fr grid track.  flex-wrap:wrap lets the container
   always re-flow; min-width:0 on .project-time > * (above) breaks the
   min-content propagation so the track can shrink to the available
   width. */
.project-time {
  flex-wrap: wrap;
}

/* 2 ── overflow-wrap on content text ─────────────────────────────
   Applies to every element that may receive long compound-word tokens
   across all 22 supported locales.  Scoped away from <time>, mono
   labels, and .language-control (see exclusions above). */
.section-heading h2,
.timeline-event h4,
.recognition-list h3,
.recognition-list p,
.experience-body h3,
.experience-org,
.experience-body > p,
.experience-project h4,
.experience-project p,
.experience-project li,
.publication-item h4,
.publication-item p,
.skill-groups h3,
.contact-card h3,
.project-card h3,
.project-card p,
.project-card li,
.github-block h3,
.intro-lead,
.intro-description,
.home-statement,
.section-heading div > p {
  overflow-wrap: break-word;
}

/* 3 ── hyphens:auto on headings and lead copy ────────────────────
   Omitted from small label/mono text where soft hyphens add noise.
   Omitted from list items and short body copy where they are needless. */
.section-heading h2,
.timeline-event h4,
.recognition-list h3,
.experience-body h3,
.experience-project h4,
.publication-item h4,
.skill-groups h3,
.contact-card h3,
.project-card h3,
.intro-lead,
.home-statement {
  hyphens: auto;
}

@media (min-width: 820px) and (max-width: 1279px) {
  :root {
    --sidebar-width: 240px;
  }

  .profile-sidebar {
    padding: 12px;
  }

  .sidebar-profile {
    padding: 0 12px 16px;
  }

  .portrait-link {
    width: 82px;
    height: 82px;
    margin-block: 8px;
  }

  .sidebar-name {
    font-size: 20px;
  }

  .sidebar-role {
    margin-top: 6px;
    font-size: 13px;
  }

  .sidebar-location {
    margin-top: 6px;
    font-size: 11px;
  }

  .sidebar-nav {
    padding-top: 14px;
  }

}

@media (max-width: 1100px) {
  .skill-groups {
    grid-template-columns: 1fr 1fr;
  }

  .skill-groups article:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 819px) {
  html {
    scroll-padding-top: 5rem;
  }

  .site-shell {
    display: block;
    min-width: 0;
  }

  .mobile-header {
    position: sticky;
    z-index: 150;
    top: 0;
    display: flex;
    height: var(--mobile-header-height);
    align-items: center;
    justify-content: space-between;
    padding-top: calc(0.65rem + env(safe-area-inset-top));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: 0.65rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: rgba(247, 247, 244, 0.94);
    backdrop-filter: blur(14px);
  }

  .page-progress {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(var(--page-progress, 0));
    transform-origin: left;
    transition: transform 80ms linear;
  }

  .mobile-brand {
    display: inline-flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    gap: 0.7rem;
  }

  .mobile-brand .mobile-monogram {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    color: var(--surface);
    border-radius: 3px;
    background: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 750;
  }

  .mobile-context {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .mobile-brand strong {
    overflow: hidden;
    color: var(--text);
    font-family: var(--font-identity);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-brand small {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.035em;
  }

  .menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition:
      transform 180ms var(--ease-out),
      opacity 120ms ease;
  }

  .nav-open .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .profile-sidebar {
    position: fixed;
    z-index: 140;
    top: var(--mobile-header-height);
    bottom: 0;
    left: 0;
    width: min(90vw, 340px);
    height: auto;
    padding: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overscroll-behavior: contain;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 220ms var(--ease-out);
  }

  .profile-sidebar .sidebar-profile {
    display: none;
  }

  .sidebar-mobile-heading {
    display: block;
    padding: 0.35rem 0.3rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-mobile-heading p {
    margin: 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .sidebar-mobile-heading span {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
  }

  .profile-sidebar .sidebar-nav {
    padding-top: 0.75rem;
  }

  .profile-sidebar .sidebar-footer {
    padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
  }

  .nav-open .profile-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 90;
    inset: var(--mobile-header-height) 0 0;
    display: block;
    visibility: hidden;
    padding: 0;
    border: 0;
    background: rgba(25, 26, 29, 0.34);
    opacity: 0;
    transition:
      opacity 180ms ease,
      visibility 180ms ease;
  }

  .nav-open .sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .site-main {
    width: 100%;
    min-width: 0;
  }

  .content-section {
    padding-top: clamp(3.5rem, 10vw, 4.5rem);
    padding-right: clamp(1.2rem, 5vw, 2.5rem);
    padding-bottom: clamp(3.5rem, 10vw, 4.5rem);
    padding-left: clamp(1.2rem, 5vw, 2.5rem);
  }

  .intro-section {
    min-height: auto;
    padding-top: 8.5rem;
  }

  .home-section {
    align-items: flex-end;
    min-height: calc(100svh - var(--mobile-header-height));
    min-height: calc(100dvh - var(--mobile-header-height));
    margin: 0;
    padding: clamp(2.5rem, 8svh, 5rem) clamp(1.2rem, 5vw, 2.5rem) 3rem;
    background-image:
      linear-gradient(
        180deg,
        rgba(32, 38, 58, 0.9) 0%,
        rgba(32, 38, 58, 0.72) 55%,
        rgba(32, 38, 58, 0.93) 100%
      ),
      url("/hero-background.svg");
    background-position: 82% 20%;
  }

  .home-content {
    width: 100%;
  }

  .section-heading {
    margin-bottom: 2.25rem;
  }

  .home-kicker {
    margin-bottom: 1rem;
    font-size: 0.6rem;
  }

  .home-english-name {
    font-size: 14px;
  }

  .profile-name {
    font-size: 28px;
    line-height: 36px;
  }

  .profile-role {
    font-family: var(--font-identity);
    font-size: 18px;
    line-height: 24px;
  }

  .home-statement {
    margin-top: 1.35rem;
    font-size: 1.2rem;
  }

  .home-meta {
    width: 100%;
    margin-top: 1.1rem;
  }

  .home-meta div {
    padding-inline: 0.65rem;
  }

  .home-meta dt {
    font-size: 0.56rem;
  }

  .home-meta dd {
    font-size: 0.69rem;
  }

  .home-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .home-action {
    width: 100%;
  }

  .menu-toggle,
  .home-action,
  .sidebar-nav a,
  .timeline-toggle,
  .experience-details > summary {
    touch-action: manipulation;
  }

  .experience-details {
    margin-top: 1.25rem;
  }

  .experience-details > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.75rem;
    align-items: center;
    min-height: 52px;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    list-style: none;
  }

  .experience-details > summary::-webkit-details-marker {
    display: none;
  }

  .experience-details > summary span {
    font-size: 0.85rem;
    font-weight: 650;
  }

  .experience-details > summary small {
    overflow: hidden;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .experience-details > summary i {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-style: normal;
    transition: transform var(--sidebar-motion) var(--ease-out);
  }

  .experience-details[open] > summary i {
    transform: rotate(45deg);
  }

  .experience-details .experience-projects {
    margin-top: 0.85rem;
  }

  .intro-lead {
    margin-top: 30px;
    font-size: 18px;
    line-height: 24px;
  }

  .sidebar-nav a {
    height: 50px;
    font-size: 15px;
  }

  .mobile-portrait {
    display: block;
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 6px var(--surface);
  }

  .current-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label period"
      "company period"
      "role period";
    gap: 0.3rem 1.5rem;
  }

  .current-card > div {
    grid-area: label;
  }

  .current-card strong {
    grid-area: company;
  }

  .current-card > span {
    grid-area: role;
  }

  .current-card time {
    grid-area: period;
    align-self: center;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: auto;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) and (max-width: 819px) {
  .home-actions {
    width: min(100%, 452px);
    grid-template-columns: repeat(2, minmax(0, 220px));
  }

  .home-action {
    width: auto;
  }
}

@media (max-width: 650px) {
  :root {
    --section-space: 4.5rem;
  }

  .profile-name {
    font-size: 28px;
    line-height: 36px;
  }

  .mobile-portrait {
    width: 76px;
    height: 76px;
  }

  .intro-lead {
    font-size: 18px;
    line-height: 24px;
  }

  .intro-lead br {
    display: none;
  }

  .current-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "company"
      "role"
      "period";
    gap: 0;
    padding: 1rem 0;
  }

  .current-card > div {
    margin-bottom: 0.55rem;
  }

  .current-card strong {
    min-width: 0;
    font-size: 17px;
  }

  .current-card > span {
    min-width: 0;
    margin-top: 0.2rem;
    text-align: left;
  }

  .current-card time {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-facts div {
    padding: 1rem 0;
  }

  .profile-facts div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section-heading {
    grid-template-columns: 42px 1fr;
    gap: 0.75rem;
  }

  .section-heading h2 {
    font-size: 1.75rem;
  }

  .year-group {
    display: block;
    padding: 1.5rem 0;
  }

  .year-group > h3 {
    position: static;
    padding: 0 0 1rem;
  }

  .year-events {
    border-left: 0;
  }

  .timeline-event {
    grid-template-columns: 82px 1fr;
    gap: 0.6rem 0.8rem;
    min-height: 0;
    padding: 1rem 0;
  }

  .timeline-event > div {
    grid-column: 2;
  }

  .event-type {
    justify-self: start;
  }

  .experience-item {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

  .experience-period {
    padding: 0 0 1rem 1.5rem;
    border-left: 2px solid var(--line-strong);
  }

  .experience-body {
    padding-left: 1rem;
  }

  .experience-project {
    padding: 1rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.2rem;
  }

  .project-card--featured {
    padding: 1.3rem;
  }

  .project-time {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .publication-year {
    display: block;
    padding: 1.25rem 0;
  }

  .publication-year > h3 {
    position: static;
    margin-bottom: 1rem;
  }

  .publication-item {
    grid-column: auto;
    padding: 1.1rem 0;
  }

  .publication-item h4 {
    font-size: 17px;
    line-height: 1.42;
  }

  .recognition-list article {
    grid-template-columns: 64px 1fr;
    gap: 0.65rem;
    padding: 1.05rem 0;
  }

  .recognition-list article > div {
    grid-column: 2;
  }

  .recognition-kind {
    justify-self: start;
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }

  .skill-groups article:last-child {
    grid-column: auto;
  }

  .skill-groups article {
    padding: 1.25rem;
  }

  .skill-groups h3 {
    min-height: 0;
  }

  .github-block {
    grid-template-columns: 1fr;
  }

  .github-block a {
    justify-content: space-between;
  }

  .site-footer {
    align-items: flex-start;
    gap: 1rem;
  }

  .error-copy {
    grid-template-columns: 1fr;
  }

  .error-copy .contact-link {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-scroll-cue,
  .typed-cursor {
    display: none;
  }

  .motion-ready .reveal-target,
  .motion-ready .reveal-target.is-revealed {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.resume-downloads {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0 0.65rem 0.75rem;
  margin-top: auto;
}

.resume-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 6px;
  min-width: 0;
  min-height: 40px;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    background-color var(--motion-fast) var(--ease),
    transform var(--motion-fast) var(--ease-out);
}

.resume-dl:hover,
.resume-dl:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  text-decoration: none;
}

.resume-dl-lang {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 400;
}

/* =============================================================================
 * LANGUAGE SELECTOR  (.language-control)
 * =============================================================================
 * Placement: position:fixed; inset-block-start / inset-inline-end (logical),
 * so the control auto-migrates from top-right (LTR) to top-left (RTL) without
 * a separate override.  Desktop sits in the unused corner above the content
 * column (z-index 90, between .back-to-top at 80 and the sticky sidebar at
 * 100).  Mobile sits inside the sticky header band at z-index 160, tucked
 * inline-before .menu-toggle (inset-inline-end: 4.75rem).
 *
 * Native-select rationale: a real <select> is fully keyboard/AT-operable on
 * all platforms.  appearance:none + a background-image SVG chevron re-skins
 * it while preserving the native options picker.  No JS is needed for the
 * interaction itself; JS only removes [disabled] once i18n.js is ready.
 *
 * RTL mirroring: logical inset-inline-end handles the corner flip
 * automatically.  The chevron SVG is re-declared inside [dir="rtl"] with a
 * flipped background-position, and inline padding sides swap to match.
 *
 * Disabled / no-JS state: the <select> ships with the HTML [disabled]
 * attribute.  Opacity 0.6 keeps contrast ≥ 4.5:1 (computed ≈ 6.1:1 for
 * --text #1f2328 on --surface #ffffff).  cursor:not-allowed and
 * pointer-events:none signal the inert state without hiding content.
 * The label uses the clip-path visually-hidden technique (NOT display:none
 * or visibility:hidden, which would drop it from the a11y tree).
 *
 * Drawer-open behavior: when .nav-open is present, the control is hidden via
 * visibility:hidden + opacity:0 transition.  Rationale: z-index 160 would
 * float the control above the backdrop (z-index 90) and sidebar (z-index 140),
 * creating a visual orphan over the overlay.  Hiding it is preferable to
 * lowering z-index (which would also bury it under the header at 150).
 * visibility:hidden removes the control from the tab order, keeping focus flow
 * orderly inside the open drawer.
 * ============================================================================= */

/* ── Desktop placement ─────────────────────────────────────────────────── */
.language-control {
  position: fixed;
  inset-block-start: max(1rem, env(safe-area-inset-top));
  inset-inline-end: var(--page-gutter);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Visually-hidden label — in a11y tree, invisible to sighted users */
.language-control__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Styled native <select> with custom chevron via background-image SVG.
   appearance:none removes the native widget chrome; the <select> itself
   remains fully keyboard/AT-operable (it IS a real select element). */
.language-control__select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  min-width: 44px;
  padding: 0 2.1rem 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2345505b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 12px 8px;
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  transition:
    color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    background-color var(--motion-fast) var(--ease);
}

.language-control__select:hover {
  color: var(--text);
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

/* Inherits the global :focus-visible rule (outline:3px solid var(--accent);
   outline-offset:3px) — not suppressed here. */
.language-control__select:focus-visible {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

/* No-JS / before-init shipped state */
.language-control__select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Status: positioned absolutely so it never shifts the select's height */
.language-control__status {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
  pointer-events: none;
}

@media (min-width: 820px) {
  #research::before,
  #recognition::before,
  #contact::before {
    inset-inline: min(0px, calc((100% - (100vw - var(--sidebar-width))) / 2));
  }

  .language-control {
    inset-inline-end: max(var(--page-gutter), calc((100vw - var(--sidebar-width) - var(--content-width)) / 2));
  }
}

@media (min-width: 1280px) {
  .project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Mobile overrides ───────────────────────────────────────────────────── */
@media (max-width: 819px) {
  .language-control {
    inset-block-start: calc(env(safe-area-inset-top) + 0.75rem);
    inset-inline-end: 4.75rem;
    z-index: 160;
    /* 90px: at 320px, control right = 320-76 = 244, left = 244-90 = 154.
       .mobile-brand right ≈ 143px → clearance gap = 11px at the tightest
       viewport. Explicit width (not only max-width) stops the <select>'s
       intrinsic option-text width from inflating document.scrollWidth. */
    width: 90px;
    max-width: 90px;
    overflow: hidden;
  }

  .language-control__select {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding-inline-end: 1.7rem;
    padding-inline-start: 0.5rem;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Hide while drawer is open; visibility:hidden also removes from tab order */
.nav-open .language-control {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    visibility 150ms ease;
}

/* =============================================================================
 * RTL OVERRIDES  [dir="rtl"]
 * =============================================================================
 * Logical properties handle most mirroring automatically.  This block covers
 * only the cases that logical properties cannot resolve:
 *   1. translateX sign flips (mobile sidebar drawer, sidebar-nav hover nudge)
 *   2. Directional SVG chevron in the language selector
 *   3. Sidebar border flip (border-right -> border-left)
 *   4. .back-to-top physical `right` offset override
 *   5. Page-progress transform-origin (grows from inline-end in RTL)
 *
 * CSS Grid + RTL: track *numbering* does NOT reverse in RTL; only physical
 * placement does.  Track 1 (--sidebar-width, 300px) therefore lands at the
 * physical RIGHT in RTL and track 2 (1fr) at the physical LEFT — exactly
 * what we want.  The base grid-column:1 / grid-column:2 assignments are
 * already correct; overriding them here would create a double-flip.
 * ============================================================================= */

[dir="rtl"] .profile-sidebar {
  border-right: 0;
  border-left: 1px solid var(--line);
}

/* Sidebar nav hover nudge: flip direction */
[dir="rtl"] .sidebar-nav a:hover {
  transform: translateX(-2px);
}

/* back-to-top: override the physical `right: 1.25rem` with logical equivalent */
[dir="rtl"] .back-to-top {
  right: auto;
  left: 1.25rem;
}

/* Language selector chevron flips to inline-start side in RTL */
[dir="rtl"] .language-control__select {
  background-position: left 0.65rem center;
  padding-right: 0.75rem;
  padding-left: 2.1rem;
}

/* Mobile: sidebar slides in from the right; progress bar grows from right */
@media (max-width: 819px) {
  [dir="rtl"] .profile-sidebar {
    right: 0;
    left: auto;
    transform: translateX(105%);
  }

  [dir="rtl"] .nav-open .profile-sidebar {
    transform: translateX(0);
  }

  [dir="rtl"] .page-progress {
    transform-origin: right;
  }
}

/* =============================================================================
 * PER-SCRIPT FONT STACKS
 * =============================================================================
 * Driven by the lang attribute that i18n.js sets on <html>.  Both
 * :root:lang(x) (specificity-safe) and [lang="x"] (broad compat) are
 * declared.  IBM Plex Sans KR remains active (the :root default) for
 * en, ko, id, ms, vi, pt, es, it, fr, de, pl, nl, sk, ro, ru, uk.
 * System fallbacks ensure no tofu if the Google Fonts CDN is blocked.
 * ============================================================================= */

/* Japanese */
:root:lang(ja),
[lang="ja"] {
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-heading: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

/* Simplified Chinese */
:root:lang(zh-CN),
[lang="zh-CN"] {
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-heading: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

/* Traditional Chinese */
:root:lang(zh-TW),
[lang="zh-TW"] {
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "MingLiU", sans-serif;
  --font-heading: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "MingLiU", sans-serif;
}

/* Thai — generous line-height prevents ascender/descender clipping */
:root:lang(th),
[lang="th"] {
  --font-body: "Noto Sans Thai", "Leelawadee UI", "Tahoma", sans-serif;
  --font-heading: "Noto Sans Thai", "Leelawadee UI", "Tahoma", sans-serif;
  line-height: 1.8;
}

/* Arabic (RTL) */
:root:lang(ar),
[lang="ar"] {
  --font-body: "Noto Sans Arabic", "Geeza Pro", "Segoe UI Arabic", "Arial Unicode MS", sans-serif;
  --font-heading: "Noto Sans Arabic", "Geeza Pro", "Segoe UI Arabic", "Arial Unicode MS", sans-serif;
}

/* Urdu Nastaliq (RTL) — tall Nastaliq forms need extra line-height */
:root:lang(ur),
[lang="ur"] {
  --font-body: "Noto Nastaliq Urdu", "Segoe UI Arabic", "Geeza Pro", serif;
  --font-heading: "Noto Nastaliq Urdu", "Segoe UI Arabic", "Geeza Pro", serif;
  line-height: 2.2;
}
