/* Soft Fork Labs - one stylesheet for all pages. No external fonts; the only script is analytics.js. */

:root {
  --bg: #f5f3ee;
  --surface: #fffdf8;
  --ink: #16150f;
  --muted: #625e55;
  --line: #d9d5c9;
  --accent: #c2410c;
  --accent-soft: #f6e3d8;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --surface: #1a1915;
    --ink: #efece4;
    --muted: #a39e93;
    --line: #2f2d27;
    --accent: #ff7a3d;
    --accent-soft: #2e1d13;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.mono { font-family: var(--mono); }
.eyebrow {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 18px;
}

/* Header */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand:hover { color: inherit; }
.nav { display: flex; gap: 22px; font: 14px/1 var(--mono); }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--accent); }
@media (max-width: 560px) { .nav { display: none; } }

/* Hero */
.hero { padding: 56px 0 72px; }
@media (min-width: 900px) {
  .hero .wrap { display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: end; }
}
.hero h1 {
  font-size: clamp(2.7rem, 8vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 28px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 36ch; margin: 0; }
.lead strong { color: var(--ink); font-weight: 600; }

.definition {
  margin: 40px 0 0;
  padding: 20px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  font: 14px/1.6 var(--mono);
  color: var(--muted);
}
@media (min-width: 900px) { .definition { margin: 0; } }
.definition b { color: var(--ink); font-weight: 600; }
.definition p { margin: 0; }
.definition p + p { margin-top: 10px; }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 700; }
.section-intro { color: var(--muted); max-width: 52ch; margin: 0 0 44px; }

/* Projects as a git graph: one main line, every project branches off it */
/* Each row draws its own stretch of the main line, so it ends at the last fork. */
.graph { list-style: none; margin: 0; padding: 0; }
.graph > li { position: relative; padding-left: 52px; }
.graph > li:not(:last-child) {
  background: linear-gradient(var(--line), var(--line)) 11px 0 / 2px 100% no-repeat;
}
.graph > li.graph-head {
  font: 13px/1 var(--mono);
  color: var(--muted);
  padding: 2px 0 10px 32px;
  background-position: 11px 8px;
}
.graph-head::before {
  content: "";
  position: absolute; left: 6px; top: 1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
}
.branch { position: relative; padding-top: 22px; }
.branch::before {
  content: "";
  position: absolute;
  left: 11px; top: 0;
  width: 41px; height: 56px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-bottom-left-radius: 22px;
}
.branch::after {
  content: "";
  position: absolute;
  left: 46px; top: 49px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 22px 26px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { color: inherit; border-color: var(--accent); transform: translateX(3px); }
.card h3 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 6px 0 8px; line-height: 1.15; }
.card p { margin: 0; color: var(--muted); }
.tag { font: 12.5px/1.2 var(--mono); color: var(--muted); }
.card h3 .accent { color: var(--accent); }
.pill { display: inline-block; margin: 2px 0 14px; padding: 4px 9px; border: 1px solid var(--accent); border-radius: 999px; font: 12px/1 var(--mono); color: var(--accent); }
.card .role { margin-top: 10px; font: 13px/1.5 var(--mono); color: var(--muted); }
.card .role::before { content: "↳ "; color: var(--accent); }
.go { display: inline-block; margin-top: 14px; font: 500 14px/1 var(--mono); color: var(--accent); }
@media (min-width: 820px) {
  .card { display: grid; grid-template-columns: 220px 1fr auto; gap: 28px; align-items: center; padding: 26px 28px 26px 32px; }
  .card h3 { margin-bottom: 0; }
  .go { margin-top: 0; white-space: nowrap; }
  .pill { margin: 10px 0 0; }
}
/* Work in progress: a branch that exists but is not merged yet. */
.branch.soon::before { border-left-style: dashed; border-bottom-style: dashed; }
.branch.soon::after { background: var(--bg); border: 2px solid var(--accent); }
.branch.soon .card:hover { transform: none; border-color: var(--line); }
.branch.soon .go { padding: 6px 10px; border: 1px solid var(--accent); border-radius: 999px; font-size: 12.5px; }
.branch.next::before { border-left-style: dashed; border-bottom-style: dashed; border-color: var(--muted); }
.branch.next::after { background: var(--bg); border: 2px dashed var(--muted); box-shadow: 0 0 0 4px var(--bg); }
.branch.next .card { background: transparent; border-style: dashed; }
.branch.next .go { color: var(--ink); }

/* Approach */
.principles { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 820px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.principles li { border-top: 2px solid var(--ink); padding-top: 18px; }
.principles .num { font: 13px/1 var(--mono); color: var(--accent); }
.principles h3 { font-size: 1.2rem; letter-spacing: -0.015em; margin: 10px 0 8px; line-height: 1.25; }
.principles p { margin: 0; color: var(--muted); }

/* Contact */
.contact h2 { max-width: 18ch; }
.mail {
  display: inline-block;
  margin-top: 18px;
  font-size: clamp(1.25rem, 4.6vw, 2.2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  word-break: break-word;
}

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }

/* Legal pages */
.legal { padding: 40px 0 72px; }
.legal article { max-width: 68ch; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 32px; }
.legal h2 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal p { margin: 0 0 12px; }
.legal ul { padding-left: 1.2em; margin: 0 0 12px; }
.legal .muted { color: var(--muted); font-size: 15px; }
.back { display: inline-block; margin-top: 36px; font: 14px/1 var(--mono); }

/* Consent banner (built by analytics.js). Both choices carry equal weight on purpose. */
.consent {
  position: fixed; z-index: 10; left: 16px; right: 16px; bottom: 16px;
  max-width: 520px; margin-left: auto;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; box-shadow: 0 8px 30px rgb(0 0 0 / 0.12);
  font-size: 15px; line-height: 1.5;
}
.consent p { margin: 0 0 14px; color: var(--ink); }
.consent-actions { display: flex; gap: 10px; }
.consent button {
  flex: 1; padding: 10px 14px; border-radius: 8px; cursor: pointer;
  font: 500 14px/1 var(--mono); color: var(--ink); background: transparent; border: 1px solid var(--ink);
}
.consent button:hover { color: var(--accent); border-color: var(--accent); }
