/* Tokens from the Figma file */
:root {
  --main: #6f51e4;
  --main-hover: #8872dd;
  --bg-page: #101010;
  --bg-surface: #141414;
  --border: #414141;
  --text-primary: #d9d9d9;
  --text-tertiary: #9a9a9a;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Lexend", system-ui, sans-serif;
  --gutter: clamp(20px, 4.44vw, 64px);
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font: 400 18px/26px var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main { flex: 1; }

/* Drifting pixels behind the home page (drawn by site.js). lvh keeps the size
   steady when a phone's address bar slides away. */
.page-pixels { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--main-hover); outline-offset: 3px; border-radius: 2px; }

.container {
  width: 100%;
  max-width: calc(1312px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-title {
  font: 700 clamp(36px, 7vw, 56px) / 1.143 var(--font-heading);
  text-transform: uppercase;
}

.section-title {
  font: 700 clamp(22px, 4vw, 30px) / 1.267 var(--font-heading);
  text-transform: uppercase;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; white-space: nowrap; }
.brand__name { font: 600 24px/32px var(--font-heading); transition: color .2s; }
.brand__role { font-size: 13px; line-height: 20px; color: var(--text-tertiary); transition: color .2s; }
.brand:hover .brand__name, .brand:focus-visible .brand__name { color: var(--main); }
.brand:hover .brand__role, .brand:focus-visible .brand__role { color: var(--text-primary); }

.nav__links { display: flex; align-items: center; gap: 50px; }
.nav__links a { font-weight: 500; font-size: 16px; line-height: 24px; white-space: nowrap; transition: color .2s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--main-hover); }

.nav__contact { justify-self: end; color: var(--main); white-space: nowrap; transition: color .2s; }
.nav__contact:hover { color: var(--main-hover); }

.nav__contact--menu { display: none; }

/* Contact Me popup (built by site.js) */
.contact-menu {
  position: fixed; z-index: 60; width: 260px; padding: 6px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  animation: contact-in .16s steps(3);
}
.contact-menu[hidden] { display: none; }
@keyframes contact-in { from { opacity: 0; transform: translateY(-6px); } }
.contact-menu__item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 6px; transition: background .15s; }
.contact-menu__item:hover, .contact-menu__item:focus-visible { background: rgba(111, 81, 228, .22); outline: none; }
.contact-menu__label { font-weight: 500; font-size: 16px; line-height: 22px; color: #fff; }
.contact-menu__detail { font-size: 13px; line-height: 18px; color: var(--text-tertiary); overflow-wrap: anywhere; }

.nav__toggle { display: none; justify-self: end; width: 44px; height: 44px; margin-right: -10px; position: relative; }
.nav__toggle span {
  position: absolute; left: 10px; width: 24px; height: 2px;
  background: var(--text-primary);
  transition: transform .25s, top .25s;
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span { top: 21px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* Hero and image trail */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 40px var(--gutter) max(12vh, 110px);
  text-align: center;
}

.hero__name, .hero__role {
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .75); /* stays readable over bright trail images */
}
.hero__name { font: 700 clamp(28px, 8.2vw, 72px) / 1.11 var(--font-heading); }
.hero__role { font: 700 clamp(14px, 4.5vw, 30px) / 1.267 var(--font-heading); }

.hero__word { display: inline-block; white-space: nowrap; }
.hero__letter { display: inline-block; }
.hero__bar { color: var(--main-hover); animation: bar-blink 1.1s steps(1) infinite; }
@keyframes bar-blink { 50% { opacity: 0; } }

.trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.trail__img { position: absolute; width: 150px; height: 113px; }

/* Scroll cue between the name and the projects */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  transform: translateX(-50%);
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .2s;
}
.hero__scroll:hover, .hero__scroll:focus-visible { color: var(--main-hover); }
.hero__scroll-icon { width: 21px; height: 27px; fill: var(--main-hover); shape-rendering: crispEdges; animation: scroll-bob 1.4s steps(3) infinite alternate; }
.hero__scroll-icon g { animation: scroll-flash 1.4s steps(1) infinite; }
.hero__scroll-icon g + g { animation-delay: .35s; }
@keyframes scroll-bob { to { transform: translateY(6px); } }
@keyframes scroll-flash { 50% { opacity: .3; } }

