/* Inter (Latin), served from here rather than Google */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 600;
  font-display: swap;
  src: url('/assets/fonts/inter-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;
}

:root {
  --bg: #101010;
  --fg: #efefef;
  --muted: #a3a3a3;
  --soft: #1c1c1c;
  --underline: #ffdc00;
  /* Hover underline (links, rows, search) */
  --underline-opacity: 50%; /* 0% invisible, 100% solid */
  --underline-thickness: 6px;
  --underline-speed: 0.34s; /* time to draw across */
  color-scheme: dark;
}
:root[data-theme='white'] {
  --bg: #fff;
  --fg: #171717;
  --muted: #686868;
  --soft: #f4f4f4;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-anchor: none;
}
html,
body {
  scrollbar-width: none;
  overscroll-behavior-y: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    17px/1.55 Inter,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  transition:
    background-color 0.18s,
    color 0.18s;
}
body:has(.vw) {
  overflow: hidden;
}
::selection {
  color: var(--bg);
  background: var(--fg);
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
a {
  color: inherit;
}
p {
  margin: 0 0 18px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 6px;
}
.muted {
  color: var(--muted);
}
#about-contact,
.search-block label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Page */
#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}
h1 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 7px;
}
.intro {
  margin-top: 26px;
}
.lede {
  width: 100%;
  font-size: 20px;
  font-weight: 250;
  line-height: 1.6;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
section {
  margin-top: 34px;
}
section[aria-labelledby='about-contact'] {
  margin-top: 22px;
}
h2 {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 8px;
}
footer {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  font-size: 14px;
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.hard-reload {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.hard-reload:hover {
  color: var(--fg);
}
footer a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Logo and theme toggle, pinned to the top corners */
.site-logo {
  position: fixed;
  top: 26px;
  left: 24px;
  z-index: 20;
  display: block;
  line-height: 0;
  color: var(--fg);
  will-change: transform; /* it animates; also keeps its edges crisp */
  transition:
    opacity 0.35s ease,
    translate 0.35s cubic-bezier(0.45, 0, 0.2, 1),
    visibility 0s linear 0s;
}
.site-logo svg {
  display: block;
  width: 28px;
  height: 28px;
}
.theme-control {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 20;
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}
.theme-control:hover {
  color: var(--fg);
}

/* Rows */
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: baseline;
  padding: 10px 0;
  font-size: 16px;
}
.entry-name {
  font-weight: 200;
}
.detail-panel {
  overflow: hidden;
}
.detail-inner {
  padding: 10px 0 30px;
  line-height: 1.75;
}
.detail-inner img {
  display: block;
  max-width: 100%;
  height: auto;
}
.entry-summary {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.detail-meta {
  font-size: 14px;
  color: var(--muted);
}
.website-shot {
  width: 100%;
  margin-bottom: 22px;
}
.shot-link {
  display: block;
}
.detail-link {
  display: inline-block;
  color: var(--fg);
  font-size: 16px;
  padding-block: 8px;
  text-decoration: none;
}
/* YouTube: a thumbnail with a play mark, swapped for the player on click */
.yt {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 22px;
  border: 0;
  background: #000;
}
.yt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--underline);
  transition: scale 0.2s;
}
.yt-play::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 21px;
  border-left: 18px solid #101010;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.yt:hover .yt-play {
  scale: 1.08;
}
/* A channel's screenshot in place of a video */
.channel-shot {
  display: block;
  margin-bottom: 22px;
}
.channel-shot img {
  width: 100%;
}
.top-profiles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.top-profiles a {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 200;
  line-height: 1.55;
}

/* The yellow hover underline, drawn as the text's own background */
.entry-name,
.link-label,
.search-text {
  justify-self: start;
  background-image: linear-gradient(
    color-mix(in srgb, var(--underline) var(--underline-opacity), transparent),
    color-mix(in srgb, var(--underline) var(--underline-opacity), transparent)
  );
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 0.12em);
  background-size: 0 var(--underline-thickness);
  transition: background-size var(--underline-speed) cubic-bezier(0.65, 0, 0.35, 1);
}
.entry:focus-visible .entry-name,
.entry[aria-expanded='true'] .entry-name,
a:focus-visible .link-label,
.search-wrap:focus-within .search-text,
.search-field:has(input:not(:placeholder-shown)) .search-text,
.flash {
  background-size: 100% var(--underline-thickness);
}
/* Hover only where hover is real. On phones a tap leaves a sticky :hover
   behind, which kept rows underlined after they closed. */
