:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --fg: #e8eaf0;
  --muted: #8b90a0;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --accent: #7cb7ff;
  --card: rgba(17, 20, 27, .72);
  --body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

#hero-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity .2s linear; }
main, .nav, .foot { position: relative; z-index: 2; }

/* nav */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(11, 13, 18, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  z-index: 50;
}
.logo { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.nav nav { display: flex; gap: 26px; font-size: 14px; }
.nav nav a { color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }
.kbar-btn { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: border-color .2s, color .2s; }
.kbar-btn:hover { border-color: var(--line-2); color: var(--fg); }
.kbar-btn .mono { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.07); }
@media (max-width: 820px) { .nav nav { display: none; } }

/* hero */
.hero { min-height: 92svh; display: flex; flex-direction: column; justify-content: center; padding: 130px max(16px, 6vw) 70px; max-width: 1400px; margin: 0 auto; }
.hero-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.status { width: 7px; height: 7px; border-radius: 50%; background: #6fdc8c; }
.hero-title { font-weight: 700; font-size: clamp(48px, 8.5vw, 120px); line-height: 1; letter-spacing: -.035em; }
.hero-role { display: block; margin-top: 18px; font-weight: 500; font-size: clamp(20px, 2.6vw, 34px); letter-spacing: -.02em; color: var(--muted); }
.hero-sub { max-width: 620px; margin-top: 28px; font-size: clamp(16px, 1.4vw, 19px); color: #b8bdcb; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 64px; max-width: 820px; border-top: 1px solid var(--line); }
.hero-stats div { padding: 18px 18px 0 0; }
.hero-stats b { display: block; font-weight: 600; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 10px; font-weight: 500; font-size: 15px; transition: background .2s, border-color .2s, color .2s; }
.btn i { font-style: normal; opacity: .7; }
.btn-primary { color: var(--bg); background: var(--fg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.05); }

/* sections */
.section { padding: 110px max(16px, 6vw) 20px; max-width: 1400px; margin: 0 auto; }
.section-head { margin-bottom: 40px; }
.kicker { font-size: 12px; color: var(--accent); display: block; margin-bottom: 14px; letter-spacing: .04em; }
.section h2 { font-weight: 600; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.03em; }
.section-head p { margin-top: 12px; max-width: 520px; }

/* featured */
.featured { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.holo { grid-column: span 4; border-radius: 16px; border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(10px); transition: border-color .25s, background .25s; }
.holo:nth-child(1), .holo:nth-child(2) { grid-column: span 6; }
.holo:hover { border-color: var(--line-2); background: rgba(22, 26, 35, .85); }
@media (max-width: 1000px) { .holo, .holo:nth-child(n) { grid-column: span 6; } }
@media (max-width: 640px) { .holo, .holo:nth-child(n) { grid-column: span 12; } }
.holo-inner { height: 100%; padding: 26px; display: flex; flex-direction: column; min-height: 260px; }
.holo-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.holo h3 { font-weight: 600; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; margin: 22px 0 10px; letter-spacing: -.02em; }
.holo p { color: #aeb3c2; font-size: 15px; flex: 1; }
.holo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: #c3c7d3; }
.holo-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); gap: 12px; flex-wrap: wrap; }
.holo-links { display: flex; gap: 16px; }
.holo-links a { color: var(--fg); }
.holo-links a:hover { color: var(--accent); }

/* toolbar + grid */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.search span, .kbar-input span { color: var(--muted); }
.search input, .kbar-input input { flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font: 15px var(--body); min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--fg); }
.chip.on { color: var(--fg); background: rgba(124,183,255,.12); border-color: rgba(124,183,255,.4); }
.sort { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12px; }
.sort button { padding: 8px 12px; color: var(--muted); }
.sort button.on { background: rgba(255,255,255,.07); color: var(--fg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.repo { position: relative; padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 8px; min-height: 160px; transition: border-color .25s, background .25s; }
.repo:hover { border-color: var(--line-2); background: rgba(22, 26, 35, .85); }
.repo h4 { font-family: var(--mono); font-weight: 500; font-size: 14.5px; word-break: break-word; padding-right: 44px; }
.repo p { color: var(--muted); font-size: 14px; flex: 1; }
.repo-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 0; }
.new-badge { position: absolute; top: 18px; right: 18px; font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(111,220,140,.4); color: #6fdc8c; }
.api-note { margin-top: 20px; font-size: 12px; }
.repo.skeleton, .post.skeleton { background: rgba(255,255,255,.03); }

/* stack */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.stack-card { padding: 26px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.stack-card .idx { font-size: 12px; color: var(--muted); }
.stack-card h3 { font-weight: 600; font-size: 20px; margin: 28px 0 10px; letter-spacing: -.015em; }
.stack-card p { color: var(--muted); font-size: 15px; }

/* posts */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 36px; }
.post { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); min-height: 280px; transition: border-color .25s; }
.post:not(.skeleton):hover { border-color: var(--line-2); }
.post-img { aspect-ratio: 16/9; background: var(--bg-2) center/cover; }
.post-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body time { font-size: 12.5px; color: var(--muted); }
.post-body h4 { font-weight: 600; font-size: 17px; line-height: 1.35; }
.post:hover h4 { color: var(--accent); }
.center { text-align: center; }

/* contact */
.contact { text-align: center; padding-bottom: 110px; }
.contact p { margin: 12px 0 30px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.socials a { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; transition: border-color .2s, color .2s; }
.socials a:hover { border-color: var(--line-2); color: var(--accent); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px max(16px, 6vw); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* command palette */
#kbar { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(5,6,9,.6); backdrop-filter: blur(4px); }
#kbar[hidden] { display: none; }
.kbar-panel { width: min(620px, 100%); border-radius: 14px; border: 1px solid var(--line-2); background: #12151c; box-shadow: 0 24px 80px rgba(0,0,0,.5); overflow: hidden; }
.kbar-input { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
#kbar-list { list-style: none; max-height: 50vh; overflow-y: auto; padding: 6px; }
#kbar-list li a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
#kbar-list li a small { color: var(--muted); font-size: 12px; white-space: nowrap; }
#kbar-list li.sel a { background: rgba(255,255,255,.06); }
.kbar-foot { display: flex; gap: 20px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* curator */
#curate { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,6,9,.7); backdrop-filter: blur(4px); }
#curate[hidden] { display: none; }
.curate-panel { width: min(860px, 100%); max-height: 90vh; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line-2); background: #12151c; overflow: hidden; }
.curate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line); }
.curate-head h3 { font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.curate-list { overflow-y: auto; padding: 8px 16px; }
.c-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.c-row b { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.c-row small { display: block; color: var(--muted); font-size: 13px; }
.c-row .new-badge { position: static; margin-left: 8px; }
.c-seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.c-seg button { padding: 6px 12px; font-size: 13px; color: var(--muted); }
.c-seg button.on[data-v="featured"] { background: rgba(124,183,255,.2); color: var(--fg); }
.c-seg button.on[data-v="auto"] { background: rgba(255,255,255,.08); color: var(--fg); }
.c-seg button.on[data-v="hidden"] { background: rgba(255,110,110,.18); color: var(--fg); }
.curate-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* reveal: a short, small fade only */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reduced .reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
