/* ============================================================
   moritzfrenzel.de - ink on paper; color lives only in branches
   ============================================================ */

:root {
  --paper: #F7F8F7;
  --ink: #0F1B2D;
  --body-text: #33404E;
  --muted: #5A6470;
  --faint: #8B96A1;
  --hairline: #DCE1E0;
  --spine: #0F1B2D;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --gutter: 200px;
  --content: 640px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #0B6B74; color: #F7F8F7; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid #0B6B74;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- page frame: content column sits right of the graph gutter ---- */

.page {
  position: relative;
  max-width: calc(var(--content) + var(--gutter) + 32px);
  margin: 0 auto;
  padding: 0 32px 0 var(--gutter);
}

.page > * { position: relative; z-index: 1; }

.graph-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.anchor { display: block; height: 0; }

/* ---- masthead ---- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-left: calc(-1 * var(--gutter) + 32px);
  padding-top: 30px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.site-ref { color: var(--muted); }

.masthead-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.masthead-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.masthead-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- hero ---- */

.hero { padding: 108px 0 24px; }

.ref-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.9rem, 7.5vw, 4.7rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  font-weight: 400;
  margin-top: 16px;
  color: var(--body-text);
}

.hero-role em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.hero-copy {
  margin-top: 26px;
  max-width: 54ch;
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--body-text);
}

.hero .anchor { margin-top: 56px; }

/* ---- section heads ---- */

.section-head { margin-bottom: 8px; }

.cmd {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 10px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* ---- remotes ---- */

.remotes { padding: 72px 0 40px; }

.remotes.community { padding-top: 16px; }

.remote-list {
  list-style: none;
  margin-top: 26px;
  border-top: 1px solid var(--hairline);
}

.remote-row { border-bottom: 1px solid var(--hairline); }

.remote-link {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  text-decoration: none;
}

.remote-ref {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c);
}

.remote-name {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: border-color 0.2s;
}

.remote-link:hover .remote-name { border-bottom-color: var(--ink); }

.remote-desc {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 3px;
}

.remote-arrow {
  font-size: 1rem;
  color: var(--faint);
  transition: transform 0.25s, color 0.25s;
}

.remote-link:hover .remote-arrow {
  transform: translate(3px, -3px);
  color: var(--ink);
}

/* ---- career log ---- */

.career { padding: 64px 0 48px; }

.legend {
  margin-top: 14px;
  max-width: 54ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.log { margin-top: 48px; }

.row {
  position: relative;
  cursor: pointer;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.row-commit { padding: 15px 0; }
.row-branch { padding: 11px 0 30px; }
.row-merge  { padding: 26px 0 9px; }

.c-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c, var(--muted));
}

.c-title {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 2px;
}

.c-note {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  margin-top: 4px;
}

.b-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  background: color-mix(in srgb, var(--c) 7%, transparent);
  border-radius: 6px;
  padding: 3px 10px;
  text-decoration: none;
}

a.b-chip:hover { background: color-mix(in srgb, var(--c) 14%, transparent); }

.b-meta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-left: 10px;
}

.m-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.m-label strong {
  font-weight: 500;
  color: var(--muted);
}

/* branch hover focus: dim everything not on the hovered branch */

.log.focusing .row.in:not(.focus),
.remotes .remote-row.dimmed { opacity: 0.35; }

.remote-row { transition: opacity 0.3s ease; }

/* ---- branch hover card: every role of the hovered branch ---- */

.branch-card {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  max-width: 330px;
  background: #FCFDFC;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--c, var(--ink));
  border-radius: 8px;
  padding: 13px 16px 14px;
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.10), 0 2px 8px rgba(15, 27, 45, 0.06);
  animation: card-in 0.18s ease;
}

.branch-card[hidden] { display: none; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(4px); }
}

.bc-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.bc-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--faint);
  margin-left: 8px;
}

.bc-span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c, var(--muted));
  margin-top: 2px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--hairline);
}

.bc-role { margin-top: 9px; }

.bc-role-title {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--ink);
}

.bc-role-range {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1px;
}

/* ---- footer ---- */

.footer { padding: 40px 0 56px; }

.init-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-contact { margin-top: 30px; }

.footer-contact a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.2s;
}

.footer-contact a:hover { border-bottom-color: var(--ink); }

.footer-legal {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 0.8rem;
  color: var(--faint);
}

.footer-legal a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-legal a:hover { color: var(--muted); border-bottom-color: var(--muted); }

/* ---- scroll reveal ---- */

.reveal-armed .row { opacity: 0; transform: translateY(10px); }
.reveal-armed .row.in { opacity: 1; transform: none; }

/* ---- responsive ---- */

@media (max-width: 720px) {
  :root { --gutter: 128px; }

  .page { padding-right: 20px; }

  .masthead { margin-left: calc(-1 * var(--gutter) + 20px); }

  .hero { padding-top: 76px; }

  .remote-link { grid-template-columns: 1fr auto; }

  .remote-ref { grid-column: 1 / -1; }

  .remote-arrow { align-self: start; }
}

@media (max-width: 400px) {
  :root { --gutter: 108px; }
}

/* ---- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row, .remote-row, .remote-arrow { transition: none; }
  .reveal-armed .row { opacity: 1; transform: none; }
  .branch-card { animation: none; }
}