@media (hover: hover) {
  .entry-name:hover,
  .link-label:hover,
  .search-wrap:hover .search-text {
    background-size: 100% var(--underline-thickness);
  }
}
/* Mouse: only the words react, not the empty space around them */
@media (hover: hover) and (pointer: fine) {
  .entry,
  a:has(.link-label) {
    pointer-events: none;
  }
  .entry-name,
  .link-label {
    pointer-events: auto;
  }
}

/* Contact buttons */
.btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: scale 0.12s;
}
.btn:active {
  scale: 0.97;
}
.btn.ghost {
  background: var(--soft);
  color: var(--fg);
}

/* About: two slides side by side, the next one peeking in */
.about-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88%;
  column-gap: 24px;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.about-slide {
  scroll-snap-align: start;
  min-width: 0;
}
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 28px;
}
/* The text sets the height; the photo fills it */
.about-photo-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.about-layout .about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.about-text {
  min-width: 0;
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}
.about-text p:last-child {
  margin: 0;
}

/* Albums: two rows of squares that scroll sideways */
.album-strip {
  display: grid;
  grid-template-rows: repeat(2, var(--photo-size, 220px));
  grid-auto-flow: column;
  grid-auto-columns: var(--photo-size, 220px);
  gap: 12px;
  padding: 4px;
  scroll-behavior: auto;
}
.album-strip > button {
  width: var(--photo-size, 220px);
  height: var(--photo-size, 220px);
  overflow: hidden;
}
.album-strip > button > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-strip,
.about-strip {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: none;
  scrollbar-width: none;
}
.album-strip::-webkit-scrollbar,
.about-strip::-webkit-scrollbar {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .album-strip,
  .about-strip {
    cursor: grab;
  }
  .dragging,
  .dragging * {
    cursor: grabbing;
    user-select: none;
  }
}

