@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter.woff2") format("woff2");
}

/* Dark by default, light if the OS asks. */
:root {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --fg-2: rgba(255, 255, 255, 0.68);
  --fg-3: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.14);
  --tile: rgba(255, 255, 255, 0.10);
  --measure: 640px;
  /* Linear-style surfaces */
  --chip-bg: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  --chip-bg-hover: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  --chip-border: rgba(255, 255, 255, 0.12);
  --chip-border-hover: rgba(255, 255, 255, 0.22);
  --chip-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.35);
  --chip-shadow-hover: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 6px rgba(0,0,0,0.4);
  --btn-bg: linear-gradient(180deg, #ffffff, #e6e6e6);
  --btn-bg-hover: linear-gradient(180deg, #ffffff, #f0f0f0);
  --btn-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  --btn-shadow-hover: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 14px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.1);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --fg-2: #6b6b6b;
    --fg-3: #9a9a9a;
    --line: #e5e5e5;
    --tile: #f0f0f0;
    --chip-bg: linear-gradient(180deg, #ffffff, #f4f4f4);
    --chip-bg-hover: linear-gradient(180deg, #ffffff, #ececec);
    --chip-border: #e2e2e2;
    --chip-border-hover: #c9c9c9;
    --chip-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.06);
    --chip-shadow-hover: inset 0 1px 0 #ffffff, 0 2px 6px rgba(0,0,0,0.08);
    --btn-bg: linear-gradient(180deg, #1a1a1a, #0a0a0a);
    --btn-bg-hover: linear-gradient(180deg, #262626, #111111);
    --btn-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 2px rgba(0,0,0,0.25);
    --btn-shadow-hover: inset 0 1px 0 rgba(255,255,255,0.12), 0 4px 14px rgba(0,0,0,0.25);
  }
}

* { box-sizing: border-box; }

/* fade between pages (browsers that support cross-document view transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.25s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
/* home: short page, so centre the block in the viewport */
body.home main { display: flex; flex-direction: column; justify-content: center; padding-bottom: 48px; }
body.home .intro { padding-top: 24px; }

::selection { background: var(--fg); color: var(--bg); }

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
  border-radius: 1px;
}
.ext::after { content: " ↗"; font-size: 0.85em; color: var(--fg-3); }
.ext:hover::after { color: var(--fg); }

h1, h2, p, ul { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 48px);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* staggered reveal */
.intro, .about, .contact, .rows li, .foot {
  animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.about { animation-delay: 0.08s; }
.rows li { animation-delay: calc(0.16s + var(--i, 0) * 0.04s); }
.foot { animation-delay: 0.5s; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* keyboard: skip to content */
.skip {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
  z-index: 10;
}
.skip:focus-visible { transform: none; outline: none; text-decoration: none; }

/* nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13px;
}
.brand { color: var(--fg); font-weight: 500; display: inline-flex; align-items: center; }
.mark { width: 26px; height: 26px; display: block; }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--fg-2); }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--fg); }

/* contact: call to action */
.contact { margin-top: 56px; }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; background: var(--btn-bg-hover); box-shadow: var(--btn-shadow-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--btn-shadow); }
.btn span span { display: inline-block; transition: transform 0.15s ease; }
.btn:hover span span { transform: translateX(3px); }
.btn:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.ibtn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  box-shadow: var(--chip-shadow);
  color: var(--fg-2);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.ibtn .chip-ico { width: 15px; height: 15px; }
.ibtn:hover { color: var(--fg); border-color: var(--chip-border-hover); background: var(--chip-bg-hover); box-shadow: var(--chip-shadow-hover); transform: translateY(-1px); text-decoration: none; }
.ibtn:active { transform: translateY(0); box-shadow: var(--chip-shadow); }
.ibtn:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.cta-sub { margin-top: 14px; font-size: 13px; }
.copy.small { font-size: 13px; color: var(--fg-3); }
.copy.small:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.copy.small::after { content: "copied"; left: calc(100% + 8px); }
.copy.small::before { content: "copy "; color: var(--fg-3); }
[data-magnet] { display: inline-block; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
[data-magnet].is-magnet { transition-duration: 0.12s; }
[data-magnet-inner] { display: inline-block; transition: inherit; }
.btn[data-magnet] { display: inline-flex; }

/* intro */
.intro {
  padding-top: 64px;
  padding-bottom: 40px;
  display: grid;
  gap: 4px;
}
.intro h1 { font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.intro p { font-size: 16px; color: var(--fg-2); max-width: 34em; text-wrap: pretty; }
.intro p strong { color: var(--fg); font-weight: 500; }
.intro a { text-decoration: underline; text-decoration-color: var(--fg-3); }
.intro a:hover { text-decoration-color: var(--fg); }

/* about */
.about { display: grid; gap: 14px; }
.about p { font-size: 16px; color: var(--fg-2); text-wrap: pretty; }
.about a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); }
.about a:hover { text-decoration-color: var(--fg); }

section + section { margin-top: 72px; }
section.first { margin-top: 48px; }
section[id], section[aria-labelledby] { scroll-margin-top: 32px; }

/* section heading: small, sentence case, muted */
.h {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-3);
  margin-bottom: 10px;
}
/* "About" heading exists for structure only */
.label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* rows: logo · name · role · dates */
.rows { list-style: none; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: baseline;
  column-gap: 14px;
  padding: 14px 0;
  border-top: 0.5px solid var(--line);
}
.rows .row:first-child { border-top: 0; }
.row .name { font-weight: 500; }
.row .role { color: var(--fg-2); }
.row .role::before { content: "  "; white-space: pre; }
.row .note {
  grid-column: 2 / -1;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.65;
  margin-top: 4px;
  max-width: 60ch;
  text-wrap: pretty;
}
.row .note a { text-decoration: underline; text-decoration-color: var(--fg-3); }
.row .note a:hover { text-decoration-color: var(--fg); }
.row .when {
  color: var(--fg-3);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 16px;
}

/* logo slot: greyscale at rest, full on row hover.
   Swap <span class="logo">X</span> for <img class="logo" src="/logos/x.svg" alt=""> when you have files. */
.logo {
  letter-spacing: -0.05em;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  padding: 2px;
  border-radius: 5px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  box-shadow: var(--chip-shadow);
  display: inline-grid;
  place-items: center;
  align-self: center;
  color: var(--fg);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
  transition: opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
img.logo { background: var(--chip-bg); border-radius: 5px; padding: 2px; }
.row:hover .logo { opacity: 1; filter: none; box-shadow: var(--chip-shadow-hover); transform: translateY(-1px); }
.logo.only-light { display: none; }
@media (prefers-color-scheme: light) { .logo.only-dark { display: none; } .logo.only-light { display: inline-grid; } }

/* link chips under a row */
.row .links { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  background: var(--chip-bg);
  box-shadow: var(--chip-shadow);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-2);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.chip:hover {
  color: var(--fg);
  border-color: var(--chip-border-hover);
  background: var(--chip-bg-hover);
  box-shadow: var(--chip-shadow-hover);
  transform: translateY(-1px);
  text-decoration: none;
}
.chip:active { transform: translateY(0); box-shadow: var(--chip-shadow); }
.chip-ico { width: 12px; height: 12px; flex-shrink: 0; }
.ti { width: 12px; height: 12px; }
.gi { width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; opacity: 0.7; }
.grid li > a:hover .gi { opacity: 1; }
.fl { display: inline-flex; align-items: center; gap: 6px; }
.fi { width: 12px; height: 12px; opacity: 0.7; }
.fl:hover .fi { opacity: 1; }
.chip span { font-size: 0.85em; color: var(--fg-3); }
@media (max-width: 560px) { .row .links { grid-column: 2; } .chip { padding: 6px 11px 6px 10px; } }

/* compact grid for the Notion products */
.row .grid { grid-column: 2 / -1; margin-top: 16px; margin-bottom: 4px; }
.grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  font-size: 13px;
  line-height: 1.5;
}
.grid li { display: grid; gap: 1px; }
.grid li > a, .grid li > .name { font-weight: 500; width: fit-content; }
.grid li > span:last-child { color: var(--fg-2); }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } .row .grid { grid-column: 2; } }

