:root {
  --ink: #000;
  --gray: #6b6b6b;
  --muted: #b3b3b3;
  --line: #b5b5b5;
  --bg: #fff;
  --bubble: clamp(110px, 8.6vw, 156px);
}

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

html, body { background: var(--bg); color: var(--ink); }
/* one fixed screen everywhere: only the achievements box scrolls */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }

body {
  font-family: "Host Grotesk", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
s { text-decoration-thickness: 1.5px; }

.ul {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: opacity .15s;
}
.ul:hover { opacity: .55; }

.muted { color: var(--muted); }

/* ---------- layout ---------- */
.page {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 4vw;
  padding: clamp(32px, 10vh, 120px) 6vw clamp(32px, 10vh, 120px) 14vw;
}

.intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
}

h1 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.tagline {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.4;
}

.label {
  margin-top: clamp(24px, 5vh, 48px);
  font-size: 18px;
  font-weight: 400;
}

/* filter words in the tagline */
.f {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #e2e2e2; /* faint hint that it's tappable */
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s, color .2s;
}
.f:hover { text-decoration-color: var(--muted); }
.f.active { text-decoration-color: var(--ink); }
.f[data-f="all"] { margin-right: 10px; }
.f:focus-visible { outline: 1.5px dashed var(--line); outline-offset: 3px; }

.which { color: var(--muted); }

/* dashed frame; the list inside scrolls with no visible scrollbar */
.box {
  margin-top: 18px;
  border: 1.2px dashed var(--line);
  border-radius: 4px;
  display: flex;
  flex: 0 1 auto; /* shrinks to fit the screen, then the list scrolls */
  min-height: 0;
}

.done {
  --ft: 0px; /* top fade, set by script.js when scrolled */
  --fb: 0px; /* bottom fade, set when more content below */
  list-style: none;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 18px 22px;
  color: var(--gray);
  font-size: 16px;
  line-height: 1.45;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--ft), #000 calc(100% - var(--fb)), transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 var(--ft), #000 calc(100% - var(--fb)), transparent);
  transition: opacity .18s ease;
}
.done::-webkit-scrollbar { display: none; }
.done.fading { opacity: 0; }
.done li { padding-left: 14px; position: relative; }
.done li::before { content: "-"; position: absolute; left: 0; color: var(--muted); }
.done li + li { margin-top: 6px; }
.done li[hidden] { display: none; }
.done b { color: var(--ink); font-weight: 500; }
/* company tag after a line, e.g. "· thine" */
.done .at { color: var(--muted); font-size: .88em; white-space: nowrap; }
.done .at::before { content: "· "; }
/* deliberately masked figure */
.done .redact { white-space: nowrap; cursor: help; }
.done a { text-decoration: none; }
.done a:hover { text-decoration: underline; }

.exp, .socials {
  font-size: 18px;
  line-height: 1.45;
}
.exp { margin-top: clamp(24px, 6vh, 64px); }
.socials {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.socials span { margin-right: 2px; }
/* icons are single-colour SVGs used as masks, so they take the text colour */
.socials a {
  width: 20px;
  height: 20px;
  background: var(--ink);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  transition: opacity .15s, transform .15s;
}
.socials a:hover { opacity: .55; transform: translateY(-1px); }
.exp .past { color: var(--muted); }

/* ---------- bubbles ---------- */
.orbit {
  position: relative;
  width: 100%;
  max-width: min(760px, 44vw, 95dvh);
  aspect-ratio: 760 / 680;
  justify-self: center;
}

.bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--bubble);
  height: var(--bubble);
  margin: calc(var(--bubble) / -2) 0 0 calc(var(--bubble) / -2);
  border: 1.5px dashed var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  cursor: grab;
  touch-action: none;
  user-select: none;
  animation: float 7s ease-in-out infinite;
  animation-delay: var(--d);
  transition: border-color .2s, box-shadow .2s;
}
.bubble.current { border-style: solid; }
.bubble:hover { border-color: #777; }
.bubble.dragging {
  cursor: grabbing;
  animation-play-state: paused;
  z-index: 5;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.bubble img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  mix-blend-mode: multiply; /* logos ship on white squares */
  pointer-events: none;
}


@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --bubble: 130px; }
  .page { padding-left: 8vw; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  :root { --bubble: min(25vw, 12.5dvh); }

  /* one fixed screen on phones: only the achievements box scrolls */
  .page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding: clamp(28px, 7dvh, 96px) 0 0;
  }
  .intro {
    padding: 0 40px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  h1 { font-size: 26px; }
  .tagline, .label, .exp, .socials { font-size: 16px; }
  .socials a { width: 19px; height: 19px; }
  .label { margin-top: clamp(20px, 4.5dvh, 40px); }
  .box { flex: 1 1 auto; margin-top: 14px; } /* box fills the free height */
  .done { max-height: none; font-size: 15.5px; padding: 14px 16px; }
  .exp { margin-top: clamp(18px, 4dvh, 40px); }
  .socials { margin-top: clamp(12px, 2.5dvh, 22px); }

  /* bubbles tuck up beside the exp / socials lines, like the mock */
  .orbit {
    max-width: none;
    width: 100vw;
    height: min(72vw, 33dvh); /* shrinks on short phones so the box keeps room */
    margin-top: max(-27vw, -12dvh);
    flex: none;
    z-index: 1;
  }
  .bubble { left: var(--mx); top: var(--my); border-width: 1.2px; }
}
