:root {
  color-scheme: light;
  --paper: #f2f7fd;
  --ink: #171713;
  --muted: #77766f;
  --line: #cbc9c1;
  --accent: #ddff57;
  --serif: "Bricolage Grotesque", Arial, sans-serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-200%);
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  padding: 1.6rem 3vw;
  font-size: 0.78rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.text-link,
.contact-footer a {
  position: relative;
}

.text-link::after,
.contact-footer a::after {
  position: absolute;
  right: 0;
  bottom: -0.25rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms ease;
}

.text-link:hover::after,
.text-link:focus-visible::after,
.contact-footer a:hover::after,
.contact-footer a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  justify-self: end;
  gap: 0.5rem;
}

.header-action {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  padding: 0.65rem 1rem;
  transition: background 250ms ease, color 250ms ease;
}

.header-action:hover,
.header-action:focus-visible,
.header-action--primary {
  background: var(--ink);
  color: var(--paper);
}

.header-action--primary:hover,
.header-action--primary:focus-visible {
  background: transparent;
  color: var(--ink);
}

.header-action span {
  margin-left: 0.35rem;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(34rem, 64svh, 44rem);
  padding: 7rem 3vw 3.5rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  margin: auto 0;
  text-align: center;
}

.hero h1 {
  max-width: 70rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.75rem, 6.8vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.hero h1 em,
.contact h2 em {
  font-weight: inherit;
}

.section {
  padding: 9rem 3vw;
}

.work {
  padding-top: 4.5rem;
}

.project-filter-shell {
  padding: 3rem 3vw 0;
}

.project-filter {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.project-filter button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    color 200ms ease;
}

.project-filter button:hover,
.project-filter button:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
}

.project-filter button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

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

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
  padding-top: 1rem;
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5.3vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.section-heading--right h2 {
  text-align: right;
}

#work-title,
#personal-title,
#about-title {
  grid-column: 2 / -1;
  align-self: start;
  text-align: right;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4.5rem 1.5rem;
}

.project-card--large {
  grid-column: auto;
}

.project-card {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}

.project-card[hidden] {
  display: none;
}

.project-visual {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #252821;
}

.project-card:not(.project-card--large) .project-visual {
  min-height: 0;
}

.project-visual--atlas {
  display: block;
  overflow: hidden;
  background: var(--paper);
}

.project-visual-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.atlas-ui {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  width: 76%;
  height: 60%;
  border-radius: 0.35rem;
  background: #eff0e9;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 28%);
  overflow: visible;
}

.atlas-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  border-right: 1px solid #d4d5ce;
  padding-top: 1rem;
}

.atlas-sidebar span {
  width: 0.4rem;
  height: 0.4rem;
  border: 1px solid #9d9f97;
  border-radius: 50%;
}

.atlas-sidebar .active {
  background: #262a23;
}

.atlas-content {
  padding: 8%;
}

.atlas-content p,
.atlas-float span {
  color: #7f8179;
  font-family: var(--mono);
  font-size: 0.42rem;
  text-transform: uppercase;
}

.atlas-content strong {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  font-weight: 700;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 4%;
  height: 34%;
  margin-top: 0.6rem;
  border-bottom: 1px solid #cacbc5;
}

.chart-bars i {
  flex: 1;
  height: 42%;
  background: #cfd3b7;
}

.chart-bars i:nth-child(2) { height: 55%; }
.chart-bars i:nth-child(3) { height: 49%; }
.chart-bars i:nth-child(4) { height: 72%; }
.chart-bars i:nth-child(5) { height: 67%; }
.chart-bars i:nth-child(6) { height: 88%; background: var(--accent); }
.chart-bars i:nth-child(7) { height: 94%; }

.atlas-float {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 7rem;
  border-radius: 0.3rem;
  padding: 0.65rem;
  background: var(--accent);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 15%);
}

.atlas-float strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  border-top: 0;
  padding-top: 0;
}

.project-meta h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.project-meta > p {
  margin: 0;
  padding-top: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.project-meta dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding-top: 0.2rem;
  color: #575750;
  font-family: var(--sans);
  font-size: calc(0.82rem - 2px);
  line-height: 1.5;
}

.project-meta dl div {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.project-meta dl div:not(:last-child)::after {
  content: "/";
}

.project-meta dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.project-meta dd {
  margin: 0;
  text-align: left;
}

.project-visual--sana {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dce1e6;
}

.project-visual--sana::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(238 241 244 / 28%), rgb(220 225 230 / 42%)),
    url("assets/security-hero.png") center / cover;
  content: "";
  opacity: 0.72;
  transform: scale(1.04);
}

.security-store-artwork {
  position: relative;
  z-index: 1;
  width: 112%;
  max-width: none;
  height: auto;
  box-shadow: 0 2rem 5rem rgb(47 58 70 / 24%);
  transform: rotate(-2deg) scale(1.03);
}

.project-visual--common {
  display: grid;
  place-items: center;
  background: #e8edf3;
  color: var(--ink);
}

.blockflows-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
}

.project-visual--coming-soon {
  display: grid;
  place-items: center;
  background: #119ee5;
}

