:root {
  color-scheme: dark;
  --ink-950: #0b0e10;
  --ink-900: #101417;
  --ink-850: #151a1e;
  --ink-800: #1a2025;
  --ink-700: #273038;
  --parchment: #f2eadc;
  --parchment-soft: #d9d0c1;
  --muted: #aaa397;
  --teal: #55b9b3;
  --teal-dark: #237f7b;
  --pink: #ed6da8;
  --pink-dark: #bd477d;
  --gold: #d6ad62;
  --line: rgba(242, 234, 220, 0.14);
  --line-strong: rgba(242, 234, 220, 0.24);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1160px;
  --reading: 760px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(85, 185, 179, 0.08), transparent 28rem),
    var(--ink-950);
  color: var(--parchment-soft);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
}

body.lightbox-open {
  overflow: hidden;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  color: var(--parchment);
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.65em;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.75rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.35rem;
}

p,
ul {
  margin-top: 0;
}

strong {
  color: var(--parchment);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.reading-width {
  max-width: var(--reading);
}

.site-header,
body > header:not(.site-header) {
  background: rgba(16, 20, 23, 0.98);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 86px;
  padding-block: 0.8rem;
}

.site-brand {
  align-items: center;
  color: var(--parchment);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.8rem;
  line-height: 1.15;
  margin: 0;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--parchment);
}

