:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, sans-serif;
  background: #0e0e11; color: #e6e6e6;
}
header {
  padding: 3rem 2rem 2rem; max-width: 1100px; margin: 0 auto;
  border-bottom: 1px solid #222;
}
header h1 { margin: 0 0 .5rem; font-size: 2.2rem; }
header p { margin: .4rem 0; color: #c0c0c8; line-height: 1.45; }
header em { font-style: normal; color: #e6e6e6; }
header a { color: #7ab8ff; }
#main {
  max-width: 1100px; margin: 0 auto; padding: 1rem 2rem 4rem;
}
section { margin-top: 2.5rem; }
section:first-child { margin-top: 1.5rem; }
.section-title {
  margin: 0 0 .25rem; font-size: 1.4rem; letter-spacing: .02em;
}
.section-blurb {
  margin: 0 0 1.2rem; color: #9098a3; font-size: .95rem; max-width: 70ch;
  line-height: 1.45;
}
.section-blurb code {
  background: #1a1a22; padding: .1em .35em; border-radius: 3px;
  font-size: .9em; color: #e8c0a0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.card {
  background: #16161b; border: 1px solid #242430; border-radius: 12px;
  padding: 1rem; color: inherit;
  transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); border-color: #3a3a55; }
.card img, .card .noimg {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 8px; background: #0a0a0d; margin-bottom: .8rem;
}
.card .noimg {
  display: flex; align-items: center; justify-content: center;
  color: #555; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
}
.card h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.card p { margin: 0 0 .8rem; color: #a0a0b0; font-size: .9rem; flex-grow: 1; }
.card-actions {
  display: flex; gap: .5rem; margin-top: auto;
}
.btn {
  display: inline-block; padding: .45rem .75rem; font-size: .85rem;
  text-decoration: none; border-radius: 6px; text-align: center;
  transition: background .15s, border-color .15s;
}
.btn-primary {
  flex: 1;
  background: #e5823e; color: #14181e; font-weight: 600;
}
.btn-primary:hover { background: #f49500; }
.btn-secondary {
  background: transparent; color: #a0a0b0; border: 1px solid #3a4048;
}
.btn-secondary:hover { border-color: #7ab8ff; color: #e6e6e6; }

.preview-trigger { cursor: zoom-in; }
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .82); backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.modal-frame {
  position: relative; z-index: 1;
  background: #0a0d11; border: 1px solid #3a4048; border-radius: 8px;
  padding: .75rem .75rem 1rem; max-width: 94vw;
}
.modal-title {
  color: #e6e6e6; font-size: 1rem; padding: 0 .25rem .6rem;
  letter-spacing: .01em;
}
.modal-close {
  position: absolute; top: .4rem; right: .4rem;
  background: transparent; border: 0; color: #9098a3;
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .1rem .5rem;
}
.modal-close:hover { color: #e6e6e6; }
.modal-iframe {
  display: block; width: min(1016px, 90vw); aspect-ratio: 1016 / 560;
  border: 1px solid #242430; border-radius: 4px; background: #000;
}