.home-work { scroll-margin-top: var(--nav-height); }

/* Work grid */
.work-grid {
  display: grid;
  /* Cards are 632 x 444 in Figma; they never grow past that */
  grid-template-columns: repeat(2, minmax(0, 632px));
  justify-content: space-between;
  column-gap: 45px;
  row-gap: 56px;
}

.card__media { aspect-ratio: 632 / 444; overflow: hidden; }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) {
  .card:hover .card__media img { transform: scale(1.03); }
}

.card__meta { margin-top: 20px; display: grid; gap: 8px; }
.card__row { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 24px; }
.card__row--small { font-size: 14px; line-height: 22px; }
.card__title { font: inherit; }
.card[hidden] { display: none; }

.home-work { padding-top: 24px; }

.more { padding-top: 73px; padding-bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: 51px; }
.more .section-title { color: #fff; text-align: center; }
.more .work-grid { width: 100%; }

/* Info overlay on the home page photos (built by site.js) */
.photo-info { position: relative; cursor: pointer; }
.photo-info:focus-visible { outline-offset: 4px; }
.photo-info__pixels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.photo-info__copy {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 10px; padding: 32px; text-align: center; color: #fff;
  opacity: 0; transition: opacity .2s steps(3); pointer-events: none;
}
.photo-info__copy h3 { font: 700 clamp(20px, 2.4vw, 30px) / 1.2 var(--font-heading); text-transform: uppercase; }
.photo-info__copy p { max-width: 460px; }
.photo-info.is-open .photo-info__copy { opacity: 1; }
.photo-info.is-plain { box-shadow: inset 0 0 0 999px rgba(16, 16, 16, .82); }
@media (hover: none) { .photo-info::after { content: "Tap for info"; position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; background: rgba(16, 16, 16, .75); border-radius: 4px; font-size: 13px; line-height: 20px; } .photo-info.is-open::after { display: none; } }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 48px;
  padding: 8px 24px;
  border-radius: 8px;
  background: var(--main-hover);
  white-space: nowrap;
  transition: background .2s;
}
.button:hover { background: var(--main); }

/* All work */
.work-page { padding-top: 65px; padding-bottom: 97px; }

.filters { display: flex; flex-wrap: wrap; gap: 24px; margin: 72px 0 52px; }
.filter {
  min-width: 110px; /* Figma tab minimum */
  min-height: 48px;
  padding: 4px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .2s, border-color .2s;
}
.filter:hover { border-color: var(--main-hover); }
.filter[aria-pressed="true"] { background: var(--main); border-color: var(--main); }

/* About */
.about-page { padding-top: 69px; padding-bottom: 64px; }

