:root {
  color-scheme: dark;
  --background: #080709;
  --surface: #0e0b11;
  --text: #eee9f2;
  --muted: #918a98;
  --purple: #b77aff;
  --line: #29222f;
  --page-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.6;
}

::selection {
  background: var(--purple);
  color: var(--background);
}

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

a:focus-visible {
  outline: 1px solid var(--purple);
  outline-offset: 5px;
}

.nowrap {
  white-space: nowrap;
}

.site-header,
main,
footer {
  width: min(calc(100% - 48px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--purple);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgb(183 122 255 / 35%);
}

.wordmark span {
  animation: blink 1.2s steps(1, end) infinite;
}

nav {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
}

nav a,
footer a {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 150ms ease, text-shadow 150ms ease;
}

nav a:hover,
footer a:hover,
nav a[aria-current="page"] {
  color: var(--purple);
  text-shadow: 0 0 7px rgb(183 122 255 / 30%);
}

.hero {
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 96px 0;
}

.eyebrow,
.section-label > span {
  margin: 0 0 24px;
  color: var(--purple);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 7px rgb(183 122 255 / 25%);
}

h1 {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(2.35rem, 6.2vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgb(183 122 255 / 34%), 0 0 24px rgb(183 122 255 / 18%);
}

.intro {
  max-width: 720px;
  margin: 40px 0 30px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.intro p {
  margin: 0;
}

.intro p + p {
  margin-top: 1.25em;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.about-page {
  min-height: calc(100vh - 92px);
  padding: clamp(88px, 12vw, 150px) 0;
}

.about-page h1 {
  max-width: 900px;
  font-size: clamp(2.35rem, 5.5vw, 4.6rem);
  line-height: 1;
}

.about-copy {
  max-width: 760px;
  margin-top: clamp(48px, 7vw, 80px);
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  line-height: 1.65;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 1.5em;
}

.inline-link {
  border-bottom: 1px solid #6d467f;
  color: var(--text);
  transition: color 150ms ease, border-color 150ms ease, text-shadow 150ms ease;
}

.inline-link:hover {
  border-color: var(--purple);
  color: var(--purple);
  text-shadow: 0 0 7px rgb(183 122 255 / 25%);
}

.service-hero {
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 96px 0;
}

.service-hero h1 {
  max-width: 980px;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  line-height: 0.98;
}

.service-intro {
  max-width: 760px;
  margin: 44px 0 30px;
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.55;
}

.service-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 1.7fr;
  gap: 48px;
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.service-list,
.engagement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

.service-list {
  grid-template-columns: 1fr;
  gap: 0;
}

.service-item,
.engagement-list > div {
  padding: 0 0 40px;
}

.service-list .service-item {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.service-list .service-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.service-item-wide {
  grid-column: 1 / -1;
  max-width: 760px;
}

.reverse-engineering {
  max-width: none;
}

.service-list .service-item h3 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  text-transform: none;
  text-shadow: 0 0 8px rgb(183 122 255 / 25%), 0 0 20px rgb(183 122 255 / 12%);
}

.reverse-intro {
  max-width: 720px;
  font-size: clamp(1.1rem, 2vw, 1.3rem) !important;
}

.service-details {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.service-details summary {
  position: relative;
  padding: 18px 38px 18px 0;
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease;
}

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

.service-details summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  color: var(--purple);
  font-size: 1.1rem;
  line-height: 1;
}

.service-details[open] summary::after {
  content: "−";
}

.service-details summary:hover {
  color: var(--purple);
}

.service-details summary:focus-visible {
  outline: 1px solid var(--purple);
  outline-offset: 4px;
}

.detail-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  position: relative;
  padding: 32px 0 32px 38px;
  border-top: 1px solid var(--line);
}

.detail-list li::before {
  content: counter(detail-item, decimal-leading-zero);
  counter-increment: detail-item;
  position: absolute;
  top: 38px;
  left: 0;
  color: var(--purple);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.detail-list {
  counter-reset: detail-item;
}

.detail-list strong,
.detail-list span {
  display: block;
}

.detail-list strong {
  margin-bottom: 10px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.detail-list span {
  max-width: 680px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.service-item h3,
.engagement-list h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-item p,
.engagement-list p,
.rates-copy p {
  margin: 0;
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

.service-item p + p,
.rates-copy p + p {
  margin-top: 1.15em;
}

.rates-copy {
  max-width: 760px;
}

.rates-copy strong {
  color: var(--text);
  font-weight: 600;
}

.rates-copy .text-link {
  margin-top: 32px;
}

.portfolio-hero {
  min-height: min(760px, calc(100vh - 92px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 96px 0;
}

.portfolio-hero h1 {
  max-width: 1020px;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  line-height: 0.98;
}

.work-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 1.7fr;
  gap: 48px;
  padding: 96px 0 48px;
  border-top: 1px solid var(--line);
}

.work-list {
  min-width: 0;
}

.work-item {
  padding: 0 0 56px;
}

.work-item + .work-item {
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 16px;
  color: var(--purple);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-meta span + span::before {
  content: "/";
  margin-right: 18px;
  color: #57465f;
}

.work-item h3 {
  margin: 0 0 20px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-shadow: 0 0 8px rgb(183 122 255 / 25%), 0 0 20px rgb(183 122 255 / 12%);
}

.work-item p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.portfolio-cta {
  padding: clamp(88px, 12vw, 150px) 0;
  border-top: 1px solid var(--line);
}

.portfolio-cta h2 {
  max-width: 760px;
  margin-bottom: 36px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.work-item code {
  color: var(--text);
  font-size: 0.9em;
}

.project-index {
  padding: clamp(88px, 12vw, 150px) 0;
  border-top: 1px solid var(--line);
}

.project-index h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.project-index > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0 0 32px;
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.text-link {
  display: inline-block;
  border-bottom: 1px solid #6d467f;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 150ms ease, border-color 150ms ease, text-shadow 150ms ease;
}

.text-link:hover {
  border-color: var(--purple);
  color: var(--purple);
  text-shadow: 0 0 7px rgb(183 122 255 / 25%);
}

.content-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 1.7fr;
  gap: 48px;
  min-height: 390px;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-label > span {
  display: block;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgb(183 122 255 / 28%), 0 0 22px rgb(183 122 255 / 14%);
}

.section-copy {
  max-width: 600px;
  align-self: center;
}

.section-copy p {
  margin: 0 0 28px;
  color: #c5bec9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.5;
}

footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark span { animation: none; }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .site-header {
    padding: 20px 0;
    align-items: flex-start;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 8px 20px;
  }

  nav a {
    font-size: 0.65rem;
  }

  .hero {
    min-height: calc(100svh - 92px);
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 44px;
    min-height: 360px;
    padding: 64px 0;
  }

  .service-section {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 72px 0;
  }

  .work-section {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 72px 0 24px;
  }

  .service-list,
  .engagement-list {
    grid-template-columns: 1fr;
  }

  .service-item-wide {
    grid-column: auto;
  }

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

  footer p {
    margin: 0;
  }
}
