/* Self-hosted fonts (Inter Tight, Geist Mono; SIL Open Font License) */
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/GeistMono-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/GeistMono-400-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; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/GeistMono-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/GeistMono-400-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; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/InterTight-300-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/InterTight-300-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; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/InterTight-300-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/InterTight-300-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; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/InterTight-300-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/InterTight-300-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; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/InterTight-300-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/InterTight-300-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; }

/* Palette: black, off-white and greys only */
:root {
  --black: #000;
  --ink: #0b0b0b;
  --ink-2: #131313;
  --line: #2a2a2a;
  --grey: #9c9c98;      /* AA on black */
  --text: #e6e6e2;      /* body copy */
  --white: #f4f4f1;
  --on-light: #1a1a1a;

  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --pixel: "Tiny5", "Geist Mono", monospace;
  --snap: cubic-bezier(0.8, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration-color: var(--grey); text-underline-offset: .25em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
ul { margin: 0; padding: 0; list-style: none; }
h2, h3, p, dl, dd { margin: 0; }

/* shared column. Leaves room for the side nav on wide screens */
.col { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (min-width: 1100px) { .col { width: min(1200px, 100% - 400px); } }
.block { padding-block: clamp(80px, 14vh, 160px); }

/* small uppercase mono used for labels, dates, nav */
.label, .job-year, .job-role em, .when, .plain time, .side a, .btn, .hero-meta {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.label { color: var(--grey); margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.label::before { content: ""; width: 8px; height: 8px; background: var(--white); }

.section-title {
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 6rem);
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: clamp(32px, 6vh, 72px);
}
h3 { font-weight: 500; font-size: 1.4rem; letter-spacing: -.01em; line-height: 1.25; }
h3.sub { margin-bottom: 14px; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); font-weight: 400; }
.role { margin-top: 4px; color: var(--grey); }

/* loader: white sheet that lifts to reveal the black page */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--white); color: var(--black);
}
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hourglass { display: block; }
.loader-count { font-family: var(--mono); font-size: .9rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* cursor: small tilted square */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 90; width: 0; height: 0;
  pointer-events: none; opacity: 0; transition: opacity .2s;
  mix-blend-mode: difference;
}
.cursor.on { opacity: 1; }
.cursor i {
  position: absolute; left: -6px; top: -5px; width: 12px; height: 10px;
  background: #fff; transform: rotate(-14deg);
  transition: transform .45s var(--snap);
}
.cursor.big i { transform: rotate(0deg) scale(4.5); }
@media (pointer: coarse) { .cursor { display: none; } }

/* top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px;
  padding: 0 clamp(20px, 2.5vw, 32px);
  background: rgba(11, 11, 11, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--white);
}
.bar a { text-decoration: none; }
.logo { font-weight: 500; font-size: .95rem; letter-spacing: -.005em; color: var(--white); }
.logo:hover { text-decoration: underline; text-underline-offset: .3em; }
.bar-time { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* side navigation */
.side { mix-blend-mode: difference; position: fixed; left: clamp(20px, 2.5vw, 32px); top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; gap: 14px; }
@media (min-width: 1100px) { .side { display: flex; } }
.side a { position: relative; padding-left: 22px; color: #8a8a86; text-decoration: none; transition: color .3s; }
.side a::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: var(--white); transform: scale(0); transition: transform .35s var(--snap); }
.side a:hover { color: var(--text); }
.side a.is-active { color: var(--white); }
.side a.is-active::before { transform: scale(1); }

/* hero: centred, as in the reference */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 110px 24px 64px;
  overflow: hidden;
}
h1 { margin: 0 0 clamp(28px, 5vh, 52px); text-transform: uppercase; line-height: .98; }
.line { display: block; overflow: hidden; padding: .04em .08em .12em; margin-bottom: -.12em; }
.line-in { display: block; font-weight: 300; font-size: clamp(3rem, 11.5vw, 11.5rem); letter-spacing: -.035em; will-change: transform; }
.hero-desc { max-width: 30em; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--text); }
.hero-meta { margin-top: 18px; color: var(--grey); }
.btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 36px;
  padding: 18px 28px;
  background: var(--ink); border: 1px solid #2f2f2f; color: var(--white);
  text-decoration: none;
  transition: background .35s var(--snap), color .35s var(--snap);
}
.btn::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.btn:hover { background: var(--white); color: var(--black); }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(14px, 2vw, 24px); }
.marquee-track { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); width: max-content; white-space: nowrap; font-weight: 300; font-size: clamp(1.8rem, 5vw, 4rem); letter-spacing: -.03em; line-height: 1.1; text-transform: uppercase; color: var(--white); padding-right: clamp(24px, 4vw, 56px); }
.marquee-track i { display: block; width: .22em; height: .22em; background: var(--grey); flex: none; }

/* about */
.about { padding-block: clamp(100px, 22vh, 240px); }
.about-text { max-width: 28em; font-weight: 400; font-size: clamp(1.5rem, 2.9vw, 2.5rem); line-height: 1.3; letter-spacing: -.02em; color: var(--white); }
.about-text .w { display: inline-block; }

