@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #090c14;
  --ink: #e6e9f2;
  --muted: #8d97b0;
  --accent: #e09c5e;

  --pad: clamp(20px, 3.2vw, 44px);
}

html[data-sky="sunset"] {
  --bg: #18101e;
  --ink: #f8e0c8;
  --muted: #c08e8a;
  --accent: #f49854;
}

html[data-sky="morning"] {
  --bg: #f5f0e8;
  --ink: #26242a;
  --muted: #686466;
  --accent: #c46834;
}

html[data-sky="day"] {
  --bg: #f4f6f3;
  --ink: #1c242e;
  --muted: #5a6a7a;
  --accent: #ba622a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color 1.2s ease, color 1.2s ease;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ui {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  pointer-events: none;
}

.ui a {
  pointer-events: auto;
}

.front {
  margin-top: auto;
}

.name {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(38px, 6.6vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 22px 0 0 -12px;
}

.links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  opacity: 0.72;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.links a svg {
  width: 22px;
  height: 22px;
  display: block;
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  opacity: 1;
  transform: translateY(-1px);
}

.links a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .front {
    margin-top: auto;
  }
  .name {
    font-size: clamp(30px, 10.5vw, 56px);
  }
  .links {
    margin-top: 20px;
    margin-bottom: 8px;
  }
  .links a svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-height: 560px) {
  .front {
    margin-top: 8vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .links a {
    transition: none;
  }
}

/* Social card render (?og=1): a tighter crop for 1200x630 link previews. */
body.og .name {
  font-size: clamp(72px, 9vw, 118px);
}

body.og .links a svg {
  width: 24px;
  height: 24px;
}
