:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-strong: #eef3ef;
  --ink: #15201f;
  --muted: #66706d;
  --line: #d8ded8;
  --teal: #188b85;
  --teal-dark: #0e5c5b;
  --coral: #d76045;
  --yellow: #e3b23c;
  --blue: #315c9f;
  --shadow: 0 20px 60px rgba(21, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    system-ui,
    sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(216, 222, 216, 0.78);
  background: rgba(244, 246, 243, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #f8fbf7;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.nav-links a.active {
  background: var(--surface-strong);
  color: var(--ink);
}

.nav-links .nav-action {
  margin-left: 6px;
  background: var(--ink);
  color: #ffffff;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.section-band,
.content-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 32px;
  min-height: calc(100vh - 72px);
  padding: 56px 0 44px;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 24px 0 72px auto;
  width: min(58vw, 680px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(244, 246, 243, 0.02), rgba(244, 246, 243, 0.18)),
    url("../assets/hero-robotics.png") center / cover;
  box-shadow: var(--shadow);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 48px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-copy {
  max-width: 520px;
  color: #3f4b48;
  font-size: 18px;
}

.hero-actions,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.danger {
  border-color: rgba(215, 96, 69, 0.35);
  background: rgba(215, 96, 69, 0.12);
  color: #8f2f1c;
}

.button.disabled {
  cursor: default;
  opacity: 0.65;
  pointer-events: none;
}

.button.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.quick-panel {
  position: absolute;
  right: 32px;
  bottom: 18px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1px;
  overflow: hidden;
  width: min(540px, calc(100% - 64px));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(21, 32, 31, 0.78);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.quick-panel div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.stat-number,
.stat-label {
  display: block;
}

.stat-number {
  font-size: 30px;
  font-weight: 900;
}

.stat-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 52px 0 12px;
}

.intro-grid article,
.team-card,
.resource-card,
.profile-panel,
.member-table-wrap,
.post-composer,
.post-card,
.admin-board article,
.admin-form,
.news-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.intro-grid article {
  padding: 24px;
}

.icon-chip {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e8f4ef;
  color: var(--teal-dark);
  font-weight: 900;
}

.content-section {
  padding: 74px 0 0;
}

.page-section {
  min-height: calc(100vh - 154px);
  padding-bottom: 70px;
}

.page-title {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1.1;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  min-width: 64px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.segmented-control button.active {
  background: var(--ink);
  color: #ffffff;
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-card {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.news-date {
  color: var(--muted);
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf5f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.team-grid,
.resource-grid,
.post-list,
.admin-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.team-card,
.resource-card,
.post-card {
  padding: 22px;
}

.team-card:nth-child(2n) .direction-bar {
  background: var(--coral);
}

.team-card:nth-child(3n) .direction-bar {
  background: var(--blue);
}

.direction-bar {
  height: 6px;
  margin: -22px -22px 20px;
  border-radius: 8px 8px 0 0;
  background: var(--teal);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.search-field,
.post-composer label,
.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field {
  width: min(320px, 100%);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 139, 133, 0.14);
}

.resource-card {
  display: grid;
  gap: 14px;
}

.resource-type {
  width: fit-content;
  border-bottom: 3px solid var(--yellow);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.community-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.community-layout .section-heading {
  grid-column: 1 / -1;
}

.post-composer {
  align-self: start;
  padding: 22px;
}

.post-composer .button {
  margin-top: 10px;
}

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

.dashboard-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.dashboard-layout .section-heading {
  grid-column: 1 / -1;
}

.profile-panel {
  padding: 24px;
}

.avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--coral);
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.member-table-wrap {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar select {
  width: 180px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.admin-layout {
  padding-bottom: 70px;
}

.admin-board article {
  padding: 22px;
}

.metric {
  margin: 4px 0 20px;
  color: var(--teal-dark);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin-top: 18px;
  padding: 22px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.admin-form-head {
  display: grid;
  gap: 6px;
}

.admin-form-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-form-single {
  margin-top: 18px;
}

.admin-form-single form {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}

.admin-member-panel {
  margin-top: 18px;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-select {
  min-width: 112px;
}

.attachment-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  color: var(--teal-dark);
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-form .wide {
  grid-column: 1 / -1;
}

.admin-form .button {
  width: fit-content;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.checkbox-row span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.admin-manage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-list-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-list-body {
  display: grid;
  gap: 0;
}

.admin-manage-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.admin-manage-item:first-child {
  border-top: 0;
}

.admin-manage-copy {
  min-width: 0;
}

.admin-manage-copy h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.admin-manage-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

.notice-panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.notice-panel {
  margin-bottom: 18px;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auth-layout .section-heading {
  grid-column: 1 / -1;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-card .button {
  width: fit-content;
}

@media (max-width: 920px) {
  .site-header {
    padding: 0 20px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 20px;
    display: none;
    width: min(320px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-action {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 320px;
    order: -1;
  }

  .quick-panel {
    position: static;
    width: 100%;
    grid-column: 1 / -1;
  }

  .intro-grid,
  .team-grid,
  .resource-grid,
  .admin-board,
  .admin-manage-grid,
  .community-layout,
  .dashboard-layout,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-form-grid,
  .admin-form-single form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-band,
  .content-section {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    min-width: auto;
  }

  .brand strong {
    font-size: 14px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 24px;
  }

  .quick-panel {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .table-toolbar,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 13px;
  }
}
