:root {
  --bg: #f2f2f0;
  --ink: #0d0d0d;
  --grey-1: #e4e4e1;
  --grey-2: #c9c9c5;
  --grey-3: #8a8a86;
  --grey-4: #4a4a47;
  --rule: rgba(13, 13, 13, 0.18);
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  font-size: 14px; letter-spacing: 0.01em;
  mix-blend-mode: difference; color: #fff;
}
.nav__brand { font-weight: 600; }
.nav__links { display: flex; gap: 28px; }
.nav a { position: relative; }
.nav__links a::after, .nav__cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.7,0,.2,1);
}
.nav__links a:hover::after, .nav__cta:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* MOBILE MENU */
.nav__toggle {
  display: none; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu a {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(36px, 11vw, 56px); letter-spacing: -0.04em; line-height: 1.1;
  padding: 6px 0; border-bottom: 1px solid rgba(242, 242, 240, 0.15);
  transform: translateY(20px); opacity: 0; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .5s;
}
.menu a span { font-size: 13px; letter-spacing: 0; color: #8f8f8b; font-family: var(--sans); font-style: normal; }
/* the page you're on: italic serif, like the headline accents */
.menu a[aria-current="page"] { font-family: var(--serif); font-style: italic; letter-spacing: -0.01em; }
.menu a[aria-current="page"] span { color: var(--bg); }
.menu.is-open a { transform: none; opacity: 1; }
.menu.is-open a:nth-child(2) { transition-delay: .04s; }
.menu.is-open a:nth-child(3) { transition-delay: .08s; }
.menu.is-open a:nth-child(4) { transition-delay: .12s; }
.menu.is-open a:nth-child(5) { transition-delay: .16s; }
.menu.is-open a:nth-child(6) { transition-delay: .2s; }
.menu.is-open a:nth-child(7) { transition-delay: .24s; }
.menu .menu__resume { font-size: 18px; letter-spacing: 0; border: 0; margin-top: 24px; }
body.menu-open { overflow: hidden; }

/* HERO */
.hero { padding: 120px var(--gutter) 0; }
.hero__title {
  font-size: clamp(52px, 11.5vw, 190px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.line {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding: 0.04em 0 0.06em;
}
.line__inner { display: block; }
.line__meta {
  font-size: 13px; letter-spacing: 0.02em; font-weight: 400;
  color: var(--grey-3); padding-bottom: 0.9em; white-space: nowrap;
}
.hero__title em { letter-spacing: -0.02em; }
.hero__media { margin-top: clamp(32px, 6vw, 72px); overflow: hidden; border-radius: 4px; }

/* PLACEHOLDER IMAGES */
.ph {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #d6d6d2, #a9a9a5 55%, #7d7d79);
  filter: grayscale(1) contrast(.9) brightness(1.05);
  transition: filter .6s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 14px; bottom: 12px;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,.85);
}
.ph--wide { aspect-ratio: 21 / 9; }
.ph--portrait { aspect-ratio: 4 / 5; }
.frame { overflow: hidden; border-radius: 4px; background: var(--grey-1); }
.frame--portrait { aspect-ratio: 4 / 5; }
.frame--portrait .photo { object-position: 50% 30%; }
/* the one splash of colour on the page */
img.photo.photo--color { filter: none; }
/* real images get the same treatment */
img.photo { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(.9); transition: filter .6s ease, transform .9s cubic-bezier(.2,.7,.2,1); }

/* TICKER */
.ticker {
  margin-top: clamp(40px, 7vw, 90px);
  border-block: 1px solid var(--rule);
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
}
.ticker__track { display: inline-flex; align-items: center; width: max-content; animation: ticker 32s linear infinite; will-change: transform; }
.ticker span {
  display: inline-flex; align-items: center;
  font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.02em; padding-right: 0.6em;
}
/* drawn separator: a text glyph like ✳ renders as a green emoji on iOS */
.ticker span::after {
  content: ""; width: 0.22em; height: 0.22em; border-radius: 50%;
  background: var(--grey-3); margin-left: 0.6em; flex: none;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { padding: clamp(72px, 11vw, 150px) var(--gutter); }
.section__head {
  display: flex; align-items: baseline; gap: 18px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px; margin-bottom: clamp(32px, 5vw, 60px);
}
.section__head h2 { font-size: clamp(32px, 4.5vw, 64px); letter-spacing: -0.035em; line-height: 1; }
.num { font-size: 13px; color: var(--grey-3); font-variant-numeric: tabular-nums; }
.section__link, .section__aside { margin-left: auto; font-size: 14px; color: var(--grey-3); }
.section__link:hover { color: var(--ink); }

/* ABOUT */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.lead { font-size: clamp(26px, 3vw, 42px); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 1em; }
.about__text p:not(.lead) { max-width: 56ch; color: var(--grey-4); }
.about__portrait { margin: 0; overflow: hidden; }
.about__portrait figcaption { font-size: 13px; color: var(--grey-3); margin-top: 10px; }
.about__portrait:hover .photo { transform: scale(1.03); }

/* EXPERIENCE (inverted) */
.section--invert { background: var(--ink); color: var(--bg); --rule: rgba(242, 242, 240, 0.2); }
.section--invert .num, .section--invert .xp__years, .section--invert .xp__note { color: #8f8f8b; }
.xp { list-style: none; margin: 0; padding: 0; }
.xp__row {
  display: grid; grid-template-columns: 160px 1.3fr 1fr 1.4fr; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
  transition: padding .4s ease;
}
.xp__row:hover { padding-left: 14px; }
.xp__role { font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.025em; line-height: 1.1; }
.xp__co { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 28px); }
.xp__years, .xp__note { font-size: 14px; }

/* WORK */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  font: inherit; font-size: 14px; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 999px; padding: 7px 16px;
  transition: background .25s, color .25s, border-color .25s;
}
.filters button:hover { border-color: var(--ink); }
.filters button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
.card { display: block; }
.card .ph, .card .photo { border-radius: 4px; }
.card > .ph { overflow: hidden; }
.card:hover .ph, .card:hover .photo { filter: grayscale(1) contrast(1.15); transform: scale(0.98); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; }
.card__meta h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; }
.card__meta span { font-size: 14px; color: var(--grey-3); }
/* PROJECT ART */
.art {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px;
  container-type: inline-size;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.card:hover .art { transform: scale(0.98); }

.art--healthie { background: #161616; }
.mock {
  position: absolute; width: 60%; height: auto; border-radius: 2.2cqw;
  filter: grayscale(1) contrast(1.08) brightness(1.15);
  box-shadow: 0 2cqw 5cqw rgba(0,0,0,.55);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.mock--1 { left: 5%;  top: 14%; transform: rotate(-5deg); }
.mock--3 { right: 5%; top: 8%;  transform: rotate(4deg); }
.mock--2 { left: 20%; top: 34%; z-index: 2; }
.card:hover .mock--1 { transform: rotate(-8deg) translate(-4%, -3%); }
.card:hover .mock--3 { transform: rotate(7deg) translate(4%, -3%); }
.card:hover .mock--2 { transform: translateY(-4%); }

.art--coffee {
  background: var(--grey-1); color: var(--ink);
  display: grid; grid-template-columns: 30% 1fr; align-items: center; gap: 6cqw; padding: 0 8cqw;
}
.bag { width: 100%; height: auto; }
.log { list-style: none; margin: 0; padding: 0; font-size: 3.4cqw; }
.log li {
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 2cqw;
  padding: 2.2cqw 0; border-bottom: 1px solid var(--rule);
}
.log li:first-child { border-top: 1px solid var(--rule); }
.log li span:nth-child(2) { color: var(--grey-3); }
.log .dots { letter-spacing: 0.15em; font-size: 0.8em; }

.art--site { background: var(--grey-1); display: flex; align-items: center; padding: 0 7cqw; }
.mini { width: 100%; font-size: 9.5cqw; line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; }
.mini span { display: block; border-bottom: 1px solid var(--rule); padding: 0.05em 0 0.07em; }

.art--term { background: #1a1a1a; display: flex; align-items: center; justify-content: center; padding: 8cqw; }
.term { width: 100%; background: #0d0d0d; border: 1px solid #2c2c2c; border-radius: 1.6cqw; overflow: hidden; }
.term__bar { display: flex; gap: 1.2cqw; padding: 2.2cqw 2.6cqw; border-bottom: 1px solid #2c2c2c; }
.term__bar i { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #3d3d3d; }
.term pre {
  margin: 0; padding: 3.5cqw 4cqw 4.5cqw; color: #9a9a96;
  font: 3.4cqw/1.7 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap;
}
.term b { color: #f2f2f0; font-weight: 500; }
.caret { color: #f2f2f0; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.card__desc { margin: 6px 0 0; font-size: 15px; color: var(--grey-4); max-width: 52ch; }
.card.is-hidden { display: none; }

/* WRITING */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--rule); }
.post {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 24px 28px 0; min-height: 260px;
  border-bottom: 1px solid var(--rule);
  transition: background .35s ease, padding .35s ease;
}
.post:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 24px; }
.post:hover { background: var(--ink); color: var(--bg); padding-left: 24px; }
.post__date { font-size: 13px; color: var(--grey-3); }
.post h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; line-height: 1.15; }
.post p { margin: 0; color: var(--grey-3); font-size: 15px; }
.post__more { margin-top: auto; font-size: 14px; }

/* LATELY */
.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
.pick { display: flex; flex-direction: column; }
.pick__img {
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: var(--grey-1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.pick__img img {
  width: 100%; height: 100%; display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter .6s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.pick__img--cover img { object-fit: cover; }
/* multiply melts white product backgrounds into the grey tile */
.pick__img--contain img { object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
.pick:hover .pick__img img { filter: grayscale(0); transform: scale(1.04); }
.pick__kind { font-size: 13px; color: var(--grey-3); }
.pick h3 { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.pick__by { font-size: 14px; color: var(--grey-4); margin-top: 2px; }

/* NOW (beneath Lately) */
.now { margin: clamp(40px, 5vw, 64px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--rule); padding-top: 24px; }
.now dt { font-size: 13px; color: var(--grey-3); margin-bottom: 8px; }
.now dd { margin: 0; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.2; }

/* CONTACT */
.contact { padding: clamp(80px, 12vw, 180px) var(--gutter) clamp(60px, 8vw, 100px); border-top: 1px solid var(--rule); }
.contact__kicker { font-size: 14px; color: var(--grey-3); margin: 0 0 12px; }
.contact__big {
  display: inline-block;
  font-size: clamp(56px, 13vw, 220px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 500;
  transition: letter-spacing .5s cubic-bezier(.2,.7,.2,1);
}
.contact__big:hover { letter-spacing: -0.03em; }
.contact__links { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 28px; font-size: 16px; }
.contact__links a:hover { color: var(--grey-3); }

/* FOOTER */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 20px var(--gutter); font-size: 13px; color: var(--grey-3);
  border-top: 1px solid var(--rule);
}
.footer a:hover { color: var(--ink); }

/* RESUME REQUEST SIDEBAR */
.drawer { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(13, 13, 13, 0.35);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .4s ease;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(460px, 100%);
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; gap: 22px;
  padding: 26px clamp(24px, 3vw, 40px) 32px;
  border-left: 1px solid var(--rule);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.18);
  transform: translateX(100%); transition: transform .55s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.drawer__close { font: inherit; font-size: 18px; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px; line-height: 1; }
.drawer__title { font-size: clamp(40px, 5vw, 56px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; margin-top: 18px; }
.drawer__text { margin: 0; color: var(--grey-4); max-width: 36ch; }
.drawer__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.btn {
  display: flex; justify-content: space-between; align-items: center;
  font: inherit; font-size: 16px; text-align: left; cursor: pointer;
  padding: 16px 20px; border-radius: 999px;
  background: transparent; color: var(--ink); border: 1px solid var(--ink);
  transition: background .25s, color .25s;
}
.btn--primary { background: var(--ink); color: var(--bg); }
/* hover only on real pointers, so taps on phones don't leave buttons "stuck" dark */
@media (hover: hover) {
  .btn:hover { background: var(--ink); color: var(--bg); }
  .btn--primary:hover { background: var(--grey-4); border-color: var(--grey-4); }
}
.btn.is-copied { background: var(--ink); color: var(--bg); }
.drawer__email { margin: auto 0 0; font-size: 13px; color: var(--grey-3); }
body.drawer-open { overflow: hidden; }

/* phones: rise from the bottom as a sheet */
@media (max-width: 600px) {
  .drawer__panel {
    top: auto; bottom: 0; height: auto; max-height: 92%; width: 100%;
    border-left: 0; border-top: 1px solid var(--rule); border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
  .drawer__email { margin-top: 4px; }
}

/* CURSOR (fine pointers only) */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: 200;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference; pointer-events: none;
    transition: width .25s ease, height .25s ease, margin .25s ease;
  }
  .cursor.is-hover { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  /* frosted bar on phones so the nav never prints over body text */
  .nav {
    mix-blend-mode: normal; color: var(--ink);
    background: rgba(242, 242, 240, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid rgba(13, 13, 13, 0.08);
    padding-block: 14px;
  }
  body.menu-open .nav { background: transparent; border-color: transparent; color: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 420px; }
  .xp__row { grid-template-columns: 1fr; gap: 4px; }
  .work { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr; }
  .post:nth-child(even) { border-left: 0; padding-left: 0; }
  .post { min-height: 0; }
  .now { grid-template-columns: repeat(2, 1fr); }
  /* swipeable row on phones */
  .picks {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .picks::-webkit-scrollbar { display: none; }
  .pick { scroll-snap-align: start; }
  .line__meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* keep the ticker, just slower and calmer */
  .ticker__track { animation-duration: 70s; }
  .caret { animation: none; }
}
