@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Colours come from the hillside photo: sky for the ground, pine for ink and accent. */
:root {
  --ground: #eef3f5;
  --panel: #ffffff;
  --ink: #12261d;
  --muted: #4d6158;
  --line: #d5e0e3;
  --accent: #1d6a48;
  --accent-soft: #dcefe4;
  --tile: #ffffff;
  --shadow: rgb(18 38 29 / 0.08);
  --shadow-lift: rgb(18 38 29 / 0.14);
  --qr-bg: #ffffff;
  --qr-ink: #12261d;
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0c1411;
    --panel: #142019;
    --ink: #e7efe9;
    --muted: #9fb3a8;
    --line: #22332b;
    --accent: #74d3a0;
    --accent-soft: #1c3a2b;
    --tile: #f4f7f5;
    --shadow: rgb(0 0 0 / 0.3);
    --shadow-lift: rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--ground); }
a { color: inherit; -webkit-tap-highlight-color: transparent; }

.page {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
}

/* Who */
.me { text-align: center; }
.avatar {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--panel), 0 6px 18px var(--shadow-lift);
}
h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.handle { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }
.bio { font-size: 1.05rem; margin-top: 0.75rem; text-wrap: balance; }

.socials {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.socials svg,
.go,
.thumb-drawn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.socials .fill { fill: currentColor; stroke: none; }
.socials a:hover { background: var(--accent-soft); color: var(--accent); }
.socials a:active { transform: scale(0.92); }

/* Links */
.links {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  gap: 0.75rem;
}
.link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px var(--shadow-lift);
}
.link:active { transform: translateY(0) scale(0.985); box-shadow: 0 1px 4px var(--shadow); }
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--tile);
  border: 1px solid var(--line);
}
.thumb-drawn { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.thumb-drawn svg { width: 28px; height: 28px; }
.text { min-width: 0; }
.title { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.sub {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.18s ease, filter 0.18s ease;
}
.go { color: var(--muted); transition: color 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.link:hover .go { color: var(--accent); transform: translate(2px, -2px); }

/* The live detail: the newest post title arrives with a short blur-to-sharp swap. */
.sub.is-swapping { opacity: 0; filter: blur(4px); }
.sub.is-live { color: var(--ink); animation: arrive 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes arrive {
  from { opacity: 0; filter: blur(6px); transform: translateY(3px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
.tag {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--muted);
  background: var(--ground);
  vertical-align: 1px;
}
.tag-new { color: var(--accent); background: var(--accent-soft); }

.foot {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Say hi */
.hi {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ground);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px var(--shadow-lift);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}
.hi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.hi:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--shadow-lift); }
.hi:active { transform: scale(0.97); }

/* Share corner */
.page { position: relative; }
.share { position: absolute; top: 1rem; right: 1rem; z-index: 2; }
.share-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.share-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover, .share-btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.share-btn:active { transform: scale(0.92); }
.share-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 15rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 16px 40px var(--shadow-lift);
  text-align: center;
  transform-origin: top right;
  animation: pop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.share-panel[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.share-title { font-weight: 700; }
.qr {
  display: block;
  width: 100%;
  max-width: 11rem;
  margin: 0.75rem auto 0.5rem;
  padding: 0.6rem;
  border-radius: 12px;
  background: var(--qr-bg);
  fill: var(--qr-ink);
}
.share-url { color: var(--muted); font-size: 0.8125rem; }
.share-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.85rem; }
.pill {
  flex: 1;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 0.875rem var(--font);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.pill:hover { background: var(--accent-soft); }
.pill:active { transform: scale(0.96); }
.pill-strong { background: var(--accent); border-color: var(--accent); color: var(--ground); }
.pill-strong:hover { background: var(--accent); filter: brightness(1.08); }

/* Easter egg: one letter of the bio sits out of line until someone taps it. */
.off {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: text;
  transform: translateY(2px) rotate(9deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.off.fixed { transform: none; cursor: inherit; }
.toast {
  min-height: 1.4em;
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show { opacity: 1; transform: none; }

/* Focus */
.off:focus-visible,
.hi:focus-visible,
.share-btn:focus-visible,
.pill:focus-visible,
.link:focus-visible,
.socials a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .link, .socials a, .go, .sub, .hi, .share-btn, .pill, .off, .toast { transition: none; }
  .share-panel { animation: none; }
  .sub.is-live { animation: none; }
  .link:hover, .link:hover .go { transform: none; }
}
