:root {
  --paper: #f4f3ed;
  --paper-bright: #fcfbf7;
  --ink: #171a1d;
  --muted: #646863;
  --line: #c9cbc3;
  --solar-blue: #115fa7;
  --solar-blue-dark: #18364d;
  --solar-yellow: #f2c230;
  --max-width: 1180px;
  --side-padding: 32px;
  --hero-background: url("assets/hero-background.jpg");
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.dialog-open {
  overflow: hidden;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper-bright);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 72px;
  padding: 0 var(--side-padding);
  border-bottom: 1px solid rgba(23, 26, 29, 0.14);
  background: rgba(244, 243, 237, 0.94);
  backdrop-filter: blur(14px);
}

.wordmark {
  width: fit-content;
  font-family: "DM Mono", monospace;
  font-size: 17px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.desktop-nav a,
.header-link {
  position: relative;
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--solar-yellow);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after,
.desktop-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
}

.header-link .icon {
  width: 16px;
  height: 16px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--paper-bright);
  border-color: var(--solar-blue);
  background: var(--solar-blue);
}

.menu-button,
.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  display: flex;
  min-height: 74vh;
  margin-top: 72px;
  align-items: center;
  overflow: hidden;
  background-color: #e9e8e2;
  background-image: var(--hero-background);
  background-position: center;
  background-size: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: rgba(244, 243, 237, 0.7);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 620px);
  align-items: center;
  gap: 68px;
  width: min(100%, 1020px);
  margin: 0 auto;
  padding: 88px var(--side-padding);
}

.headshot {
  position: relative;
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  border: 4px solid var(--paper-bright);
  border-radius: 50%;
  background: var(--solar-blue-dark);
  box-shadow: 0 0 0 3px var(--solar-blue);
  overflow: visible;
}

.headshot-fallback {
  color: var(--paper-bright);
  font-family: "DM Mono", monospace;
  font-size: 52px;
  font-weight: 500;
}

.headshot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 1;
}

.headshot.image-unavailable .headshot-image {
  opacity: 0;
}

.headshot-accent {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 25px;
  height: 25px;
  border: 4px solid var(--paper-bright);
  border-radius: 50%;
  background: var(--solar-yellow);
}

.eyebrow,
.section-number,
.project-category,
.timeline-date,
.blog-index {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;
  margin: 16px 0 22px;
  font-size: 76px;
  font-weight: 600;
  line-height: 1;
}

.hero-intro {
  max-width: 560px;
  margin: 0;
  color: #3f4441;
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 34px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--solar-yellow);
  font-size: 15px;
  font-weight: 600;
}

.text-link-muted {
  color: var(--muted);
  border-color: var(--line);
}

.text-link[aria-disabled="true"] {
  cursor: default;
}

.section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 64px;
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto;
  padding: 112px var(--side-padding);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  align-self: start;
}

.section-number {
  margin-bottom: 16px;
  color: var(--solar-blue);
  font-weight: 500;
}

.section-number::after {
  display: inline-block;
  width: 30px;
  height: 3px;
  margin: 0 0 3px 10px;
  background: var(--solar-yellow);
  content: "";
}

.section h2,
.projects-section h2,
.blog-section h2,
.skills-section h2,
.contact-section h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.15;
}

.section-heading > p:last-child:not(.section-number) {
  max-width: 290px;
  margin: 18px 0 0;
  color: var(--muted);
}

.about-section {
  grid-template-columns: 0.8fr 1.35fr 0.65fr;
  padding-top: 96px;
}

.about-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
}

.about-copy .lead {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.45;
}

.quick-facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.quick-facts div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.quick-facts dt {
  margin-bottom: 4px;
  color: var(--solar-blue);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.projects-section {
  border-bottom: 1px solid var(--line);
  background: var(--paper-bright);
}

.projects-inner {
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto;
  padding: 112px var(--side-padding);
}

.projects-heading {
  display: grid;
  grid-template-columns: 0.55fr 1.2fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 54px;
}

.projects-heading .section-number {
  margin: 0;
}

.projects-heading > p:last-child {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
}

.project-showcase {
  display: grid;
  gap: 24px;
}

.project-stage {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ecece7;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
}

.project-stage::before {
  position: absolute;
  top: 50%;
  right: 13%;
  left: 13%;
  height: 1px;
  background: rgba(17, 95, 167, 0.2);
  content: "";
}

.project-stage:active {
  cursor: grabbing;
}

.project-stage:focus-visible {
  outline: 3px solid rgba(17, 95, 167, 0.35);
  outline-offset: 4px;
}

.project-track {
  position: absolute;
  inset: 0;
}

.project-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(56%, 620px);
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 6px;
  color: var(--paper-bright);
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transform-origin: center;
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease,
    filter 320ms ease,
    border-color 220ms ease,
    box-shadow 320ms ease;
}

