/* ================================================
   Priest 个人主页 - Stylesheet
   严格还原 Ardot 画布设计稿的视觉细节
   ================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --bg: #0F0E0E;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --divider: rgba(255, 255, 255, 0.12);

  --text-primary: #F2F2F2;
  --text-secondary: #A8A8A8;
  --text-muted: #666666;
  --text-dark: #0F0E0E;

  --accent-gold: #E8C268;
  --accent-mint: #7DD9A6;

  /* Card gradients (5 unique project cards) */
  --grad-lottery: linear-gradient(45deg, #E8C268 0%, #E17148 100%);
  --grad-yijing: linear-gradient(45deg, #784594 0%, #C78C59 100%);
  --grad-liuren: linear-gradient(45deg, #33668C 0%, #73C2BF 100%);
  --grad-xmas: linear-gradient(45deg, #26804D 0%, #D9404D 100%);
  --grad-roguelike: linear-gradient(45deg, #4D2659 0%, #E65933 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing */
  --side: 80px;
  --section-v: 96px;
}

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

html, body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Page Layout ---------- */
.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* ================================================
   HEADER (64px)
   ================================================ */
.header {
  width: 100%;
  height: 64px;
  padding: 0 var(--side);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0;
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link--accent {
  color: var(--accent-gold);
}

.nav-link--accent:hover {
  color: var(--accent-gold);
  opacity: 0.8;
}

/* ================================================
   HERO (620px)
   ================================================ */
.hero {
  width: 100%;
  height: 620px;
  padding: 80px var(--side);
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 520px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}

.hero-kicker {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 2.4px;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 64px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 76px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 28px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 32px;
  background: #FFFFFF;
  color: var(--text-dark);
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.cta-secondary {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-gold);
  transition: opacity 0.2s ease;
}

.cta-secondary:hover {
  opacity: 0.8;
}

/* AI Badge (Hero) */
.ai-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 21px;
  padding: 0 12px;
  margin-top: 16px;
  background: rgba(125, 217, 166, 0.12);
  border: 1px solid rgba(125, 217, 166, 0.3);
  border-radius: 20px;
  gap: 0;
}

.ai-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mint);
  margin-right: 12px;
  box-shadow: 0 0 8px var(--accent-mint);
  animation: pulse 2s ease-in-out infinite;
}

.ai-badge-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-mint);
  letter-spacing: 0.3px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hero Visual */
.hero-visual {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

/* AI Neural Network SVG (decorative) */
.ai-network {
  position: absolute;
  top: 30px;
  left: 0;
  width: 200px;
  height: 180px;
  pointer-events: none;
  z-index: 1;
}

.ai-network .nn-dot {
  animation: nn-pulse 3s ease-in-out infinite;
}

.ai-network .nn-dot:nth-child(odd) {
  animation-delay: 1.5s;
}

@keyframes nn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hero glow (radial gold gradient) */
.hero-glow {
  position: absolute;
  top: -100px;
  right: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 194, 104, 0.18) 0%, rgba(232, 194, 104, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Deco Cards (Hero) */
.deco-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.deco-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.deco-card--top {
  width: 280px;
  height: 120px;
  align-self: flex-end;
  margin-right: 30px;
}

.deco-card--bottom {
  width: 340px;
  height: 120px;
  align-self: flex-start;
  margin-left: 30px;
}

.deco-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.deco-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 4px;
}

.deco-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ================================================
   ABOUT (372px)
   ================================================ */
.about {
  width: 100%;
  padding: var(--section-v) var(--side);
  display: flex;
  align-items: center;
  gap: 80px;
}

.about-divider {
  width: 1px;
  height: 180px;
  background: var(--divider);
  flex-shrink: 0;
}

.about-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-kicker {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 2.4px;
}

.about-title {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 40px;
}

.about-text {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 26px;
  max-width: 1025px;
}

/* ================================================
   PROJECTS (822px)
   ================================================ */
.projects {
  width: 100%;
  padding: 0 var(--side) var(--section-v);
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: relative;
}

.projects-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.projects-kicker {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 2.4px;
}

.projects-title {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 40px;
}

/* AI Chip Decoration (absolutely positioned) */
.ai-chip {
  position: absolute;
  top: -10px;
  right: -20px;
  width: 160px;
  height: 160px;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}

/* Projects Grid (5 cards: 3 in row 1, 2 in row 2) */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
  z-index: 1;
}

.card {
  width: calc((100% - 48px) / 3);
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
}

.card-image {
  width: 100%;
  height: 160px;
  border-radius: 24px 24px 0 0;
  opacity: 0.8;
}

.card-image--lottery   { background: var(--grad-lottery); }
.card-image--yijing    { background: var(--grad-yijing); }
.card-image--liuren    { background: var(--grad-liuren); }
.card-image--xmas      { background: var(--grad-xmas); }
.card-image--roguelike { background: var(--grad-roguelike); }

.card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 22px;
}

