@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --body: 'Inter', sans-serif;
  --display: 'Lora', serif;
  --mono: 'JetBrains Mono', monospace;
  --red: #C41230;
  --text: #333;
  --heading: #111;
  --muted: #555;
  --faint: #666;
  --border: #f0f0f0;
  --bg: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--body);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(196, 18, 48, 0.1); }

a { color: var(--red); text-decoration: none; }
a:hover { opacity: 0.75; }

/* ── nav ──────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.nav-brand span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--heading);
}
.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--heading); }
.nav-links a.active { color: var(--heading); }

/* ── content ──────────────────────────────────────── */
.content {
  max-width: 45rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}
.content-narrow {
  max-width: 45rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6.25rem;
}

/* ── prose ─────────────────────────────────────────── */
.prose p {
  font-family: var(--body);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1rem;
}
.prose p a { color: var(--red); }
.prose strong { color: var(--heading); }
.prose em { font-style: italic; }

.prose h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
  margin: 1.75rem 0 0.375rem;
}
.prose h2 {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--heading);
  margin: 2rem 0 0.75rem;
}
.prose h3 {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  margin: 1.5rem 0 0.5rem;
}
.prose ul, .prose ol {
  margin: 0 0 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.65;
}
.prose li { margin-bottom: 0.25rem; }

/* ── sparkle bullets ──────────────────────────────── */
.project-list {
  list-style: none;
  margin-left: 0 !important;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.project-list li {
  position: relative;
  padding-left: 0.25rem;
  margin-bottom: 0.5rem;
}
.project-list li::before {
  content: '\2726';
  color: var(--red);
  font-size: 1em;
  position: absolute;
  left: -1.1rem;
  top: 0;
  line-height: 1.65;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9375rem;
  background: #f5f5f5;
  padding: 0.125rem 0.3125rem;
  border-radius: 3px;
}
.prose pre {
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.prose blockquote {
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-style: italic;
}
.prose img {
  max-width: 100%;
  border-radius: 5px;
  margin: 0.5rem 0 1rem;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── intro (home page) ────────────────────────────── */
.intro {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: #333;
  margin-bottom: 1rem;
}

/* ── section headings ─────────────────────────────── */
.section-heading {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.875rem;
}

/* ── post list ────────────────────────────────────── */
.post-item {
  display: block;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.post-item:hover { opacity: 1; }
.post-item:hover .post-title { color: var(--red); }
.post-title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading);
  transition: color 0.15s;
}
.post-meta {
  font-family: var(--body);
  font-size: 0.875rem;
  color: var(--faint);
  margin-top: 0.25rem;
}

/* ── project list ─────────────────────────────────── */
.project-item {
  display: block;
  padding: 1.25rem 0;
  text-decoration: none;
}
.project-item + .project-item {
  border-top: 1px solid var(--border);
}
.project-item:hover { opacity: 1; }
.project-item:hover .project-title { color: var(--red); }
.project-title {
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--heading);
  transition: color 0.15s;
}
.project-venue {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--red);
  background: rgba(196, 18, 48, 0.06);
  padding: 0.125rem 0.4375rem;
  border-radius: 3px;
  margin-left: 0.625rem;
  vertical-align: 0.125rem;
  letter-spacing: 0.02em;
}
.project-desc {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--text);
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ── post header ──────────────────────────────────── */
.post-header {
  margin-bottom: 2.25rem;
}
.post-header h1 {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
  margin: 1.75rem 0 0.5rem;
}
.post-header .post-meta {
  margin-top: 0;
  font-size: 0.875rem;
}
.back-link {
  font-family: var(--body);
  font-size: 0.875rem;
  color: var(--red);
}

/* ── footer ───────────────────────────────────────── */
.footer {
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-family: var(--body);
  font-size: 0.8125rem;
  color: #999;
}

/* ── responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .nav { padding: 0.875rem 1.125rem; }
  .content { padding: 3rem 1.125rem 3.75rem; }
  .content-narrow { padding: 1.75rem 1.125rem 3.75rem; }
}
