/* kschaeffler.com
   One narrow, left-aligned column. Section labels sit in a left column on wide screens
   and stack above their text on phones. The teal-to-orange gradient and the mountains
   from the old Carrd page live on in the small emblem and in link hovers. */

:root {
  --bg: #f7f8f8;
  --fg: #1d2526;
  --muted: #667375;
  --line: #e1e6e6;
  --link: #24767c;
  --hover: #c2662a;
  --teal: #A8DADC;
  --orange: #F4A261;
  --font: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --label: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121718;
    --fg: #e4eaeb;
    --muted: #93a2a4;
    --line: #263335;
    --link: #8fd0d3;
    --hover: #f4a261;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7.5rem) 1.5rem 6rem;
  display: grid;
  gap: 2.5rem;
}

/* Intro */
.intro { display: grid; gap: 0.25rem; margin-bottom: 1rem; }

.emblem {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  background-image: url('images/mountains.svg'), linear-gradient(194deg, var(--teal) 24%, var(--orange) 100%);
  background-size: auto 100%, auto;
  background-position: center, 0 0;
  background-repeat: repeat-x, no-repeat;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tagline { margin: 0; color: var(--muted); }

.lead { margin: 1.25rem 0 0; max-width: 34rem; }

/* Sections */
.row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0;
  font-family: var(--label);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 2.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.body { min-width: 0; max-width: 34rem; }
.body p { margin: 0; }

.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }

.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0; }
.tags li:not(:last-child)::after { content: '·'; margin: 0 0.6rem; color: var(--muted); }

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: var(--hover); text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

/* Long version */
.story summary {
  cursor: pointer;
  color: var(--link);
  list-style: none;
  width: fit-content;
}
.story summary::-webkit-details-marker { display: none; }
.story summary::after { content: ' ↓'; }
.story[open] summary::after { content: ' ↑'; }
.story summary:hover { color: var(--hover); }
.story-text { display: grid; gap: 1rem; margin-top: 1rem; color: var(--fg); }
.story-text p { margin: 0; }

/* Footer */
.foot { padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.foot p { margin: 0; max-width: 34rem; }
.foot a { color: inherit; }

/* Gentle entrance */
.page > * { animation: rise 0.6s ease-out both; }
.page > :nth-child(2) { animation-delay: 0.05s; }
.page > :nth-child(3) { animation-delay: 0.1s; }
.page > :nth-child(4) { animation-delay: 0.15s; }
.page > :nth-child(5) { animation-delay: 0.2s; }
.page > :nth-child(6) { animation-delay: 0.25s; }
.page > :nth-child(7) { animation-delay: 0.3s; }
.page > :nth-child(8) { animation-delay: 0.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .page > * { animation: none; }
  a { transition: none; }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .page { gap: 2rem; padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }
  .row { grid-template-columns: 1fr; gap: 0.35rem; }
}
