@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0c0d0b;
  --raise: #151613;
  --ink: #ece8dc;
  --soft: #c9c4b7;
  --muted: #8f8b7f;
  --line: #262722;
  --sun: #f2c94c;
  --sun-ink: #15130b;
  --pad: clamp(18px, 5vw, 64px);
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Bricolage", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--sun); color: var(--sun-ink); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; border-radius: 4px; }
p { margin: 0; }

/* header */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  padding: 16px var(--pad);
  pointer-events: none;
}
.top .mark { pointer-events: auto; }

.mark { display: flex; text-decoration: none; }
.mark img { display: block; transition: transform .5s var(--ease); }
.mark:hover img { transform: rotate(-6deg) scale(1.06); }
.top nav { display: flex; gap: 26px; margin-left: auto; }
.top nav a { position: relative; padding: 6px 0; font-size: 15px; text-decoration: none; color: var(--soft); transition: color .25s; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--sun); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.top nav a:hover { color: var(--ink); }
.top nav a:hover::after { transform: scaleX(1); transform-origin: left; }

main, .foot { padding: 0 var(--pad); }
main { max-width: 1240px; margin: 0 auto; }
.foot { max-width: 1240px; margin: 0 auto; }

/* hero */
.hero { padding: 150px 0 80px; }
.hello { color: var(--muted); font-size: 18px; margin-bottom: 18px; }
.name { margin: 0; font-weight: 750; font-size: clamp(56px, 12vw, 190px); line-height: .86; letter-spacing: -.055em; }
.name .line { display: block; overflow: hidden; padding-bottom: .04em; }
.name .muted-line { color: transparent; -webkit-text-stroke: 1.5px var(--muted); font-weight: 600; }
.name .ch { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.name.go .ch { transform: none; }
.caret { display: inline-block; width: .42em; height: .62em; margin-left: .06em; background: var(--sun); border-radius: .04em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.intro { margin-top: 44px; display: grid; gap: 8px; font-size: clamp(18px, 1.6vw, 21px); color: var(--soft); }
.ink { text-decoration: none; color: var(--ink); background: linear-gradient(var(--sun), var(--sun)) 0 100% / 100% 1.5px no-repeat; transition: background-size .35s var(--ease), color .35s; padding: 0 2px; }
.ink:hover { background-size: 100% 100%; color: var(--sun-ink); }

/* photo + note */
.me { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: center; padding: 40px 0 110px; }
.photo { position: relative; margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--raise); }
.photo picture { display: block; height: 100%; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* black and white underneath, color sweeps in diagonally (top-left to bottom-right) */
.photo .bw { filter: grayscale(1) contrast(1.05) brightness(.96); }
.photo .color {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 0 0, 0 0);
  transition: clip-path 1.1s cubic-bezier(.65, 0, .35, 1);
}
.photo:hover .color, .photo.color-on .color { clip-path: polygon(0 0, 200% 0, 0 200%); }
.note { margin: 0; padding: 0; border: 0; }
.note p { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.15; font-weight: 650; letter-spacing: -.03em; }
.note p + p { margin-top: 14px; }
.note p:nth-child(2) { color: var(--soft); font-weight: 500; }
.note p:last-child { color: var(--sun); }

/* blocks */
.block { padding: 64px 0 24px; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.block h2 { margin: 0 0 14px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }

/* posts */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-bottom: 1px solid var(--line); }
.posts a {
  display: grid; grid-template-columns: 170px 1fr; column-gap: 24px; row-gap: 4px; align-items: baseline;
  padding: 22px 8px; text-decoration: none; transition: background .3s var(--ease), padding .4s var(--ease);
}
.posts a:hover { background: var(--raise); padding-left: 16px; }
.posts .when, .timeline .when, .date { font: 400 14px/1.5 var(--mono); color: var(--muted); }
.post-title { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.posts a:hover .post-title { color: var(--sun); }
.post-sum { grid-column: 2; color: var(--muted); font-size: 16px; }
.posts .empty { padding: 22px 8px; color: var(--muted); border: 0; }

/* formation */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 20px 8px; border-bottom: 1px solid var(--line); }
.timeline h3 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.timeline p { color: var(--muted); }

/* contact */
.mail { font-size: 19px; color: var(--soft); }
.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 26px 0 0; }
.socials a {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px 11px 14px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-size: 15px; background: var(--raise);
  transition: transform .35s var(--ease), border-color .35s, color .35s;
}
.socials svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.socials a:hover { transform: translateY(-3px); border-color: var(--sun); color: var(--sun); }

.foot { padding-top: 60px; color: var(--muted); font-size: 14px; overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 24px; }
.foot-right { display: grid; justify-items: end; gap: 8px; margin-left: auto; text-align: right; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; }
.hosted { color: var(--muted); text-align: center; font-size: 13px; padding: 4px 0 28px; }
/* large name that rises a little slower than the page as the bottom comes into view */
.foot-mark {
  margin: 48px 0 0; padding-bottom: clamp(10px, 2vw, 24px);
  font-size: clamp(64px, 18.5vw, 252px); font-weight: 750; line-height: .82; letter-spacing: -.06em;
  white-space: nowrap; color: #191a16; user-select: none;
  transform: translateY(calc((1 - var(--p, 1)) * 38%));
  will-change: transform;
}
.foot-caret { display: inline-block; width: .34em; height: .5em; margin-left: .05em; background: var(--sun); opacity: .85; border-radius: .03em; }
.foot a { color: var(--soft); text-decoration: none; transition: color .25s; }
.foot a:hover { color: var(--sun); }

/* legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 130px 0 40px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.04em; margin: 8px 0 10px; }
.legal .updated { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; letter-spacing: -.015em; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--soft); font-size: 17px; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 10px 0 0; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ink); text-decoration-color: var(--sun); text-underline-offset: 3px; }

/* single post */
.article { max-width: 720px; margin: 0 auto; padding: 140px 0 60px; }
.back { display: inline-block; text-decoration: none; color: var(--muted); font-size: 15px; margin-bottom: 36px; transition: color .25s, transform .35s var(--ease); }
.back:hover { color: var(--sun); transform: translateX(-4px); }
.article h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -.04em; margin: 10px 0 36px; }
.prose { color: var(--soft); font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { color: var(--ink); letter-spacing: -.02em; line-height: 1.2; margin-top: 1.8em; }
.prose a { color: var(--ink); text-decoration-color: var(--sun); text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--raise); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: var(--raise); border: 1px solid var(--line); padding: 16px 18px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--sun); color: var(--muted); }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 700px) {
  .me { grid-template-columns: 1fr; padding-bottom: 72px; }
  .posts a, .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .post-sum { grid-column: 1; }
  .top nav { gap: 18px; }
  .name { font-size: 18vw; }
  .name .muted-line { -webkit-text-stroke-width: 1px; }
  .hero { padding-top: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .name .ch, .foot-mark { opacity: 1 !important; transform: none !important; }
}
.timeline li:last-child { border-bottom: 0; }
.legal ul + p { margin-top: 14px; }
@media (max-width: 600px) { .foot-right { justify-items: start; margin-left: 0; text-align: left; } .foot nav { justify-content: flex-start; } }
