/* fixed dark palette (carried over from the original site) */
:root {
  --bg: #333333;
  --fg: #ffffff;
  --muted: #cccccc;
  --link: #cc99ff;
  --border: rgba(255, 255, 255, 0.12);
  --surface: #3d3d3d;
  --code-bg: #2a2a2a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; margin: 1.6em 0 0.6em; }
h1 { font-size: 2rem; margin-top: 0.5em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0.9em 0; }
img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
p > img { margin: 1.2em auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--border); color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
pre { background: var(--code-bg); padding: 1em; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }
.muted { color: var(--muted); }

.container {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}
.nav__logo { font-weight: 700; font-size: 1.15rem; color: var(--fg); }
.nav__links { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.nav__link { padding: 0.4rem 0.6rem; border-radius: 6px; color: var(--fg); }
.nav__link:hover { background: var(--surface); text-decoration: none; }
.nav__link--active { color: var(--link); }

/* footer */
.footer {
  display: flex; justify-content: center; gap: 1.5rem;
  padding: 1rem; font-size: 0.85rem; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* home */
.intro h1 { font-size: 2.4rem; }
.section-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 2.5rem; }

/* post cards */
.card { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.card:last-child { border-bottom: 0; }
.card__title { margin: 0 0 0.25rem; font-size: 1.25rem; }
.card__title a { color: var(--fg); }
.card__title a:hover { color: var(--link); text-decoration: none; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.card__description { margin: 0.4rem 0 0; }

/* tags */
.tags { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  display: inline-block; padding: 0.05em 0.55em; border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 0.8rem;
}
.tag:hover { color: var(--link); text-decoration: none; }
.tag-index { list-style: none; padding: 0; }
.tag-index li { padding: 0.35rem 0; }
.tag-index .tag { font-size: 1rem; }

/* post */
.post__header { margin-bottom: 1.5rem; }
.post__title { margin-bottom: 0.3rem; }
.post__meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-size: 0.9rem; color: var(--muted); }
.comments { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* carousel */
.carousel-wrapper { position: relative; margin: 1.2em 0 0; }
.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; border-radius: 4px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > .carousel-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
.carousel > .carousel-slide > img { width: 100%; margin: 0; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1;
}
.carousel-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.carousel-arrow--prev { left: 0.5rem; }
.carousel-arrow--next { right: 0.5rem; }
.carousel-arrow.hidden { opacity: 0; pointer-events: none; }
.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin: 0.5rem 0 1.2em; }
.carousel-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 0; padding: 0; background: #666; cursor: pointer; }
.carousel-dot.active { background: #fff; }
