:root {
  --background: #fff;
  --surface: #f7f6fb;
  --ink: #191624;
  --muted: #514b60;
  --accent: #3300bb;
  --accent-hover: #250087;
  --line: #dfd9eb;
  --gutter: clamp(1rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }

h1, h2, h3 { line-height: 1.08; }

h1 {
  font-size: clamp(2.45rem, 5vw, 4.9rem);
  letter-spacing: -.055em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -.045em;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  letter-spacing: -.03em;
}

a { color: var(--accent); }

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

:focus-visible {
  outline: 3px solid #8153df;
  outline-offset: 4px;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

.section-inner { padding-block: clamp(3rem, 7vw, 6rem); }

.header {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--background);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1.5rem;
}

.header-inner { min-height: 4.25rem; }

.logo {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

.navbar,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem clamp(.9rem, 3vw, 2rem);
}

.navbar a,
.footer a {
  padding-block: .55rem;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.navbar a:hover,
.footer a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .25em;
}

.menu-toggle { display: none; }

.skip-link {
  position: fixed;
  z-index: 2;
  top: .5rem;
  left: var(--gutter);
}

.skip-link:not(:focus) { transform: translateY(calc(-100% - 1rem)); }

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(30vw, 22rem);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3.25rem, 9vw, 8rem);
}

.label {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .045em;
}

.home .label {
  margin-bottom: .85rem;
  font-size: .95rem;
}

.home-summary {
  max-width: 47ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.65vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: .6rem;
  background: var(--accent);
  color: #fff;
  padding: .65rem 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.button-secondary {
  border-color: var(--line);
  background: var(--background);
  color: var(--accent);
}

.portrait {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.projects { background: var(--surface); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: 1.75rem;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .85rem;
  min-width: 0;
  padding: clamp(.95rem, 2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--background);
}

.project-media {
  display: grid;
  place-items: center;
  height: clamp(11rem, 22vw, 16rem);
  overflow: hidden;
  border-radius: .75rem;
}

.storefront img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.checklist { background: #e5eaf9; }

.checklist img {
  width: auto;
  height: 91%;
  min-height: 0;
}

.flow { container-type: inline-size; }
.flow-sync { background: #eee9fc; color: #322064; }
.flow-video { background: #f7ebe6; color: #592d21; }

.flow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.35rem, 1.2vw, .9rem);
  width: 100%;
  padding: 0 clamp(.65rem, 2vw, 1.5rem);
  margin: 0;
  list-style: none;
}

.flow li {
  padding: .55rem .45rem;
  border-top: 1px solid currentColor;
  font-size: clamp(.8rem, 1.35vw, 1rem);
  font-weight: 720;
  line-height: 1.35;
}

.flow li span {
  display: block;
  margin-bottom: .45rem;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

@container (max-width: 19rem) {
  .flow ol { grid-template-columns: 1fr; }
  .flow li span {
    display: inline;
    margin-right: .5rem;
  }
}

figcaption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .75rem;
}

figcaption a { color: inherit; }

.project-copy {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.project-copy p:not(.label),
.earlier dd,
.about p { color: var(--muted); }

.project-copy .text-link {
  align-self: start;
  margin-top: auto;
  padding-top: .35rem;
}

.text-link {
  font-weight: 700;
  text-underline-offset: .2em;
}

.earlier { margin-top: clamp(2rem, 5vw, 3.5rem); }

.earlier dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-top: 1.15rem;
}

.earlier dl div {
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.earlier dt {
  margin-bottom: .2rem;
  font-weight: 800;
}

.about {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 2fr;
  gap: 1.25rem 2.5rem;
}

.about p { max-width: 64ch; }

.about p + p { margin-top: 1rem; }

.contact {
  background: #241448;
  color: #fff;
}

.contact p {
  max-width: 48ch;
  margin: .9rem 0 1.5rem;
  color: #eee6ff;
}

.contact .button {
  max-width: 100%;
  background: #fff;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.contact .button:hover { background: #eee6ff; }

.footer {
  padding-block: 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 699px) {
  .menu-toggle:not([hidden]) {
    display: block;
    min-height: 2.75rem;
    padding: .4rem .9rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--background);
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .menu-toggle:not([hidden])[aria-expanded="false"] + .navbar { display: none; }

  .navbar {
    width: 100%;
    padding-bottom: .4rem;
  }

  .menu-toggle:not([hidden]) + .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    justify-content: space-between;
    padding: .5rem var(--gutter);
    border-bottom: 1px solid var(--line);
    background: var(--background);
  }

  .home,
  .projects-grid,
  .about { grid-template-columns: 1fr; }

  .home { gap: 2rem; }

  .portrait { width: min(56vw, 15rem); }

  .checklist img { max-width: 26vw; object-fit: contain; }
}

@media (max-width: 420px) {
  .earlier dl { grid-template-columns: 1fr; }
}
