/*
  我家毛孩子的日常 - 纯静态样式
  - 不使用任何外部资源/字体/CDN
  - 尽量使用原生 CSS 完成布局与交互
*/

:root {
  --bg: #0f1115;
  --panel: #171923;
  --text: #e6e8f0;
  --muted: #aab2c5;
  --brand: #ff9f1c;
  --brand-2: #ff6b6b;
  --line: #2b3040;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, PingFang SC, Noto Sans CJK SC, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, #1a1f2f, transparent),
              radial-gradient(900px 900px at -10% 20%, #1d2133, transparent),
              var(--bg);
}

.wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,17,21,.7);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; }
.brand .logo { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.brand-text { font-weight: 700; letter-spacing: .02em; }
.nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; }
.nav a:hover { color: var(--text); }

/* Hero */
/* Hero slider + copy split layout */
.hero { position: relative; padding: 32px 0; }
.hero .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-slider { height: auto; }
.slides { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.slide { position: absolute; inset: 0; opacity: 0; animation: slideShow 48s infinite; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.05) saturate(1.05); border-radius: inherit; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.18)); }

/* 5 slides with staggered delays */
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 6s; }
.slide:nth-child(3) { animation-delay: 12s; }
.slide:nth-child(4) { animation-delay: 18s; }
.slide:nth-child(5) { animation-delay: 24s; }
.slide:nth-child(6) { animation-delay: 30s; }
.slide:nth-child(7) { animation-delay: 36s; }
.slide:nth-child(8) { animation-delay: 42s; }

@keyframes slideShow {
  0% { opacity: 0; }
  3% { opacity: 1; }
  17% { opacity: 1; }
  20% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .slide { animation: none; opacity: 0; }
  .slide:nth-child(1) { opacity: 1; }
}

/* Hero copy */
.hero-copy h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 .5rem; }
.hero-copy .lead { color: var(--muted); margin: 0 0 1.2rem; }
.hero-copy .caption h3 { margin: .2rem 0; font-size: 18px; }
.hero-copy .caption p { margin: .3rem 0 1rem; color: var(--muted); }
/* Buttons (kept for possible future use) */
.btn {
  display: inline-block; padding: .7rem 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111; font-weight: 700; text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.05); }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 70%); }
.section h2 { margin: 0 0 .8rem; font-size: clamp(22px, 3.2vw, 28px); }
.section-tip { color: var(--muted); margin: 0 0 1rem; }

/* Grid gallery */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { display: block; border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.card img { width: 100%; height: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.card:hover img { transform: scale(1.02); transition: transform .25s ease; }

/* Lightbox via :target */
.lightbox { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,.72); z-index: 100; padding: 20px; }
.lightbox:target { display: grid; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; max-width: min(92vw, 1200px); }
.lightbox img { max-width: 100%; max-height: 70vh; border-radius: 16px; box-shadow: var(--shadow); }
.lightbox-info {
  background: rgba(23, 25, 35, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  margin-top: 15px;
  text-align: center;
  min-width: 300px;
  border: 1px solid var(--line);
}
.lightbox-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
}
.lightbox-desc {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.5;
}
.lightbox-date {
  font-size: 14px;
  color: var(--muted);
}
.lightbox .close { position: fixed; inset: 0; display: block; }

/* Timeline */
.timeline { position: relative; margin-top: 10px; padding-left: 22px; border-left: 2px solid var(--line);
  max-height: 50vh; overflow: auto; padding-right: 10px; overscroll-behavior: contain; }
.timeline .item { position: relative; margin: 20px 0 24px; padding-left: 6px; }
.timeline .item::before {
  content: ""; position: absolute; left: -30px; top: .45em; width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 4px rgba(255,255,255,.04);
}
.timeline h3 { margin: 0 0 .2rem; font-size: 18px; }
.timeline time { color: var(--muted); font-size: 13px; }
.timeline p { margin: .5rem 0 0; color: var(--text); opacity: .95; }

/* Custom scrollbar for timeline */
.timeline { scrollbar-width: thin; scrollbar-color: #3a4054 #141820; }
.timeline::-webkit-scrollbar { width: 10px; }
.timeline::-webkit-scrollbar-track { background: #141820; border-radius: 10px; }
.timeline::-webkit-scrollbar-thumb { background: #3a4054; border-radius: 10px; }
.timeline::-webkit-scrollbar-thumb:hover { background: #4a5066; }

/* About */
.about { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; text-align: center; } }

/* Avatar style */
.avatar { width: 180px; aspect-ratio: 1 / 1; border-radius: 50%; padding: 4px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
}
@media (max-width: 800px) { .avatar { margin: 0 auto; } }
.about-img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; background: var(--panel); }
.about-text p { margin: 0 0 .9rem; color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); background: rgba(0,0,0,.2); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
