/*
  imfht.com — 方核桃 · clean single-column personal site
  sans-serif, minimal, content-first
*/

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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --faint: #e7e7ea;
  --accent: #2563eb;

  --sans: "Inter", "Noto Sans SC", system-ui, -apple-system, "PingFang SC",
          "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Menlo", monospace;

  --w: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --text: #e7e7ea;
    --muted: #8b8b94;
    --faint: #26262b;
    --accent: #6ea8fe;
  }
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

main, article {
  max-width: var(--w);
  margin: 0 auto;
  padding: 7rem 1.5rem 7rem;
}

/* ——— header ——— */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4rem;
}
.site-head .name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-head nav a {
  color: var(--muted);
  font-size: 0.95rem;
  margin-left: 1.25rem;
  transition: color 0.2s;
}
.site-head nav a:hover { color: var(--text); }

/* ——— intro ——— */
.intro { margin-bottom: 4.5rem; }
.intro .hello {
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.1rem;
}
.intro p {
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 0.4rem;
}
.intro p + p { color: var(--muted); }

/* ——— sections ——— */
section { margin-bottom: 3.75rem; }

section > h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.35rem;
}

/* ——— entries (projects / experience) ——— */
.entries { list-style: none; }

.entries li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--faint);
}
.entries li:last-child { border-bottom: none; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.entry-title {
  font-weight: 600;
  font-size: 1.02rem;
  transition: color 0.2s;
}
a.entry-title:hover { color: var(--accent); }

.entry-role {
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.35rem;
}

.entry-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.entry-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.25rem;
}

.entry-url {
  color: var(--muted);
  border-bottom: 1px solid var(--faint);
  margin-left: 0.4rem;
  transition: color 0.2s, border-color 0.2s;
}
.entry-url:hover { color: var(--accent); border-color: var(--accent); }

/* ——— footer ——— */
footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--muted); transition: color 0.2s; }
footer a:hover { color: var(--text); }
footer .dot { color: var(--faint); margin: 0 0.35rem; }

/* ——— article pages (about / contact / privacy) ——— */
article h1 {
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

article .subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

article hr.short {
  border: none;
  border-top: 1px solid var(--faint);
  width: 2rem;
  margin: 2rem 0;
}

article p {
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

article h2 {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
}

article a {
  color: var(--text);
  border-bottom: 1px solid var(--faint);
  transition: color 0.2s, border-color 0.2s;
}
article a:hover { color: var(--accent); border-color: var(--accent); }

article ul {
  list-style: none;
  margin-bottom: 1.2rem;
}
article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

article .back {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  border: none;
  transition: color 0.2s;
}
article .back:hover { color: var(--text); }

/* ——— responsive ——— */
@media (max-width: 600px) {
  html { font-size: 16px; }
  main, article { padding: 3.5rem 1.25rem 4rem; }
  .entry-head { flex-direction: column; gap: 0.1rem; }
  footer { flex-direction: column; }
}