.coming-soon-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Zoomed past the frame so the scroll parallax never exposes the card background. */
  transform: scale(1.12);
}

.project-visual--lab {
  display: grid;
  place-items: center;
  background: #d9d4ca;
}

.project-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 58% 52%;
  transform: scale(1.16);
}

.project-visual--notes {
  display: grid;
  place-items: center;
  background: #d8c8b5;
}

.project-visual,
.project-visual *,
.project-visual::before {
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-visual:hover .atlas-ui,
.project-visual:focus-visible .atlas-ui {
  transform: translateY(-0.8rem);
}

.project-visual:hover .security-store-artwork,
.project-visual:focus-visible .security-store-artwork {
  transform: rotate(-1deg) scale(1.07);
}

.project-visual:hover .blockflows-artwork,
.project-visual:focus-visible .blockflows-artwork {
  transform: scale(1.035);
}

.project-visual:hover .coming-soon-artwork,
.project-visual:focus-visible .coming-soon-artwork {
  transform: scale(1.16);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 9vw;
}

.portrait {
  position: relative;
  min-height: 42rem;
  border-radius: 0.6rem;
  background: #cec8bd;
  overflow: hidden;
}

.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.about-copy .lede {
  margin: 0 0 3rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.about-copy > p:not(.lede) {
  max-width: 34rem;
  color: #56564f;
  line-height: 1.75;
}

.text-link {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.text-link span {
  margin-left: 0.5rem;
}

.experience-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 7rem;
}

.experience-row p,
.experience-row span {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.experience-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 400;
}

.experience-row span {
  text-align: right;
}

.quote {
  padding-bottom: 4rem;
}

.quote figure {
  max-width: 68rem;
  margin: 0 auto 10rem;
  text-align: center;
}

.quote blockquote {
  margin: 0 0 3rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.2vw, 5.3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.quote figcaption {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.quote figcaption span {
  display: block;
  color: var(--ink);
}

.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 5rem 3vw 2rem;
  background: var(--ink);
  color: var(--paper);
}

.contact > .eyebrow {
  padding-top: 1rem;
}

.contact h2 {
  margin: auto 0 3rem;
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 13rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.72;
}

.contact h2 em {
  color: var(--accent);
}

.contact-link {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 3rem);
}

.contact-link span {
  transition: transform 250ms ease;
}

.contact-link:hover span,
.contact-link:focus-visible span {
  transform: translate(0.25rem, -0.25rem);
}

.contact-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-top: 5rem;
  color: #a3a29a;
  font-family: var(--mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.contact-footer p {
  margin: 0;
}

.contact-footer div {
  display: flex;
  gap: 2rem;
}

.contact-footer > a {
  justify-self: end;
}

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.project-list .reveal:nth-child(2) {
  transition-delay: 100ms;
}

.project-list .reveal:nth-child(3) {
  transition-delay: 180ms;
}

:focus-visible {
  outline: 2px solid #5270d8;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 38rem;
  }

  .section-heading {
    grid-template-columns: 1fr 2fr;
  }

  .section-heading > p:last-child {
    display: none;
  }

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

  .project-card--large {
    grid-column: auto;
  }

  .project-card .project-visual,
  .project-card:not(.project-card--large) .project-visual {
    min-height: 0;
  }

  .about-grid {
    gap: 4rem;
  }

  .portrait {
    min-height: 34rem;
  }

}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .project-filter-shell,
  .contact {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .site-header {
    padding-top: 1.25rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .header-action {
    padding: 0.55rem 0.7rem;
  }

  .hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 13vw, 4.6rem);
    line-height: 0.92;
  }

  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .work {
    padding-top: 4rem;
  }

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

  .section-heading {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
  }

  .project-list {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .project-card .project-visual,
  .project-card:not(.project-card--large) .project-visual {
    min-height: 0;
  }

  .atlas-ui {
    grid-template-columns: 2.5rem 1fr;
    width: 86%;
    height: 54%;
  }

  .atlas-sidebar {
    gap: 0.8rem;
    padding-top: 2rem;
  }

  .atlas-content {
    padding: 12% 8%;
  }

  .atlas-content strong {
    font-size: 2.5rem;
  }

  .atlas-float {
    right: -3%;
    width: 9rem;
    padding: 1rem;
  }

  .atlas-float strong {
    font-size: 1.5rem;
  }

  .security-store-artwork {
    width: 150%;
  }

  .project-meta,
  .project-card:not(.project-card--large) .project-meta {
    min-height: 0;
  }

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

  .portrait {
    min-height: 32rem;
  }

  .experience-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    padding: 1.4rem 0;
  }

  .experience-row h3 {
    font-size: 1.8rem;
    text-align: right;
  }

  .experience-row span {
    text-align: right;
  }

  .quote figure {
    margin-bottom: 6rem;
  }

  .contact h2 {
    font-size: clamp(5rem, 25vw, 8rem);
  }

  .contact-link {
    overflow-wrap: anywhere;
  }

  .contact-footer {
    grid-template-columns: 1fr auto;
    gap: 2rem;
  }

  .contact-footer > a {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

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

}

.project-filter-shell[hidden] {
  display: none;
}
