/* ==========================================================================
   AEDL (Actual Electronic Design Lab · 真实电子设计实验室)
   Design: Unified Typography, Clean Layout, Comfortable Font Scaling
   ========================================================================== */

:root {
  --bg-main: #FAFBFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-subtle-hover: #E2E8F0;
  
  --border: #E2E8F0;
  --border-hover: #CBD5E1;
  
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-sub: #94A3B8;
  
  --primary: #0F172A;
  --primary-hover: #1E293B;
  --accent: #2563EB;
  
  /* Unified Font Stack: No font mixing */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
  --font-mono: "Consolas", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  
  --max-w: 1160px;
  --header-h: 64px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Increased from 15px for comfortable readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* First Screen (Hero) - 100vh Full Viewport */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #FFFFFF;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.hero-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  width: 88%;
  pointer-events: none;
}

.hero-logo-img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.04));
}

/* Thin Divider */
.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
  width: 100%;
}

/* Section */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.4px;
  margin-bottom: 32px;
}

/* Overview Clean Section Layout */
.overview-block {
  margin-bottom: 42px;
}

.overview-block:last-child {
  margin-bottom: 0;
}

.overview-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-subtitle::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--text-main);
  border-radius: 2px;
}

.overview-text {
  font-size: 1.0rem;
  color: var(--text-body);
  line-height: 1.85;
  max-width: 1000px;
}

.overview-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 16px;
}

.text-col {
  display: flex;
  flex-direction: column;
}

.col-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.col-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.overview-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.facility-item {
  display: flex;
  flex-direction: column;
}

.facility-code {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.facility-name {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Article Cards */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-family);
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-date .date-val {
  font-family: "Consolas", var(--font-family);
  font-size: 0.84rem;
}

.article-date .tag-val {
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.5;
  transition: color 0.15s ease;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-link-text {
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 600;
}

.article-more-card {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 22px;
}

.article-more-card:hover {
  background: var(--bg-subtle-hover);
  border-color: var(--text-muted);
}

/* Service Cards */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 22px;
}

.service-url {
  font-size: 0.84rem;
  font-family: var(--font-mono);
  color: var(--text-sub);
}

/* Tools Toolbox */
.tools-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-input {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  width: 260px;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--text-main);
  width: 300px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 16px;
}

.tool-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.tool-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.tool-name {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tool-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Join Us Clean Link Block */
.join-block {
  max-width: 800px;
}

.join-text {
  font-size: 1.0rem;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 12px;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #FFFFFF;
  padding: 10px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  margin-top: 14px;
  transition: var(--transition);
}

.btn-join:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Footer */
.site-footer {
  padding: 40px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: #FFFFFF;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .overview-grid-3 {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .overview-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .overview-grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .search-input {
    width: 100%;
  }
}
