*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

:root {
  --bg: #09090f;
  --glass: rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #475569;
  --accent: #818cf8;
  --accent-bg: rgba(129,140,248,0.12);
  --r: 14px;
  --rs: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 60% at 5% 35%, rgba(103,88,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 95% 12%, rgba(20,184,166,0.08) 0%, transparent 50%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: 56px;
  padding: 0 max(24px, calc((100vw - 720px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(9,9,15,0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-size: 14px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text); text-decoration: none;
}
.nav-menu { display: flex; gap: 2px; list-style: none; }
.nav-menu a {
  display: block; padding: 6px 12px; border-radius: var(--rs);
  font-size: 13px; color: var(--text-2); text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text); background: var(--glass); }

/* ── LAYOUT ── */
.container { max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }

/* ── PAGE HEADER ── */
.ph { margin-bottom: 48px; }
.ph-label {
  display: inline-block; margin-bottom: 14px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg);
  padding: 4px 10px; border-radius: 6px;
}
.ph-title { font-size: 30px; font-weight: 700; letter-spacing: -0.7px; line-height: 1.25; margin-bottom: 10px; }
.ph-sub { font-size: 14px; color: var(--text-2); }

/* ── HOME ENTRY GRID ── */
.entry-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 52px; }
.entry-card {
  display: block; text-decoration: none;
  padding: 22px 18px;
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--r);
  transition: background .2s, border-color .2s, transform .22s;
}
.entry-card:hover { background: var(--glass-hover); border-color: var(--border-hover); transform: translateY(-2px); }
.entry-icon { font-size: 16px; margin-bottom: 14px; color: var(--accent); opacity: .7; }
.entry-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.entry-desc { font-size: 12px; color: var(--text-3); }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 14px;
}

/* ── POST LIST ── */
.post-list { display: flex; flex-direction: column; gap: 6px; }
.post-card {
  display: block; text-decoration: none; color: var(--text);
  padding: 18px 20px;
  background: var(--glass);
  border: 1px solid var(--border); border-radius: var(--r);
  transition: background .2s, border-color .2s;
}
.post-card:hover { background: var(--glass-hover); border-color: var(--border-hover); }
.post-meta { font-size: 12px; color: var(--text-3); margin-bottom: 8px; display: flex; gap: 10px; }
.post-title { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 7px; }
.post-excerpt {
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── ARTICLE ── */
.article-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  margin-bottom: 40px; background: none; border: none; padding: 0;
  text-decoration: none; transition: color .2s;
}
.article-back:hover { color: var(--text); }
.article-header { margin-bottom: 36px; }
.article-meta { font-size: 12px; color: var(--text-3); margin-bottom: 12px; display: flex; gap: 10px; }
.article-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.3; }
.article-body { font-size: 15px; line-height: 1.85; color: #cbd5e1; }
.article-body p { margin-bottom: 18px; }
.article-body h3 { font-size: 15px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 18px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body code {
  font-family: 'SF Mono', Menlo, monospace; font-size: 12px;
  background: var(--glass); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px; color: var(--accent);
}

/* ── DAILY ── */
.daily-group { margin-bottom: 36px; }
.daily-date-label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.daily-item {
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--border); border-radius: var(--r);
  margin-bottom: 6px;
  transition: background .15s, border-color .15s;
}
.daily-item:hover { background: var(--glass-hover); border-color: var(--border-hover); }
.daily-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.daily-item-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; flex: 1; }
.daily-item-link {
  flex-shrink: 0; font-size: 12px; color: var(--accent);
  text-decoration: none; opacity: .65; transition: opacity .2s; white-space: nowrap; margin-top: 1px;
}
.daily-item-link:hover { opacity: 1; }
.daily-item-summary { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }
.daily-item-meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.daily-tag {
  display: inline-block; font-size: 10px; padding: 1px 7px;
  border-radius: 4px; background: var(--glass); border: 1px solid var(--border); color: var(--text-3);
}

/* ── LOAD MORE ── */
.load-more-btn {
  display: block; width: 100%; margin-top: 16px;
  padding: 13px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text-2); font-size: 13px;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s; text-align: center;
}
.load-more-btn:hover { background: var(--glass-hover); border-color: var(--border-hover); color: var(--text); }
.load-more-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--glass) 0%, var(--glass-hover) 50%, var(--glass) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--r); margin-bottom: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.error-box {
  padding: 24px; text-align: center; color: var(--text-2); font-size: 14px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r);
}

/* ── FOOTER ── */
.footer {
  padding: 20px max(24px, calc((100vw - 720px) / 2));
  border-top: 1px solid var(--border);
  text-align: center; font-size: 12px; color: var(--text-3);
}
.footer a { color: var(--text-3); text-decoration: none; }
.footer a:hover { color: var(--text-2); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .entry-grid { grid-template-columns: 1fr; }
  .ph-title { font-size: 24px; }
  .container { padding: 36px 16px 80px; }
}