.card-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 22px;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-gold);
  margin-top: 2px;
}

/* AI Tag (in card body) */
.ai-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(125, 217, 166, 0.12);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-mint);
  letter-spacing: 0.3px;
}

/* View More Link */
.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  z-index: 1;
  position: relative;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.more-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 194, 104, 0.3);
  color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.more-link svg {
  transition: transform 0.3s ease;
}

.more-link:hover svg {
  transform: translateX(4px);
}

/* ================================================
   SECONDARY PAGE - PROJECTS
   ================================================ */

/* Page Hero (secondary page header) */
.page-hero {
  width: 100%;
  padding: 64px var(--side) 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  align-self: flex-start;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--accent-gold);
}

.back-link svg {
  transition: transform 0.3s ease;
}

.back-link:hover svg {
  transform: translateX(-4px);
}

.page-hero-kicker {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 2.4px;
}

.page-hero-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 56px;
  letter-spacing: -0.5px;
}

.page-hero-sub {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 28px;
  max-width: 600px;
}

/* Stats Row */
.page-hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 36px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--divider);
}

/* All Projects Section */
.projects-all {
  padding-top: 0;
}

/* Placeholder Card */
.card--placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.card--placeholder:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.card-image--placeholder {
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Secondary page responsive */
@media (max-width: 1024px) {
  .page-hero-title {
    font-size: 36px;
    line-height: 44px;
  }

  .stat-num {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .page-hero-title {
    font-size: 28px;
    line-height: 36px;
  }

  .page-hero-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 20px;
  }

  .stat-divider {
    height: 28px;
  }
}

/* ================================================
   FOOTER (385px)
   ================================================ */
.footer {
  width: 100%;
  padding: 80px var(--side) 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  position: relative;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}

.footer-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}

/* AI Footer Glow */
.ai-glow {
  width: 80px;
  height: 80px;
  pointer-events: none;
  opacity: 0.9;
  animation: glow-rotate 20s linear infinite;
}

@keyframes glow-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ================================================
   Responsive Adjustments
   ================================================ */
@media (max-width: 1024px) {
  :root {
    --side: 48px;
  }

  .hero {
    flex-direction: column;
    height: auto;
    padding: 64px var(--side);
    gap: 48px;
  }

  .hero-content {
    width: 100%;
  }

  .hero-title {
    font-size: 48px;
    line-height: 60px;
  }

  .deco-card--top {
    margin-right: 0;
  }

  .deco-card--bottom {
    margin-left: 0;
  }

  .ai-network {
    width: 140px;
    height: 120px;
  }

  .card {
    width: calc((100% - 24px) / 2);
  }

  .ai-chip {
    width: 110px;
    height: 110px;
    top: -10px;
    right: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --side: 24px;
    --section-v: 64px;
  }

  .header {
    padding: 0 var(--side);
  }

  .nav {
    gap: 16px;
  }

  .hero {
    padding: 48px var(--side);
  }

  .hero-title {
    font-size: 36px;
    line-height: 44px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-visual {
    align-items: center;
  }

  .deco-card--top,
  .deco-card--bottom {
    width: 100%;
    margin: 0;
  }

  .ai-network {
    display: none;
  }

  .about {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 48px var(--side);
  }

  .about-divider {
    width: 48px;
    height: 1px;
  }

  .about-title {
    font-size: 24px;
    line-height: 32px;
  }

  .card {
    width: 100%;
  }

  .projects-title {
    font-size: 24px;
    line-height: 32px;
  }

  .ai-chip {
    width: 80px;
    height: 80px;
    opacity: 0.6;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-links {
    gap: 24px;
  }
}