:root {
  --bg: #f7f4ec;
  --paper: #fffdf7;
  --ink: #171717;
  --muted: #5e625f;
  --line: #242424;
  --teal: #087f8c;
  --rose: #c3316f;
  --amber: #e7a923;
  --green: #3d8b37;
  --shadow: 8px 8px 0 #171717;
  --radius: 8px;
  --measure: 1120px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(8, 127, 140, 0.08) 0 12%, transparent 12% 100%),
    linear-gradient(315deg, rgba(231, 169, 35, 0.14) 0 10%, transparent 10% 100%),
    var(--bg);
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

code {
  border: 1px solid rgba(23, 23, 23, 0.2);
  border-radius: 4px;
  background: #fff7d8;
  padding: 0.1rem 0.3rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.section-wrap {
  width: min(var(--measure), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(var(--measure), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  background: var(--amber);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.hero,
.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(40px, 8vw, 88px) 0 48px;
}

.hero-copy h1,
.project-hero h1,
.document-header h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.project-hero-copy p:not(.eyebrow),
.document-header p:not(.eyebrow) {
  max-width: 660px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--rose);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.terminal-panel {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  color: #8dff9a;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-row {
  display: flex;
  gap: 0.45rem;
  border-bottom: 2px solid var(--line);
  background: var(--paper);
  padding: 0.65rem;
}

.terminal-row span {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 2px;
}

.terminal-row span:nth-child(1) {
  background: var(--rose);
}

.terminal-row span:nth-child(2) {
  background: var(--amber);
}

.terminal-row span:nth-child(3) {
  background: var(--teal);
}

.terminal-panel pre {
  min-height: 180px;
  margin: 0;
  padding: 1.25rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  white-space: pre-wrap;
}

.project-section {
  padding: 32px 0 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 128px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(23, 23, 23, 0.9);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(var(--teal), var(--rose), var(--amber));
}

.project-card:hover,
.project-card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(23, 23, 23, 0.9);
}

.project-icon {
  width: 72px;
  height: 72px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  object-fit: cover;
}

.project-icon-fallback {
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.project-card-copy {
  display: grid;
  gap: 0.2rem;
}

.project-title {
  font-size: 1.18rem;
  font-weight: 850;
}

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

.project-arrow {
  color: var(--rose);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 900;
}

.empty-state,
.document,
.project-content {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.88);
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 1.25rem;
}

.document {
  margin-top: 36px;
  margin-bottom: 72px;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.breadcrumbs {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumbs li + li::before {
  content: ">";
  color: var(--rose);
  font-weight: 900;
}

.breadcrumbs a {
  color: var(--ink);
  font-weight: 800;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.22em;
}

.document-header {
  margin-bottom: 2rem;
}

.document-body {
  max-width: 760px;
}

.document-body h2,
.document-body h3 {
  line-height: 1.15;
}

.document-body a {
  color: var(--teal);
  font-weight: 700;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: start;
  margin: 1.5rem 0 2rem;
}

.app-screenshot {
  margin: 0;
}

.app-screenshot img {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--line);
}

.app-screenshot figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-hero-icon {
  justify-self: center;
  width: min(220px, 55vw);
  border: 2px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.68rem 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--line);
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.secondary {
  background: var(--paper);
}

.project-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 2rem;
  margin-bottom: 72px;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.support-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: start;
  border-left: 4px solid var(--amber);
  padding-left: 1rem;
}

.support-links a {
  color: var(--ink);
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(var(--measure), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-rule {
  width: 42px;
  height: 2px;
  background: var(--line);
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .project-hero,
  .project-content {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }

  .project-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .project-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .project-arrow {
    display: none;
  }

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

  .terminal-panel {
    max-width: 420px;
  }

  .site-footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
