/* Loop video */
.loop-video {
  position: relative;
  margin-bottom: 1rem;
}

.loop-video video {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid #f3f4f6;
  cursor: pointer;
}

.play-button {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: transparent;
  cursor: pointer;
}

.play-button svg {
  opacity: 0.9;
}

.hidden {
  display: none;
}

/* Icon */

.external-link-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: black;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   Global styles
========================= */

:root {
  --text: black;
  --text-h: black;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);

  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px,
    rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: Inter, sans-serif;
  --heading: Inter, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

@media (max-width: 1024px) {
  :root {
    font-size: 16px;
  }
}

/* =========================
   Page container
========================= */

.page-container {
  position: relative;
  width: 750px;

  margin-top: 100px;
  margin-right: auto;
  margin-bottom: 50px;
  margin-left: auto;

  max-width: 100%;
  min-height: 100svh;
  text-align: left;
  display: flex;
  flex-direction: column;
}

/* =========================
   Typography
========================= */

p {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
}

span {
  font-size: 14px;
  color: black;
}

.section-title {
  color: black;
  font-size: 14px;
  font-weight: 600;
}

.underline {
  text-decoration: underline;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
}

/* =========================
   Counter
========================= */

.counter {
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--accent);
  background: var(--accent-bg);
  border: 2px solid transparent;
  transition: border-color 0.3s;
  margin-bottom: 24px;
}

.counter:hover {
  border-color: var(--accent-border);
}

.counter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =========================
   Theme toggle
========================= */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 14px;
}

.theme-toggle input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  border: 1px solid black;
  border-radius: 999px;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 0;
  top: 0;
  background: black;
  border-radius: 50%;
  transition: transform 0.2s;
}

.theme-toggle input:checked + .slider::before {
  transform: translateX(22px);
}

.dark {
  background: #111;
  color: white;
}

/* =========================
   Buttons and images
========================= */

.plus-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
}

.portrait {
  width: 100%;
  display: block;
}

/* =========================
   Project pages
========================= */

.project-title {
   color: black;
   font-weight: 700;
   font-size: 24px;
   margin-bottom: 10px;
}

.back-link {
  position: absolute;
  left: -44px;
  top: 3px;
  color: inherit;
  color: black;
}

.project-info {
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  gap: 4px;
}

.info-row h5,
.info-row p {
  margin: 0;
  color: black;
}

.info-row h5 {
  font-size: 14px;
  font-weight: 600;
}

.project-gallery.two-columns {
  columns: 2;
  column-gap: 16px;
}

.project-gallery.one-column {
  columns: 1;
}

.project-gallery img,
.project-gallery video {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  border: 1px solid #e5e7eb;
}

.project-gallery img:last-child,
.project-gallery video:last-child {
  margin-bottom: 0;
}



/* =========================
   Center
========================= */

#center {
  display: flex;
  flex-direction: column;
  gap: 25px;
  place-content: center;
  place-items: center;
  flex-grow: 1;
}

@media (max-width: 1024px) {
  #center {
    padding: 32px 20px 24px;
    gap: 18px;
  }
}

/* =========================
   Next steps
========================= */

#next-steps {
  display: flex;
  border-top: 1px solid var(--border);
  text-align: left;
}

#next-steps > div {
  flex: 1 1 0;
  padding: 32px;
}

#next-steps .icon {
  margin-bottom: 16px;
  width: 14px;
  height: 14px;
}

#docs {
  border-right: 1px solid var(--border);
}

#next-steps ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  margin: 32px 0 0;
}

#next-steps ul .logo {
  height: 18px;
}

#next-steps ul a {
  color: var(--text-h);
  font-size: 16px;
  border-radius: 6px;
  background: var(--social-bg);
  display: flex;
  padding: 6px 12px;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: box-shadow 0.3s;
}

#next-steps ul a:hover {
  box-shadow: var(--shadow);
}

#next-steps ul a .button-icon {
  height: 18px;
  width: 18px;
}



/* =========================
   Responsive layout
========================= */

/*
@media (max-width: 1024px) {
  #next-steps {
    flex-direction: column;
    text-align: center;
  }

  #next-steps > div {
    padding: 24px 20px;
  }

  #docs {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #next-steps ul {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  #next-steps ul li {
    flex: 1 1 calc(50% - 8px);
  }

  #next-steps ul a {
    width: 100%;
    justify-content: center;
  }
}
*/