/* Andreas Osberghaus — personal site
   Light monochrome + Bitcoin orange accent
   Display: Source Serif 4 · Body: Source Sans 3
   Color mode follows system preference */

:root {
  color-scheme: light dark;

  --bg: #f7f5f2;
  --text: #1a1a1a;
  --text-muted: #5a5752;
  --accent: #f7931a;
  --icon-muted: #8a8680;
  --icon-rest: #3d3d3d;
  --focus-ring: color-mix(in srgb, var(--accent) 55%, transparent);
  --hover-bg: color-mix(in srgb, var(--accent) 8%, transparent);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: 180ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --text: #f0ede8;
    --text-muted: #a39e96;
    --accent: #f7931a;
    --icon-muted: #6e6a64;
    --icon-rest: #cfc9c0;
    --focus-ring: color-mix(in srgb, var(--accent) 45%, transparent);
    --hover-bg: color-mix(in srgb, var(--accent) 14%, transparent);
  }
}

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

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

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.005em;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 200ms ease, color 200ms ease;
}

.identity {
  width: min(100%, 36rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 5.5vw, 2.85rem);
  font-weight: 500;
  font-style: normal;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--text);
}

.subtitle {
  margin: 0 0 1.35rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--icon-muted);
}

.bio {
  margin: 0 0 1.25rem;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.bio-lead {
  white-space: nowrap;
}

@media (max-width: 36rem) {
  .bio-lead {
    white-space: normal;
  }
}

.motif {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  outline: none;
  cursor: default;
}

.motif-mark {
  display: block;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: var(--icon-muted);
  transition: background-color var(--ease), transform var(--ease);
}

.motif:hover .motif-mark,
.motif:focus-visible .motif-mark {
  background: var(--accent);
}

.motif:hover .motif-mark:nth-child(1),
.motif:focus-visible .motif-mark:nth-child(1) {
  transition-delay: 0ms;
}

.motif:hover .motif-mark:nth-child(2),
.motif:focus-visible .motif-mark:nth-child(2) {
  transition-delay: 40ms;
}

.motif:hover .motif-mark:nth-child(3),
.motif:focus-visible .motif-mark:nth-child(3) {
  transition-delay: 80ms;
}

.motif:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

.personal {
  margin: 0 0 2.25rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.social ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--icon-rest);
  border-radius: 999px;
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease),
    transform var(--ease);
}

.social a:hover {
  color: var(--accent);
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.social a:focus-visible {
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

.social .icon {
  display: block;
}

.nostr {
  margin: 1.25rem 0 0;
  max-width: min(100%, 36rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.nostr-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--icon-muted);
}

.nostr-key {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro",
    Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-decoration: none;
  word-break: break-all;
  max-width: 100%;
  transition: color var(--ease);
}

.nostr-key:hover,
.nostr-key:focus-visible {
  color: var(--accent);
}

.nostr-key:focus-visible {
  outline: none;
  border-radius: 0.2rem;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  body {
    transition: none;
  }

  .social a:hover {
    transform: none;
  }
}
