/* dliu27.com — shared stylesheet */

:root {
  --bg: #faf5e9;
  --bg-card: #fffdf6;
  --border: #e7ddc8;
  --text: #33291c;
  --text-muted: #82735c;
  --accent: #b3572b;
  --accent-dim: rgba(179, 87, 43, 0.08);
  --max-width: 720px;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia,
    "Songti SC", serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* keep footer pinned to the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.container {
  flex: 1;
  width: 100%;
  padding-bottom: 48px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 245, 233, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav .brand {
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
}

nav .brand:hover {
  text-decoration: none;
  color: var(--accent);
}

nav .links {
  display: flex;
  gap: 22px;
}

nav .links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

nav .links a:hover,
nav .links a.active {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 72px 0 48px;
}

.hero img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero .tagline {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 16px;
}

.hero .meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.socials {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Sections ---------- */

section {
  padding: 32px 0;
}

section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-more {
  margin-top: 16px;
  font-size: 14px;
}

/* ---------- Experience ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.timeline-item .role {
  font-weight: 600;
}

.timeline-item .company {
  color: var(--accent);
}

.timeline-item .note {
  color: var(--text-muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
}

/* ---------- Cards (projects) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--mono);
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.card .lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.vue { background: #41b883; }
.dot.js { background: #f1e05a; }
.dot.py { background: #3572a5; }

/* ---------- Token card ---------- */

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.token-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}

.token-label {
  width: 72px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.token-address {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  word-break: break-all;
}

.token-row .note {
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Post list ---------- */

.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.post-item:hover {
  text-decoration: none;
}

.post-item:hover .post-title {
  color: var(--accent);
}

.post-item .post-title {
  font-weight: 600;
  transition: color 0.15s ease;
}

.post-item .post-date {
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--mono);
  white-space: nowrap;
}

/* ---------- Article ---------- */

.article {
  padding: 56px 0 32px;
}

.article header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.article header .post-date {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--mono);
  margin-top: 12px;
}

.article-body {
  margin-top: 32px;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: 18px;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 14px;
}

.article-body code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}

.article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 18px;
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Page header (blog index) ---------- */

.page-header {
  padding: 56px 0 8px;
}

.page-header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 28px 0 40px;
  color: var(--text-muted);
  font-size: 14px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 48px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  nav .links {
    gap: 16px;
  }
}
