html {
  scroll-padding-top: var(--nav-height, 110px);
  background-color: var(--bs-body-bg);
}

:root {
  --content-max-width: 900px;
  --nav-max-width: 900px;
}

@media (min-width: 768px) {
  :root {
    --nav-max-width: 1180px;
  }

  #home > .container {
    max-width: var(--content-max-width);
  }
}

body {
  position: relative;
  font-family: 'DM Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

html.page-pending body {
  opacity: 0;
}

html.page-ready body {
  animation: page-fade-in 1s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes page-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

:root[data-bs-theme="light"] {
  /* --bs-warning: #7E9CD8; */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --outline-stroke: rgba(0, 0, 0, 0.1);
  --indicator-bg: rgba(0, 0, 0, 0.06);
  --indicator-stroke: rgba(0, 0, 0, 0.08);
  --indicator-shadow: rgba(0, 0, 0, 0.08);
  /* iOS liquid-glass indicator */
  --ind-glass-bg: rgba(255, 255, 255, 0.6);
  --ind-rim: rgba(255, 255, 255, 0.75);
  --ind-highlight: rgba(255, 255, 255, 0.95);
  --ind-highlight-bottom: rgba(255, 255, 255, 0.55);
  --ind-shadow: rgba(0, 0, 0, 0.1);
  --ind-inner-shadow: rgba(0, 0, 0, 0.1);
  --keycap-shadow: rgba(0, 0, 0, 0.22);
  --keycap-shadow-near: rgba(0, 0, 0, 0.14);
}

:root[data-bs-theme="dark"] {
  /* --bs-warning: #7FB4CA; */
  --glass-bg: rgba(33, 37, 41, 0.1);
  --outline-stroke: rgba(255, 255, 255, 0.15);
  --indicator-bg: rgba(255, 255, 255, 0.1);
  --indicator-stroke: rgba(255, 255, 255, 0.15);
  --indicator-shadow: rgba(0, 0, 0, 0.35);
  /* iOS liquid-glass indicator */
  --ind-glass-bg: rgba(33, 37, 41, 0.6);
  --ind-rim: rgba(255, 255, 255, 0.22);
  --ind-highlight: rgba(255, 255, 255, 0.45);
  --ind-highlight-bottom: rgba(255, 255, 255, 0.12);
  --ind-shadow: rgba(0, 0, 0, 0.28);
  --ind-inner-shadow: rgba(0, 0, 0, 0.24);
  --keycap-shadow: rgba(0, 0, 0, 0.5);
  --keycap-shadow-near: rgba(0, 0, 0, 0.3);
}

#home {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--nav-height, 110px)) !important;
}

.content-container {
  max-width: var(--content-max-width);
}

.navbar-glass {
  background-color: var(--glass-bg) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Promote to its own layer so scrolling behind it doesn't force a
     full-area backdrop repaint every frame. */
  will-change: backdrop-filter;
}

.navbar-toggler {
  border: none;
  box-shadow: none !important;
}

#mainNav {
  --bs-navbar-padding-y: 0;
  --nav-item-height: 36px;
}

#mainNav .navbar-brand {
  color: var(--bs-navbar-color);
}

#mainNav .navbar-brand:hover,
#mainNav .navbar-brand:focus,
#mainNav .navbar-brand.active {
  color: var(--bs-navbar-active-color);
}

#mainNav .nav-container {
  position: relative;
  max-width: var(--nav-max-width);
  padding-block: 0.75rem !important;
}

#mainNav .nav-link,
#mainNav .navbar-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: var(--nav-item-height);
  min-height: var(--nav-item-height);
  font-weight: 400;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {

  #mainNav .nav-link:hover:not(.active),
  #mainNav .navbar-brand:hover:not(.active) {
    background-color: var(--indicator-bg);
    color: var(--bs-navbar-active-color);
  }
}

#mainNav .nav-link:focus,
#mainNav .navbar-brand:focus {
  outline: none;
}

