:root {
  --paper: #f5f2eb;
  --paper-deep: #eee9df;
  --ink: #182231;
  --ink-2: #475569;
  --line: #d9d4ca;
  --navy: #1d3657;
  --navy-2: #294a73;
  --blue: #439cc4;
  --blue-soft: #e8f2f6;
  --white: #fffefb;
  --green: #2f6f5e;
  --amber: #9a6b25;
  --red: #914747;
  --shadow: 0 18px 60px rgba(24, 34, 49, .08);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(67,156,196,.10), transparent 28rem),
    linear-gradient(180deg, #f8f5ef 0%, var(--paper) 38%, #f1ede5 100%);
  font-family: var(--sans);
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.page-shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin-top: 14px;
  padding: 11px 14px 11px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(217,212,202,.9);
  border-radius: 20px;
  background: rgba(255,254,251,.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(36, 47, 62, .06);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: white; background: var(--navy);
  font-family: var(--serif); font-size: 20px;
}
.brand strong { display: block; font-family: var(--serif); font-size: 17px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #f4f1ea; }
.nav-link, .quiet-btn, .icon-btn {
  border: 0; background: transparent; cursor: pointer;
}
.nav-link { padding: 9px 15px; border-radius: 10px; font-size: 14px; color: #596779; }
.nav-link:hover, .nav-link.active { background: var(--white); color: var(--navy); box-shadow: 0 4px 15px rgba(33,48,67,.06); }
.header-actions { display: flex; justify-content: flex-end; gap: 7px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.7); font-size: 19px; }
.quiet-btn { padding: 9px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.7); }
.icon-btn:hover, .quiet-btn:hover { border-color: #bdb6aa; background: white; }

.app-main { min-height: 75vh; padding: 52px 8px 60px; }
.hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 26px;
  align-items: stretch;
}
.hero-main {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(34px, 5vw, 76px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(249,247,242,.88)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(29,54,87,.025) 32px);
  overflow: hidden;
  position: relative;
}
.hero-main::after {
  content: "";
  position: absolute; right: -90px; bottom: -130px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(67,156,196,.22);
  box-shadow: 0 0 0 48px rgba(67,156,196,.035), 0 0 0 98px rgba(29,54,87,.025);
}
.eyebrow { color: var(--navy-2); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.hero h1 { margin: 22px 0 16px; max-width: 720px; font-family: var(--serif); font-size: clamp(42px, 6vw, 82px); line-height: .98; font-weight: 600; letter-spacing: -.04em; }
.hero-lead { max-width: 700px; margin: 0; color: #596577; font-size: 17px; line-height: 1.9; }
.hero-actions { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.primary-btn, .secondary-btn {
  border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; font-weight: 650;
}
.primary-btn { color: white; background: var(--navy); box-shadow: 0 9px 24px rgba(29,54,87,.18); }
.primary-btn:hover { background: #27476e; }
.secondary-btn { color: var(--navy); background: var(--blue-soft); }
.hero-side { display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.date-card, .visitor-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,254,251,.82); padding: 28px;
}
.date-card small, .visitor-card small { color: var(--ink-2); }
.date-card strong { display: block; margin-top: 7px; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.visitor-card { position: relative; overflow: hidden; }
.visitor-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--navy), var(--blue)); }
.visitor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.visitor-grid strong { display: block; font-family: var(--serif); font-size: 28px; color: var(--navy); }
.visitor-grid span { font-size: 12px; color: var(--ink-2); }

.section { margin-top: 58px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title small { color: var(--blue); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; }
.section-title h2 { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 42px); font-weight: 600; letter-spacing: -.02em; }
.section-note { color: var(--ink-2); font-size: 13px; }
.text-link { border: 0; background: transparent; color: var(--navy); cursor: pointer; font-weight: 650; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat-card { padding: 20px 21px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,254,251,.7); cursor: pointer; transition: .2s ease; }
.stat-card:hover { transform: translateY(-2px); background: white; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-family: var(--serif); font-size: 32px; color: var(--navy); }
.stat-card span { font-size: 13px; color: var(--ink-2); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card {
  position: relative; overflow: hidden; min-height: 270px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-no { position: absolute; right: 24px; top: 16px; font-family: var(--serif); font-size: 70px; color: rgba(29,54,87,.055); }
.project-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-size: 11px; font-weight: 700; }
.project-card h3 { margin: 24px 0 11px; width: 84%; font-family: var(--serif); font-size: 25px; font-weight: 600; }
.project-card p { margin: 0; max-width: 90%; color: #5b6676; line-height: 1.75; font-size: 14px; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 19px; }
.tag { padding: 5px 8px; border: 1px solid #dfdbd3; border-radius: 7px; color: #657182; font-size: 11px; background: #faf8f4; }
.progress-wrap { margin-top: 22px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.progress-track { height: 7px; background: #ede8df; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--blue)); }
.project-arrow { position: absolute; right: 28px; bottom: 28px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #f3f0ea; color: var(--navy); }

.achievement-list { display: grid; gap: 12px; }
.achievement-row {
  display: grid; grid-template-columns: 110px 1fr 180px 120px; gap: 20px; align-items: center;
  border-top: 1px solid var(--line); padding: 21px 5px;
}
.achievement-row:last-child { border-bottom: 1px solid var(--line); }
.achievement-kind { font-size: 12px; color: var(--blue); font-weight: 800; letter-spacing: .08em; }
.achievement-row h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.achievement-row p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.achievement-venue { font-size: 13px; color: var(--ink-2); }
.status-dot { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.resource-card { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,254,251,.8); padding: 23px; cursor: pointer; transition: .2s; }
.resource-card:hover { background: white; transform: translateY(-2px); box-shadow: var(--shadow); }
.resource-icon { width: 38px; height: 38px; border: 1px solid #d8e5eb; border-radius: 11px; display: grid; place-items: center; color: var(--navy); background: var(--blue-soft); font-family: var(--serif); }
.resource-card h3 { margin: 17px 0 6px; font-family: var(--serif); font-size: 22px; }
.resource-card p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; min-height: 42px; }
.resource-count { display: block; margin-top: 18px; font-size: 12px; color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: rgba(255,254,251,.78); padding: 24px; }
.panel h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 21px; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-top: 1px solid #e6e1d8; cursor: pointer; }
.recent-item:first-child { border-top: 0; }
.recent-item strong { display: block; font-size: 14px; }
.recent-item small { color: var(--ink-2); }
.recent-empty { padding: 18px 0; color: var(--ink-2); font-size: 13px; }

.page-title { padding: 28px 0 10px; }
.page-title small { color: var(--blue); letter-spacing: .16em; font-weight: 800; text-transform: uppercase; }
.page-title h1 { margin: 7px 0 8px; font-family: var(--serif); font-size: clamp(40px, 5vw, 68px); font-weight: 600; letter-spacing: -.03em; }
.page-title p { max-width: 760px; color: var(--ink-2); line-height: 1.8; }

.tabs { display: flex; gap: 6px; padding: 5px; width: max-content; max-width: 100%; overflow-x: auto; background: #ebe6dc; border-radius: 12px; margin: 22px 0; }
.tab { border: 0; background: transparent; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; color: #657183; }
.tab.active { background: var(--white); color: var(--navy); box-shadow: 0 4px 14px rgba(29,54,87,.07); }

.project-detail { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); padding: 30px; margin-top: 18px; }
.detail-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 28px; }
.detail-grid h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 12px; }
.detail-grid p { color: var(--ink-2); line-height: 1.8; }
.highlight-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.highlight-list li { padding: 12px 14px; border-left: 3px solid var(--blue); background: #f8f7f3; border-radius: 0 10px 10px 0; }

.file-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 18px 0; }
.file-breadcrumb { color: var(--ink-2); font-size: 13px; }
.file-list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--white); }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 90px; gap: 16px; align-items: center; padding: 15px 17px; border-top: 1px solid #e9e4dc; }
.file-row:first-child { border-top: 0; }
.file-name { min-width: 0; display: flex; gap: 11px; align-items: center; }
.file-symbol { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); font-size: 11px; font-weight: 800; }
.file-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-meta { color: var(--ink-2); font-size: 12px; }
.file-action { border: 0; border-radius: 9px; padding: 8px 10px; background: #f0ede6; cursor: pointer; font-size: 12px; }
.file-action:hover { background: #e6e1d8; }
.connection-note { padding: 13px 15px; border: 1px dashed #c9c1b5; border-radius: 12px; color: var(--ink-2); font-size: 12px; margin-bottom: 12px; background: rgba(255,255,255,.45); }

.timeline { position: relative; margin-top: 34px; }
.timeline::before { content: ""; position: absolute; left: 92px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline-item { display: grid; grid-template-columns: 74px 36px 1fr; gap: 10px; margin-bottom: 25px; }
.timeline-date { font-size: 12px; color: var(--ink-2); padding-top: 4px; }
.timeline-dot { position: relative; }
.timeline-dot::before { content: ""; position: absolute; left: 13px; top: 3px; width: 9px; height: 9px; border: 3px solid var(--paper); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-content { padding-bottom: 18px; }
.timeline-content h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 20px; }
.timeline-content p { margin: 0; color: var(--ink-2); line-height: 1.7; font-size: 13px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding: 28px 10px 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.site-footer strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: var(--serif); font-size: 16px; }
.footer-meta { display: flex; gap: 18px; }

.modal { width: min(720px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 24px; padding: 24px; background: #fffefb; color: var(--ink); box-shadow: 0 30px 90px rgba(21,31,44,.24); }
.modal::backdrop { background: rgba(22,30,42,.34); backdrop-filter: blur(7px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.modal-head small { color: var(--blue); letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.modal-head h2 { font-family: var(--serif); font-weight: 600; margin: 4px 0 0; }
.search-input { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; background: #f8f6f1; outline: none; }
.search-input:focus { border-color: #9cbaca; box-shadow: 0 0 0 4px rgba(67,156,196,.10); }
.search-results { max-height: 55vh; overflow-y: auto; margin-top: 12px; }
.search-result { padding: 13px 8px; border-top: 1px solid #e9e4dc; cursor: pointer; }
.search-result:first-child { border-top: 0; }
.search-result strong { display: block; font-size: 13px; }
.search-result small { color: var(--ink-2); }

.admin-login, .upload-form { display: grid; gap: 15px; }
label > span { display: block; margin-bottom: 7px; font-size: 12px; color: var(--ink-2); }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: #faf8f4; outline: none; }
input:focus, select:focus { border-color: #9bb7c5; box-shadow: 0 0 0 3px rgba(67,156,196,.10); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { margin: 0; color: var(--ink-2); font-size: 11px; line-height: 1.6; }
.drop-zone { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1.5px dashed #bfc9ce; border-radius: 16px; background: #f7fafb; cursor: pointer; text-align: center; }
.drop-zone.dragging { border-color: var(--blue); background: #eef7fa; }
.drop-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); font-size: 24px; }
.drop-zone strong { font-size: 14px; }
.drop-zone small { color: var(--ink-2); }
.upload-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.hidden { display: none !important; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; padding: 12px 16px; border-radius: 12px; color: white; background: #1f344f; box-shadow: 0 16px 45px rgba(20,30,45,.2); font-size: 13px; animation: toastIn .2s ease; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { order: 3; grid-column: 1 / -1; width: 100%; justify-content: center; overflow-x: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: .6fr 1.4fr; grid-template-rows: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .achievement-row { grid-template-columns: 90px 1fr 140px; }
  .achievement-row .status-dot { grid-column: 2 / -1; }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 18px, 1480px); }
  .site-header { top: 7px; margin-top: 7px; border-radius: 16px; }
  .brand small { display: none; }
  .brand strong { font-size: 15px; }
  .header-actions .quiet-btn { display: none; }
  .nav-link { padding: 8px 11px; }
  .app-main { padding-top: 30px; }
  .hero-main { padding: 34px 26px; min-height: 400px; }
  .hero h1 { font-size: 48px; }
  .hero-side { grid-template-columns: 1fr; }
  .visitor-grid { gap: 8px; }
  .visitor-grid strong { font-size: 23px; }
  .project-grid, .resource-grid, .two-col, .detail-grid { grid-template-columns: 1fr; }
  .achievement-row { grid-template-columns: 1fr; gap: 7px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 17px; }
  .file-row { grid-template-columns: 1fr auto; }
  .file-row .file-meta:nth-of-type(2), .file-row .file-meta:nth-of-type(3) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { flex-direction: column; gap: 4px; }
}
