/* Obsidian Black & Champagne Gold — Production Stylesheet (Zero External Dependencies) */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #09090b;
  color: #f5f2eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #f6e6b4;
}

.font-editorial {
  font-family: Georgia, "Noto Serif SC", "Songti SC", "SimSun", serif;
}

.font-tech {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }
}

.gold-text {
  background: linear-gradient(135deg, #f6e6b4 0%, #d4af37 52%, #a67c1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gold-border {
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.gold-border-strong {
  border: 1px solid rgba(212, 175, 55, 0.65);
}

.gold-hairline {
  height: 1px;
  max-width: 1152px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

/* Header & Scroll Progress */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #e5c158;
  transition: background-color 0.2s ease;
}

.brand:hover .brand-badge {
  background: rgba(212, 175, 55, 0.12);
}

.brand-title {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #e5c158;
}

.brand-sub {
  font-size: 11px;
  color: #8d887e;
  display: none;
}

@media (min-width: 640px) {
  .brand-sub {
    display: block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #a19d94;
}

@media (min-width: 640px) {
  .site-nav {
    gap: 32px;
  }
}

.site-nav a:hover {
  color: #e5c158;
}

.scroll-progress {
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #a67c1e, #f6e6b4, #d4af37);
  transition: width 0.08s linear;
}

/* Right Timeline Rail */
.timeline-rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-size: 11px;
}

@media (min-width: 1280px) {
  .timeline-rail {
    display: flex;
  }
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8d887e;
  transition: color 0.2s ease;
}

.rail-label {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rail-item:hover .rail-label,
.rail-item.active .rail-label {
  opacity: 1;
  color: #e5c158;
}

.rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.6);
  background: #09090b;
  transition: all 0.28s ease;
}

.rail-item.active .rail-dot {
  background: #d4af37;
  border-color: #f6e6b4;
  transform: scale(1.45);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.75);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 96px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.hero-m3-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("./assets/hero-m3.jpg");
  background-size: cover;
  background-position: center 68%;
  filter: grayscale(88%) contrast(1.22) brightness(0.38);
  transform: scale(1.05);
  will-change: transform;
  transition: transform 0.12s ease-out;
  pointer-events: none;
}

.hero-scrim-v {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.8) 0%, rgba(9, 9, 11, 0.55) 55%, #09090b 100%);
  pointer-events: none;
}

.hero-scrim-r {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(212, 175, 55, 0.12), transparent 55%);
  pointer-events: none;
}

.hero-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.65;
}

.hero-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 8fr 4fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(18, 18, 22, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.28);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #d4af37;
}

.ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4af37;
  animation: pulseDot 1.8s ease-in-out infinite;
}

.hero-title {
  margin: 20px 0 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 46px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 56px;
  }
}

.hero-subtitle {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #e7e2d8;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 32px;
  }
}

.hero-desc {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: 14px;
  color: #a19d94;
}

@media (min-width: 640px) {
  .hero-desc {
    font-size: 16px;
  }
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-gold {
  position: relative;
  overflow: hidden;
  padding: 12px 24px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #d4af37, #b58c24);
  color: #09090b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn-gold:hover {
  filter: brightness(1.1);
}

.btn-gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  animation: shimmerSweep 3.4s ease-in-out infinite;
}

.btn-outline-gold {
  padding: 12px 24px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.65);
  color: #e5c158;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.1);
}

.stats-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (min-width: 1024px) {
  .stats-col {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.28);
  backdrop-filter: blur(8px);
}

.stat-val {
  font-size: 22px;
  font-weight: 700;
}

@media (min-width: 640px) {
  .stat-val {
    font-size: 30px;
  }
}

.stat-label {
  font-size: 12px;
  color: #a19d94;
  margin-top: 4px;
}

.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(212, 175, 55, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: scrollFloat 2s ease-in-out infinite;
  z-index: 10;
}

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

@media (min-width: 640px) {
  .section-block {
    padding: 96px 0;
  }
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.section-header-bordered {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

@media (min-width: 768px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #d4af37;
  text-transform: uppercase;
}

.section-title {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: #f5f2eb;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 30px;
  }
}

.section-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: #a19d94;
}

/* Era Controls & Stage */
.era-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #121216;
  color: #a19d94;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  color: #e5c158;
}

