/*
 * 內容頁（/projects/、/about/ 等）共用樣式。
 * 首頁 index.html 與 privacy.html 有各自的內嵌樣式，這份只給 scripts/build-pages.mjs 產生的頁面使用。
 */

body {
  background-color: #07070d;
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgb(255 43 214 / 0.12), transparent 60%),
    radial-gradient(50rem 35rem at -10% 20%, rgb(0 240 255 / 0.09), transparent 60%);
  background-attachment: fixed;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background: repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* 雙語區塊：依 <html lang> 只顯示目前語言（沒有 JavaScript 時顯示繁體中文） */
html[lang='en'] [data-lang-block='zh-TW'],
html:not([lang='en']) [data-lang-block='en'] {
  display: none !important;
}

.glass {
  background: linear-gradient(135deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgb(0 240 255 / 0.22);
}
.chamfer {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.chamfer-sm {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.text-glow-cyan {
  text-shadow: 0 0 8px rgb(0 240 255 / 0.8), 0 0 24px rgb(0 240 255 / 0.4);
}
.flicker:hover,
.flicker:focus-visible {
  animation: neon-flicker 1.4s linear infinite;
}
@keyframes neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; text-shadow: 0 0 6px currentColor, 0 0 18px currentColor; }
  20%, 24%, 55% { opacity: 0.45; text-shadow: none; }
}

/* 文章內文排版 */
.prose-cps h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #00f0ff;
}
.prose-cps h2::before {
  content: '// ';
  color: #ff2bd6;
  font-family: 'JetBrains Mono', monospace;
}
.prose-cps p,
.prose-cps li {
  color: #c9c9da;
  line-height: 1.9;
}
.prose-cps p { margin: 0.75rem 0; }
.prose-cps ul,
.prose-cps ol { margin: 0.5rem 0 0.5rem 0; padding-left: 0; }
.prose-cps ul { list-style: none; }
.prose-cps ol { list-style: none; counter-reset: step; }
.prose-cps li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; }
.prose-cps ul > li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: #00f0ff;
  font-family: 'JetBrains Mono', monospace;
}
.prose-cps ol > li { counter-increment: step; padding-left: 2.25rem; }
.prose-cps ol > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: #ff2bd6;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  top: 0.15em;
}
.prose-cps a {
  color: #f3ff3a;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.prose-cps strong { color: #e7e7f2; }
.prose-cps code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #00f0ff;
}
.prose-cps .meta-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #9a9ab3;
}

/* 專案卡片（總覽頁） */
.proj-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgb(14 14 24 / 0.96), rgb(7 7 13 / 0.96));
  border: 1px solid rgb(0 240 255 / 0.28);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.proj-card:hover {
  border-color: rgb(0 240 255 / 0.7);
  box-shadow: 0 0 24px rgb(0 240 255 / 0.15);
}

:focus-visible {
  outline: 2px solid #f3ff3a;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 專案頁的畫面擷取 */
.shots { display: grid; gap: 1.25rem; margin-top: 2rem; }
.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(0 240 255 / 0.28);
  background: #0e0e18;
}
.shot figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #9a9ab3;
}
