:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --hairline: #d2d2d7;
  --link: #0066cc;
  --chip: #f0f0f3;
  --code-bg: #f5f5f7;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #161618;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --hairline: #2c2c2e;
    --link: #2997ff;
    --chip: #232326;
    --code-bg: #1c1c1e;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }

/* Home */
.hero { padding: 5.5rem 0 2.5rem; }
.hero h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 1.25rem;
}
.hero p { font-size: 1.2rem; line-height: 1.55; color: var(--muted); margin: 0 0 .9rem; max-width: 36rem; }
.hero p strong { color: var(--text); font-weight: 600; }

.section-label {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 2rem 0 1rem;
}

.projects { display: grid; gap: 1rem; padding-bottom: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  font-weight: 650;
}
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--link); text-decoration: none; }
.card .domain { display: inline-block; font-size: .9rem; margin: .15rem 0 .75rem; }
.card p { margin: 0 0 .7rem; }
.card p:last-child { margin-bottom: 0; }

.metros { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.metros a {
  display: inline-block;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: .92rem;
  font-weight: 500;
}
.metros a:hover { text-decoration: none; filter: brightness(.96); }

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: .92rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* Top bar on inner pages */
.topbar { padding: 1.5rem 0 0; font-size: .95rem; }
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--link); }
.topbar .sep { color: var(--hairline); margin: 0 .5rem; }

/* Archive list */
.page-title {
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 2.5rem 0 .75rem;
}
.lede { color: var(--muted); margin: 0 0 2rem; }
.year { font-size: 1.1rem; margin: 2.2rem 0 .4rem; color: var(--muted); font-weight: 600; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px solid var(--hairline);
}
.post-list time { flex: 0 0 4.2rem; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.post-list a { color: var(--text); }
.post-list a:hover { color: var(--link); }

/* Post */
.post-head { margin: 2.5rem 0 2rem; }
.post-head h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .6rem; }
.post-meta { color: var(--muted); font-size: .95rem; }
.archive-note {
  font-size: .9rem; color: var(--muted);
  background: var(--chip); border-radius: 12px; padding: .7rem 1rem; margin: 0 0 2rem;
}
.prose { overflow-wrap: break-word; }
.prose h1, .prose h2, .prose h3, .prose h4 { letter-spacing: -0.01em; line-height: 1.25; margin: 2.2rem 0 .8rem; }
.prose h1 { font-size: 1.6rem; } .prose h2 { font-size: 1.4rem; } .prose h3 { font-size: 1.2rem; } .prose h4 { font-size: 1.05rem; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose .figure, .prose figure { margin: 1.5rem 0; }
.prose .caption, .prose figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--hairline); color: var(--muted); }
.prose pre {
  background: var(--code-bg); border-radius: 10px; padding: .9rem 1rem; overflow-x: auto;
  font-size: .82rem; line-height: 1.5;
}
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; }
.prose :not(pre) > code { background: var(--code-bg); padding: .1em .35em; border-radius: 5px; }
.prose table { border-collapse: collapse; font-size: .88rem; margin: 1.2rem 0; display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { padding: .4rem .7rem; border-bottom: 1px solid var(--hairline); text-align: left; }
.prose th { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }
.prose iframe { max-width: 100%; border: 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding-top: 3.5rem; }
  .card { padding: 1.25rem; border-radius: 16px; }
  .post-list li { flex-direction: column; gap: .1rem; }
}
/* C. Swiss index: grid, tight sans, one red accent */
:root { --bg:#ffffff; --surface:transparent; --text:#111; --muted:#777; --hairline:#111; --link:#e30613; --chip:transparent; --shadow:none; }
@media (prefers-color-scheme: dark){ :root{ --bg:#0d0d0d; --text:#f2f2f2; --muted:#8a8a8a; --hairline:#f2f2f2; --link:#ff4d4d; } }
body { font-family: "Helvetica Neue", Helvetica, "Inter", Arial, sans-serif; font-size: 16px; }
.wrap { max-width: 60rem; }
.hero { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; padding-top: 4rem; border-bottom: 2px solid var(--hairline); padding-bottom: 2.5rem; }
.hero h1 { font-family: inherit; font-size: clamp(2.4rem,6vw,4.2rem); letter-spacing: -0.045em; line-height: .95; font-weight: 700; grid-row: span 2; }
.hero p { color: var(--text); font-size: 1.15rem; }
.section-label { color: var(--text); letter-spacing: .14em; margin-top: 2.5rem; }
.projects { gap: 0; }
.card { display: grid; grid-template-columns: 1fr 1.6fr; column-gap: 2rem; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; padding: 1.4rem 0 1.8rem; background: none; box-shadow: none; }
.card > h3, .card > .domain { grid-column: 1; }
.card > h3 { grid-row: 1; font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 700; }
.card > .domain { grid-row: 2; align-self: start; }
.card > p, .card > ul { grid-column: 2; }
.card > p:first-of-type { grid-row: 1 / span 2; }
.metros a { background: none; border: 1px solid var(--hairline); border-radius: 0; color: var(--text); font-weight: 500; }
.metros a:hover { background: var(--link); border-color: var(--link); color: #fff; filter: none; }
.site-footer { border-top: 2px solid var(--hairline); color: var(--text); }
@media (max-width: 700px){ .hero, .card { grid-template-columns: 1fr; } .card > *{ grid-column: 1 !important; grid-row: auto !important; } }
/* Inner pages under the Swiss design: keep reading lines short */
.post-head, .prose, .archive-note, .page-title, .lede, .post-list, .year { max-width: 42rem; }
.archive-note { background: none; border-left: 2px solid var(--link); border-radius: 0; padding: .2rem 0 .2rem 1rem; }

/* No footer: keep breathing room at the bottom */
main.wrap { padding-bottom: 5rem; }