#mainNav .nav-link:focus-visible,
#mainNav .navbar-brand:focus-visible {
  box-shadow: inset 0 0 0 2px var(--bs-secondary-color);
}

#mainNav .nav-link {
  font-size: 0.88rem;
  padding: 0 0.65rem;
}

#mainNav .navbar-brand {
  justify-content: center;
  font-size: 1.1rem;
  padding-inline: 0.75rem;
  padding-block: 0;
}

.menu-scroll-container {
  overflow-x: auto;
  white-space: nowrap;
}

.nav-indicator,
.collaborator-node {
  background-color: var(--ind-glass-bg);
  box-shadow:
    inset 0 1px 1px var(--ind-highlight),
    inset 0 -1px 1.5px var(--ind-highlight-bottom),
    inset 0 0 0 0.5px var(--ind-rim),
    inset 0 4px 8px -2px var(--ind-inner-shadow),
    inset 0 -2px 4px -1px var(--ind-inner-shadow),
    3px 3px 8px var(--ind-shadow),
    1px 1px 3px var(--ind-shadow);
  backdrop-filter: blur(10px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(180%) brightness(1.04);
  border-radius: 999px;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
    width 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
    height 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.3s ease;
}

/* Position the indicator while the page is hidden, without exposing its
   initial travel from zero size to the active navigation item. */
html.page-pending .nav-indicator {
  transition: none;
}

.nav-indicator.visible {
  opacity: 1;
}

@media (max-width: 767.98px) {
  #mainNav .nav-container {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
  }

  #mainNav .navbar-brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0;
  }

  #mainNav .order-1 {
    /* language and theme controls */
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .menu-scroll-container {
    grid-column: 1 / span 2;
    grid-row: 2;
    width: 100%;
    flex-basis: auto;
    padding-bottom: 0;
    overflow: visible !important;
    white-space: normal !important;
  }

  #mainNav .navbar-nav {
    flex-wrap: wrap;
    gap: 0.5rem !important;
    padding-inline: 0;
    justify-content: start;
  }

}

@media (min-width: 768px) {
  .menu-scroll-container {
    flex-grow: 0;
  }
}

p a {
  color: inherit;
  text-decoration: underline;
  /* text-decoration-thickness: 1px; */
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease, text-decoration-color 0.2s ease;
}

p a:hover,
p a:focus {
  color: var(--bs-warning);
  /* text-decoration-thickness: 2px; */
  text-decoration-color: var(--bs-warning);
}

#theme-toggle,
#language-toggle {
  position: relative;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--outline-stroke);
  background-color: var(--indicator-bg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

#theme-toggle {
  width: 56px;
}

#language-toggle {
  --language-cell-width: 34px;
  --toggle-thumb-duration: var(--language-thumb-duration, 0.42s);
  width: auto;
  padding: 2px;
  gap: 0;
  visibility: hidden;
}

#language-toggle.is-ready {
  visibility: visible;
}

#theme-toggle:hover,
#language-toggle:hover {
  border-color: var(--bs-body-color);
}

#theme-toggle .theme-toggle-thumb,
#language-toggle .language-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  height: 26px;
  background-color: var(--bs-body-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  transition: transform var(--toggle-thumb-duration, 0.32s) cubic-bezier(0.34, 1.25, 0.64, 1);
}

#theme-toggle .theme-toggle-thumb {
  width: 26px;
  border-radius: 50%;
}

#language-toggle .language-toggle-thumb {
  width: var(--language-cell-width, 38px);
  border-radius: 999px;
  z-index: 2;
  transition: none;
}

#language-toggle.is-ready .language-toggle-thumb {
  transition: transform var(--toggle-thumb-duration, 0.32s) cubic-bezier(0.34, 1.25, 0.64, 1);
}

#language-toggle.is-syncing .language-toggle-thumb {
  transition: none;
}

.language-toggle-label {
  position: relative;
  width: var(--language-cell-width, auto);
  min-width: 34px;
  height: 26px;
  padding: 0 0.45rem;
  box-sizing: border-box;
  z-index: 1;
  color: var(--bs-secondary-color);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
  transition: color 0.2s ease;
}