.project-stage.is-dragging .project-card {
  transition:
    opacity 80ms linear,
    filter 80ms linear,
    border-color 80ms linear;
}

.project-card img,
.project-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card img {
  object-fit: cover;
  pointer-events: none;
}

.project-card-placeholder {
  background: #dfe5e8;
}

.project-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: rgba(23, 26, 29, 0.74);
  content: "";
  pointer-events: none;
}

.project-card-label {
  position: absolute;
  right: 20px;
  bottom: 17px;
  left: 20px;
  z-index: 1;
  display: grid;
  gap: 2px;
  text-align: left;
  pointer-events: none;
}

.project-card-label span {
  color: #d6d8d3;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.project-card-label strong {
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card.is-active {
  border-color: var(--solar-yellow);
  box-shadow: 0 18px 38px rgba(23, 26, 29, 0.26);
}

.project-card:not(.is-active) {
  filter: saturate(0.75);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 30;
  width: 48px;
  height: 48px;
  color: var(--ink);
  border-color: rgba(23, 26, 29, 0.2);
  background: rgba(252, 251, 247, 0.92);
  box-shadow: 0 8px 20px rgba(23, 26, 29, 0.12);
  transform: translateY(-50%);
}

.carousel-arrow-left {
  left: 20px;
}

.carousel-arrow-right {
  right: 20px;
}

.project-progress {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 30;
  margin: 0;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-align: center;
}

.project-console {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-width: 0;
  padding-top: 8px;
}

.project-category {
  color: var(--solar-blue);
}

.project-active-copy h3 {
  margin: 8px 0 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.project-active-copy .project-category {
  margin: 0;
}

.project-active-copy.is-updating {
  animation: project-copy-enter 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes project-copy-enter {
  from {
    opacity: 0.25;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-controls {
  display: flex;
  align-items: center;
}

.project-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  width: auto;
  min-width: 180px;
  padding: 0 16px;
  border: 1px solid var(--solar-blue);
  border-radius: 4px;
  color: var(--paper-bright);
  background: var(--solar-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.project-open-button .icon {
  margin-left: 18px;
  width: 17px;
  height: 17px;
}

.timeline {
  position: relative;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 120px 1fr;
  gap: 18px;
  padding: 0 0 52px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 6px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--solar-yellow);
  box-shadow: 0 0 0 2px var(--solar-blue);
}

.timeline-date {
  padding-top: 3px;
  color: var(--muted);
}

.timeline-item h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.timeline-role {
  margin: 0 0 9px;
  color: var(--solar-blue);
  font-size: 15px;
  font-weight: 600;
}

.timeline-item > div:last-child > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.blog-section {
  border-bottom: 1px solid var(--line);
  background: #e8edf0;
}

.blog-inner {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 64px;
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto;
  padding: 112px var(--side-padding);
}

.blog-feature {
  display: grid;
  grid-template-columns: 110px 1fr 58px;
  gap: 24px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid rgba(23, 26, 29, 0.25);
}

.blog-index {
  color: var(--solar-blue);
}

.blog-feature h3 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 600;
}

.blog-feature p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
}

.skills-section {
  padding: 112px 0;
  border-bottom: 1px solid var(--line);
  background: #ecece7;
  overflow: hidden;
}

.skills-heading {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr auto;
  gap: 64px;
  align-items: end;
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto 54px;
  padding: 0 var(--side-padding);
}

.skills-heading .section-number {
  margin: 0;
}

.skills-heading h2 {
  margin: 0;
}

.skills-heading > div > p {
  max-width: 580px;
  margin: 16px 0 0;
  color: var(--muted);
}

.skills-motion-toggle {
  color: var(--solar-blue);
  border-color: rgba(17, 95, 167, 0.35);
  background: var(--paper-bright);
}

.skills-marquee {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-bright);
  overflow: hidden;
}

.skills-track {
  display: flex;
  width: max-content;
  animation: skills-loop 64s linear infinite;
  will-change: transform;
}

.skills-section.is-paused .skills-track,
.skills-marquee:hover .skills-track {
  animation-play-state: paused;
}

.skills-sequence {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  padding: 14px 7px;
}

.skill-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  flex: 0 0 250px;
  height: 132px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.skill-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 8px;
}

.skill-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.skill-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-copy span {
  color: var(--solar-blue);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

@keyframes skills-loop {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.circle-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--solar-blue);
  border-radius: 50%;
  color: var(--paper-bright);
  background: var(--solar-blue);
}

.contact-section {
  color: var(--paper-bright);
  background: #162b3a;
}

.contact-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto;
  padding: 112px var(--side-padding);
}

