/* Layout: single 1100px column; hero pairs the pitch with a real .csproj upgrade diff; sections separated by space, not boxes. */
:root {
  --bg: #F1F3F2;
  --surface: #FFFFFF;
  --fg: #142027;
  --muted: #55636B;
  --line: #D5DBDA;
  --accent: #1D58C9;
  --accent-soft: #E3EBFA;
  --add: #1F7A4D;
  --add-bg: #E2F2E9;
  --del: #A33B2A;
  --del-bg: #F7E4E0;
  --code-bg: #0F1A21;
  --code-fg: #D7E1E6;
  --code-dim: #7D8E97;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1418; --surface: #151D22; --fg: #E4EAED; --muted: #98A6AE; --line: #26323A;
    --accent: #7FA6F5; --accent-soft: #1A2740;
    --add: #6FCB9A; --add-bg: #12301F; --del: #F0907E; --del-bg: #3A1C17;
    --code-bg: #0A1014; --code-fg: #D7E1E6; --code-dim: #6E7F88;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1418; --surface: #151D22; --fg: #E4EAED; --muted: #98A6AE; --line: #26323A;
  --accent: #7FA6F5; --accent-soft: #1A2740;
  --add: #6FCB9A; --add-bg: #12301F; --del: #F0907E; --del-bg: #3A1C17;
  --code-bg: #0A1014; --code-fg: #D7E1E6; --code-dim: #6E7F88;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  padding-inline: 20px; padding-block: 0;
}
.wrap { max-width: 1100px; margin-inline: auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.1; }
p { margin: 0; }
.label {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* Header */
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 22px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand svg { flex: none; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
nav.links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; }
nav.links a { color: var(--muted); text-decoration: none; }
nav.links a:hover { color: var(--fg); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-block: 72px 80px;
}
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -0.025em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero .cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; font: 600 1rem var(--font-body); padding: 12px 20px; border-radius: 6px;
  text-decoration: none; border: 1px solid var(--accent); cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--accent); }

.diff {
  background: var(--code-bg); color: var(--code-fg); border-radius: 10px;
  font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.75;
  overflow: hidden; box-shadow: 0 20px 50px -30px rgba(10, 20, 30, 0.6);
}
.diff .bar {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--code-dim); font-size: 0.78rem;
}
.diff pre { margin: 0; padding: 14px 0; overflow-x: auto; }
.diff code { display: block; min-width: max-content; }
.diff .ln { display: block; padding-inline: 16px; white-space: pre; }
.diff .d { background: rgba(240, 120, 100, 0.14); color: #F2A596; }
.diff .a { background: rgba(110, 200, 150, 0.14); color: #93DDB4; }
.diff .c { color: var(--code-dim); }

/* Sections */
section { padding-block: 72px; border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-bottom: 44px; }
.sec-head > * { min-width: 0; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; }
.sec-head p.intro { margin-top: 14px; color: var(--muted); max-width: 40em; }

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc { background: var(--bg); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.svc h3 { font-size: 1.3rem; font-weight: 700; }
.svc p { color: var(--muted); }
.svc .stack { font-family: var(--font-mono); font-size: 0.8rem; color: var(--fg); margin-top: auto; padding-top: 8px; }

/* Case study */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.case > * { min-width: 0; }
.case h3 { font-size: 1.6rem; font-weight: 700; }
.case .body p + p { margin-top: 14px; }
.case .body p { max-width: 36em; }
.built { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.built li {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px;
  padding-block: 13px; border-bottom: 1px solid var(--line); font-size: 0.97rem;
}
.built li span:first-child { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; }

/* Record */
.record { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }
.record > * { min-width: 0; }
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs li {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 12px; border-bottom: 1px solid var(--line);
}
.jobs strong { font-weight: 600; }
.jobs .yrs { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.jobs .role { display: block; color: var(--muted); font-size: 0.92rem; }
.results { display: flex; flex-direction: column; gap: 22px; }
.result { border-left: 2px solid var(--accent); padding-left: 18px; }
.result b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--fg); }
.result span { color: var(--muted); font-size: 0.95rem; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps li::before {
  content: counter(s); font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent);
  width: 30px; height: 30px; border: 1px solid var(--accent); border-radius: 50%;
  display: grid; place-items: center;
}
.steps h3 { font-size: 1.1rem; font-weight: 700; }
.steps p { color: var(--muted); font-size: 0.96rem; }

/* Contact */
.contact { background: var(--accent-soft); border-radius: 12px; padding: 48px 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact > * { min-width: 0; }
.contact h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.contact p { margin-top: 12px; color: var(--muted); max-width: 32em; }
.mail { display: flex; flex-direction: column; gap: 10px; }
.mail .addr {
  font-family: var(--font-mono); font-size: 1.05rem; background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; user-select: all; overflow-wrap: anywhere;
}
.mail .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
#copyStatus { font-size: 0.9rem; color: var(--muted); }

footer { padding-block: 36px 48px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 860px) {
  .hero, .case, .record, .contact { grid-template-columns: 1fr; gap: 36px; }
  .sec-head { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-block: 48px 56px; }
}
@media (max-width: 560px) {
  .services, .steps { grid-template-columns: 1fr; }
  .built li { grid-template-columns: 1fr; gap: 2px; }
  .contact { padding: 32px 22px; }
  section { padding-block: 56px; }
  nav.links { gap: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .diff .a { animation: glow 2.4s ease-out 0.6s both; }
  @keyframes glow { from { background: rgba(110, 200, 150, 0.4); } to { background: rgba(110, 200, 150, 0.14); } }
}

/* Articles */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { padding-block: 26px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr; gap: 24px; }
.post-list li > * { min-width: 0; }
.post-list time { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 5px; }
.post-list h2 { font-size: 1.45rem; font-weight: 700; }
.post-list h2 a { color: var(--fg); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { margin-top: 8px; color: var(--muted); max-width: 40em; }
.page-head { padding-block: 64px 40px; }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; margin-top: 14px; }
.page-head .lede { margin-top: 16px; font-size: 1.12rem; color: var(--muted); max-width: 38em; }
article.post { max-width: 44rem; padding-block: 56px 72px; }
article.post .meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); margin-top: 18px; }
article.post h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 14px; }
article.post h2 { font-size: 1.55rem; font-weight: 700; margin-top: 44px; }
article.post h3 { font-size: 1.15rem; font-weight: 700; margin-top: 28px; }
article.post p, article.post ul, article.post ol { margin-top: 16px; }
article.post ul, article.post ol { padding-left: 1.3em; }
article.post li + li { margin-top: 8px; }
article.post code { font-family: var(--font-mono); font-size: 0.88em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
article.post pre { background: var(--code-bg); color: var(--code-fg); border-radius: 8px; padding: 16px 18px; overflow-x: auto; margin-top: 18px; font-size: 0.86rem; line-height: 1.65; }
article.post pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
article.post .lede { font-size: 1.15rem; color: var(--muted); margin-top: 18px; }
.callout { margin-top: 44px; padding: 26px 28px; background: var(--accent-soft); border-radius: 10px; }
.callout h2 { margin-top: 0 !important; font-size: 1.3rem !important; }
.callout p { color: var(--muted); }
@media (max-width: 560px) { .post-list li { grid-template-columns: 1fr; gap: 6px; } }