.pill-btn.active {
  background: #d4af37;
  color: #09090b;
  border-color: #d4af37;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

.autoplay-btn {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: transparent;
  color: #e5c158;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.autoplay-btn:hover,
.autoplay-btn.running {
  background: rgba(212, 175, 55, 0.16);
}

.stage-card {
  border-radius: 16px;
  background: #111115;
  border: 1px solid rgba(212, 175, 55, 0.28);
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .stage-card {
    padding: 40px;
  }
}

.stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .stage-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.blueprint-box {
  background: #0b0b0e;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  padding: 24px;
}

.blueprint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #d4af37;
  margin-bottom: 12px;
}

.status-pill {
  padding: 2px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #e5c158;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blueprint-bottom {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8d887e;
}

.sys-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sys-title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: #f5f2eb;
}

@media (min-width: 640px) {
  .sys-title {
    font-size: 30px;
  }
}

.sys-tagline {
  margin: 4px 0 0;
  font-size: 14px;
  color: #e5c158;
}

.sys-summary {
  margin: 0;
  font-size: 14px;
  color: #a19d94;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-box {
  padding: 12px;
  border-radius: 8px;
  background: #0b0b0e;
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.metric-v {
  font-size: 14px;
  font-weight: 700;
  color: #f5f2eb;
}

.metric-k {
  font-size: 11px;
  color: #8d887e;
  margin-top: 2px;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #1a1a20;
  color: #e7e2d8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.arrow-group {
  display: flex;
  gap: 8px;
}

.circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: transparent;
  color: #a19d94;
  cursor: pointer;
  transition: all 0.2s ease;
}

.circle-btn:hover {
  color: #e5c158;
  border-color: #d4af37;
}

.mini-strip {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .mini-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mini-card {
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #111115;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-card:hover {
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-2px);
}

.mini-card.active {
  background: #171612;
  border-color: rgba(212, 175, 55, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.12);
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  border-radius: 16px;
  background: #111115;
  border: 1px solid rgba(212, 175, 55, 0.28);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-card:hover {
  border-color: rgba(212, 175, 55, 0.65);
  transform: translateY(-4px);
}

.team-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #e5c158;
}

.team-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #09090b;
  color: #d6d0c4;
  border: 1px solid rgba(212, 175, 55, 0.28);
}

/* Blog List */
.blog-list {
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.blog-row {
  position: relative;
  padding: 20px 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.blog-row:last-child {
  border-bottom: none;
}

.blog-row:hover {
  background: #121216;
}

@media (min-width: 768px) {
  .blog-row {
    grid-template-columns: 3fr 7fr 2fr;
    align-items: center;
  }
}

.blog-bar {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #d4af37;
  transform: scaleY(0);
  transition: transform 0.22s ease;
}

.blog-row:hover .blog-bar {
  transform: scaleY(1);
}

.blog-content {
  transition: transform 0.2s ease;
}

.blog-row:hover .blog-content {
  transform: translateX(6px);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #8d887e;
}

.blog-cat {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #e5c158;
}

.blog-read {
  font-size: 12px;
  color: #d4af37;
}

@media (min-width: 768px) {
  .blog-read {
    text-align: right;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  background: #070709;
  padding: 32px 0;
  font-size: 12px;
  color: #8d887e;
}

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

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a:hover {
  color: #e5c158;
}

/* Reader Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 672px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px;
  background: #121216;
  border: 1px solid rgba(212, 175, 55, 0.65);
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
}

/* Animations & Motion Effects */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drawBlueprint {
  0% { stroke-dashoffset: 620; opacity: 0.25; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes flowDash {
  to { stroke-dashoffset: -40; }
}

@keyframes shimmerSweep {
  0% { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(220%) skewX(-18deg); }
}

@keyframes scrollFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

.animate-chapter {
  animation: fadeSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.svg-blueprint rect,
.svg-blueprint circle,
.svg-blueprint polygon,
.svg-blueprint line {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: drawBlueprint 1.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.svg-blueprint path {
  stroke-dasharray: 6 4;
  animation: flowDash 1.6s linear infinite;
}

.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, -240px) var(--my, -240px),
    rgba(212, 175, 55, 0.13),
    transparent 65%
  );
  pointer-events: none;
}
