:root {
  --ink: #171717;
  --black: #000;
  --purple: #7a35b0;
  --purple-tint: rgba(122, 53, 176, 0.1);
  --grey: #cecece;
  --line: #d9d9d9;
  --page-width: 1440px;
  --content-width: 1180px;
  --serif: var(--sans);
  --mono: var(--sans);

  --text-xl: clamp(26px, 3.5vw, 50px);
  --text-l: clamp(32px, 3.5vw, 50px);
  --text-m: clamp(26px, 2.8vw, 40px);
  --text-body: clamp(20px, 2.1vw, 30px);

  /* Header, footer and homepage (see also css/home.css). */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --muted: #666666;
  --surface: #f4f3f0;
  --hairline: #e4e2dd;
  --purple-soft: #efe6f7;
  --dark: #131115;
  --on-dark: #f6f4f8;
  --on-dark-muted: #a59fab;
  --purple-on-dark: #c79ded;
  --gutter: clamp(16px, 4vw, 56px);
  --wrap-max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E");
  --icon-arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--purple);
}

a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--page-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: 20px;
  padding-left: 20px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

/* Text that is read by screen readers but not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Width used by the header, footer and homepage sections. */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap-max) + 2 * var(--gutter));
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

/* Small uppercase label with a purple dot, e.g. "Contact". */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

/* Shared header: sticky bar with a round monogram and a pill-shaped Contact
   button. It is set in the sans-serif on every page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  font-family: var(--sans);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.site-nav a:hover {
  color: var(--purple);
}

.site-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
}

.site-nav .nav-cta {
  margin-left: 8px;
  background: var(--ink);
  color: #fff;
}

.site-nav .nav-cta:hover {
  background: var(--purple);
  color: #fff;
}

/* Homepage: portrait, handwritten name and introduction. */
.hero {
  display: flex;
  align-items: center;
  padding: 36px 0 55px;
}

.portrait {
  flex: 0 0 auto;
  width: 400px;
  max-width: 40%;
}

