/* ===== CLDMT — Design System v2 · 品红光爆主题 ===== */

/* --- Variables --- */
:root {
  --c-primary: #4a0e3a;
  --c-primary-l: #6b1854;
  --c-accent: #e91e63;
  --c-accent-l: #ff4081;
  --c-accent-bg: rgba(233,30,99,.1);
  --c-bg: #0c0918;
  --c-bg-alt: #140f28;
  --c-card: rgba(28,18,55,.75);
  --c-card-border: rgba(233,30,99,.2);
  --c-text: #ede8f2;
  --c-text-2: #a89bbe;
  --c-border: rgba(255,255,255,.1);
  --c-success: #38a169;
  --c-warning: #dd6b20;
  --c-anlogic: #7c4dff;
  --c-xilinx: #ff5252;
  --c-wtmec: #00bfa5;
  --c-glow: rgba(233,30,99,.45);
  --shadow-s: 0 1px 4px rgba(0,0,0,.3);
  --shadow-m: 0 4px 12px rgba(0,0,0,.35);
  --shadow-l: 0 10px 30px rgba(0,0,0,.4), 0 0 24px var(--c-glow);
  --r: 10px;
  --max-w: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  background-image: radial-gradient(ellipse at 20% 0%, rgba(120,20,80,.3) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 100%, rgba(233,30,99,.15) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--c-accent-l); text-decoration: none; transition: color .15s; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }

/* --- Container --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem; }

/* ========== Site Header ========== */
.site-header {
  background: rgba(13,11,26,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233,30,99,.18);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-m);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
  height: 56px;
}
.site-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: .5px;
}
.site-logo:hover { text-decoration: none; opacity: .9; }
.site-nav a {
  color: rgba(255,255,255,.85);
  margin-left: 1.5rem;
  font-size: .9rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

/* ========== Hero (Home) ========== */
.hero {
  background: radial-gradient(ellipse at 50% 60%, rgba(255,100,120,.35) 0%, rgba(200,30,100,.2) 30%, rgba(80,10,60,.3) 55%, #0c0918 80%);
  color: #fff;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,180,120,.18) 0%, transparent 45%),
              radial-gradient(circle at 30% 50%, rgba(140,40,200,.12) 0%, transparent 40%),
              radial-gradient(circle at 70% 45%, rgba(233,30,99,.15) 0%, transparent 35%);
  animation: hero-glow 10s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 55%, transparent 0deg, rgba(255,200,160,.03) 2deg, transparent 4deg);
  pointer-events: none;
}
@keyframes hero-glow {
  0% { opacity: .8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.03); }
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: .6rem;
  letter-spacing: 2px;
  position: relative;
  background: linear-gradient(90deg, #fff 0%, #ffb6c1 40%, #ff4081 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(233,30,99,.3);
}
.hero-desc {
  font-size: 1.15rem;
  opacity: .82;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.hero-scroll {
  margin-top: 2.5rem;
  font-size: .85rem;
  opacity: .45;
  letter-spacing: 1px;
  position: relative;
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(6px); opacity: .7; }
}

/* ========== Column Hero ========== */
.column-hero {
  background: linear-gradient(135deg, #0c0918 0%, #300a38 50%, #4a0e3a 100%);
  color: #fff;
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid rgba(233,30,99,.18);
}
.column-hero .container { padding-top: .5rem; padding-bottom: 0; }
.column-hero h1 { font-size: 1.85rem; font-weight: 800; margin: .4rem 0 .25rem; }
.column-hero p { opacity: .88; font-size: 1rem; }
.column-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.column-hero .breadcrumb .sep,
.column-hero .breadcrumb > span:last-child { color: rgba(255,255,255,.5); }

/* ========== Breadcrumb ========== */
.breadcrumb {
  font-size: .85rem;
  color: var(--c-text-2);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--c-accent); }
.breadcrumb .sep { margin: 0 .35rem; color: var(--c-border); }

/* ========== Section Title ========== */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f0e6f6;
  margin: 2.5rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--c-accent);
  text-shadow: 0 0 12px rgba(233,30,99,.2);
  display: inline-block;
}

