/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0077b6;
  --primary-light: #e6f3fa;
  --primary-dark: #023e8a;
  --text: #2b2d42;
  --text-gray: #555;
  --text-light: #888;
  --white: #fff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; }

.page-content { flex: 1; }

/* ===== Site Header ===== */
.site-header {
  background: linear-gradient(135deg, #023e8a 0%, #0077b6 40%, #00b4d8 100%);
  color: var(--white);
  text-align: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.site-header-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.site-header-sub {
  font-size: 1rem;
  opacity: 0.85;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .site-header { padding: 28px 20px; }
  .site-header-name { font-size: 1.5rem; }
  .site-header-sub { font-size: 0.9rem; }
}

/* ===== Home Hero ===== */
.hero {
  background: linear-gradient(135deg, #023e8a 0%, #0077b6 40%, #00b4d8 100%);
  color: var(--white);
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-btn {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 12px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.page-title-text {
  font-size: 1.8rem;
  color: var(--primary-dark);
  text-align: center;
  padding: 32px 24px 0;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-title-text { font-size: 1.4rem; padding: 24px 20px 0; }
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-buttons { gap: 10px; }
  .hero-buttons .hero-btn { padding: 10px 24px; font-size: 0.9rem; }
}

/* ===== Section ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.about-text .content {
  color: var(--text-gray);
  line-height: 1.9;
}

.about-text .content p { margin-bottom: 12px; }

.about-image {
  background: linear-gradient(135deg, var(--primary-light), #d4f0fc);
  border-radius: 12px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ===== Projects List ===== */
.projects-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.category-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.category-tag {
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-gray);
  transition: all 0.2s;
}

.category-tag:hover,
.category-tag.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.2s, padding-left 0.2s;
  border-radius: 6px;
}

.project-card:hover {
  background: var(--primary-light);
  padding-left: 32px;
}

.project-card-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-card-title::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.project-card-date {
  color: var(--text-light);
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: 24px;
}

/* ===== Project Detail ===== */
.detail-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* Rich text content */
.content h2 { color: var(--primary-dark); margin: 24px 0 12px; font-size: 1.3rem; }
.content h3 { color: var(--primary-dark); margin: 20px 0 10px; font-size: 1.1rem; }
.content p { margin-bottom: 12px; color: var(--text-gray); line-height: 1.9; }
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}
.content table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid #d0dde6;
  text-align: left;
}
.content table td {
  padding: 8px 14px;
  border: 1px solid var(--border);
}
.content table tr:nth-child(even) td {
  background: #f9fafc;
}
.content ul, .content ol { padding-left: 24px; margin-bottom: 12px; }
.content li { margin-bottom: 4px; color: var(--text-gray); }

/* Alignment */
.content .text-align-left { text-align: left; }
.content .text-align-center { text-align: center; }
.content .text-align-right { text-align: right; }
.content .text-align-justify { text-align: justify; }


/* ===== Attachments Box ===== */
.attachments {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  min-width: 240px;
  max-width: 340px;
  z-index: 50;
}

.attachments h3 {
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.attachments a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  font-size: 0.88rem;
  padding: 5px 0;
  transition: color 0.2s;
}

.attachments a:hover { color: var(--primary); }
.attachments a::before { content: '📎'; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ===== Back Home ===== */
.back-home {
  position: fixed;
  top: 16px;
  right: 24px;
  color: var(--text-gray);
  font-size: 0.9rem;
  z-index: 10;
  transition: color 0.2s;
}

.back-home:hover { color: var(--primary); }

@media (max-width: 768px) {
  .back-home { top: 10px; right: 12px; font-size: 0.82rem; }
  .hero { padding: 50px 20px 70px; }
  .hero h1 { font-size: 2rem; }
}

/* ===== Footer ===== */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 0;
  font-size: 0.9rem;
}

.beian {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.beian a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.beian a:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.beian-sep {
  margin: 0 6px;
  color: rgba(255,255,255,0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 48px 20px; }
  .project-card { padding: 16px 16px; }
  .detail-content { padding: 24px 16px 40px; }
  .attachments {
    position: static;
    max-width: none;
    margin: 16px;
  }
}