/* Search: no box. The underline sits on a hidden copy of the text. */
.search-block {
  margin-top: 22px;
}
.top-profiles + .search-block {
  margin-top: 18px;
}
.search-field {
  display: flex;
  align-items: center;
}
.search-wrap {
  position: relative;
  display: inline-block;
  min-width: 3ch;
  max-width: 100%;
}
.search-mirror,
.search-field input {
  font: inherit;
  font-size: 16px;
  font-weight: 200;
  line-height: 1.55;
  letter-spacing: normal;
}
.search-mirror {
  display: block;
  padding: 10px 1ch 10px 0; /* room for the caret */
  color: transparent;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
}
.search-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  caret-color: var(--fg);
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder {
  color: var(--fg);
  opacity: 1;
}
.search-field input:focus-visible {
  outline: none;
}
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-decoration {
  -webkit-appearance: none;
}
.search-status {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.search-status:empty {
  display: none;
}

/* Photo viewer */
.vw {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(12, 12, 12, 0.94);
  color: #f2f2f2;
}
.vw :focus-visible {
  outline-color: #fff;
}
.vw-img {
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.vw-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  font-size: 22px;
  opacity: 0.75;
}
.vw-btn:hover,
.vw-btn:focus-visible {
  opacity: 1;
}
.vw-prev,
.vw-next {
  top: 50%;
  translate: 0 -50%;
}
.vw-prev {
  left: 8px;
}
.vw-next {
  right: 8px;
}
.vw-close {
  right: 8px;
  top: 8px;
  font-size: 28px;
}
.vw-count {
  position: absolute;
  bottom: 16px;
  left: 50%;
  translate: -50% 0;
  font-size: 13px;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* Yellow dot cursor (mouse only). Square over anything clickable. */
.dot-cursor {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .dot-cursor {
    display: block;
    position: fixed;
    inset: auto;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    padding: 0;
    border: 0;
    overflow: visible;
    background: var(--underline);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: border-radius 0.16s ease-out;
  }
  .dot-cursor::backdrop {
    background: transparent;
  }
  .dot-cursor-on,
  .dot-cursor-on * {
    cursor: none !important;
  }
  .dot-cursor-on .dot-cursor {
    opacity: 1;
  }
  .dot-cursor.is-square {
    border-radius: 0;
  }
}

/* Intro (loader.js) */
.jf-loader {
  display: none;
}
.jf-loading .jf-loader,
.jf-leaving .jf-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--fg);
  text-align: center;
  cursor: pointer;
}
.jf-loading,
.jf-loading body,
.jf-leaving,
.jf-leaving body {
  overflow: hidden;
  touch-action: none;
}
/* Logo and toggle wait above the screen until the cover leaves */
.jf-loading .site-logo,
.jf-loading .theme-control {
  transform: translateY(-90px);
}
.jfl-pile {
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
}
.jfl-line {
  margin: 0;
  opacity: 0;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 200;
  letter-spacing: -0.035em;
  line-height: 1.15;
  transition: color 0.8s;
}
.jfl-line.old {
  color: color-mix(in srgb, var(--fg) 25%, var(--bg));
}
.jfl-name {
  margin: 0;
  font-size: clamp(30px, 7vw, 64px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.2;
  white-space: nowrap;
}
.jfl-word,
.jfl-rest {
  display: inline-block;
}
/* Yellow dots on j and i: the glyph is painted in two bands */
.jfl-dot {
  color: transparent;
  background: linear-gradient(var(--underline) 0 0.4em, var(--fg) 0.4em);
  -webkit-background-clip: text;
  background-clip: text;
}
.jfl-skip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  margin: 0;
  font-size: 14px;
  font-weight: 200;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.jfl-skip.shown {
  opacity: 1;
}

/* Phones */
@media (max-width: 560px) {
  #app {
    padding: 66px 16px 28px;
  }
  h1 {
    font-size: 25px;
    font-weight: 450;
  }
  .lede {
    white-space: normal;
    font-size: 21px;
    text-wrap: balance;
  }
  section {
    margin-top: 30px;
  }
  .theme-control {
    top: 10px;
    right: 16px;
    font-size: 13px;
  }
  .site-logo {
    opacity: 0;
    translate: 0 -10px;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.35s ease,
      translate 0.35s cubic-bezier(0.45, 0, 0.2, 1),
      visibility 0s linear 0.35s;
  }
  /* Photo and text stay the same height. Text that doesn't fit carries on in
     the next column to the right, and the strip scrolls sideways through it. */
  .about-strip {
    grid-auto-columns: max-content;
    scroll-snap-type: x proximity;
  }
  .about-layout {
    --col: 46vw;
    grid-template-columns: var(--col) auto;
    gap: 16px;
  }
  .about-photo-frame {
    height: calc(var(--col) * 4 / 3);
  }
  .about-text {
    width: var(--col);
    height: calc(var(--col) * 4 / 3);
    column-width: var(--col);
    column-gap: 16px;
    column-fill: auto;
  }
  .about-text {
    font-size: 15px;
    line-height: 1.65;
  }
  .about-text p {
    margin-bottom: 16px;
  }
  /* One row of big photos that snap */
  .album-strip {
    grid-template-rows: var(--photo-size, 300px);
    scroll-snap-type: x mandatory;
  }
  .album-strip > button {
    scroll-snap-align: start;
  }
}
@media (max-width: 600px) {
  .vw-prev,
  .vw-next {
    top: auto;
    bottom: 4px;
    translate: none;
  }
}
/* With a mouse, the toggle only reacts over its text */
@media (hover: hover) and (pointer: fine) {
  .theme-control {
    top: 30px;
    min-width: 0;
    min-height: 0;
    line-height: 1.4;
  }
}
@media (max-width: 359px) {
  h1 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Touch screens get the normal overscroll back, so pulling down at the top
   refreshes the page. Mouse and trackpad keep the soft stop. */
@media (pointer: coarse) {
  html,
  body {
    overscroll-behavior-y: auto;
  }
}