.language-toggle-label-en {
  order: 1;
}

.language-toggle-label-ko {
  order: 2;
}

#language-toggle:hover .language-toggle-label {
  color: var(--bs-body-color);
}

.language-toggle-thumb-label {
  display: none;
  color: var(--bs-body-color);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1;
}

html[lang="en"] #language-toggle .language-toggle-thumb {
  transform: translateY(-50%) translateX(0);
}

html[lang="ko"] #language-toggle .language-toggle-thumb {
  transform: translateY(-50%) translateX(var(--language-cell-width, 38px));
}

html[lang="en"] #language-toggle .language-toggle-thumb-label-en,
html[lang="ko"] #language-toggle .language-toggle-thumb-label-ko {
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle .theme-toggle-icon {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  line-height: 1;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--bs-secondary-color);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#theme-toggle .theme-toggle-icon-sun {
  left: 9px;
}

#theme-toggle .theme-toggle-icon-moon {
  right: 9px;
}

#theme-toggle .theme-toggle-thumb i {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: var(--bs-body-color);
}

#theme-toggle .theme-toggle-icon::before,
#theme-toggle .theme-toggle-thumb i::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
}

#theme-toggle .theme-toggle-thumb .bi-moon-fill {
  display: none;
}

:root[data-bs-theme="dark"] #theme-toggle .theme-toggle-thumb {
  transform: translateY(-50%) translateX(26px);
}

:root[data-bs-theme="dark"] #theme-toggle .theme-toggle-thumb .bi-sun-fill {
  display: none;
}

:root[data-bs-theme="dark"] #theme-toggle .theme-toggle-thumb .bi-moon-fill {
  display: inline-block;
}

.btn-glass {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline-stroke);
  color: var(--bs-body-color);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-glass:hover,