.site-brand img {
  background: #e8dcc8;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.site-brand__name,
.site-brand__tagline {
  display: block;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.site-brand__tagline {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  margin-top: 0.3rem;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.site-nav a,
body > header:not(.site-header) nav a {
  border-radius: 999px;
  color: var(--parchment-soft);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(85, 185, 179, 0.13);
  color: var(--parchment);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(85, 185, 179, 0.35);
}

body > header:not(.site-header) {
  padding: 1rem;
  text-align: center;
}

body > header:not(.site-header) .site-brand {
  justify-content: center;
  margin-bottom: 0.75rem;
}

body > header:not(.site-header) nav a {
  display: inline-block;
}

main {
  min-height: 55vh;
}

.eyebrow,
.status-label {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0;
  position: relative;
}

.hero::before {
  background: linear-gradient(135deg, rgba(237, 109, 168, 0.1), rgba(85, 185, 179, 0.08));
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
  height: 28rem;
  position: absolute;
  right: -12rem;
  top: -16rem;
  width: 28rem;
}

.hero__layout {
  align-items: center;
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.hero__copy {
  max-width: 700px;
}

.hero__copy h1 {
  margin-top: 0.25rem;
}

.hero__lead {
  color: var(--parchment-soft);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  max-width: 62ch;
}

.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button,
.link-button,
button {
  align-items: center;
  background: var(--pink);
  border: 1px solid var(--pink);
  border-radius: 999px;
  color: #160d12;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  min-height: 46px;
  padding: 0.78rem 1.2rem;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.link-button:hover,
button:hover {
  background: #f483b8;
  border-color: #f483b8;
  color: #160d12;
  transform: translateY(-1px);
}

.button--secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--parchment);
}

.button--secondary:hover {
  background: var(--ink-800);
  border-color: var(--teal);
  color: var(--parchment);
}

.hero-covers {
  align-items: end;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  isolation: isolate;
  position: relative;
}

.hero-covers::after {
  background: var(--teal);
  bottom: -0.9rem;
  content: "";
  height: 3px;
  left: 10%;
  opacity: 0.65;
  position: absolute;
  width: 80%;
  z-index: -1;
}

.hero-covers img {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  height: auto;
  object-fit: cover;
  width: 100%;
}

.hero-covers img:nth-child(2) {
  margin-bottom: 1.2rem;
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section--muted {
  background: var(--ink-900);
  border-block: 1px solid var(--line);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-heading > div {
  max-width: 720px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.project-card,
.project,
.card,
.content-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 45%), var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.project-card:hover {
  border-color: rgba(85, 185, 179, 0.45);
  transform: translateY(-3px);
}

.project-card__media {
  aspect-ratio: 4 / 5;
  background: var(--ink-800);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-card__media img {
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 240ms ease;
  width: 100%;
}

.project-card:hover .project-card__media img {
  transform: scale(1.025);
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem;
}

.project-card__body h2,
.project-card__body h3 {
  margin-bottom: 0.6rem;
}

.project-card__body p {
  color: var(--muted);
}

.project-card__link {
  font-weight: 800;
  margin-top: auto;
  text-decoration: none;
}

.project-card--text {
  min-height: 280px;
  overflow: hidden;
  position: relative;
}

.project-card--text::after {
  border: 1px solid rgba(214, 173, 98, 0.22);
  border-radius: 22px;
  content: "";
  height: 150px;
  position: absolute;
  right: -68px;
  top: -68px;
  transform: rotate(24deg);
  width: 150px;
}

.project-card--text .project-card__body {
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.callout {
  align-items: center;
  background: linear-gradient(120deg, rgba(85, 185, 179, 0.12), rgba(237, 109, 168, 0.08));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: clamp(1.75rem, 5vw, 3rem);
}

.callout h2,
.callout p {
  margin-bottom: 0.35rem;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.page-hero__copy {
  max-width: 850px;
}

.page-hero__copy > :last-child {
  margin-bottom: 0;
}

.page-content {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.content-panel,
.project,
.card {
  margin-bottom: 1.25rem;
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

.detail-layout {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
}

.detail-copy {
  max-width: var(--reading);
}

.detail-copy h2 {
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
  padding-top: 2rem;
}

.detail-copy > h2:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.detail-copy ul {
  padding-left: 1.25rem;
}

.detail-copy li {
  margin-bottom: 0.7rem;
  padding-left: 0.4rem;
}

.detail-copy li::marker {
  color: var(--pink);
}

.detail-media {
  position: sticky;
  top: 1.5rem;
}

.detail-media .screenshot {
  margin: 0 0 1rem;
}

.screenshot {
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: auto;
  margin: 1.5rem auto;
  max-width: 600px;
  width: 100%;
}

.project-index {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-index .project-card:first-child {
  grid-column: span 2;
}

.project-index .project-card:first-child {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
}

.project-index .project-card:first-child .project-card__media {
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  min-height: 360px;
}

form {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

label {
  color: var(--parchment);
  display: block;
  font-weight: 700;
  margin-top: 1rem;
}

label:first-child {
  margin-top: 0;
}

input,
textarea {
  background: var(--ink-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--parchment);
  font: inherit;
  margin-top: 0.4rem;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

form button {
  margin-top: 1.25rem;
}

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery img {
  aspect-ratio: 1;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: zoom-in;
  height: 100%;
  object-fit: cover;
  transition: border-color 160ms ease, transform 160ms ease;
  width: 100%;
}

.gallery-item {
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  display: block;
  min-height: 0;
  padding: 0;
  width: 100%;
}

.gallery-item:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

.gallery img:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.gallery-backdrop {
  align-items: center;
  background: rgba(5, 7, 8, 0.92);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 100;
}

.gallery-backdrop.is-open {
  display: flex;
}

.gallery-backdrop__image {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-out;
  max-height: calc(100vh - 2.5rem);
  max-width: min(100%, 1000px);
  object-fit: contain;
}

.gallery-backdrop__close {
  background: var(--ink-850);
  border-color: var(--line-strong);
  color: var(--parchment);
  min-height: 42px;
  padding: 0.6rem 0.9rem;
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
}

.gallery-backdrop__close:hover {
  background: var(--ink-700);
  border-color: var(--teal);
  color: var(--parchment);
}

.contact-form {
  max-width: var(--reading);
}

.site-footer,
body > footer:not(.site-footer) {
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin-top: 0;
}

.site-footer__inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 110px;
  padding-block: 1.5rem;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--parchment-soft);
  font-size: 0.88rem;
  text-decoration: none;
}

body > footer:not(.site-footer) {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
}

@media (max-width: 860px) {
  .hero__layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-covers {
    margin-inline: auto;
    max-width: 620px;
  }

  .detail-media {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: -1;
    position: static;
  }

  .detail-media .screenshot {
    margin: 0;
  }

  .detail-media h2 {
    grid-column: 1 / -1;
  }

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

  .card-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header__inner,
  .site-footer__inner,
  .section-heading,
  .callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header__inner {
    gap: 0.9rem;
  }

  .site-nav {
    justify-content: flex-start;
    margin-inline: -0.45rem;
  }

  .site-nav a {
    padding-inline: 0.55rem;
  }

  .project-index,
  .project-index .project-card:first-child,
  .card-grid,
  .card-grid--two {
    grid-template-columns: 1fr;
  }

  .project-index .project-card:first-child {
    display: flex;
    grid-column: auto;
  }

  .project-index .project-card:first-child .project-card__media {
    aspect-ratio: 4 / 5;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 0;
  }

  .card-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .detail-media {
    grid-template-columns: 1fr;
  }

  .hero-covers {
    gap: 0.45rem;
  }

  .hero-covers img:nth-child(2) {
    margin-bottom: 0.6rem;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .site-brand__tagline {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    font-size: 0.82rem;
  }
}

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

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