:root {
  --bg: #0b0f14;
  --surface: #10151d;
  --surface-2: #151b25;
  --border: #1f2a37;
  --text: #e6eaf0;
  --muted: #94a3b8;
  --accent: #4e8ff0;
  --accent-dim: rgba(78, 143, 240, 0.14);
  --radius: 14px;
  --max-w: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #8fb9f7 0%, #4e8ff0 55%, #3b7bec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #04121a;
}

.brand small {
  color: var(--muted);
  font-weight: 600;
}

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

.nav a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav a.active {
  color: var(--text);
  background: var(--accent-dim);
}

.lang-switch {
  margin-left: 12px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  transition: border-color 0.2s, color 0.2s;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 104px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #8fb9f7, #4e8ff0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 36px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(78, 143, 240, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 6px 32px rgba(78, 143, 240, 0.45);
}

.btn.ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-2);
}

.btn.ghost:hover {
  border-color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-head .more {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.section-head .more:hover {
  text-decoration: underline;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

a.card:hover {
  border-color: rgba(78, 143, 240, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--accent-dim);
  border: 1px solid rgba(78, 143, 240, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card .card-desc {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.tag.accent {
  color: var(--accent);
  border-color: rgba(78, 143, 240, 0.35);
  background: var(--accent-dim);
}

/* ---------- Contact strip ---------- */
.contact-strip {
  margin-top: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.contact-item:hover {
  border-color: rgba(78, 143, 240, 0.45);
  transform: translateY(-2px);
}

.contact-item .ci-label {
  font-size: 13px;
  color: var(--muted);
}

.contact-item .ci-value {
  font-weight: 600;
  font-size: 15px;
  word-break: break-all;
}

/* ---------- Project page ---------- */
.project-hero {
  padding: 64px 0 40px;
}

.project-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.project-title-row h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.badge.status {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge.accent {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(78, 143, 240, 0.35);
}

.project-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 700px;
  margin-bottom: 28px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.download-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.download-item:hover {
  border-color: rgba(78, 143, 240, 0.45);
  transform: translateY(-2px);
}

.download-item .di-tags {
  margin-top: 4px;
}

.download-item .di-note {
  font-size: 12.5px;
  color: var(--muted);
}

.download-item .di-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-item .di-desc {
  font-size: 13.5px;
  color: var(--muted);
}

.feat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  list-style: none;
}

.feat-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14.5px;
}

.feat-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  margin-right: 10px;
}

.coming-soon {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.coming-soon .cs-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.coming-soon h3 {
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
}

.about-block h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.about-block p {
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 72px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 72px 0 48px;
  }

  .nav a {
    padding: 8px 10px;
    font-size: 14px;
  }

  .lang-switch {
    margin-left: 6px;
    padding: 6px 9px;
  }

  .section {
    padding: 40px 0;
  }
}

::selection {
  background: rgba(78, 143, 240, 0.35);
}

/* ---------- Featured project ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.featured-grid:hover {
  border-color: rgba(78, 143, 240, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.featured-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.featured-info .card-desc {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

/* ---------- Phone screenshot frame ---------- */
.phone-frame {
  width: 250px;
  background: #0e131a;
  border: 1px solid rgba(141, 158, 178, 0.2);
  border-radius: 30px;
  padding: 9px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.phone-frame::before {
  content: "";
  display: block;
  width: 84px;
  height: 18px;
  margin: 0 auto 8px;
  background: rgba(141, 158, 178, 0.14);
  border-radius: 999px;
}

.phone-frame img {
  display: block;
  width: 100%;
  border-radius: 20px;
}

.shot-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.shot-item {
  text-align: center;
}

.shot-item .shot-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Support matrix ---------- */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.matrix-table th,
.matrix-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}

.matrix-table thead th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.matrix-table tbody tr:last-child td {
  border-bottom: none;
}

.matrix-table td.ok {
  color: #34d399;
  font-weight: 600;
}

.matrix-table td.warn {
  color: #fbbf24;
  font-weight: 600;
}

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: 72px 0 40px;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--muted);
  max-width: 640px;
  font-size: 1.02rem;
}

/* ---------- Project meta grid ---------- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.meta-item .mi-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.meta-item .mi-value {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Mini project card (list page) ---------- */
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: rgba(78, 143, 240, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.project-card .pc-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.project-card .pc-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  overflow: hidden;
  flex-shrink: 0;
}

.project-card .pc-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.project-card .pc-tags {
  margin-bottom: 10px;
}

.project-card .pc-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.project-card .pc-more {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 860px) {
  .featured-grid {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .phone-frame {
    margin: 0 auto;
  }
}