:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --ink: #1f2733;
  --ink-soft: #586071;
  --ink-faint: #9098a8;
  --line: #e7ebf2;
  --line-strong: #d6dce8;
  --accent: #4a6cf7;
  --accent-soft: #eef2ff;
  --shadow: 0 1px 2px rgba(28, 40, 64, .05);
  --shadow-md: 0 4px 14px rgba(28, 40, 64, .07);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

.icon-sprite { position: absolute; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ---------- Header ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.hero-avatar {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 22px; letter-spacing: .5px;
  color: #fff;
  /* background: var(--accent); */
  flex-shrink: 0;
}
.hero-avatar > img {
  width: 60px; height: 60px;
  border-radius: 30px;
}
.hero-text { min-width: 0; }
.hero h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero .tagline {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.hero .subtitle {
  margin: 2px 0 0;
  color: var(--ink-faint);
  font-size: 13.5px;
}
.hero-links {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-left: auto;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pill svg { width: 15px; height: 15px; }

/* ---------- Sections ---------- */
.section { margin-top: 52px; }
.section-head { margin-bottom: 18px; }
.section-head h2 {
  margin: 0;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-faint);
}
.section-head p { margin: 5px 0 0; color: var(--ink-faint); font-size: 13.5px; }

/* ---------- Project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }

.card-top { display: flex; align-items: center; gap: 13px; }
.logo {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  /* background: var(--card-accent, var(--accent)); */
  /* border: 1px solid rgba(144, 152, 168, 0.1); */
  color: #dadada; font-weight: 700; font-size: 16px;
  overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.card-title { min-width: 0; }
.card-title h3 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.tag {
  font-size: 11px; font-weight: 600; color: var(--ink-soft);
  background: var(--accent-soft);
  padding: 2px 8px; border-radius: 6px;
}
.card-desc {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 14px; line-height: 1.55;
  flex: 1;
}

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  transition: color .15s, border-color .15s, background .15s;
}
.link-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.link-btn svg { width: 14px; height: 14px; }

.children {
  margin-top: 16px; padding-top: 15px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 7px;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: color .15s, border-color .15s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip svg { width: 12px; height: 12px; opacity: .65; }

/* ---------- Articles ---------- */
.articles { display: flex; flex-direction: column; gap: 10px; }
.article {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.article:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.article-date {
  flex-shrink: 0; width: 52px; text-align: center;
  line-height: 1.1;
}
.article-date .d { font-size: 18px; font-weight: 700; }
.article-date .m { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--ink-faint); letter-spacing: .06em; }
.article-sep { width: 1px; align-self: stretch; background: var(--line); }
.article-body { flex: 1; min-width: 0; }
.article-topic {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.article-title { font-size: 15px; font-weight: 600; margin-top: 2px; line-height: 1.4; }
.article-arrow { flex-shrink: 0; color: var(--ink-faint); }
.article:hover .article-arrow { color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-faint); font-size: 13px;
}
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------- Error state ---------- */
.notice {
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); color: var(--ink-soft); font-size: 14px; line-height: 1.6;
}
.notice code {
  background: var(--accent-soft); padding: 2px 7px; border-radius: 6px;
  font-size: 13px; color: var(--ink);
}

@media (max-width: 720px) {
  .wrap { padding: 40px 18px 72px; }
  .grid { grid-template-columns: 1fr; }
  .hero-links { margin-left: 0; width: 100%; }
  .hero h1 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
