:root {
  --text: #333;
  --muted: #5e5e5e;
  --line: #dedede;
  --soft: #f6f7f8;
  --panel: #fff;
  --accent: #236f8e;
  --accent-strong: #17485c;
  --shadow: 0 18px 40px rgba(20, 30, 40, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  padding: 2em;
  background: #fff;
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 12px;
  line-height: 20px;
}

a:link,
a:visited {
  color: var(--text);
}

a:hover {
  color: var(--accent-strong);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.project-header {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.title {
  margin: 0;
  color: #4d4d4d;
  font-family: "Varela Round", "Open Sans", sans-serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 65px;
  letter-spacing: 0;
  text-align: center;
}

.subtitle-row,
.author-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.subtitle-row {
  gap: 4px 14px;
}

.subheader {
  margin: 0;
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 44px;
  letter-spacing: 0;
}

.author-row {
  align-items: center;
  gap: 8px 22px;
  margin-top: 8px;
}

.member-row {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

.author-text {
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link-row {
  gap: 0.75em;
  margin-top: 28px;
}

.action-button,
.media-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 0.2rem;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.action-button {
  padding: 0.65em 1.1em;
}

.action-button:link,
.action-button:visited {
  color: #fff;
}

.action-button:hover,
.action-button:focus-visible,
.media-tab:hover,
.media-tab:focus-visible {
  background: var(--accent-strong);
  color: #fff;
}

.expanded-name {
  margin: 26px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.section {
  display: block;
  max-width: 960px;
  margin: 0 auto;
}

.intro-section {
  padding-top: 30px;
}

.tldr {
  margin: 0 0 18px;
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
}

.code-font {
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
}

.paragraph {
  margin: 0;
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0;
  text-align: left;
}

.media-shell {
  margin-bottom: 22px;
}

.media-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.media-tab {
  padding: 0.6em 1em;
  background: #555;
}

.media-tab.is-active {
  background: var(--accent);
}

.media-panel {
  display: none;
  margin: 0;
}

.media-panel.is-active {
  display: block;
}

.media-panel > img,
.split-media,
.video-frame,
.figure-grid figure,
.wide-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.media-panel > img {
  width: 100%;
}

.split-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.split-media img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.section-title {
  margin: 44px 0 18px;
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 34px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  min-height: 186px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.feature-card i {
  color: var(--accent);
  font-size: 30px;
}

.feature-card h3 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 23px;
}

.feature-card p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.figure-grid figure,
.wide-figure {
  margin: 0;
}

.figure-grid img {
  width: 100%;
  height: 310px;
  object-fit: contain;
  padding: 16px;
  background: #fff;
}

.wide-figure {
  margin-top: 18px;
}

.wide-figure img {
  width: 100%;
  padding: 18px;
  background: #fff;
}

.web-intro {
  margin-bottom: 18px;
}

.web-carousel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.web-carousel-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.web-carousel-card:focus-visible {
  outline: 3px solid rgba(35, 111, 142, 0.35);
  outline-offset: 3px;
}

.web-carousel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 112px;
  padding: 20px;
  background: var(--soft);
}

.web-carousel-heading > i {
  color: var(--accent);
  font-size: 30px;
}

.web-carousel-heading h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 17px;
  line-height: 23px;
}

.web-carousel-heading p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.carousel-viewport {
  width: 100%;
  height: 430px;
  padding: 16px;
  border: 0;
  background: #fff;
  cursor: pointer;
  touch-action: pan-y;
}

.carousel-viewport:focus-visible {
  outline: 3px solid rgba(35, 111, 142, 0.35);
  outline-offset: -4px;
}

.carousel-viewport img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-controls {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-size: 21px;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--accent-strong);
}

.carousel-button:focus-visible {
  outline: 3px solid rgba(35, 111, 142, 0.35);
  outline-offset: 2px;
}

.carousel-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.carousel-status [data-carousel-count] {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.delivery-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.delivery-flow li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.delivery-flow span {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.web-stack {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: right;
}

.footer {
  padding: 42px 0 12px;
  text-align: center;
}

.footer p {
  max-width: 780px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  text-align: center;
}

.footer a {
  color: var(--text);
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  body {
    padding: 1.25em;
  }

  .title {
    font-size: 42px;
    line-height: 54px;
  }

  .subheader {
    font-size: 21px;
    line-height: 32px;
  }

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

  .split-media img,
  .figure-grid img {
    height: 280px;
  }

  .carousel-viewport {
    height: 360px;
  }

  .delivery-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    padding: 1em;
  }

  .title {
    font-size: 38px;
    line-height: 48px;
  }

  .subheader {
    font-size: 19px;
  }

  .author-row {
    gap: 8px 14px;
  }

  .author-text,
  .expanded-name,
  .paragraph {
    font-size: 15px;
    line-height: 23px;
  }

  .link-row,
  .media-toolbar {
    gap: 8px;
  }

  .feature-grid,
  .figure-grid,
  .split-media,
  .web-carousel-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

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

  .web-stack {
    text-align: left;
  }

  .web-carousel-heading {
    min-height: auto;
  }

  .carousel-viewport {
    height: 420px;
  }

  .split-media img,
  .figure-grid img {
    height: auto;
    max-height: none;
  }

  .section-title {
    margin-top: 36px;
  }
}
