:root {
  --canvas: #fbfbfa;
  --surface: #f2f2f0;
  --ink: #141414;
  --muted: #6d6d6a;
  --soft: #989894;
  --line: #d9d9d5;
  --line-strong: #bdbdb8;
  --accent: #315fd6;
  --complete: #3e7756;
  --prototype: #315fd6;
  --development: #8b6b2f;
  --planned: #777773;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: var(--canvas);
  transform: translateY(-200%);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner,
.hero__inner,
.section-shell {
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 2rem;
}

.wordmark {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.hero {
  min-height: min(760px, 78vh);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  align-items: end;
  gap: 4rem;
  padding: 8.5rem 0 8rem;
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero__lead {
  max-width: 43rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.hero__supporting {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero__aside {
  align-self: end;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  line-height: 1.55;
  text-transform: uppercase;
}

.hero__aside-line {
  display: block;
  width: 3rem;
  height: 1px;
  margin-bottom: 1rem;
  background: var(--ink);
}

.hero__aside p {
  margin: 0;
}

.projects {
  padding: 9rem 0 10rem;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(10rem, 0.65fr) minmax(0, 1.75fr) minmax(13rem, 0.9fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 5rem;
}

.section-intro .eyebrow {
  margin: 0 0 0.8rem;
}

h2 {
  margin: 0;
  font-size: clamp(3.3rem, 8vw, 7rem);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.9;
}

.section-intro > p:last-child {
  max-width: 19rem;
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.project {
  padding: 3.5rem 0 3.75rem;
  border-bottom: 1px solid var(--line);
}

.project__body {
  min-width: 0;
}

.project__heading {
  max-width: 58rem;
}

.project h3:not(.hero__lead) {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.title-note {
  display: inline-block;
  margin: 0.25rem 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.38em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: middle;
}

.project__summary {
  max-width: 48rem;
  margin: 1.35rem 0 0;
  color: #3f3f3d;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.5;
}

.project__meta {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.project-action {
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
}

.project-action[href] {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
}

.project-action[href]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.project-action:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.project-gallery {
  max-width: 58rem;
  margin-top: 2.5rem;
  scroll-margin-top: 2rem;
}

.project-gallery__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  list-style: none;
}

.project-gallery__heading::-webkit-details-marker {
  display: none;
}

.project-gallery__heading h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.project-gallery__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
  transition: border-color 180ms ease, color 180ms ease;
}

.project-gallery__heading:hover .project-gallery__toggle {
  border-color: var(--accent);
  color: var(--accent);
}

.project-gallery__disclosure[open] .project-gallery__toggle-closed,
.project-gallery__disclosure:not([open]) .project-gallery__toggle-open {
  display: none;
}

.project-gallery__disclosure:not([open]) .project-gallery__heading {
  margin-bottom: 0;
}

.project-gallery__hint {
  margin: -0.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-gallery__swipe {
  display: none;
}

.screenshot-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screenshot-list figure {
  margin: 0;
}

.screenshot-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.screenshot-link:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0.4rem 1.2rem rgb(20 20 20 / 8%);
}

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

.screenshot-list figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.project__details {
  max-width: 58rem;
  margin-top: 2.5rem;
}

.project__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
}

.project__details summary::-webkit-details-marker {
  display: none;
}

.summary__icon {
  position: relative;
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.summary__icon::before,
.summary__icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1px;
  background: currentColor;
  content: "";
  transition: transform 220ms ease;
}

.summary__icon::before {
  transform: translate(-50%, -50%);
}

.summary__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.project__details[open] .summary__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.details__content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 4rem;
  padding: 2.5rem 0 0.75rem;
  animation: details-in 260ms ease both;
}

.details__content h4 {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.details__content p {
  margin: 0 0 1.05rem;
  color: #3f3f3d;
  font-size: 1rem;
  line-height: 1.65;
}

.details__content p:last-child {
  margin-bottom: 0;
}

.details__tech {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  gap: 1.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.details__tech h4 {
  flex: 0 0 auto;
  margin: 0;
}

.tech-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 1rem;
  list-style: none;
}

.tech-detail-list li:not(:last-child)::after {
  margin: 0 0.55rem;
  color: var(--soft);
  content: "·";
}

@keyframes details-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about {
  display: grid;
  grid-template-columns: minmax(12rem, 0.9fr) minmax(0, 1.35fr);
  gap: 4rem;
  padding: 8rem 0 10rem;
  border-top: 1px solid var(--line-strong);
}

.about .eyebrow {
  margin-bottom: 1.35rem;
}

.about__copy {
  max-width: 42rem;
  padding-top: 0.2rem;
}

.about__copy p {
  margin: 0 0 1.4rem;
  color: #3f3f3d;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.about__copy p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

.legal-page {
  width: min(calc(100% - 3rem), 48rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.legal-page h1 {
  margin: 0 0 3rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.legal-content {
  max-width: 42rem;
  color: #3f3f3d;
  overflow-wrap: anywhere;
}

.legal-content section + section {
  margin-top: 2.75rem;
}

.legal-content h2 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.3;
}

.legal-content p,
.legal-content ul,
.legal-content address {
  margin: 0 0 1rem;
}

.legal-content address {
  font-style: normal;
}

.legal-content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

@media (max-width: 800px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 7rem 0 6.5rem;
  }

  .hero__aside {
    justify-self: start;
  }

  .section-intro {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }

  .section-intro .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -0.5rem;
  }

  .section-intro > p:last-child {
    align-self: end;
  }

  .details__content {
    gap: 2rem;
  }

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

@media (max-width: 560px) {
  .site-header__inner,
  .site-footer__inner,
  .hero__inner,
  .section-shell {
    width: min(calc(100% - 2rem), var(--content-width));
  }

  .legal-page {
    width: min(calc(100% - 2rem), 48rem);
  }

  .site-header__inner {
    min-height: 4rem;
  }

  .site-nav {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding: 5.5rem 0 5rem;
  }

  .hero__lead {
    font-size: 1.35rem;
  }

  .projects {
    padding: 6rem 0 6.5rem;
  }

  .section-intro {
    display: block;
    margin-bottom: 3.5rem;
  }

  .section-intro .eyebrow {
    margin-bottom: 1.25rem;
  }

  .section-intro > p:last-child {
    margin-top: 1.5rem;
  }

  .project {
    padding: 2.75rem 0 3rem;
  }

  .project h3:not(.hero__lead) {
    font-size: 2.3rem;
  }

  .project__summary {
    font-size: 1rem;
  }

  .project__meta {
    gap: 0.9rem;
    margin-top: 1.5rem;
  }

  .project-action,
  .tech-detail-list {
    font-size: 0.86rem;
  }

  .project-gallery {
    margin-top: 2rem;
  }

  .project-gallery__swipe {
    display: inline;
  }

  .screenshot-list {
    grid-auto-columns: minmax(12.5rem, 70%);
    grid-auto-flow: column;
    grid-template-columns: none;
    padding-bottom: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
  }

  .screenshot-list li {
    scroll-snap-align: start;
  }

  .details__tech {
    display: block;
  }

  .details__tech h4 {
    margin-bottom: 0.8rem;
  }

  .details__content {
    display: block;
    padding-top: 2rem;
  }

  .details__content > div + div {
    margin-top: 2rem;
  }

  .about {
    gap: 2rem;
    padding: 6rem 0 6.5rem;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
    min-height: 7rem;
  }
}

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

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