/* ════════════════════════════════
   projects.css — Deepin Projects page
════════════════════════════════ */

/* HERO */
#proj-hero {
  background: var(--blue);
  color: #fff;
  height: calc(100vh - 54px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 20px 90px;
  position: relative;
  overflow: hidden;
}
#proj-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.045) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
  pointer-events: none;
  overflow: hidden;
}
.proj-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1360px;
  padding: 0 12px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 0.7s ease both;
  margin: auto 0;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.6s ease both 0.1s;
}
#proj-hero p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.55);
  max-width: 440px;
  margin: 20px auto 0;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.6s ease both 0.3s;
}
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.35);
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 1;
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.hero-scroll span::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--yellow);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0% { top: -100%; } 100% { top: 100%; } }

/* PROJECT LIST */
#proj-list {
  padding: 60px 0 80px;
  background: var(--bg);
}
#proj-list .container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* PROJECT CARD */
.proj-card {
  border-bottom: 1.5px solid var(--border);
  transition: background 0.2s;
}
.proj-card:first-child { border-top: 1.5px solid var(--border); }
.proj-card:hover { background: var(--bg-alt); }

.proj-card-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
}

.proj-meta {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.proj-num {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
  opacity: 0.25;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  margin-top: 2px;
}

.proj-info { flex: 1; min-width: 0; }

.proj-info h2 {
  font-family: 'BBHBartle', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.proj-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
  max-width: 560px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  opacity: 0.6;
}

/* ACTION BUTTONS */
.proj-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  order: -1;
}

.btn-dl, .btn-gh, .btn-readme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-dl svg, .btn-gh svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-readme svg.chevron { width: 14px; height: 14px; transition: transform 0.2s; }
.btn-readme.active svg.chevron { transform: rotate(180deg); }

.btn-dl {
  background: var(--blue);
  color: #fff;
}
.btn-dl:hover { background: var(--blue-d); transform: translateY(-1px); }

.btn-gh {
  background: var(--bg-alt);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-gh:hover { border-color: var(--blue); color: var(--blue); }

.btn-readme {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-readme:hover, .btn-readme.active {
  color: var(--blue);
  border-color: var(--blue);
}

/* README DROPDOWN */
.proj-readme {
  border-top: 1px solid var(--border);
  padding: 28px 24px 28px 68px;
  animation: fadeUp 0.2s ease both;
}

.readme-body {
  max-width: 680px;
}

.readme-body h3 {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 20px 0 8px;
}
.readme-body h3:first-child { margin-top: 0; }

.readme-body p, .readme-body li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.readme-body ul {
  padding-left: 20px;
  margin: 0 0 8px;
}

.readme-body pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 12px 16px;
  overflow-x: auto;
  margin: 10px 0;
}

.readme-body code {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-alt);
  padding: 1px 5px;
}

.readme-body pre code {
  background: none;
  padding: 0;
}

.readme-body a {
  color: var(--blue);
  text-decoration: underline;
}



/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  #proj-hero { height: calc(100vh - 54px); min-height: 0; padding: 80px 20px 90px; }

  .proj-card-head { gap: 14px; padding: 18px 16px; }

  .proj-info h2 { font-size: 1.05rem; }

  .proj-meta { gap: 16px; width: 100%; min-width: 0; }
  .proj-info { overflow: hidden; }
  .proj-num { font-size: 1.8rem; width: 36px; opacity: 0.25; margin-top: 2px; }
  .proj-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .btn-dl, .btn-gh, .btn-readme {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .proj-readme { padding: 16px; }
  .proj-readme.proj-readme { padding-left: 16px; }
}

@media (max-width: 480px) {
  #proj-hero { padding: 60px 16px 80px; }
  .proj-card-head { padding: 16px 12px; }
  .proj-readme { padding: 12px; }
  .proj-meta { gap: 14px; }
  .proj-num { font-size: 1.6rem; width: 32px; opacity: 0.25; margin-top: 2px; }

  .btn-dl, .btn-gh, .btn-readme {
    font-size: 0.7rem;
    padding: 7px 8px;
    gap: 4px;
  }
  .btn-dl svg, .btn-gh svg, .btn-readme svg.chevron {
    width: 12px;
    height: 12px;
  }

  .tag {
    font-size: 0.6rem;
    padding: 2px 7px;
  }

  .proj-info h2 { font-size: 0.95rem; }
  .proj-info p { font-size: 0.85rem; }
}
