:root {
  --navy: #0e1b2a;
  --navy-soft: #16283b;
  --teal: #1fb5a8;
  --teal-dark: #14877f;
  --blue: #4a9be0;
  --amber: #f0b04a;
  --paper: #f4f6f3;
  --ink: #1b2a3a;
  --muted: #5a6b7b;
  --line: #d9e0dc;
  --radius: 14px;
  --content-width: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
}

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

a {
  color: var(--teal-dark);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

code {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(14, 27, 42, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: var(--paper);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.85;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

/* Hero */

.hero {
  background: var(--navy);
  color: var(--paper);
  padding-block: 4.5rem 5rem;
}

.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.hero .lead {
  font-size: 1.2rem;
  max-width: 36rem;
  opacity: 0.9;
}

.hero-logo {
  width: min(16rem, 60%);
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 2px solid var(--teal);
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

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

.button:hover,
.button:focus-visible {
  filter: brightness(1.1);
}

/* Sections */

.section {
  padding-block: 4rem;
}

.section.alt {
  background: var(--paper);
}

.section.dark {
  background: var(--navy);
  color: var(--paper);
}

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.section-intro {
  max-width: 42rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.dark .section-intro {
  color: rgba(244, 246, 243, 0.75);
}

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

.grid.spaced,
.subhead {
  margin-top: 2.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card h3 {
  font-size: 1.1rem;
}

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

.dark .card {
  background: var(--navy-soft);
  border-color: rgba(244, 246, 243, 0.12);
}

/* Architecture diagram */

.diagram {
  display: grid;
  justify-items: center;
  text-align: center;
}

.node {
  width: min(100%, 22rem);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  background: var(--navy-soft);
  border: 2px solid var(--teal);
}

.node small {
  display: block;
  opacity: 0.75;
}

.node.windows {
  border-color: var(--blue);
}

.node.linux {
  border-color: var(--amber);
}

/* Connector between two boxes: a vertical line that ends with an arrowhead.
   The color comes from currentColor so each column can tint its own lines. */
.line {
  position: relative;
  width: 2px;
  height: 1.8rem;
  background: currentColor;
  color: var(--teal);
}

.line::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-inline: 6px solid transparent;
  border-top: 8px solid currentColor;
}

.line.tall {
  height: 3.2rem;
}

.line.tall::after {
  display: none;
}

.line-label {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  width: max-content;
  max-width: 9rem;
  font-size: 0.9rem;
  text-align: left;
  color: var(--paper);
}

/* Two equal columns. The horizontal bar runs from the center of the first
   column to the center of the second one, so each column hangs from it. */
.diagram-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 40rem;
}

.diagram-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--teal);
}

.diagram-column {
  display: grid;
  justify-items: center;
  align-content: start;
}

.diagram-column.windows {
  color: var(--blue);
}

.diagram-column.linux {
  color: var(--amber);
}

.diagram-column .node {
  width: calc(100% - 1rem);
  color: var(--paper);
}

/* Projects */

.project {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.project-head img {
  width: 3rem;
  height: 3rem;
}

.project-head h3 {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 1rem;
}

.tag {
  align-self: flex-start;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(31, 181, 168, 0.15);
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.project a.repo-link {
  margin-top: auto;
  font-weight: 600;
}

/* Tables and lists */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 28rem;
}

th,
td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: phase -1;
}

.roadmap li {
  counter-increment: phase;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1rem;
}

.roadmap li::before {
  content: counter(phase);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy);
  font-weight: 700;
}

.roadmap strong {
  display: block;
}

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

/* Footer */

.site-footer {
  background: var(--navy);
  color: rgba(244, 246, 243, 0.8);
  padding-block: 2.5rem;
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

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

/* 404 page */

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: var(--navy);
  color: var(--paper);
  text-align: center;
}

.not-found .button-row {
  justify-content: center;
}

.not-found img {
  width: 9rem;
  margin: 0 auto 1.5rem;
}

.not-found h1 {
  font-size: clamp(3rem, 12vw, 6rem);
  margin-bottom: 0.2em;
  color: var(--teal);
}

@media (min-width: 52rem) {
  .hero .container {
    grid-template-columns: 1.4fr 1fr;
  }

  .hero-logo {
    width: 100%;
    max-width: 18rem;
  }
}

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