/* ---------------------------------------------------------------------------
   stefanwichmann.com — bespoke micro-theme
   Warm off-white · antire palette (burgundy #3f1c24 + neon green #b1ee01).
   Playful centered hero. System fonts (no external requests). Light/dark.
   --------------------------------------------------------------------------- */

:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 48rem;
  --gap: 1.25rem;
  --radius: 14px;
  --pop: #e6a017;          /* warm amber pop — our own accent, not antire's lime */
}

/* Light (default) */
:root, [data-theme="light"] {
  --bg:      #faf9f7;       /* warm off-white */
  --surface: #ffffff;
  --text:    #211a1c;
  --muted:   #6f6568;
  --border:  #ece6e4;
  --link:    #8e2337;       /* burgundy red */
  --brand:   #8e2337;       /* button background */
  --tint:    #f7ecee;       /* pale burgundy wash */
  --shadow:  0 1px 2px rgba(30,15,20,.05), 0 10px 28px rgba(30,15,20,.06);
}

[data-theme="dark"] {
  --bg:      #191315;
  --surface: #221a1d;
  --text:    #ece7e8;
  --muted:   #a99ea1;
  --border:  #3a2e31;
  --link:    #ec95a2;       /* light rose (readable on dark) */
  --brand:   #b23048;
  --tint:    #2c2023;
  --shadow:  0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#191315; --surface:#221a1d; --text:#ece7e8; --muted:#a99ea1;
    --border:#3a2e31; --link:#ec95a2; --brand:#b23048; --tint:#2c2023;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 12px 32px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.4rem; }

/* --- Hero (big, centered, playful) ---------------------------------------- */
.hero {
  display: flex; align-items: center; justify-content: center;
  min-height: min(78vh, 640px);
  padding: clamp(3rem, 8vw, 5rem) 0 3rem;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(1.25rem, 4vw, 1.9rem);
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.4rem;
}
.social { justify-content: center; }

.portrait {
  width: clamp(128px, 30vw, 208px);
  height: clamp(128px, 30vw, 208px);
  border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid var(--surface); box-shadow: var(--shadow);
  outline: 3px solid var(--link);
}
.portrait--placeholder {
  display: grid; place-items: center;
  background: var(--tint); color: var(--link);
  font-family: var(--serif); font-size: clamp(2.5rem, 9vw, 4rem);
}

.greeting {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.06; margin: 0 0 .55rem; letter-spacing: -0.02em; font-weight: 600;
}
.hl { color: var(--link); }
.positioning { margin: 0 0 .9rem; color: var(--muted); font-size: 1.1rem; }
.bio { margin: 0 auto 1.15rem; max-width: 34rem; }
.bio p { margin: 0; }

.social { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.social a { color: var(--muted); }
.social a:hover { color: var(--pop); text-decoration: none; }

/* --- Groups & cards -------------------------------------------------------- */
.group { padding: 1.9rem 0; border-top: 1px solid var(--border); }
.group:first-of-type { border-top: none; }
.group-title {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); font-weight: 700; margin: 0 0 1.15rem;
}
.group-title::before { content: ""; display: inline-block; width: .7em; height: .7em;
  background: var(--pop); border-radius: 2px; margin-right: .55em; vertical-align: baseline; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
@media (min-width: 34rem) { .cards { grid-template-columns: 1fr 1fr; } }

.card-link {
  display: flex; gap: .9rem; align-items: center;
  padding: 1rem 1.1rem; height: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: inherit;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card-link:hover {
  text-decoration: none; border-color: var(--link);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.card-logo { width: 56px; height: 56px; border-radius: 12px; flex: none; object-fit: cover; border: 1px solid var(--border); }
.card-logo--placeholder {
  display: grid; place-items: center;
  background: var(--tint); color: var(--link);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
}
.card-logo--gh svg { display: block; }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-title { font-weight: 600; }
.card-ext { color: var(--muted); font-weight: 400; font-size: .85em; }
.card-tagline { color: var(--muted); font-size: .92rem; }

/* Text-wordmark card: company name set in the site font on the default surface */
.card-name {
  font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em;
  line-height: 1.1; color: var(--text);
}

/* --- Detail pages ---------------------------------------------------------- */
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.6rem; padding-bottom: 1.6rem; font-size: .95rem;
}
.page-home { font-weight: 700; color: var(--text); }
.page-back { color: var(--muted); }

.detail { padding: 1rem 0 3rem; }
.detail-logo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; margin-bottom: .8rem; border: 1px solid var(--border); }
.detail-title { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.5rem); margin: 0 0 .3rem; }
.detail-tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.6rem; }
.detail-body > :first-child { margin-top: 0; }

.shots { display: grid; gap: 1rem; margin: 1.8rem 0; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.shot { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }

.detail-links { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.8rem 0 0; }
.btn {
  display: inline-block; padding: .62rem 1.25rem; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--brand);
}
.btn { transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--link); border-color: var(--border); }

.support-block {
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .95rem;
}
.support-block p { margin: .3rem 0; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 2rem;
  padding: 2rem 1.4rem; text-align: center; color: var(--muted); font-size: .9rem;
}
.footer-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-bottom: .6rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--link); }
.copyright { margin: 0; }

/* --- Theme toggle (fixed, all pages) --------------------------------------- */
.theme-toggle {
  position: fixed; top: 1.1rem; right: 1.1rem; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; display: grid; place-items: center; color: var(--muted);
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--link); color: var(--link); }
.theme-toggle-icon {
  width: 16px; height: 16px; border-radius: 50%; background: currentColor;
  box-shadow: inset -5px -3px 0 0 var(--surface);
}
[data-theme="dark"] .theme-toggle-icon { box-shadow: none; }