/* experience: index rows */
.jobs { padding-bottom: clamp(80px, 14vh, 160px); }
.job { border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job-head {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 5rem 1fr 15rem 2rem; align-items: center; gap: 12px 24px;
  padding: clamp(22px, 3vw, 34px) 0;
  overflow: hidden; isolation: isolate;
  transition: padding .5s var(--snap), color .3s;
}
.job-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--white);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .5s var(--snap);
}
.job-head:focus-visible { padding-inline: 20px; color: var(--black); }
.job-head:focus-visible::before { transform: scaleY(1); }
.job-head:focus-visible :is(.job-year, .job-role, .job-role em) { color: #3a3a3a; }
@media (hover: hover) {
  .job-head:hover { padding-inline: 20px; color: var(--black); }
  .job-head:hover::before { transform: scaleY(1); }
  .job-head:hover :is(.job-year, .job-role, .job-role em) { color: #3a3a3a; }
}
.job-year, .job-role em { color: var(--grey); transition: color .3s; }
.job-name { font-weight: 300; font-size: clamp(1.6rem, 4.2vw, 3.6rem); letter-spacing: -.03em; line-height: 1.05; text-transform: uppercase; color: inherit; }
.job-role { display: flex; flex-direction: column; gap: 4px; font-size: 1rem; line-height: 1.35; color: var(--text); }
.job-role em { font-style: normal; }
.job-plus { position: relative; width: 16px; height: 16px; justify-self: end; transition: transform .5s var(--snap); }
.job-plus::before, .job-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; }
.job-plus::after { transform: rotate(90deg); }
.job.is-open .job-plus { transform: rotate(45deg); }
.job-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--snap); }
.job.is-open .job-body { grid-template-rows: 1fr; }
.job:not(.is-open) .job-body { visibility: hidden; transition: grid-template-rows .6s var(--snap), visibility 0s .6s; }
.job-body > div { overflow: hidden; }
.job-body ul { padding: 4px 0 36px calc(5rem + 24px); max-width: 60em; }

/* job bullet lists */
.job-body li { position: relative; padding-left: 1.4em; margin-bottom: .75em; max-width: 42em; line-height: 1.6; color: var(--text); }
.job-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--white); }

/* facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(80px, 14vh, 160px); }
.facts > div { padding: 28px 24px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.fact-n { font-weight: 300; font-size: clamp(2rem, 3.6vw, 3.2rem); letter-spacing: -.03em; line-height: 1; color: var(--white); }
.fact-t { color: var(--grey); font-size: .95rem; line-height: 1.4; max-width: 15em; }

/* projects: title stays put on the left while the details scroll past on the right */
.projects { padding-bottom: clamp(80px, 14vh, 160px); }
.project { display: grid; grid-template-columns: 5fr 7fr; gap: 24px clamp(32px, 6vw, 96px); padding-block: clamp(40px, 8vh, 80px); border-top: 1px solid var(--line); }
.project:last-child { border-bottom: 1px solid var(--line); }
.project header { align-self: start; position: sticky; top: 96px; }
.project h3 { font-weight: 300; text-transform: uppercase; font-size: clamp(1.8rem, 3.4vw, 3rem); letter-spacing: -.03em; line-height: 1.05; color: var(--white); }
.p-sub { margin-top: 14px; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); line-height: 1.5; }
.project li { position: relative; padding-left: 1.4em; margin-bottom: .85em; max-width: 40em; line-height: 1.6; color: var(--text); }
.project li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--white); }
.p-link { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: .4em; }
/* rows (skills, education) */
.row { position: relative; }
.row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: left; transform: scaleX(var(--line-p, 1)); }
.skills .row { display: grid; grid-template-columns: 17rem 1fr; gap: 8px 32px; padding: 26px 0; }
.skills .row:last-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.skills dt { font-weight: 500; font-size: 1.2rem; color: var(--white); }
.skills dd { max-width: 42em; color: var(--text); }

.edu .row { display: grid; grid-template-columns: 17rem 1fr; gap: 8px 32px; padding: 28px 0; }
.edu .when { color: var(--grey); padding-top: .4rem; }
.edu h3 { font-weight: 300; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.025em; }
.note { margin-top: 10px; max-width: 36em; color: var(--text); }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; margin-top: clamp(56px, 10vh, 100px); }
.plain .row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; color: var(--text); }
.plain .lvl { flex: none; color: var(--grey); font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; padding-top: .25rem; }
.plain time { flex: none; color: var(--grey); padding-top: .25rem; }

/* contact: inverted, a flash of white at the end */
.contact { background: var(--white); color: var(--on-light); padding-block: clamp(80px, 18vh, 200px); overflow: hidden; }
.contact-lede { max-width: 24em; margin-bottom: clamp(32px, 7vh, 80px); font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.35; }
.mail {
  display: inline-block;
  font-weight: 300; text-transform: uppercase;
  font-size: clamp(1.7rem, 6.2vw, 5.8rem);
  letter-spacing: -.035em; line-height: 1;
  text-decoration: none; overflow-wrap: anywhere;
}
.mail:hover { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .14em; }
.contact-list { margin-top: clamp(32px, 7vh, 80px); }
.contact-list li { padding: 4px 0; }
.contact a { text-decoration-color: rgba(0, 0, 0, .4); }
.contact :focus-visible { outline-color: var(--black); }

/* small screens, no-JS and reduced motion: plain vertical flow */
@media (max-width: 860px) {
  .job-head { grid-template-columns: 1fr 2rem; }
  .job-year, .job-name, .job-role { grid-column: 1; }
  .job-plus { grid-column: 2; grid-row: 1 / span 3; }
  .job-body ul { padding-left: 0; }
  .skills .row, .edu .row { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .project { grid-template-columns: 1fr; }
  .project header { position: static; }
}
html:not(.js) .loader, html:not(.js) .cursor, .static .loader, .static .cursor { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