.signature {
  flex: 1;
  font-family: "Square Peg", "Brush Script MT", cursive;
  font-size: clamp(56px, 9vw, 130px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}

.introduction {
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.introduction p + p {
  margin-top: 1.2em;
}

.section-title {
  margin-bottom: 80px;
  color: var(--purple);
  font-size: var(--text-m);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: capitalize;
}

/* Software: a grid of logos, each with its name underneath. */
.software-grid {
  padding-top: 150px;
}

.software-grid ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 60px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.software-grid li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  font-size: var(--text-body);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.software-grid img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* Homepage project previews. */
.project-list {
  padding-top: 120px;
}

.project-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list ul > li {
  padding-top: 20px;
  border-top: 1px solid var(--grey);
}

.project-list ul > li + li {
  margin-top: 80px;
}

.project-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

.project-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* The date sits directly in .project-info, so this sets its style. */
.project-info {
  color: var(--purple);
  font-family: var(--mono);
  font-size: 14px;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.project-info h3 {
  margin: 24px 0 40px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--text-m);
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* Small grey buttons: Read it, Previous and Next. */
.read-link,
.button-previous,
.button-next {
  display: inline-block;
  padding: 10px;
  border-radius: 5px;
  background: var(--grey);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.read-link:hover,
.button-previous:hover,
.button-next:hover {
  background: var(--purple);
  color: #fff;
}

/* Shared footer: dark contact band with a large email link. */
.site-footer {
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: 32px;
  background: var(--dark);
  color: var(--on-dark);
  font-family: var(--sans);
  line-height: 1.5;
  text-align: left;
}

.site-footer a {
  color: var(--on-dark);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--purple-on-dark);
}

.site-footer a:focus-visible {
  outline-color: var(--purple-on-dark);
}

.site-footer .eyebrow {
  color: var(--on-dark-muted);
}

.site-footer .eyebrow-dot {
  background: var(--purple-on-dark);
}

.footer-address {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 28px;
  font-style: normal;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  max-width: 100%;
  font-size: clamp(22px, 5.4vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.footer-email::after {
  content: "";
  flex: 0 0 auto;
  width: 0.6em;
  height: 0.6em;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
}

.site-footer .footer-phone {
  color: var(--on-dark-muted);
  font-size: clamp(18px, 1.8vw, 24px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(56px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-dark-muted);
  font-size: 14px;
}

.footer-social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--purple-on-dark);
}

/* Phones: shorter header (monogram only, no Home link) and a stacked footer. */
@media (max-width: 640px) {
  .header-bar {
    height: 64px;
  }

  .brand-name,
  .nav-home {
    display: none;
  }

  .site-nav a {
    padding: 9px 12px;
    font-size: 14px;
  }

  .site-nav .nav-cta {
    margin-left: 4px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Project pages: title and summary. */
.case-header {
  margin-top: 94px;
  padding-top: 115px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.case-header h1 {
  max-width: 1000px;
  margin: 0 auto 100px;
  font-size: var(--text-l);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.case-header > p {
  max-width: 1240px;
  margin: 0 auto 100px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.9;
}

/*
  Project page sections.
  :where() keeps these selectors at zero specificity, so the component
  classes further down (showcase, changepage, footer) always win.
*/
:where(.case-header ~ section) {
  max-width: var(--content-width);
  margin: 50px auto 0;
  padding: 50px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* The first section of each case study sits in a light purple panel. */
:where(.case-header ~ section:first-of-type) {
  margin-top: 0;
  padding: 90px 40px;
  border-top: 0;
  background: var(--purple-tint);
}

:where(.case-header ~ section) > h2 {
  color: var(--purple);
  font-size: var(--text-l);
  font-weight: 700;
  line-height: 1.2;
  text-transform: capitalize;
}

:where(.case-header ~ section) > p {
  max-width: 1100px;
  margin: 36px auto 0;
  font-size: var(--text-body);
  line-height: 1.2;
}

/* Images sit side by side when there is room; a <br> starts a new row. */
:where(.case-header ~ section) > img {
  display: inline-block;
  max-width: calc(100% - 20px);
  margin: 36px 10px 0;
  vertical-align: top;
}

:where(.case-header ~ section) > h2 + * {
  margin-top: 50px;
}

/* Bold subheadings inside sections, e.g. "(1) Multiple Activities". */
.subheading {
  margin-top: 50px;
  font-size: var(--text-m);
  font-weight: 700;
  text-transform: capitalize;
}

.subheading + p,
.subheading + img {
  margin-top: 50px;
}

/* Closing "End" block at the bottom of each case study. */
:where(.case-header ~ section):has(> h3:first-child) {
  border-top: 0;
}

:where(.case-header ~ section) > h3:first-child {
  color: var(--purple);
  font-size: var(--text-l);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.0125em;
}

:where(.case-header ~ section) > h3:first-child + p {
  max-width: 900px;
  margin-top: 0;
  color: var(--black);
  font-size: var(--text-l);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.0125em;
  text-transform: capitalize;
}

/* Changi: experience architecture, one step per line with arrows between. */
.flow-vertical,
.requirements-flow {
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
}

.flow-vertical li {
  font-size: var(--text-m);
  font-weight: 700;
  line-height: 1.2;
  text-transform: capitalize;
}

.flow-vertical li:not(:last-child)::after {
  content: "\2193";
  display: block;
  color: var(--purple);
  font-weight: 400;
  line-height: 50px;
}

/* Air New Zealand: design requirements in purple. */
.requirements-flow li {
  color: var(--purple);
  font-size: var(--text-body);
  line-height: 1.2;
}

/* Air New Zealand: row of showcase screens. */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

/* Changi showcase: screens and notes alternate left and right. */
.showcase-list {
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
}

.showcase-list > li + li {
  margin-top: 80px;
}

.showcase-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 480px);
  justify-content: center;
  align-items: center;
  gap: 40px 80px;
}

.showcase-card > img {
  grid-column: 1;
  width: 300px;
}

.showcase-info {
  grid-column: 2;
  grid-row: 1;
  text-align: left;
}

.showcase-card:has(> img + img) .showcase-info {
  grid-row: 1 / span 2;
}

.showcase-list > li:nth-child(even) .showcase-card {
  grid-template-columns: minmax(0, 480px) 300px;
}

.showcase-list > li:nth-child(even) .showcase-card > img {
  grid-column: 2;
}

.showcase-list > li:nth-child(even) .showcase-info {
  grid-column: 1;
}

.showcase-tag {
  display: inline-block;
  margin-bottom: 50px;
  padding: 16px 28px;
  border-radius: 10px;
  background: var(--purple-tint);
  color: var(--black);
  font-size: var(--text-m);
  font-weight: 700;
  line-height: 1.2;
  text-transform: capitalize;
}

.showcase-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-points li {
  color: var(--black);
  font-size: var(--text-body);
  line-height: 1.2;
}

.showcase-points li + li {
  margin-top: 36px;
}

.showcase-points li::before {
  content: "\00B7  ";
}

/* Previous / next project links at the end of each case study. */
.changepage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: var(--content-width);
  margin: 100px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--grey);
  text-align: left;
}

.changepage > article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.changepage > .changepage-list-next {
  align-items: flex-end;
  text-align: right;
}

.changepage img {
  width: 200px;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.changepage h4 {
  max-width: 362px;
  margin: 60px 0 40px;
  color: var(--black);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Resume and contact pages: title, name and contact details. Everything on
   these pages is set in Inria Serif, with no italics. */
.resume-header h1 {
  margin-bottom: 24px;
}

.resume-header > .resume-name {
  margin-bottom: 40px;
  font-size: var(--text-body);
  line-height: 1.2;
}

/* On the contact page the name ends the title block. */
.resume-header > .resume-name:last-child {
  margin-bottom: 100px;
}

/* Email, phone and LinkedIn, one per line. */
.resume-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto 100px;
  padding: 0;
  list-style: none;
  font-size: 18px;
  line-height: 1.4;
}

/* Keep phone numbers and the LinkedIn address on one line. */
.resume-contact a {
  white-space: nowrap;
}

.resume-contact li > span {
  margin-right: 8px;
  color: var(--purple);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Each entry: dates and place on the left, details on the right. */
.resume-entry,
.resume-skills {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px 60px;
  max-width: 1000px;
  margin: 50px auto 0;
  text-align: left;
}

.resume-entry + .resume-entry {
  padding-top: 50px;
  border-top: 1px solid var(--line);
}

.resume-meta,
.resume-skills dt {
  color: var(--purple);
  font-size: 18px;
  line-height: 1.5;
}

.resume-body h3 {
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.2;
}

.resume-body p,
.resume-body li,
.resume-skills dd {
  font-size: 20px;
  line-height: 1.5;
}

.resume-body p {
  margin-top: 12px;
}

.resume-body .resume-role {
  margin-top: 8px;
  color: var(--purple);
}

.resume-body h4 {
  margin-top: 36px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.resume-body ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.resume-body li + li {
  margin-top: 8px;
}

.resume-body li::marker {
  color: var(--purple);
}

.resume-body .read-link {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 14px;
}

.resume-skills {
  gap: 20px 60px;
}

.resume-skills dd {
  margin: 0;
}

/* Contact page: plain sections (no purple panel), each with a list centred on
   the page's middle line. Labels sit to the left of the line, right-aligned, and
   links to the right of it, so both lists line up with the headings and with
   each other. */
.contact-section {
  padding: 50px 0;
  border-top: 1px solid var(--line);
  background: none;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: baseline;
  gap: 20px 40px;
  max-width: 720px;
  margin: 50px auto 0;
}

.contact-info dt {
  color: var(--purple);
  font-size: 18px;
  line-height: 1.5;
  text-align: right;
}

.contact-info dd {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  text-align: left;
}

/*
  Motion, inspired by landonorris.com.
  Page-load effects are pure CSS; js/animations.js adds the text roll on links,
  the scroll reveals and the word-by-word introduction. Content, colours and
  font sizes stay the same, and all movement is switched off for visitors whose
  system asks for reduced motion.
*/
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* The handwritten name appears from left to right, as if it is being written. */
@keyframes write {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

/* The portrait opens like a curtain from its bottom edge. */
@keyframes wipe-up {
  from {
    clip-path: inset(100% 0 0 0);
    transform: scale(1.08);
  }

  to {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Page load. */
  .site-header {
    animation: fade-in 1s ease both;
  }

  .portrait {
    animation: wipe-up 1.2s cubic-bezier(0.76, 0, 0.24, 1) 0.1s both;
  }

  .signature {
    animation: write 2s cubic-bezier(0.65, 0, 0.35, 1) 0.5s backwards;
  }

  .introduction p {
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .introduction p:nth-child(1) {
    animation-delay: 0.7s;
  }

  .introduction p:nth-child(2) {
    animation-delay: 0.85s;
  }

  .introduction p:nth-child(3) {
    animation-delay: 1s;
  }

  .case-header h1 {
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }

  .case-header > p {
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  }

  .resume-contact {
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
  }

  /* Text roll on links: the text slides up and a copy rolls in from below,
     letter by letter. The extra padding keeps italic letters from being cut
     off at the sides without changing the link's size. */
  .roll {
    position: relative;
    display: inline-block;
    margin: 0 -0.12em;
    padding: 0 0.12em;
    overflow: hidden;
    vertical-align: top;
    white-space: nowrap;
  }

  .roll-line {
    display: block;
    transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  }

  .roll-line + .roll-line {
    position: absolute;
    top: 100%;
    left: 0.12em;
  }

  .roll-char {
    display: inline-block;
    white-space: pre;
    transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: calc(var(--i) * 0.018s);
  }

  a:hover .roll-line:first-child,
  a:focus-visible .roll-line:first-child,
  a:hover .roll-char,
  a:focus-visible .roll-char {
    transform: translateY(-100%);
  }

  /* Underlined links keep their underline while the letters roll. */
  .resume-contact .roll-line:first-child,
  .resume-contact .roll-char,
  .contact-info .roll-line:first-child,
  .contact-info .roll-char {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  /* Scroll reveal: blocks fade up and images wipe in from the bottom. */
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--delay, 0s);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .wipe {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1);
  }

  .wipe.is-visible {
    clip-path: inset(0 0 0 0);
  }

  /* Homepage introduction: words light up one by one as you scroll. */
  .introduction.is-filling .word {
    opacity: 0.2;
    transition: opacity 0.35s ease;
  }

  .introduction.is-filling .word.is-lit {
    opacity: 1;
  }

  /* Hover: software logos hop, project images lift. */
  .software-grid img {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .software-grid li:hover img {
    transform: translateY(-8px) rotate(-6deg);
  }

  .project-card > img,
  .changepage img {
    transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1), transform 0.4s ease, box-shadow 0.4s ease;
  }

  .project-card:hover > img,
  .changepage > article:hover img {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(23, 23, 23, 0.15);
  }
}

/* Printed pages always show everything, whatever has been scrolled to. */
@media print {
  .reveal,
  .wipe,
  .introduction .word {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }
}

@media (max-width: 960px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .portrait {
    max-width: 100%;
  }

  .signature {
    align-self: stretch;
  }

  .software-grid {
    padding-top: 100px;
  }

  .software-grid ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card,
  .showcase-list > li:nth-child(even) .showcase-card {
    grid-template-columns: minmax(0, 480px);
    justify-items: center;
  }

  .showcase-list > li:nth-child(n) .showcase-card > * {
    grid-column: 1;
    grid-row: auto;
  }

  .showcase-list > li:nth-child(n) .showcase-info {
    justify-self: stretch;
  }
}

/* Small screens: single columns and tighter spacing. */
@media (max-width: 600px) {
  .hero {
    padding-bottom: 40px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .software-grid ul {
    gap: 40px 20px;
  }

  .software-grid li {
    gap: 16px;
  }

  .software-grid img {
    width: 72px;
    height: 72px;
  }

  .project-list {
    padding-top: 80px;
  }

  .project-list ul > li + li {
    margin-top: 48px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card > img {
    max-width: 400px;
  }

  .project-info h3 {
    margin: 16px 0 24px;
  }

  .case-header {
    margin-top: 40px;
    padding-top: 60px;
  }

  .case-header h1,
  .case-header > p {
    margin-bottom: 50px;
  }

  :where(.case-header ~ section:first-of-type) {
    padding: 50px 20px;
  }

  .changepage {
    grid-template-columns: 1fr;
  }

  .changepage > .changepage-list-next {
    align-items: flex-start;
    text-align: left;
  }

  .changepage h4 {
    margin: 24px 0;
  }

  .resume-header h1 {
    margin-bottom: 24px;
  }

  .resume-contact {
    margin-bottom: 50px;
  }

  .resume-header > .resume-name:last-child {
    margin-bottom: 50px;
  }

  .resume-entry,
  .resume-skills {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .resume-skills dd + dt {
    margin-top: 12px;
  }

  /* Phones are too narrow for two columns: label above link, both centred. */
  .contact-info {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-info dt,
  .contact-info dd {
    text-align: center;
  }

  .contact-info dd + dt {
    margin-top: 16px;
  }
}

/* Respect visitors who prefer less movement. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.img-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap:20px;
  align-items:start;
  margin:24px 0;
}

.img-row img{
  width:100%;
  height:auto;
  display:block;
}

@media(max-width:600px){
  .img-row{
    grid-template-columns: 1fr;
  }
}

.value-list {
    list-style: none;
    padding: 0;
    margin: 32px auto 0;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.value-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    text-align: center;
}

.value-need {
    font-size: 0.95rem;
    color: #888;
}

.value-arrow {
    color: #755FFF;
}

.value-solution {
    font-weight: bold;
}

@media (max-width: 800px) {
    .value-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .value-list {
        grid-template-columns: 1fr;
    }
}

.brand-grid{
  display:grid;
  /* One column: "1fr,1fr" was invalid, so browsers already showed one. */
  grid-template-columns: 1fr;
  gap:30px;
  max-width:1000px;
  margin:32px auto 0;
  text-align:center;
}

.brand-wide{
  grid-column: 1/-1;
}

.brand-block 
.subheading{
  margin-bottom:30px;
}

.brand-block .logo-row {
    display: flex;
    flex-direction: row;      
    align-items: center;
    gap: 40px;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;           
}

.brand-block .logo-row .logo-row-img {
    width: 140px;
    max-width: 140px;
    height: auto;
    flex: 0 0 140px;         
    margin: 0;
}

.brand-block .logo-row .logo-row-text {
    flex: 1; 
    text-align:left;              
}

.logo-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 8px;
}

@media (max-width: 600px) {
    .brand-block .logo-row {
        flex-direction: column;
        text-align: center;
    }
}

.font-name,
.font-weights{
  font-family:"Inter",sans-serif;
}

.font-name{
  font-size:25px;
  font-weight:700;
  margin:0 0 8px;
}

.font-weights{
  list-style:none;
  padding:0;
  margin:0;
  line-height:1.8;
}

.font-sizes{
  color:#888;
  font-size:20px;
}

.swatches{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:40px 20px;
  line-height:2;
  text-align:center;
  font-size:18px;
}

.swatch{
  display:block;
  width:70px;
  height:70px;
  margin:0 auto 16px;
  border-radius:50%;
  border:1px solid #e5e5e5
}

@media (max-width: 700px) {           
  .brand-grid { grid-template-columns: 1fr; }          
  .swatches { grid-template-columns: repeat(3, 1fr); } 
}

.icon-set{
  display:block;
  width:100%;
  max-width:480px;
  height:auto;
  margin:0 auto;
}

.brand-block
.icon-set{
  display:block;
  width:100%;
  max-width:400px;
  height:auto;
  margin:0 auto;
}

.showcase-item {
    display: flex;                  
    align-items: center;           
    gap: 64px;                     
    max-width: 900px;
    margin: 80px auto;             
    text-align: left;               
}

.showcase-item.reverse {
    flex-direction: row-reverse;    
}

.showcase-item img {
    width: 260px;                  
    max-width: 100%;
    height: auto;
    flex-shrink: 0;               
}

.showcase-text {
    flex: 1;                       
}

.showcase-text h3 {
    margin: 0 0 16px;
}

.showcase-text ul {
    padding-left: 20px;
    margin: 0;
    line-height: 1.7;
}

.showcase-text li {
    margin-bottom: 8px;
}

@media (max-width: 700px) {
    .showcase-item,
    .showcase-item.reverse {
        flex-direction: column;
        gap: 24px;
        margin: 48px auto;
    }
}