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

:root {
  --bg: #0a0a0b;
  --surface: #141415;
  --surface-2: #1c1c1e;
  --surface-3: #242426;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --accent: #e8553d;
  --teal: #30d5c8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg); color: var(--text-2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.7;
  min-height: 100vh; display: flex; flex-direction: column;
}

a { color: var(--teal); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ─── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
}
header .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--text-3); font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; transition: all 0.15s;
}
.nav a:hover { color: var(--text-2); background: var(--surface-2); opacity: 1; }
.nav a.active { color: var(--text); background: var(--surface-3); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 600; }
.logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #e8553d, #c4432d);
  display: grid; place-items: center;
}
.logo-icon svg { width: 14px; height: 14px; }

/* ─── Page Header ─── */
.page-header { padding: 48px 0 32px; }
.page-header h1 { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.page-header p { font-size: 14px; color: var(--text-3); margin-top: 8px; }

/* ─── Hero ─── */
.hero { padding: 72px 0 48px; text-align: center; position: relative; }
.hero::before {
  content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(232,85,61,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(232,85,61,0.08); border: 1px solid rgba(232,85,61,0.15);
}
.hero h1 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: 1.2; }
.hero p { font-size: 15px; color: var(--text-3); max-width: 460px; margin: 14px auto 0; }

/* ─── Grid (tools homepage) ─── */
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 48px;
}
@media (max-width: 768px) { .tools-grid { grid-template-columns: 1fr; } }
@media (min-width: 769px) and (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }

.tool-card {
  background: var(--surface); padding: 24px; display: flex; flex-direction: column;
  transition: background 0.15s; text-decoration: none; color: inherit;
}
.tool-card:hover { background: var(--surface-2); opacity: 1; }
.tool-card .top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.tool-card .icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border);
}
.tool-card .icon svg { width: 17px; height: 17px; opacity: 0.7; }
.tool-card .arrow { opacity: 0; transition: 0.15s; color: var(--text-3); transform: translate(-3px, 3px); }
.tool-card:hover .arrow { opacity: 1; transform: translate(0,0); }
.tool-card .name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.tool-card .desc { font-size: 12px; color: var(--text-3); flex: 1; margin-bottom: 14px; }
.tool-card .meta { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.tool-card .tag { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); }
.tool-card .ver { font-size: 10px; color: var(--text-3); font-family: 'SF Mono', monospace; }

/* ─── Article List ─── */
.article-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 48px; }
.article-item {
  background: var(--surface); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s; text-decoration: none; color: inherit; gap: 16px;
}
.article-item:hover { background: var(--surface-2); opacity: 1; }
.article-item .info { flex: 1; min-width: 0; }
.article-item .title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.article-item .excerpt { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-item .date { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ─── Content Page ─── */
.content { padding: 32px 0 64px; flex: 1; }
.content h1 { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin-bottom: 8px; }
.content .subtitle { font-size: 14px; color: var(--text-3); margin-bottom: 32px; }
.content h2 { font-size: 18px; font-weight: 600; color: var(--text); margin: 32px 0 12px; }
.content h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 24px 0 8px; }
.content p { margin-bottom: 14px; font-size: 14px; }
.content ul, .content ol { padding-left: 20px; margin-bottom: 14px; }
.content li { font-size: 14px; margin-bottom: 4px; }
.content pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; overflow-x: auto; margin-bottom: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; color: var(--text-2);
  line-height: 1.6;
}
.content code {
  background: var(--surface-3); padding: 2px 6px; border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; color: var(--teal);
}
.content pre code { background: none; padding: 0; color: inherit; }
.content .info-box {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 16px; margin-bottom: 16px; font-size: 13px;
}
.content .breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 20px; }
.content .breadcrumb a { color: var(--text-3); }
.content .breadcrumb a:hover { color: var(--text-2); }

/* ─── Section ─── */
.section-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.section-more { font-size: 12px; color: var(--text-3); margin-bottom: 16px; display: inline-block; }
.section-more:hover { color: var(--text-2); opacity: 1; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 48px auto; max-width: 160px; }

/* ─── Footer ─── */
footer { border-top: 1px solid var(--border); padding: 28px 0; text-align: center; margin-top: auto; }
footer p { font-size: 12px; color: var(--text-3); }
footer a { color: var(--text-3); }
footer a:hover { color: var(--text-2); opacity: 1; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; }

/* ─── Animations ─── */
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.anim { animation: fade-up 0.4s ease-out both; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.1s; } .d3 { animation-delay: 0.15s; }
.d4 { animation-delay: 0.2s; } .d5 { animation-delay: 0.25s; } .d6 { animation-delay: 0.3s; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .nav { gap: 2px; }
  .nav a { padding: 5px 8px; font-size: 12px; }
  .hero { padding: 48px 0 32px; }
  .content h1 { font-size: 22px; }
}