/* footer */
.foot {
  position: relative;
  margin-top: 96px;
  padding-top: 24px;
  padding-bottom: 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-3);
}
.foot::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  border-top: 0.5px solid var(--line);
}
.foot a:hover { color: var(--fg); }
.copy {
  all: unset;
  cursor: pointer;
  position: relative;
  color: inherit;
}
.copy:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
.copy::after {
  content: "copied";
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.copy[data-state="copied"]::after { opacity: 1; }

/* scene: fixed page background (dark theme only) */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.scene picture, .scene img { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene img { object-fit: cover; object-position: 100% 0%; display: block; transform: scaleX(-1); }
/* keep the content column on dark ground; the light lives in the empty right side */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 55%, rgba(10,10,10,0) 100%);
}
.scene .dawn {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  animation: dawn 2s ease-out 0.2s both;
}
@keyframes dawn { from { opacity: 0.95; } to { opacity: var(--dawn, 0.3); } }
body.dense { --dawn: 0.55; }
@media (prefers-color-scheme: light) { .scene { display: none; } }
@media (prefers-reduced-motion: reduce) { .scene .dawn { animation: none; opacity: var(--dawn, 0.3); } }
@media print { .scene { display: none; } }

/* custom cursor (app.js adds .has-cursor on fine pointers only) */
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cur {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, background-color 0.25s ease;
}
.cur-on .cur { opacity: 1; }
.cur-dot { width: 6px; height: 6px; background: #ffffff; }
.cur-ring { width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, 0.8); }
.cur-hover .cur-ring { width: 52px; height: 52px; background: rgba(255, 255, 255, 0.16); }
.cur-hover .cur-dot { width: 4px; height: 4px; }
.cur-press .cur-ring { width: 26px; height: 26px; }

@media (max-width: 560px) {
  .intro { padding-top: 40px; padding-bottom: 32px; }
  section + section { margin-top: 56px; }
  .row { grid-template-columns: 20px 1fr; }
  .row .when { grid-column: 2; font-size: 12px; }
  .row .note { grid-column: 2; }
  .row .role { display: block; }
  .row .role::before { content: none; }
  .logo { align-self: start; margin-top: 3px; }
  .foot { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro, .about, .contact, .rows li, .foot { animation: none; }
  .logo, .skip, .copy::after, .cur, .chip, .btn, .ibtn { transition: none; }
}

@media print {
  :root { --bg: #fff; --fg: #0a0a0a; --fg-2: #6b6b6b; --fg-3: #9a9a9a; --line: #e5e5e5; --tile: #f0f0f0; }
  .skip, .cur { display: none; }
  .logo { filter: none; opacity: 1; }
  .intro, .about, .contact, .rows li, .foot { animation: none; }
}
