/* Self-hosted variable Fraunces (Latin subset, wght axis).
 * Single file covers every weight we use so we don't pay extra round trips. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fraunces.woff2") format("woff2-variations"),
       url("./assets/fraunces.woff2") format("woff2");
}

:root {
  --bg: #1a1a1a;
  --bg-elevated: #282828;
  --bg-light: #333435;
  --border: #404040;
  --text: #e6e1dc;
  --text-muted: #8a857f;
  --accent-green: #a5c261;
  --accent-blue: #6d9cbe;
  --accent-gold: #e8bf6a;
  --accent-teal: #99bfb5;

  /* original social brand colours from client/less/blocks/social-links.less */
  --color-github: #000000;
  --color-linkedin: #4875b4;
  --color-hacker-news: #ff6600;
  --color-instagram: #e4405f;
  --color-lastfm: #d01f3c;
  --color-email: #3a9d96;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- layout ----------
 * Canvas is full-viewport behind everything. The header sits at the
 * top, the footer at the bottom — both on the left where the wallpaper
 * stays dark, so no opaque backdrop is needed.
 */

main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
}

main > section {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  cursor: pointer;
}

main > section canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 50% 50%;
  transition: opacity 150ms ease, filter 150ms ease, transform 150ms ease;
}

main > section.is-repainting canvas {
  opacity: 0;
  filter: blur(50px);
  transform: scale(1.2);
}

.bio {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem);
}

/* ---------- bio typography ---------- */

.bio__name {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.bio__name-first,
.bio__name-last {
  display: block;
}

.bio__name-first {
  color: var(--emphasis-color, var(--accent-green));
  transition: color 200ms ease;
}

.bio__name-last {
  color: var(--text);
}

.bio__tagline {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- social icons ---------- */

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

.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.social__link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  display: block;
}

.social__link:hover,
.social__link:focus-visible {
  background: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.social__link.is-github:hover,
.social__link.is-github:focus-visible {
  color: var(--color-github);
}

.social__link.is-linkedin:hover,
.social__link.is-linkedin:focus-visible {
  color: var(--color-linkedin);
}

.social__link.is-hacker-news:hover,
.social__link.is-hacker-news:focus-visible {
  color: var(--color-hacker-news);
}

.social__link.is-instagram:hover,
.social__link.is-instagram:focus-visible {
  color: var(--color-instagram);
}

.social__link.is-lastfm:hover,
.social__link.is-lastfm:focus-visible {
  color: var(--color-lastfm);
}

.social__link.is-email:hover,
.social__link.is-email:focus-visible {
  color: var(--color-email);
}

/* ---------- responsive ----------
 * On narrow viewports the painted band fills more of the screen,
 * so flip the bio to the top-right corner — diagonally opposite the
 * BR-anchored band — and right-align everything inside it.
 */

@media (max-width: 850px) {
  main {
    justify-content: flex-start;
    align-items: flex-end;
  }

  .bio {
    text-align: right;
  }

  .social {
    justify-content: flex-end;
  }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  main > section canvas {
    transition: none;
  }
}