.btn-glass:focus {
  background-color: var(--glass-bg);
  border-color: var(--bs-body-color);
  color: var(--bs-body-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-glass:active {
  background-color: var(--glass-bg) !important;
  border-color: var(--bs-body-color) !important;
  color: var(--bs-body-color) !important;
}

.content-section {
  padding-block: 6rem;
}

.content-section+.content-section {
  border-top: none;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-warning);
  margin-bottom: 0.6rem;
}

.hero-kicker {
  font-size: 0.75rem;
}

.hero-intro {
  max-width: 700px;
  font-size: 1.1rem;
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 3rem;
}

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

.section-heading .section-title {
  margin-bottom: 0;
}

.section-subtitle {
  margin: 0.3rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.subsection-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.subsection-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.subsection-title:first-of-type {
  margin-top: 0;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.news-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  letter-spacing: 0.02em;
}

.news-text {
  font-size: 1rem;
  line-height: 1.6;
}

.news-text a,
.cv-record-title a,
.cv-record-period a,
.cv-record-description a,
.cv-record-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.news-text a:hover,
.news-text a:focus,
.cv-record-title a:hover,
.cv-record-title a:focus,
.cv-record-period a:hover,
.cv-record-period a:focus,
.cv-record-description a:hover,
.cv-record-description a:focus,
.cv-record-meta a:hover,
.cv-record-meta a:focus {
  color: var(--bs-warning);
  text-decoration-color: var(--bs-warning);
}

@media (max-width: 575.98px) {
  .news-list {
    gap: 1.5rem;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.entry {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline-stroke);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.entry:hover {
  border-color: var(--bs-body-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.entry-inner {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
}

.entry-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  /* border-radius: 12px; */
  background-color: var(--bs-body-bg);
  /* border: 1px solid var(--outline-stroke); */
  overflow: hidden;
  flex-shrink: 0;
}

.entry-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.entry-body {
  min-width: 0;
}

.entry-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.entry-org {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bs-body-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.entry-org:hover,
.entry-org:focus {
  color: var(--bs-warning);
}

.entry-period {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.entry-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--bs-body-color);
  margin-top: 0.15rem;
}

.entry-subtitle {
  font-size: 0.88rem;
  color: var(--bs-secondary-color);
  margin-top: 0.1rem;
}

.entry-period-mobile {
  display: none;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  margin-top: 0.35rem;
}

.entry-footer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.88rem;
  color: var(--bs-secondary-color);
  line-height: 1.6;
}

.entry-footer ul {
  list-style: disc outside;
  margin: 0;
  padding-left: 1.1rem;
}

.entry-footer li+li {
  margin-top: 0.15rem;
}

.entry-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.entry-footer a:hover,
.entry-footer a:focus {
  color: var(--bs-warning);
  text-decoration-color: var(--bs-warning);
}

@media (max-width: 575.98px) {
  .entry-inner {
    grid-template-columns: 64px 1fr;
    gap: 1rem;
    padding: 1rem 1.1rem;
  }

  .entry-logo-wrap {
    width: 64px;
    height: 64px;
  }

  .entry-period {
    display: none;
  }

  .entry-period-mobile {
    display: block;
  }

  .entry-footer {
    padding: 0 1.1rem 1rem;
  }
}

.cv-interest-line {
  margin: 0;
  color: var(--bs-body-color);
  font-size: 1rem;
  line-height: 1.6;
}

.cv-section-header {
  --cv-title-stack-height: 4.8rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--cv-title-stack-height);
  margin-bottom: 3rem;
  padding-right: calc(var(--cv-title-stack-height) + 0.75rem);
}

.cv-section-header .section-title {
  margin-bottom: 0;
}

.cv-pdf-button {
  position: absolute;
  top: -0.75rem;
  right: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--cv-title-stack-height);
  height: var(--cv-title-stack-height);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background-color: transparent;
  color: var(--bs-body-color);
  font-size: calc(var(--cv-title-stack-height) - 1.5rem);
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cv-pdf-button i,
.cv-pdf-button i::before {
  display: block;
  line-height: 1;
}

.cv-pdf-button:hover {
  background-color: rgba(var(--bs-warning-rgb), 0.14);
  color: var(--bs-warning);
  box-shadow: none;
}

.cv-pdf-button:focus {
  outline: none;
}

.cv-pdf-button:focus-visible {
  background-color: rgba(var(--bs-warning-rgb), 0.14);
  color: var(--bs-warning);
  outline: 2px solid rgba(var(--bs-warning-rgb), 0.45);
  outline-offset: 2px;
}

.cv-record-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-record {
  padding-block: 1rem;
  border-top: 1px solid var(--outline-stroke);
}

.cv-record:first-child {
  padding-top: 0;
  border-top: 0;
}

.cv-itemized-list {
  gap: 0.8rem;
}

.cv-itemized-list .cv-record,
.cv-itemized-list .cv-record:first-child {
  position: relative;
  padding: 0 0 0 1.2rem;
  border-top: 0;
}

.cv-itemized-list .cv-record::before {
  content: '';
  position: absolute;
  top: 0.62rem;
  left: 0.2rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--bs-secondary-color);
}

.cv-record-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.cv-record-title {
  min-width: 0;
  margin: 0;
  color: var(--bs-body-color);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}

.cv-record-native {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.9rem;
}

.cv-record-period {
  flex: 0 0 auto;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.cv-record-description {
  margin: 0.3rem 0 0;
  color: var(--bs-body-color);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cv-record-meta {
  margin-top: 0.1rem;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 2.3rem;
    margin-bottom: 2.5rem;
  }

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

  .cv-section-header {
    --cv-title-stack-height: 4.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
  }

  .cv-record-header {
    display: block;
  }

  .cv-record-period {
    margin-top: 0.2rem;
    white-space: normal;
  }
}

.pub-item {
  padding-block: 1rem;
}

.pub-item+.pub-item {
  border-top: 1px solid var(--outline-stroke);
}

.pub-venue {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background-color: var(--bs-warning);
  color: #000;
  margin-bottom: 0.55rem;
}

.pub-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.pub-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pub-title a:hover,
.pub-title a:focus {
  color: var(--bs-warning);
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.pub-authors strong {
  color: var(--bs-body-color);
}

.pub-authors a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.pub-authors a:hover,
.pub-authors a:focus {
  color: var(--bs-warning);
  text-decoration-color: var(--bs-warning);
}

.pub-detail {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  font-style: italic;
}

.pub-action {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.collaborator-graph-wrap {
  position: relative;
}

.collaborator-graph {
  display: block;
  width: 100%;
  height: clamp(20rem, 40vw, 24rem);
  overflow: visible;
  touch-action: pan-y;
}

.collaborator-node-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.collaborator-link {
  stroke: var(--indicator-stroke);
  stroke-width: 4;
  stroke-opacity: 1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(1px 1px 2px var(--ind-shadow));
  transition: stroke 0.2s ease, stroke-opacity 0.2s ease;
}

.collaborator-link-highlight {
  stroke: var(--ind-highlight-bottom);
  stroke-width: 1.25;
  stroke-opacity: 0.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: stroke 0.2s ease, stroke-opacity 0.2s ease;
}

.collaborator-link-hit {
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.collaborator-link-target:not(.is-interactive) {
  pointer-events: none;
}

.collaborator-link-target.is-interactive {
  cursor: pointer;
}

.collaborator-link-target:focus {
  outline: none;
}

.collaborator-link-target:hover .collaborator-link,
.collaborator-link-target:focus-visible .collaborator-link,
.collaborator-link-target.is-open .collaborator-link {
  stroke: rgba(var(--bs-warning-rgb), 0.42);
  stroke-opacity: 1;
}

.collaborator-link-target:hover .collaborator-link-highlight,
.collaborator-link-target:focus-visible .collaborator-link-highlight,
.collaborator-link-target.is-open .collaborator-link-highlight {
  stroke: var(--ind-highlight);
  stroke-opacity: 0.95;
}

.collaborator-project-popover {
  position: absolute;
  z-index: 2;
  min-width: 10rem;
  max-width: calc(100% - 1rem);
  padding: 0.65rem;
  background: var(--ind-glass-bg);
  border: 1px solid var(--indicator-stroke);
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 1px var(--ind-highlight),
    inset 0 -1px 1.5px var(--ind-highlight-bottom),
    inset 0 0 0 0.5px var(--ind-rim),
    3px 3px 8px var(--ind-shadow),
    1px 1px 3px var(--ind-shadow);
  backdrop-filter: blur(10px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(180%) brightness(1.04);
  transform: translate(-50%, calc(-100% - 0.75rem));
}

.collaborator-project-popover.is-below {
  transform: translate(-50%, 0.75rem);
}

.collaborator-project-popover-title {
  margin: 0 0 0.35rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.collaborator-project-list {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.collaborator-project-list a {
  display: block;
  padding: 0.35rem 0.5rem;
  color: var(--bs-body-color);
  border-radius: 0.45rem;
  font-size: 0.88rem;
  text-decoration: none;
}

.collaborator-project-list a:hover,
.collaborator-project-list a:focus-visible {
  color: var(--bs-warning);
  background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-warning) 14%);
}

.collaborator-node {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: var(--bs-body-color);
  text-decoration: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
  will-change: transform;
}

.collaborator-node:active {
  cursor: grabbing;
}

.collaborator-node-label {
  display: block;
  font-size: clamp(0.8rem, 1.6vw, 0.92rem);
  font-weight: 500;
  line-height: 1;
  transform: translateY(1px);
  pointer-events: none;
}

.collaborator-node.is-self .collaborator-node-label {
  font-size: clamp(1.2rem, 2.3vw, 1.35rem);
  font-weight: 700;
}

.collaborator-node:hover,
.collaborator-node:focus-visible {
  color: var(--bs-warning);
}

.collaborator-node:focus {
  outline: none;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline-stroke);
  color: var(--bs-body-color);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1),
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 1030;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

#back-to-top.visible:hover {
  border-color: var(--bs-body-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

#back-to-top.visible:active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.outline-logo {
  display: grid;
  grid-template-columns: repeat(5, 0.75em);
  justify-content: center;
  width: 100%;
  font-weight: 800;
  font-size: 24vw;
  line-height: 0.85;
  user-select: none;
}

.outline-logo-container {
  padding-block: 10vh 5vh;
}

.outline-logo span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-body-bg, #fff);
  text-shadow:
    -1px -1px 0 var(--outline-stroke),
    1px -1px 0 var(--outline-stroke),
    -1px 1px 0 var(--outline-stroke),
    1px 1px 0 var(--outline-stroke);
  transition: text-shadow 0.35s ease, color 0.35s ease;
  outline: none;
}

.outline-logo span:not(:empty) {
  cursor: pointer;
}

.outline-logo span.is-active {
  color: var(--bs-warning);
  /* text-shadow:
    -1px -1px 0 var(--bs-warning),
     1px -1px 0 var(--bs-warning),
    -1px  1px 0 var(--bs-warning),
     1px  1px 0 var(--bs-warning); */
}

@keyframes keycap-shimmer {

  /* subtle "press me" pulse: rests, then a single soft brighten before
     easing back. The brief brighten (not an even breathe) gently draws
     the eye without being showy. */
  0%,
  70% {
    opacity: 0.7;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

.keycap-logo {
  width: 90px;
  height: 90px;
  cursor: pointer;
  opacity: 0.75;
  /* subtle idle pulse; paused on hover/press */
  animation: keycap-shimmer 2.5s ease-in-out infinite;
  filter:
    drop-shadow(0 2px 2px var(--keycap-shadow))
    drop-shadow(0 1px 1px var(--keycap-shadow-near));
  transition:
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.5s ease,
    filter 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 24px;
}

.keycap-logo:hover {
  opacity: 0.95;
  animation: none;
  transform: translateY(-2px);
  filter:
    drop-shadow(0 1.8px 1.5px var(--keycap-shadow))
    drop-shadow(0 1px 1px var(--keycap-shadow-near));
  transition: transform 0.05s ease, opacity 0.5s ease, filter 0.1s ease;
}

.keycap-logo.pressed {
  opacity: 0.95;
  animation: none;
  transform: translateY(6px);
  filter:
    drop-shadow(0 1px 1px var(--keycap-shadow))
    drop-shadow(0 0 1px var(--keycap-shadow-near));
  transition: transform 0.05s ease, opacity 0.5s ease, filter 0.05s ease;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  .keycap-logo {
    animation: none;
  }

  .collaborator-link,
  .collaborator-link-highlight {
    transition: none;
  }
}

.scroll-down-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  font-size: 1.8rem;
  text-decoration: none;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.scroll-down-indicator i {
  display: inline-block;
  animation: scroll-bounce 2s infinite;
}

.scroll-down-indicator:hover {
  color: var(--bs-warning);
  transform: translateX(-50%) scale(1.15);
}

.scroll-down-indicator.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(15px);
}

@media (max-width: 991.98px) {
  #home {
    min-height: 100svh !important;
    padding-bottom: clamp(5.5rem, 10vh, 7rem) !important;
  }

  .scroll-down-indicator {
    bottom: calc(clamp(1rem, 3vh, 1.75rem) + env(safe-area-inset-bottom, 0px));
    font-size: 1.55rem;
  }
}

@media (max-width: 575.98px) {
  .scroll-down-indicator {
    font-size: 1.4rem;
  }
}

.site-footer {
  position: relative;
  z-index: 3;
  padding-block: 2rem 2.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  background-color: var(--bs-body-bg);
  border-top: 1px solid var(--outline-stroke);
}

@keyframes scroll-bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(6px);
  }

  60% {
    transform: translateY(3px);
  }
}
