:root {
  --bg: #111411;
  --ink: #f8f4e8;
  --text: #dfd9ca;
  --muted: #a6a091;
  --line: #343a33;
  --paper: #1a1f1b;
  --mist: #151915;
  --green: #a9dfb7;
  --sage: #d8f3dd;
  --dark: #080a08;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 74% 9%, rgba(169, 223, 183, 0.16), transparent 26%),
    radial-gradient(circle at 16% 70%, rgba(115, 139, 181, 0.16), transparent 28%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, auto, 54px 54px, 54px 54px;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(135deg, var(--sage), #8abfa1);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover { color: var(--ink); }

.nav-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 7px;
  border: 1px solid rgba(169, 223, 183, 0.55);
  background: rgba(169, 223, 183, 0.12);
  color: var(--ink);
}

main {
  padding: 0 clamp(20px, 6vw, 80px);
}

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(74px, 10vw, 128px) 0 56px;
}

.label {
  margin-bottom: 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(58px, 8vw, 112px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 23px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #10110f;
}

.summary {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.58fr);
  gap: 18px;
  padding-bottom: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.thesis {
  padding: clamp(28px, 4vw, 42px);
}

h2 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 700;
  line-height: 0.98;
}

.thesis p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.service {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(216,243,221,0.55), transparent 48%),
    var(--paper);
}

.panel,
.card,
.contact-form {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.field input,
.field textarea {
  background: #101410;
}

.service h3 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.service p {
  margin-top: 12px;
  color: var(--muted);
}

.service ul {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.service li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  font-weight: 750;
}

.service li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--green);
  flex: 0 0 auto;
}

.contact-panel {
  max-width: 1160px;
  margin: 0 auto 86px;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(340px, 0.64fr);
  gap: 18px;
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.contact-copy {
  padding: 28px 0;
}

.contact-copy p {
  max-width: 640px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.form-honeypot {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--bg);
  font-size: 14px;
}

.form-status[hidden] {
  display: none;
}

.form-status[data-state="success"] {
  border-color: rgba(124, 196, 136, 0.6);
  color: #d8f3dd;
}

.form-status[data-state="error"] {
  border-color: rgba(242, 118, 90, 0.7);
  color: #ffd8ce;
}

.form-status-content {
  display: grid;
  gap: 3px;
}

.form-status strong {
  color: var(--ink);
}

.form-spinner {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid rgba(216, 243, 221, 0.25);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.contact-form.is-submitting .field,
.contact-form.is-submitting .button,
.contact-form.is-submitting .form-note,
.contact-form.is-complete .field,
.contact-form.is-complete .button,
.contact-form.is-complete .form-note {
  opacity: 0.5;
}

.contact-form .button:disabled {
  cursor: wait;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 12px 13px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.form-note {
  margin-top: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.note {
  max-width: 1160px;
  margin: 0 auto 84px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.note strong {
  color: var(--ink);
}

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.card h3 {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.18;
}

.card p {
  margin-top: 12px;
  color: var(--muted);
}

.open-source-section {
  padding-bottom: 70px;
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.58fr);
  gap: 18px;
  margin-bottom: 18px;
}

.project-primary {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(169, 223, 183, 0.48);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 243, 221, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--paper);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.project-kicker {
  margin-bottom: 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-primary h3 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 0.96;
}

.project-primary p {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.project-stack {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.project-row {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: var(--paper);
}

.project-row strong {
  color: var(--ink);
  font-size: 18px;
}

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

.project-grid .card {
  min-height: 220px;
}

.fit-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.fit-row {
  display: grid;
  grid-template-columns: 0.5fr 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: var(--paper);
}

.fit-row strong {
  color: var(--ink);
  font-size: 18px;
}

.fit-row span {
  color: var(--muted);
}

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.process article {
  padding: 24px;
  background: var(--paper);
}

.process-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.process h3 {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.18;
}

.process p {
  margin-top: 12px;
  color: var(--muted);
}

.operator {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.operator .panel {
  padding: 28px;
}

.operator p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.not-found-main {
  min-height: calc(100vh - 76px - 99px);
  display: grid;
  align-items: center;
  padding: clamp(56px, 10vw, 118px) clamp(20px, 6vw, 80px);
}

.not-found-panel {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 31, 27, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.not-found-panel h1 {
  font-size: clamp(56px, 8vw, 104px);
}

.legal-main {
  padding-top: clamp(52px, 8vw, 92px);
  padding-bottom: clamp(70px, 10vw, 118px);
}

.legal-document {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 31, 27, 0.82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.legal-document h1 {
  max-width: 820px;
  font-size: clamp(52px, 7vw, 92px);
}

.legal-updated {
  margin-top: 22px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-document section {
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.legal-document h2 {
  max-width: 760px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.14;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.legal-document p {
  margin-top: 14px;
}

.legal-document a {
  color: var(--sage);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-document code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--dark);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.footer-legal {
  max-width: 720px;
}

.footer-legal p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.footer-links > a:not(.social-link) {
  color: var(--muted);
  font-weight: 800;
}

.footer-links > a:not(.social-link):hover,
.footer-links > a:not(.social-link):focus-visible {
  color: var(--ink);
}

.social-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: rgba(169, 223, 183, 0.55);
  background: rgba(169, 223, 183, 0.1);
  color: var(--ink);
}

.social-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.social-icon {
  width: 19px;
  height: 19px;
  display: block;
  background: currentColor;
}

.social-icon-linkedin {
  -webkit-mask: url("/images/social/linkedin.svg") center / contain no-repeat;
  mask: url("/images/social/linkedin.svg") center / contain no-repeat;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
  }

  .hero { padding-top: 64px; }
  h1 { font-size: clamp(50px, 15vw, 74px); }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .summary { grid-template-columns: 1fr; }
  .project-feature {
    grid-template-columns: 1fr;
  }
  .project-actions {
    flex-direction: column;
  }
  .grid-3,
  .process,
  .operator,
  .contact-panel {
    grid-template-columns: 1fr;
  }
  .fit-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-links {
    justify-content: flex-start;
  }
}