/* ========== Card Grid ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* ========== Card ========== */
.card {
  background: var(--c-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--r);
  padding: 1.5rem;
  box-shadow: var(--shadow-s);
  border: 1px solid var(--c-card-border);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-l);
  border-color: var(--c-accent);
}
.card--accent-left { border-left: 4px solid var(--c-accent); }
.card--anlogic { border-top: 4px solid var(--c-anlogic); border-left: none; }
.card--xilinx  { border-top: 4px solid var(--c-xilinx);  border-left: none; }
.card--wtmec   { border-top: 4px solid var(--c-wtmec);   border-left: none; }
.card--ai      { border-top: 4px solid #e040fb; border-left: none; }
.card--robot   { border-top: 4px solid #00e5ff; border-left: none; }
.card--chip    { border-top: 4px solid #ffab40; border-left: none; }

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0e6f6;
  margin: 0 0 .4rem;
}
.card h4 {
  font-size: .95rem;
  font-weight: 600;
  color: #c9b8d8;
  margin: 0 0 .5rem;
}
.card p {
  font-size: .88rem;
  color: var(--c-text-2);
  margin: 0;
  line-height: 1.6;
}
.card .tag {
  display: inline-block;
  font-size: .72rem;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  padding: .15rem .55rem;
  border-radius: 3px;
  margin-top: .65rem;
  font-weight: 500;
}

/* Feature card */
.card--feature { padding: 2rem 1.5rem; text-align: center; }
.card--feature .card-icon { font-size: 2.25rem; margin-bottom: .5rem; }
.card--feature h3 { font-size: 1.25rem; margin-bottom: .5rem; }

/* Link card */
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; color: inherit; }
a.card h3 { transition: color .15s; }
a.card:hover h3 { color: var(--c-accent); }

/* Coming soon */
.card--coming {
  opacity: .55;
  border-style: dashed;
  pointer-events: none;
}
.card--coming:hover { transform: none; box-shadow: var(--shadow-s); }

/* ========== Doc List ========== */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--c-border);
  transition: background .15s;
}
.doc-list li:last-child { border-bottom: none; }
.doc-list li:hover { background: var(--c-accent-bg); }
.doc-list li { border-bottom-color: var(--c-border); }
.doc-list a { font-weight: 500; }

/* ========== Badge ========== */
.badge {
  display: inline-block;
  font-size: .7rem;
  padding: .1rem .45rem;
  border-radius: 3px;
  font-weight: 600;
  margin-left: .4rem;
  vertical-align: middle;
  background: rgba(255,255,255,.06);
  color: var(--c-text-2);
}
.badge--new    { background: rgba(56,161,105,.2); color: #68d391; }
.badge--coming { background: rgba(221,107,32,.15); color: #f6ad55; }
.badge--hot    { background: rgba(233,30,99,.2); color: #ff80ab; }

/* ========== Article ========== */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--c-border);
}
.article-header h1 {
  font-size: 1.85rem;
  color: #f0e6f6;
  margin-bottom: .4rem;
  line-height: 1.3;
}
.article-meta { font-size: .85rem; color: var(--c-text-2); }
.article-tags { margin-top: .5rem; }
.article-tags .tag { margin-right: .35rem; }

.article-content h1 { font-size: 1.65rem; color: #f0e6f6; margin-top: 2.5rem; }
.article-content h2 {
  font-size: 1.4rem;
  color: #e0c8f0;
  margin-top: 2.25rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid rgba(233,30,99,.22);
}
.article-content h3 { font-size: 1.15rem; color: #c9b8d8; margin-top: 1.75rem; }
.article-content h4 { font-size: 1rem; color: var(--c-text); margin-top: 1.5rem; }
.article-content p { margin: .75rem 0; }
.article-content ul, .article-content ol { margin: .5rem 0; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .88rem;
  overflow-x: auto;
  display: block;
}
.article-content th, .article-content td {
  padding: .55rem .75rem;
  border: 1px solid var(--c-border);
  text-align: left;
}
.article-content th {
  background: rgba(74,14,58,.75);
  color: #f0e6f6;
  font-weight: 600;
  white-space: nowrap;
}
.article-content tr:nth-child(even) { background: rgba(22,18,42,.5); }
.article-content tr:hover { background: var(--c-accent-bg); }

.article-content code {
  background: var(--c-bg-alt);
  padding: .12rem .35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .85em;
}
.article-content pre {
  background: #0a0818;
  color: #e0dce8;
  border: 1px solid rgba(233,30,99,.15);
  padding: 1.25rem;
  border-radius: var(--r);
  overflow-x: auto;
  margin: 1rem 0;
}
.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: .88rem;
}
.article-content blockquote {
  border-left: 4px solid var(--c-accent);
  background: var(--c-accent-bg);
  padding: .75rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--r) var(--r) 0;
}
.article-content blockquote p { margin: .25rem 0; color: #c9b8d8; }
.article-content img {
  border-radius: var(--r);
  margin: 1rem 0;
  box-shadow: var(--shadow-s);
}
.article-content hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2rem 0;
}

/* ========== Back Nav ========== */
.back-nav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 1.25rem;
  font-size: .9rem;
}

/* ========== Footer ========== */
.site-footer {
  background: #08061a;
  border-top: 1px solid rgba(233,30,99,.18);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-size: .85rem;
  line-height: 1.8;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: .15rem 0; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero { padding: 4rem 1rem 3rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero-desc { font-size: 1rem; }
  .column-hero h1 { font-size: 1.4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid--2 { grid-template-columns: 1fr; }
  .header-inner { height: 50px; }
  .site-nav a { margin-left: .75rem; font-size: .82rem; }
  .container { padding: 1.25rem 1rem; }
  .section-title { font-size: 1.15rem; }
  .article-header h1 { font-size: 1.4rem; }
  .article-content table { font-size: .82rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== Print ========== */
@media print {
  .site-header, .site-footer, .back-nav, .breadcrumb { display: none; }
  .hero, .column-hero { background: none !important; color: #222; padding: 1rem 0; }
  body { background: #fff; color: #222; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
