:root {
  --bg: #0b0f14;
  --surface: #121822;
  --card: #151c28;
  --text: #e7edf5;
  --muted: #a9b5c5;
  --brand: #4aa3ff;
  --brand-2: #9bdbff;
  --ring: #2b89ff66;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #162033, transparent 60%),
              radial-gradient(900px 500px at 110% 10%, #0f1522, transparent 60%),
              var(--bg);
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  padding: 3.5rem 0 2rem;
  background:
    radial-gradient(1000px 400px at 20% -15%, rgba(74,163,255,0.15), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-title {
  font-size: clamp(2rem, 2.5vw + 1.5rem, 3rem);
  margin: 0;
  letter-spacing: 0.2px;
}

.site-subtitle {
  margin-top: 0.4rem;
  color: var(--muted);
  max-width: 65ch;
}

.cards {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
  align-items: start; /* ensures columns align to the top */
}

.card {
  grid-column: span 12;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);

  /* overflow & wrapping fixes */
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 780px) {
  .card:nth-child(1) { grid-column: span 5; }
  .card:nth-child(2) { grid-column: span 4; }
  .card:nth-child(3) { grid-column: span 3; }
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

ul, ol {
  margin: 0;
  padding-left: 1.2rem;
}

.checklist li {
  list-style: "✔  ";
}

.bullets li {
  list-style: "•  ";
}

.steps li {
  margin: 0.25rem 0;
}

.steps li,
.checklist li,
.bullets li {
  white-space: normal; /* allow wrapping */
}

.gallery-section {
  padding: 2.5rem 0 3.5rem;
}

.gallery-section h2 {
  margin-bottom: 0.25rem;
}

.gallery-note {
  color: var(--muted);
  margin-top: 0.2rem;
}

.gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.9rem;
}

.gallery-item {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-item a {
  display: block;
  position: relative;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #0e141f;
}

.gallery-item figcaption {
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255,255,255,0.06);

  /* wrap fix */
  overflow-wrap: break-word;
  white-space: normal;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
  border-color: rgba(74,163,255,0.4);
}

@media (min-width: 560px) {
  .gallery-item { grid-column: span 6; }
  .gallery-item img { height: 220px; }
}

@media (min-width: 900px) {
  .gallery-item { grid-column: span 3; }
  .gallery-item img { height: 180px; }
}

/* Lightbox */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.9);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  z-index: 1000;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1200px, 94vw);
  max-height: 86vh;
  display: grid;
  gap: 0.5rem;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.12);
  background: #0e141f;
}

#lightbox-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(21, 28, 40, 0.8);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.lightbox-close:hover {
  outline: 3px solid var(--ring);
  border-color: rgba(255,255,255,0.3);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 0 2.5rem;
  color: var(--muted);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
