:root {
  --bg: #fff5d6;
  --fg: #000000;
  --muted: #2a2a2a;
  --card: #ffffff;
  --shadow: #000000;
  --c1: #ff5a5f;
  --c2: #ffd166;
  --c3: #4ecdc4;
  --c4: #5d8bf4;
  --c5: #c77dff;
  --sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --display: 'Archivo Black', 'Space Grotesk', 'Inter', sans-serif;
}

/* Dark mode. Auto-switches via system appearance unless pinned via
   `color_scheme: light|dark` in config.yml.
   Brutalism on dark needs visible shadows: the trademark black drop-shadow
   disappears against a dark page, so on dark the shadow becomes a bright
   neon (cyan) and the body color is a richer charcoal so the cards still
   pop. The signature primary palette keeps its identity. */
@media (prefers-color-scheme: dark) {
  :root:not(.scheme-light) {
    --bg: #14141a;
    --fg: #f5f5f5;
    --muted: #b8b8b8;
    --card: #1f1f24;
    --shadow: #4ecdc4;
  }
  :root:not(.scheme-light) .link-button.link-latest { color: #14141a; }
  :root:not(.scheme-light) .link-latest-badge {
    background: #14141a;
    color: var(--c2);
    border-color: #14141a;
  }
}
:root.scheme-dark {
  --bg: #14141a;
  --fg: #f5f5f5;
  --muted: #b8b8b8;
  --card: #1f1f24;
  --shadow: #4ecdc4;
}
:root.scheme-dark .link-button.link-latest { color: #14141a; }
:root.scheme-dark .link-latest-badge {
  background: #14141a;
  color: var(--c2);
  border-color: #14141a;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--shadow) 1px, transparent 1px),
    linear-gradient(90deg, var(--shadow) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  background-attachment: fixed;
  background-color: var(--bg);
  background-blend-mode: soft-light;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 480px; }

.profile { text-align: center; margin-bottom: 36px; }

.profile-pic-wrap {
  display: inline-block;
  background: var(--c2);
  padding: 8px;
  border: 3px solid var(--shadow);
  box-shadow: 6px 6px 0 var(--shadow);
  margin-bottom: 20px;
  transform: rotate(-2deg);
}

.profile-pic {
  width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
  border: 3px solid var(--shadow);
}

.name {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.description {
  display: inline-block;
  background: var(--card);
  color: var(--fg);
  border: 3px solid var(--shadow);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  text-wrap: pretty;
  max-width: 36ch;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  color: var(--fg);
  border: 3px solid var(--shadow);
  box-shadow: 6px 6px 0 var(--shadow);
  font-size: 17px;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.link-button:nth-child(5n+1) { background: var(--c1); }
.link-button:nth-child(5n+2) { background: var(--c2); }
.link-button:nth-child(5n+3) { background: var(--c3); }
.link-button:nth-child(5n+4) { background: var(--c4); color: #fff; }
.link-button:nth-child(5n+5) { background: var(--c5); color: #fff; }

.link-button:hover,
.link-button:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--shadow);
  outline: none;
}

.link-button:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--shadow);
}

.link-icon i { font-size: 18px; }
.link-button-text { font-size: 13px; font-weight: 600; opacity: 0.85; margin-left: 6px; }

.button-container { display: flex; justify-content: center; }

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  color: var(--fg);
  border: 3px solid var(--shadow);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.icon-button i { font-size: 18px; }

.icon-button:hover,
.icon-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
  outline: none;
}

.icon-button:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--shadow);
}

.footer {
  margin-top: 40px;
  padding: 16px;
  background: var(--card);
  border: 3px solid var(--shadow);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.footer a {
  font-weight: 700;
  border-bottom: 2px solid var(--shadow);
}

.copyright { margin-top: 8px; font-size: 12px; opacity: 0.8; }

@media (max-width: 480px) {
  .name { font-size: 28px; }
  .link-button { box-shadow: 4px 4px 0 var(--shadow); }
  .link-button:hover { box-shadow: 6px 6px 0 var(--shadow); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* "Latest" link variant — chunky stamp + clamp long titles */
.link-button.link-latest {
  align-items: flex-start;
  background: var(--c2);
}
.link-latest-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  margin-right: 8px;
  background: var(--fg);
  color: var(--c2);
  border: 2px solid var(--fg);
  transform: rotate(-2deg);
  vertical-align: 1px;
}
.link-latest .link-text {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