.contact-section .eyebrow {
  color: var(--solar-yellow);
}

.contact-section h2 {
  margin-top: 16px;
  font-size: 52px;
}

.contact-intro {
  max-width: 510px;
  margin: 22px 0 0;
  color: #c5d0d5;
  font-size: 17px;
}

.contact-list {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.contact-list > a,
.contact-list > span {
  display: grid;
  grid-template-columns: 100px 1fr 24px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.contact-list > a > span,
.contact-list > span > span {
  color: #aebdc5;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.contact-list strong {
  font-size: 15px;
  font-weight: 600;
}

.contact-placeholder {
  color: #9cabb3;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: 0 max(var(--side-padding), calc((100vw - var(--max-width)) / 2));
  font-size: 13px;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.site-footer .icon {
  width: 16px;
  height: 16px;
}

.project-dialog {
  width: min(1120px, calc(100% - 40px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper-bright);
  box-shadow: 0 24px 70px rgba(15, 25, 31, 0.3);
  overflow: auto;
}

.project-dialog[open] {
  animation: dialog-enter 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-dialog.is-closing {
  animation: dialog-exit 280ms cubic-bezier(0.4, 0, 1, 1) both;
}

.project-dialog::backdrop {
  background: rgba(12, 19, 24, 0.72);
  backdrop-filter: blur(4px);
  animation: backdrop-enter 360ms ease both;
}

.project-dialog.is-closing::backdrop {
  animation: backdrop-exit 280ms ease both;
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
}

@keyframes backdrop-enter {
  from {
    background: rgba(12, 19, 24, 0);
  }
}

@keyframes backdrop-exit {
  to {
    background: rgba(12, 19, 24, 0);
  }
}

.dialog-close {
  position: sticky;
  top: 16px;
  right: 16px;
  z-index: 50;
  float: right;
  margin: 16px 16px -58px 0;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--paper-bright);
  background: rgba(23, 26, 29, 0.66);
}

.project-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: min(56vh, 620px);
  min-height: 420px;
  background: #e8edf0;
  overflow: hidden;
}

.project-preview[hidden],
.step-viewer[hidden] {
  display: none;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.step-viewer {
  position: relative;
  width: 100%;
  height: min(60vh, 620px);
  min-height: 440px;
  background: #e8edf0;
  overflow: hidden;
}

.step-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.step-viewer canvas:active {
  cursor: grabbing;
}

.step-toolbar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 54px;
  padding: 7px 8px 7px 16px;
  border-radius: 4px;
  color: var(--paper-bright);
  background: rgba(22, 43, 58, 0.88);
  backdrop-filter: blur(10px);
}

.step-status {
  margin: 0;
  overflow: hidden;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-action {
  width: 38px;
  height: 38px;
  color: var(--paper-bright);
  border-color: rgba(255, 255, 255, 0.38);
}

.step-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--solar-blue-dark);
  background: rgba(232, 237, 240, 0.9);
}

.step-loading[hidden],
.step-error[hidden] {
  display: none;
}

.step-loading p,
.step-error {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.step-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(17, 95, 167, 0.2);
  border-top-color: var(--solar-blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.step-error {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 9;
  max-width: calc(100% - 100px);
  padding: 10px 12px;
  border-left: 3px solid var(--solar-yellow);
  color: var(--paper-bright);
  background: rgba(22, 43, 58, 0.9);
}

.dialog-body {
  display: block;
}

.dialog-content {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 64px 54px;
}

.dialog-content h2 {
  margin: 12px 0 16px;
  font-size: 38px;
  line-height: 1.15;
}

.dialog-summary {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.dialog-image-section {
  padding: 0 54px 64px;
}

.dialog-image-heading {
  margin-bottom: 20px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.dialog-image-heading p {
  margin: 0 0 8px;
}

.dialog-image-heading h3 {
  margin: 0;
  font-size: 24px;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.dialog-gallery-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e8edf0;
  overflow: hidden;
}

.dialog-gallery-item:first-child,
.dialog-gallery-item.is-wide {
  grid-column: 1 / -1;
}

.dialog-gallery-item img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.dialog-gallery-item figcaption {
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper-bright);
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 36px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.dialog-detail {
  display: grid;
  gap: 24px;
}

.dialog-detail section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-detail h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.dialog-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dialog-links {
  display: flex;
  gap: 22px;
  margin-top: 34px;
}

.dialog-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--solar-yellow);
  font-size: 14px;
  font-weight: 600;
}

.dialog-links a[hidden] {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Blog listing and reusable article page */
.subpage-header {
  position: sticky;
  grid-template-columns: 1fr auto;
}

.subpage-header .header-link {
  display: inline-flex;
}

.subpage-main {
  min-height: calc(100vh - 156px);
}

.page-intro {
  padding: 110px max(var(--side-padding), calc((100vw - var(--max-width)) / 2)) 70px;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  max-width: 820px;
  margin: 12px 0 18px;
  font-size: 58px;
  line-height: 1.08;
}

.page-intro > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.post-list {
  width: min(100%, calc(var(--max-width) + (var(--side-padding) * 2)));
  margin: 0 auto;
  padding: 72px var(--side-padding) 112px;
}

.post-empty {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.post-empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.post-empty p {
  margin: 0;
  color: var(--muted);
}

.post-entry {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 48px;
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.post-entry-meta {
  margin: 0 0 8px;
  color: var(--solar-blue);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.post-entry h2 {
  margin: 0 0 8px;
  font-size: 24px;
  transition: color 180ms ease;
}

.post-entry div > p:last-child {
  margin: 0;
  color: var(--muted);
}

.post-entry-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 26, 29, 0.35);
  border-radius: 50%;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.post-entry-arrow .icon {
  width: 17px;
  height: 17px;
}

.post-entry:hover h2,
.post-entry:focus-visible h2 {
  color: var(--solar-blue);
}

.post-entry:hover .post-entry-arrow,
.post-entry:focus-visible .post-entry-arrow {
  border-color: var(--solar-blue);
  color: var(--paper-bright);
  background: var(--solar-blue);
}

@media (max-width: 760px) {
  .post-entry {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 16px;
  }

  .post-entry > .blog-index {
    grid-column: 1 / -1;
  }
}

.article-header {
  width: min(calc(100% - var(--side-padding) - var(--side-padding)), 760px);
  margin: 0 auto;
  padding: 104px 0 52px;
}

.article-header h1 {
  margin: 14px 0 20px;
  font-size: 46px;
  line-height: 1.14;
}

.article-header > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.article-body {
  width: min(calc(100% - var(--side-padding) - var(--side-padding)), 760px);
  margin: 0 auto;
  padding: 0 0 120px;
}

.article-body h2 {
  margin: 52px 0 14px;
  font-size: 27px;
}

.article-body p {
  color: #3f4441;
}

.article-body .article-lead {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.6;
}

.article-figure {
  margin: 44px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e8edf0;
  overflow: hidden;
}

.article-figure img {
  width: auto;
  max-width: 100%;
  max-height: 720px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.article-figure figcaption {
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper-bright);
  font-size: 13px;
}

.article-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 44px 0;
}

.article-image-grid .article-figure {
  margin: 0;
}

@media (max-width: 760px) {
  .article-image-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-card {
    transition: none;
  }

  .skills-track {
    animation: none;
  }

  .skills-motion-toggle {
    display: none;
  }

  .project-dialog[open],
  .project-dialog.is-closing,
  .project-dialog::backdrop,
  .project-dialog.is-closing::backdrop {
    animation-duration: 1ms;
  }
}

@media (max-width: 980px) {
  :root {
    --side-padding: 24px;
  }

  .hero-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 44px;
    width: min(100%, 820px);
  }

  .headshot {
    width: 160px;
    height: 160px;
  }

  .hero h1 {
    font-size: 62px;
  }

  .project-console {
    gap: 40px;
  }
}

@media (max-width: 760px) {
  :root {
    --side-padding: 22px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-link {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    border: 0;
  }

  .mobile-nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    padding: 12px var(--side-padding) 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav a {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
  }

  .hero {
    min-height: auto;
  }

  .hero-scrim {
    background: rgba(244, 243, 237, 0.78);
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    padding-top: 64px;
    padding-bottom: 72px;
  }

  .headshot {
    width: 132px;
    height: 132px;
  }

  .headshot-fallback {
    font-size: 39px;
  }

  .headshot-accent {
    width: 22px;
    height: 22px;
    border-width: 3px;
  }

  .hero h1 {
    margin-top: 12px;
    margin-bottom: 18px;
    font-size: 48px;
  }

  .hero-intro {
    max-width: 520px;
    font-size: 17px;
  }

  .section,
  .about-section {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .section h2,
  .projects-section h2,
  .blog-section h2,
  .skills-section h2 {
    font-size: 32px;
  }

  .projects-inner {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .projects-heading {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 36px;
  }

  .projects-heading > p:last-child {
    margin-top: 4px;
  }

  .project-stage {
    min-height: 440px;
  }

  .project-card {
    width: min(72%, 400px);
  }

  .project-card-label strong {
    font-size: 17px;
  }

  .carousel-arrow {
    width: 42px;
    height: 42px;
  }

  .carousel-arrow-left {
    left: 10px;
  }

  .carousel-arrow-right {
    right: 10px;
  }

  .project-console {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
  }

  .project-open-button {
    width: 100%;
  }

  .experience-section {
    gap: 54px;
  }

  .blog-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .blog-feature {
    grid-template-columns: 1fr 52px;
  }

  .blog-index {
    grid-column: 1 / -1;
  }

  .skills-section {
    padding: 82px 0;
  }

  .skills-heading {
    grid-template-columns: 1fr auto;
    gap: 14px 24px;
    margin-bottom: 36px;
  }

  .skills-heading .section-number {
    grid-column: 1;
  }

  .skills-heading > div {
    grid-column: 1 / -1;
  }

  .skills-motion-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .contact-section h2 {
    font-size: 40px;
  }

  .page-intro {
    padding-top: 80px;
  }

  .page-intro h1 {
    font-size: 43px;
  }

  .dialog-content {
    padding: 46px 28px;
  }

  .dialog-content h2 {
    font-size: 31px;
  }
}

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

  .hero h1 {
    font-size: 43px;
  }

  .project-stage {
    min-height: 350px;
  }

  .project-card {
    width: 74%;
    touch-action: pan-y;
  }

  .project-card-label {
    right: 10px;
    bottom: 8px;
    left: 10px;
  }

  .project-card-label strong {
    font-size: 15px;
  }

  .project-controls {
    flex-wrap: wrap;
  }

  .project-open-button {
    flex: 1 1 160px;
  }

  .skill-item {
    grid-template-columns: 56px minmax(0, 1fr);
    flex-basis: 218px;
    height: 118px;
    padding: 20px;
  }

  .skill-logo {
    width: 52px;
    height: 52px;
    padding: 10px;
  }

  .timeline-item {
    grid-template-columns: 20px 1fr;
    gap: 15px;
  }

  .timeline-date {
    grid-column: 2;
    margin-bottom: -8px;
  }

  .timeline-item > div:last-child {
    grid-column: 2;
  }

  .contact-list > a,
  .contact-list > span {
    grid-template-columns: 82px minmax(0, 1fr) 20px;
    gap: 12px;
  }

  .contact-list strong {
    overflow-wrap: anywhere;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .post-empty {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-header h1 {
    font-size: 34px;
  }

  .article-header {
    padding-top: 92px;
    padding-bottom: 42px;
  }

  .article-body .article-lead {
    font-size: 19px;
  }

  .project-dialog {
    inset: 10px;
    width: auto;
    max-width: none;
    max-height: none;
    margin: 0;
  }

  .step-viewer {
    height: 390px;
    min-height: 390px;
  }

  .project-preview {
    height: 340px;
    min-height: 340px;
  }

  .step-toolbar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding-left: 10px;
  }

  .step-status {
    max-width: 110px;
  }

  .dialog-content {
    padding: 50px 24px;
  }

  .dialog-image-section {
    padding: 0 24px 32px;
  }

  .dialog-gallery {
    grid-template-columns: 1fr;
  }

  .dialog-gallery-item:first-child,
  .dialog-gallery-item.is-wide {
    grid-column: auto;
  }

  .dialog-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