.intro {
  max-width: 1022px;
  margin: 69px auto 104px;
  display: grid;
  grid-template-columns: 317px minmax(0, 642px);
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.intro__photo { width: 100%; aspect-ratio: 317 / 432; object-fit: cover; }
.intro__text { color: #fff; display: grid; gap: 26px; }

.resume-section + .resume-section { margin-top: 40px; }
.resume-section > .section-title { margin-bottom: 40px; }
.resume-list { display: grid; gap: 16px; }
.resume-item {
  display: flex;
  justify-content: space-between;
  gap: 4px 32px;
  min-height: 71px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.resume-item__role { font: 400 22px/32px var(--font-body); }
.resume-item__link {
  display: inline;
  text-decoration: underline transparent 1px;
  text-underline-offset: 4px;
  transition: color .2s, text-decoration-color .2s;
}
.resume-item__link::after { content: " \2197"; font-family: system-ui, "Segoe UI Symbol", sans-serif; }
.resume-item__link:hover, .resume-item__link:focus-visible {
  color: var(--main-hover);
  text-decoration-color: currentColor;
}

/* Hover preview for About page links (desktop only, added by site.js) */
.link-preview {
  position: fixed;
  z-index: 30;
  width: 280px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--main-hover);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity .16s steps(3), transform .16s steps(3), visibility 0s .16s;
}
.link-preview.is-visible { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.link-preview__media { aspect-ratio: 16 / 10; background: var(--main); }
.link-preview__media[hidden] { display: none; }
.link-preview__img { width: 100%; height: 100%; object-fit: cover; }
.link-preview__text { padding: 12px 14px 14px; }
.link-preview__title { font-weight: 500; font-size: 16px; line-height: 22px; }
.link-preview__where { margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--text-tertiary); }

.card { position: relative; scroll-margin-top: calc(var(--nav-height) + 24px); }
/* Makes a whole card clickable when it has a project page */
.card__cover { position: absolute; inset: 0; z-index: 1; border-radius: 2px; }
.card:has(.card__cover):hover .card__title { color: var(--main-hover); }
.card__title { transition: color .2s; }
.card:target .card__title { color: var(--main-hover); }

.resume-item__org { font-size: 14px; line-height: 22px; }
.resume-item__date { font-size: 22px; line-height: 32px; white-space: nowrap; }

/* Project pages (rod3nt.html, notlb.html and future ones) */
.project { padding-bottom: 96px; }
.project-intro { padding-top: 28px; }
.project-intro__role { margin-top: 4px; font-size: 22px; line-height: 32px; }
.project-facts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; margin: 56px 0 0; }
.project-facts div { display: flex; gap: 6px; }
.project-facts dt, .project-facts dd { margin: 0; }

/* Styled like the Work page tabs */
.project-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 200px; margin-top: 32px; }
.project-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 110px; min-height: 48px; padding: 8px 24px; /* Figma tab minimum */
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 18px; line-height: 26px;
  transition: background .2s, border-color .2s;
}
/* Outlined like an unselected tab; turns into the selected tab on hover or click */
.project-button:hover, .project-button:focus-visible, .project-button:active { background: var(--main); border-color: var(--main); }
.project-button[aria-disabled="true"]:hover, .project-button[aria-disabled="true"]:active { background: none; border-color: var(--border); }
.project-button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.project-hero { margin-top: 32px; display: flex; flex-direction: column; gap: 32px; }
.project-video { display: block; width: 100%; height: auto; background: #000; object-fit: cover; }
.project-video--main { aspect-ratio: 1312 / 734.6; border-radius: 16px; }
.project-hero__image { width: 100%; height: auto; aspect-ratio: 1312 / 734.6; object-fit: cover; border-radius: 16px; }
.project-intro-text { margin: -32px auto 48px; max-width: 1312px; }
.analysis-media { margin-top: 48px; }
.analysis-media .project-video { aspect-ratio: 1312 / 550.4; border-radius: 16px; }
.challenge__copy ul { display: grid; gap: 8px; margin-top: 12px; padding-left: 22px; list-style: disc; }
.project-summary { font: 600 clamp(18px, 1.8vw, 24px) / 1.33 var(--font-body); text-align: center; color: #fff; }

.project-section { margin-top: 112px; }
.project-heading { margin-bottom: 64px; font: 700 clamp(26px, 3.4vw, 40px) / 1.2 var(--font-heading); text-transform: uppercase; }
.project-heading--centre { text-align: center; }
.project-heading--small { margin-bottom: 34px; font-size: clamp(22px, 2.6vw, 30px); }
.project-heading--stack span { display: block; }
.project-columns { display: grid; gap: 32px 43px; }
.project-columns--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-columns--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 60px; }
.project strong { font-weight: 700; color: #fff; }

/* The media column is exactly the Figma width (set per challenge); the text takes the rest */
.challenge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--media-w, 598px)); align-items: center; gap: 40px 64px; }
.challenge--flip { grid-template-columns: minmax(0, var(--media-w, 598px)) minmax(0, 1fr); }
.challenge + .challenge { margin-top: 96px; }
.challenge--flip .challenge__text { order: 2; }
.challenge__text { display: flex; gap: 12px; }
.challenge__number { flex: none; font: 700 40px/1 var(--font-heading); color: var(--text-tertiary); }
.challenge__copy { display: grid; gap: 4px; }
.challenge__copy p + .challenge__title { margin-top: 24px; }
.challenge__title { font: 700 22px/1.4 var(--font-body); color: #fff; }
.challenge__media { position: relative; cursor: pointer; }
.challenge__media--still { cursor: auto; }
.challenge__media .project-video, .challenge__media img { width: 100%; height: auto; object-fit: cover; border-radius: 16px; } /* shape comes from the Figma box, set inline */
.video-hint {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 10px;
  background: rgba(16, 16, 16, .75); border-radius: 4px; font-size: 13px; line-height: 20px;
  transition: opacity .2s; pointer-events: none;
}
.challenge__media.is-playing .video-hint { opacity: 0; }
@media (hover: none) { .video-hint { font-size: 0; } .video-hint::after { content: "Tap to play"; font-size: 13px; } }

/* The graph ignores the mouse until clicked, so the page scroll never gets stuck in it */
.embed { position: relative; height: clamp(360px, 45vw, 620px); overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #1b1b1b; }
.embed iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.embed.is-active iframe { pointer-events: auto; }
.embed::before { content: ""; position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.embed__lock {
  position: absolute; left: 50%; bottom: 20px; z-index: 2; transform: translateX(-50%);
  padding: 10px 20px; border-radius: 8px; background: var(--main); color: #fff; font-weight: 500;
  transition: background .2s;
}
.embed__lock:hover { background: var(--main-hover); }
.embed.is-active::before, .embed.is-active .embed__lock { display: none; }

.project-image { width: 100%; height: auto; aspect-ratio: 1312 / 550.4; object-fit: cover; margin-top: 48px; border-radius: 16px; background: #fff; }
.project-note { margin-top: 32px; }

/* Three photos placed exactly as in Figma (1312 x 597 area): a 1065 x 597 photo,
   with 464 x 309 and 464 x 258 photos laid over its right-hand side */
.photo-collage { position: relative; aspect-ratio: 1312 / 597; margin-top: 48px; }
.photo-collage img { position: absolute; object-fit: cover; }
.photo-collage__main { left: 0; top: 0; width: calc(1065 / 1312 * 100%); height: 100%; }
.photo-collage__top { left: calc(848 / 1312 * 100%); top: 0; width: calc(464 / 1312 * 100%); height: calc(309 / 597 * 100%); }
.photo-collage__bottom { left: calc(848 / 1312 * 100%); top: calc(309 / 597 * 100%); width: calc(464 / 1312 * 100%); height: calc(258 / 597 * 100%); }

.reflection { display: grid; gap: 26px; }
.reflection-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 64px; margin-top: 30px; }
.reflection-card { padding: 24px 28px 28px; background: #1e1e1e; border-radius: 8px; }
.reflection-card h3 { margin-bottom: 4px; font: 700 22px/1.4 var(--font-body); color: #fff; }

@media (max-width: 1100px) {
  .project-buttons { gap: 24px; }
  .project-columns--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reflection-cards { gap: 24px; }
}

@media (max-width: 767px) {
  .project { padding-bottom: 64px; }
  .project-intro__role { font-size: 18px; line-height: 26px; }
  .project-facts { flex-direction: column; margin-top: 28px; }
  .project-buttons { justify-content: flex-start; gap: 12px; margin-top: 28px; }
  .project-hero { margin-top: 28px; gap: 24px; }
  .project-summary { text-align: left; }
  .project-section { margin-top: 72px; }
  .project-heading, .project-heading--small { margin-bottom: 28px; }
  .project-columns--4, .project-columns--3 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .challenge, .challenge--flip { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .challenge--flip .challenge__text { order: 0; }
  .challenge + .challenge { margin-top: 56px; }
  .challenge__number { font-size: 30px; }
  .challenge__title { font-size: 19px; }
  .embed { height: 420px; }
  .project-image, .photo-collage, .analysis-media { margin-top: 28px; }
  .project-intro-text { margin: -8px 0 28px; }
  .reflection-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 12px; }
  .reflection-card { padding: 20px; }
  .reflection-card h3 { font-size: 19px; }
}

/* Motion (classes added by site.js, so nothing is hidden if scripts don't run) */
/* Section headings draw a short pixel underline */
.reveal-heading { position: relative; }
.reveal-heading::after {
  content: ""; display: block; width: 72px; height: 6px; margin-top: 14px;
  background: repeating-linear-gradient(90deg, var(--main) 0 6px, transparent 6px 9px);
  transform: scaleX(0); transform-origin: left;
}
.project-heading--centre.reveal-heading::after, .more .reveal-heading::after { margin-inline: auto; transform-origin: center; }
.reveal-heading.is-in::after { transform: scaleX(1); transition: transform .45s steps(8) .15s; }

.title-word { display: inline-block; white-space: nowrap; }
.title-letter { display: inline-block; }

/* Small hover touches, in steps to match the pixel style */
@media (hover: hover) {
  .resume-item { transition: padding-left .2s steps(3); position: relative; }
  .resume-item::before {
    content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 22px;
    background: var(--main); transform: scaleY(0); transition: transform .2s steps(3);
  }
  .resume-item:hover { padding-left: 18px; }
  .resume-item:hover::before { transform: scaleY(1); }
  .reflection-card { transition: transform .2s steps(3), box-shadow .2s steps(3); }
  .reflection-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--main-hover), 6px 6px 0 rgba(111, 81, 228, .45); }
  .challenge__number { transition: color .2s steps(2); }
  .challenge:hover .challenge__number { color: var(--main-hover); }
}

/* Repo page: an Unreal Engine Blueprint graph you can move around in */
/* The graph fills the whole screen under the nav bar */
.experimental-page { padding: 0; }
.bp-graph {
  position: relative; height: calc(100vh - var(--nav-height)); height: calc(100svh - var(--nav-height)); overflow: hidden;
  border-bottom: 1px solid #0b0b0b;
  background-color: #262626;
  background-image:
    linear-gradient(rgba(0, 0, 0, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .45) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 128px 128px, 128px 128px, 16px 16px, 16px 16px;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .55);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.bp-graph.is-panning { cursor: grabbing; }
/* The faint corner mark, like Unreal's "BLUEPRINT" label */
.bp-graph::after {
  content: "REPO"; position: absolute; right: 28px; bottom: 18px; z-index: 3;
  font: 700 clamp(30px, 5vw, 64px) / 1 var(--font-heading); letter-spacing: .04em; color: rgba(255, 255, 255, .07);
  pointer-events: none;
}
/* Page title floats over the top-left of the graph */
.bp-title { position: absolute; top: 28px; left: var(--gutter); z-index: 4; pointer-events: none; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); transition: opacity .25s steps(4); }
.bp-title.is-covered { opacity: .12; } /* fades out of the way when a node passes under it */
.bp-world { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; }
.bp-wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.bp-wire { fill: none; stroke: #e6e6e6; stroke-width: 2.5; vector-effect: non-scaling-stroke; } /* wires stay the same thickness at any zoom */
/* The orange pulse that runs along wires while a Blueprint is executing */
.bp-wire__flow { fill: none; stroke: #ffb547; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 4 26; animation: bp-flow 1.4s linear infinite; }
@keyframes bp-flow { to { stroke-dashoffset: -30; } }

.bp-comment {
  position: absolute; width: 560px; cursor: move;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px;
}
.bp-comment__title { padding: 8px 14px; background: rgba(255, 255, 255, .14); border-radius: 6px 6px 0 0; font: 700 18px/1.3 var(--font-heading); color: #fff; }
.bp-comment__text { padding: 12px 14px 14px; font-size: 15px; line-height: 22px; color: var(--text-primary); }

.bp-node {
  position: absolute; cursor: move;
  background: rgba(14, 14, 14, .94); border: 1px solid #050505; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .55);
}
.bp-node:hover, .bp-node:focus-visible { outline: none; box-shadow: 0 0 0 2px #f2a93b, 0 8px 22px rgba(0, 0, 0, .55); } /* Unreal's selection outline */
.bp-start { width: 220px; }
.bp-node__head {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 34px;
  border-radius: 9px 9px 0 0; background: var(--bp-head);
}
.bp-start .bp-node__head { border-radius: 9px; }
.bp-node--event { --bp-head: linear-gradient(90deg, #a52222, #6e1a1a 60%, rgba(110, 26, 26, .25)); }
.bp-node--function { --bp-head: linear-gradient(90deg, #3a6fae, #234a75 60%, rgba(35, 74, 117, .25)); }
.bp-node--pure { --bp-head: linear-gradient(90deg, #4d8c2c, #2f5a1c 60%, rgba(47, 90, 28, .25)); }
.bp-node--macro { --bp-head: linear-gradient(90deg, #6f6f6f, #444 60%, rgba(68, 68, 68, .25)); }
.bp-node__icon { font-size: 15px; color: rgba(255, 255, 255, .85); }
.bp-node__titles { min-width: 0; }
.bp-node__title { font: 700 17px/1.25 var(--font-heading); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.bp-node__category { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .7); }

/* Pins: white arrow-shaped exec pins on the header, coloured circles for data */
.bp-pin { display: inline-block; flex: none; }
.bp-pin--exec { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: #fff; clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%); }
.bp-pin--in { left: 12px; }
.bp-pin--out { right: 12px; }
.bp-pin--data { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--pin); background: color-mix(in srgb, var(--pin) 35%, transparent); }

.bp-node__body { padding: 14px; display: grid; gap: 14px; }
.bp-node__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #0b0b0b; }
.bp-node__media img, .bp-node__media video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.bp-node__media--empty { display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .18); }
.bp-node__media--empty span { font-size: 14px; color: var(--text-tertiary); }
.bp-node__media .video-hint { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; background: rgba(16, 16, 16, .75); border-radius: 4px; font-size: 12px; line-height: 18px; transition: opacity .2s; pointer-events: none; }
.bp-node__media.is-playing .video-hint { opacity: 0; }
.bp-node__media--instagram { aspect-ratio: auto; background: #fff; container-type: inline-size; }
/* Sized to Instagram's card: the profile header (about 146px) plus two rows of three square photos.
   If Instagram reports its exact height, repo.js uses that instead. */
.bp-node__media--instagram iframe { display: block; width: 100%; height: calc(146px + 66.67cqw); border: 0; }
.bp-node__link {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 15px; transition: background .2s, border-color .2s;
}
.bp-node__link:hover { background: var(--main); border-color: var(--main); }
.bp-node__pins { display: grid; gap: 6px; }
.bp-node__pins li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 22px; }
.bp-node__label { color: var(--text-tertiary); }
.bp-node__value { margin-left: auto; color: #fff; text-align: right; }
.bp-node__text { font-size: 15px; line-height: 23px; }

.bp-controls { position: absolute; top: 14px; right: 14px; z-index: 4; display: flex; gap: 8px; }
.bp-controls button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px;
  background: rgba(14, 14, 14, .9); border: 1px solid var(--border); color: #fff; font-size: 16px; line-height: 1;
  transition: border-color .2s, background .2s;
}
.bp-controls button:hover { border-color: var(--main-hover); background: rgba(111, 81, 228, .2); }
.bp-hint { position: absolute; left: 16px; bottom: 14px; z-index: 4; padding: 5px 10px; border-radius: 6px; background: rgba(14, 14, 14, .8); font-size: 13px; line-height: 18px; color: var(--text-tertiary); pointer-events: none; }
.bp-hint--touch { display: none; }
@media (hover: none) { .bp-hint--mouse { display: none; } .bp-hint--touch { display: inline; } }

@media (max-width: 767px) {
  .bp-title { top: 18px; left: 18px; }
  .bp-graph::after { bottom: 52px; }
}

/* Footer */
.footer { background: var(--bg-surface); padding-block: 51px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer__name { font: 600 24px/32px var(--font-heading); }
.footer__links { display: flex; gap: 88px; }
.footer__links a { font-size: 22px; line-height: 32px; min-width: 95px; transition: color .2s; }
.footer__links a:hover, .footer__links a:active { color: var(--main); }

/* Loading screen: only shown when the head script adds .is-loading */
.loader { display: none; }
.is-loading body { overflow: hidden; }
.is-loading .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: var(--main);
  color: #fff;
}
/* site.js takes over drawing the purple, so it can break into blocks */
.loader.is-done { background: transparent; pointer-events: none; }
.loader__canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.loader__logo { width: 320px; max-width: 60vw; aspect-ratio: 64 / 38; }
.loader__text { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: 32px; transition: opacity .2s steps(3); }
.loader.is-done .loader__text { opacity: 0; }
.loader__name {
  font: 700 clamp(18px, 3vw, 26px) / 1.2 var(--font-heading);
  text-transform: uppercase;
  text-align: center;
}
/* Mask cuts the bar into separate blocks, each 8px wide with a 4px gap */
.loader__track {
  width: min(236px, 100%);
  height: 8px;
  margin-top: 20px;
  background: rgba(255, 255, 255, .28);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 12px);
  mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 12px);
}
.loader__bar { height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.loader__count { margin-top: 12px; font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; }

/* Tablet */
@media (max-width: 1100px) {
  .nav__links { gap: 32px; }
  .brand__role { display: none; }
  .intro { grid-template-columns: minmax(220px, 317px) minmax(0, 1fr); }
  .footer__links { gap: 40px; }
  .footer__links a { min-width: 0; }
}

/* Mobile */
@media (max-width: 767px) {
  body { font-size: 16px; line-height: 24px; }

  :root { --nav-height: 64px; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .brand__role { display: inline; }
  .brand__name { font-size: 22px; }
  .nav__toggle { display: block; }

  .nav__contact--bar { display: none; }
  .nav.is-open .nav__panel { display: flex; }
  .nav__panel {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
  }
  .nav__links { align-items: stretch; gap: 0; }
  .nav__links a { display: flex; align-items: center; min-height: 48px; font-size: 18px; }
  .nav__links a.nav__contact--menu { color: var(--main-hover); }

  .hero { gap: 8px; }

  .work-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .card__meta { margin-top: 14px; gap: 6px; }
  .card__row { font-size: 16px; line-height: 24px; }
  .card__row--small { font-size: 14px; line-height: 22px; }

  .more { padding-top: 56px; gap: 32px; }
  .more .work-grid { row-gap: 20px; }

  .work-page { padding-top: 40px; padding-bottom: 64px; }
  .filters { gap: 10px; margin: 32px 0 36px; }

  .about-page { padding-top: 40px; }
  .intro { grid-template-columns: minmax(0, 1fr); margin: 32px auto 56px; gap: 28px; }
  .intro__photo { max-width: 317px; margin-inline: auto; }
  .intro__text { gap: 24px; }

  .resume-section > .section-title { margin-bottom: 24px; }
  .resume-item { flex-direction: column; min-height: 0; }
  .resume-item__role { font-size: 18px; line-height: 26px; }
  .resume-item__date { font-size: 14px; line-height: 22px; color: var(--text-tertiary); }

  .footer { padding-block: 36px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer__links { flex-wrap: wrap; gap: 8px 32px; }
  .footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
