/* CCSLab visual layer. Palette tokens drive all UI colors; the official emblem stays red. */
:root {
  --blue: #a51c39;
  --accent: #a51c39;
  --accent-hover: #86142d;
  --soft: #faf0f3;
  --hero-a: #22111f;
  --hero-b: #431525;
  --art-hue: 0deg;
  --line: #e8e5e9;
  scroll-behavior: smooth;
}
:root[data-theme="blue"] {
  --blue: #2159a5;
  --accent: #2159a5;
  --accent-hover: #194780;
  --soft: #edf3fc;
  --hero-a: #101c33;
  --hero-b: #183b58;
  --art-hue: 225deg;
}
:root[data-theme="teal"] {
  --blue: #087c76;
  --accent: #087c76;
  --accent-hover: #08635e;
  --soft: #ecf7f5;
  --hero-a: #10272d;
  --hero-b: #144644;
  --art-hue: 175deg;
}
:root[data-theme="violet"] {
  --blue: #7251b5;
  --accent: #7251b5;
  --accent-hover: #5c3c96;
  --soft: #f3effb;
  --hero-a: #211630;
  --hero-b: #3d2258;
  --art-hue: 290deg;
}
:root[data-theme="amber"] {
  --blue: #98601c;
  --accent: #98601c;
  --accent-hover: #774a15;
  --soft: #faf4e9;
  --hero-a: #292117;
  --hero-b: #4b3220;
  --art-hue: 45deg;
}
body {
  color: #292b36;
  background: #fbfafb;
}
button {
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
  border-radius: 7px;
}
button:hover {
  background: var(--soft);
  border-color: color-mix(in srgb, var(--accent) 35%, white);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, white);
  outline-offset: 4px;
}
input:focus,
select:focus,
textarea:focus {
  outline-color: color-mix(in srgb, var(--accent) 35%, white);
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
}
.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.site-header {
  max-width: 1536px;
  padding: 22px 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  gap: 15px;
  color: #292b36;
  font-weight: 500;
}
.university-emblem {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
}
.university-name {
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-size: 25px;
  white-space: nowrap;
  font-weight: 700;
}
.university-name small {
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 1.7px;
  font-weight: 400;
}
.brand-divider {
  width: 1px;
  height: 36px;
  background: #ddd9df;
  margin: 0 2px;
}
.lab-name {
  font-family: Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
}
.lab-name small {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #8a8392;
  margin-top: 7px;
}
.header-tools {
  display: flex;
  gap: 18px;
  align-items: center;
}
.role-switch {
  display: flex;
  background: #f3f1f4;
  padding: 4px;
  border: 1px solid #eeebf0;
  border-radius: 9px;
}
.role-switch button {
  border: 0;
  background: none;
  color: #8d8494;
  font-size: 12px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.role-switch .selected {
  background: white;
  color: var(--accent);
  box-shadow: 0 2px 6px #26152e0c;
}
.header-tools svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-button {
  display: flex;
  gap: 8px;
  align-items: center;
  border-color: #e5e0e7;
  color: #5f5869;
  background: white;
  font-size: 12px;
  padding: 12px 15px;
}
main {
  max-width: 1440px;
  padding: 28px 48px 0;
}
.possibilities {
  isolation: isolate;
  position: relative;
  min-height: 470px;
  padding: 54px 50px 56px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 77% 44%, var(--hero-b), transparent 61%),
    var(--hero-a);
  color: white;
  box-shadow: 0 18px 38px #2b132410;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(#ffffff06 1px, transparent 1px),
    linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, transparent, #000);
}
.hero-orbit {
  position: absolute;
  right: -100px;
  top: -230px;
  width: 720px;
  height: 720px;
  border: 1px solid #ffffff09;
  border-radius: 50%;
  z-index: -1;
}
.hero-orbit:before,
.hero-orbit:after {
  content: "";
  position: absolute;
  inset: 70px;
  border: 1px solid #ffffff08;
  border-radius: 50%;
}
.hero-orbit:after {
  inset: 140px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: 2.4px;
  color: #d5bbc9;
  margin: 0 0 30px;
}
.hero-kicker span {
  width: 5px;
  height: 5px;
  background: #ecb6c4;
  border-radius: 50%;
  box-shadow: 0 0 12px #ef9cb9;
}
.hero-copy h1 {
  font-size: clamp(34px, 3.2vw, 49px);
  letter-spacing: 2px;
  line-height: 1.55;
  font-weight: 600;
  margin: 0 0 16px;
}
.hero-copy h1 span {
  color: #f6ccd9;
}
.hero-copy h1 i {
  color: #c9809b;
  font-style: normal;
}
.hero-description {
  font-size: 12px;
  color: #c3b2c2;
  line-height: 2.1;
  letter-spacing: 0.7px;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 38px;
  padding: 13px 20px;
  margin-top: 20px;
  border: 1px solid #ffffff35;
  border-radius: 6px;
  background: #ffffff08;
  color: #fff;
  font-size: 12px;
}
.hero-link:hover {
  background: #ffffff15;
}
.hero-link span {
  font-size: 18px;
}
.infinity-art {
  position: absolute;
  width: 61%;
  right: -1%;
  top: 0;
  height: 100%;
  object-fit: contain;
  filter: hue-rotate(var(--art-hue));
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.hero-art-label {
  position: absolute;
  right: 56px;
  bottom: 80px;
  color: #dfbbc9;
  font-size: 9px;
  letter-spacing: 4px;
}
.hero-art-label > span {
  font-size: 24px;
  vertical-align: middle;
  letter-spacing: 0;
  margin-right: 8px;
}
.hero-art-label small {
  letter-spacing: 2px;
  font-size: 7px;
  margin: 5px 0 0 34px;
  color: #9b7f92;
}
.hero-bottom {
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 22px;
  border-top: 1px solid #ffffff13;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.9px;
  color: #998697;
}
.hero-bottom b {
  font-weight: 400;
  color: #d6b7c5;
  margin-left: 20px;
}
.intro {
  margin: 0 2px;
  padding: 29px 10px;
  gap: 25px;
  background: transparent;
}
.intro-copy .eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  margin: 0 0 10px;
  color: #a496a4;
}
.intro h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0;
}
.intro p:not(.eyebrow) {
  font-size: 11px;
  margin: 10px 0 0;
  color: #9e96a2;
}
.stats {
  gap: 36px;
}
.stats div {
  padding-left: 36px;
  border-color: #e6e0e7;
}
.stats strong {
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1px;
}
.stats span {
  font-size: 10px;
  letter-spacing: 1px;
  color: #978e9c;
}
.section-title {
  margin: 34px 0 22px;
}
.section-title .eyebrow {
  font-size: 9px;
  color: #a392a2;
  letter-spacing: 2px;
}
.section-title h2 {
  font-size: 24px;
  margin-top: 9px;
  letter-spacing: 1px;
}
#count {
  color: #9a8d9d;
  font-size: 11px;
}
.filters {
  background: #fff;
  border-color: var(--line);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 4px #1c102302;
}
.filters input,
.filters select {
  background: #faf9fb;
  border-color: #ece8ef;
  font-size: 11px;
  padding: 11px;
  border-radius: 5px;
}
.filters input {
  min-width: 230px;
}
.filters .text {
  font-size: 11px;
  color: #95869b;
}
.card {
  border-radius: 10px;
  border-color: var(--line);
  box-shadow: 0 3px 8px #2c173003;
}
.card:hover,
.card:focus {
  border-color: color-mix(in srgb, var(--accent) 38%, white);
  box-shadow: 0 8px 24px #2c173010;
}
.portrait {
  background: linear-gradient(145deg, #f4f1f5, #eae8ee);
}
.badge {
  color: var(--accent);
  background: var(--soft);
}
.card .label {
  color: #a296a7;
}
.card .bio {
  border-top-color: #eee9ef;
}
.empty {
  background: #fff;
  border: 1px dashed #ddd4e0;
  padding: 57px 20px;
  color: #a699ad;
  font-size: 12px;
}
.empty b {
  font-size: 17px;
  color: #62546b;
  font-weight: 500;
  letter-spacing: 1px;
}
.empty:before {
  content: "∞";
  display: block;
  font:
    56px Georgia,
    serif;
  color: color-mix(in srgb, var(--accent) 30%, white);
  margin-bottom: 8px;
}
.add-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 26px 30px;
  border-radius: 10px;
  gap: 20px;
  margin: 30px 0 48px;
}
.add-symbol {
  font-size: 32px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.add-area > div {
  flex: 1;
}
.add-area h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: #514355;
  letter-spacing: 0.7px;
}
.add-area p {
  font-size: 11px;
  margin: 9px 0 0;
  color: #a08fa6;
}
.add-area .primary {
  font-size: 12px;
  padding: 13px 20px;
}
footer {
  background: white;
  padding: 30px max(24px, calc((100vw - 1344px) / 2));
  align-items: center;
  gap: 20px;
  color: #9b8ca2;
  border-color: var(--line);
}
footer strong {
  font:
    700 16px Arial,
    sans-serif;
  color: #69596f;
}
footer strong span {
  font-weight: 300;
  color: #ccbccc;
  margin: 0 7px;
}
footer small {
  font-size: 8px;
  letter-spacing: 1.5px;
}
footer p,
footer a {
  font-size: 10px;
}
footer a:hover {
  color: var(--accent);
}
dialog {
  border: 1px solid #ece6ee;
  border-radius: 16px;
  box-shadow: 0 30px 100px #26102d40;
}
dialog::backdrop {
  background: #21142b80;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 22px;
}
dialog input,
dialog select,
dialog textarea {
  border-color: #e5dfe9;
}
.upload {
  border-color: #d7cadd;
  background: var(--soft);
}
.summary {
  background: var(--soft);
}
nav .active {
  background: var(--accent);
}
.table-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
th {
  background: var(--soft);
}
.settings-heading {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #a18ea6;
  margin: 25px 0 12px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 6px;
  font-size: 11px;
  color: #7d6e84;
}
.theme-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 5px #ffffff25;
}
.theme-dot.red {
  background: #a51c39;
}
.theme-dot.blue {
  background: #2159a5;
}
.theme-dot.teal {
  background: #087c76;
}
.theme-dot.violet {
  background: #7251b5;
}
.theme-dot.amber {
  background: #98601c;
}
.settings-section {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.settings-section strong {
  font-size: 13px;
  font-weight: 500;
}
.settings-section p {
  margin: 5px 0 0;
  font-size: 11px;
}
.settings-note {
  font-size: 11px !important;
}
.settings-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
.role-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  padding: 12px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 12px;
}
.role-note:before {
  content: "●";
  font-size: 8px;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@media (min-width: 1536px) {
  .site-header {
    padding-left: 96px;
    padding-right: 96px;
  }
}
@media (max-width: 1100px) {
  .hero-copy {
    max-width: 440px;
  }
  .possibilities {
    padding: 45px 36px;
    min-height: 450px;
  }
  .hero-copy h1 {
    font-size: 40px;
  }
  .infinity-art {
    right: -7%;
    width: 65%;
    opacity: 0.8;
  }
  .hero-bottom {
    left: 36px;
    right: 36px;
  }
  .stats {
    gap: 24px;
  }
  .stats div {
    padding-left: 24px;
  }
  .hero-art-label {
    right: 30px;
  }
  .filters input {
    min-width: 190px;
  }
}
@media (max-width: 900px) {
  .site-header {
    padding: 20px 24px;
  }
  .hero-copy h1 {
    font-size: 34px;
  }
  .hero-copy {
    max-width: 370px;
  }
  .infinity-art {
    width: 65%;
    right: -13%;
    opacity: 0.6;
  }
  .hero-art-label {
    display: none;
  }
  .hero-kicker {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .intro {
    display: flex;
  }
  .intro-copy h2 {
    font-size: 16px;
  }
  .stats {
    gap: 15px;
  }
  .stats div {
    padding-left: 15px;
  }
  .stats strong {
    font-size: 28px;
  }
  .header-tools {
    gap: 10px;
  }
  .brand {
    gap: 10px;
  }
  .lab-name {
    font-size: 23px;
  }
  .university-name {
    font-size: 22px;
  }
  .university-emblem {
    width: 46px;
    height: 46px;
  }
  .hero-bottom > span:last-child {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .add-area {
    padding: 24px;
  }
  .add-area h3 {
    font-size: 14px;
  }
  .add-symbol {
    display: none;
  }
}
@media (max-width: 650px) {
  .site-header {
    padding: 15px 16px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .brand {
    gap: 9px;
  }
  .university-emblem {
    width: 42px;
    height: 42px;
  }
  .university-name {
    font-size: 21px;
  }
  .university-name small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .lab-name {
    font-size: 23px;
  }
  .lab-name small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .brand-divider {
    height: 31px;
    margin: 0 2px;
  }
  .header-tools {
    margin-left: auto;
  }
  .role-switch button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .settings-button {
    padding: 10px;
  }
  .settings-button span {
    display: none;
  }
  .header-tools svg {
    width: 14px;
    height: 14px;
  }
  main {
    padding-top: 16px;
  }
  .possibilities {
    min-height: 550px;
    padding: 30px 25px;
    border-radius: 12px;
  }
  .hero-kicker {
    font-size: 7px;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
  }
  .hero-copy h1 {
    font-size: 34px;
    letter-spacing: 1px;
  }
  .hero-description {
    font-size: 11px;
  }
  .hero-link {
    font-size: 11px;
    padding: 10px 15px;
    margin-top: 12px;
    gap: 20px;
  }
  .infinity-art {
    width: 85%;
    height: 250px;
    top: auto;
    bottom: 15px;
    right: -8%;
    opacity: 0.8;
  }
  .hero-copy {
    max-width: none;
  }
  .hero-bottom {
    left: 25px;
    right: 25px;
    bottom: 16px;
    font-size: 6px;
    letter-spacing: 1.4px;
  }
  .hero-bottom > span:last-child {
    display: none;
  }
  .intro {
    display: block;
    padding: 26px 7px;
  }
  .intro-copy h2 {
    font-size: 17px;
  }
  .stats {
    justify-content: space-between;
    margin-top: 24px;
    padding-right: 15px;
  }
  .stats div {
    padding-left: 20px;
  }
  .stats strong {
    font-size: 30px;
  }
  .stats span {
    font-size: 9px;
  }
  .section-title {
    margin-top: 28px;
  }
  .section-title h2 {
    font-size: 22px;
  }
  .section-title .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .filters {
    gap: 8px;
    padding: 12px;
  }
  .filters input {
    min-width: 0;
  }
  .filters select {
    font-size: 10px;
    padding: 10px 7px;
  }
  .add-area {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
  }
  .add-area h3 {
    font-size: 15px;
  }
  .add-area .primary {
    width: 100%;
    padding: 12px;
  }
  .theme-options {
    gap: 6px;
  }
  .theme-option {
    font-size: 10px;
    padding: 12px 3px;
  }
  .settings-section {
    align-items: flex-start;
  }
  .settings-section button {
    font-size: 11px;
    white-space: nowrap;
  }
  .settings-actions {
    flex-wrap: wrap;
  }
  .settings-actions button {
    font-size: 12px;
  }
  footer {
    flex-wrap: wrap;
    padding: 25px 20px;
  }
  footer > p {
    display: none;
  }
  footer a {
    font-size: 9px;
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  .infinity-art {
    animation: none;
  }
  * {
    transition: none !important;
  }
}
/* Resume content stays aligned while long biographies remain fully readable. */
.resume-shell {
  min-width: 0;
}
.resume-scroll {
  height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--soft);
}
.resume-scroll .value {
  overflow-wrap: anywhere;
}
.resume-bio,
.contact-value {
  white-space: pre-wrap;
}
.resume-scroll-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 10px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}
.resume-scroll-controls button {
  padding: 6px 8px;
  font-size: 11px;
  background: white;
  flex-shrink: 0;
}
.resume-scroll-controls span {
  font-size: 9px;
  color: #97879e;
  text-align: center;
}
.detail-scroll {
  max-height: min(60vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 10px;
  margin-bottom: 15px;
}
.detail-scroll > div {
  min-width: 0;
}
.detail-scroll .value {
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .resume-scroll {
    height: 315px;
  }
  .resume-scroll-controls {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .resume-scroll-controls span {
    display: none;
  }
  .detail-scroll {
    max-height: 58vh;
  }
}
.card-edit-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: white;
}
.card-edit-footer button {
  width: 100%;
  font-size: 12px;
  background: var(--soft);
}
.request-list {
  max-height: 60vh;
  overflow-y: auto;
}
.request-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.request-item .value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.request-item .actions {
  flex-wrap: wrap;
}
#current-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  font-size: 13px;
}
#current-directory {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.hero-actions .hero-link {
  margin-top: 0;
  font-size: 16px;
  font-weight: 500;
  gap: 18px;
  white-space: nowrap;
  padding: 14px 19px;
}
.hero-actions .hero-add {
  background: #ffffff18;
  border-color: #ffffff55;
}
.hero-actions .hero-add:hover {
  background: #ffffff28;
  border-color: #ffffff80;
}
input:disabled,
select:disabled {
  background: #f0edf2;
  color: #a89eae;
  border-color: #e5dfe9;
  cursor: not-allowed;
  opacity: 0.75;
}
@media (max-width: 650px) {
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .hero-link {
    font-size: 14px;
    padding: 11px 12px;
    gap: 8px;
    justify-content: center;
  }
}
@media (max-width: 380px) {
  .hero-actions {
    gap: 8px;
  }
  .hero-actions .hero-link {
    font-size: 13px;
    padding: 11px 9px;
    gap: 5px;
  }
}
.pin-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 7px;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 400;
  background: var(--soft);
  color: var(--accent);
  white-space: nowrap;
}
/* Four independent summary figures remain readable on smaller screens. */
@media (max-width: 900px) {
  .intro { display: block; }
  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 25px; padding-right: 0; }
  .stats div { padding-left: 10px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .stats div:nth-child(odd) { border-left: 0; padding-left: 0; }
}
.upload-status { padding: 12px; background: var(--soft); border-radius: 6px; color: var(--accent); font-size: 12px; }
