/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.site-header {
  position: relative;
  overflow: hidden;
  /* Translucent AND fading out, rather than a flat slab with a rule under it.
     Opaque cut the sky in half; flat-translucent still ended it on a hard
     horizontal line directly under the title, which is the one edge on the
     page the eye lands on first. Fading the panel to nothing lets a single
     sky run the whole length of the page, while the darker top keeps the
     title legible where the title actually sits. The rule goes with it: a
     1px line drawn across open sky reads as a seam, not as structure. */
  background: linear-gradient(
    180deg,
    rgba(13, 15, 23, 0.78) 0%,
    rgba(13, 15, 23, 0.66) 46%,
    rgba(13, 15, 23, 0.3) 82%,
    rgba(13, 15, 23, 0) 100%
  );
}

/* Header “glow horizon” */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      1100px 340px at 32% 128%,
      rgba(90, 170, 255, 0.24),
      rgba(120, 80, 255, 0.12),
      rgba(0, 0, 0, 0) 70%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0.72;
  mix-blend-mode: screen;
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 3.25rem;
  padding-bottom: 3.5rem;
}

.site-title {
  margin: 0;
  /* Extra line-height + bottom padding keep glyph descenders (g, y) inside
     the gradient's painted area — background-clip: text clips to the text
     box, so a tight line-height would shear the tails off. */
  padding-bottom: 0.16em;
  font-size: clamp(2.15rem, 5.5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f7f9ff;
  background: linear-gradient(180deg, #ffffff 0%, #c6d6f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-tagline {
  margin: 0;
  color: #aeb9cc;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
}
/* Wrapper for the "← Back" / "← Home" button in subpage headers. */
.header-back {
  color: #a0aec0;
  font-size: var(--fs-sm);
  margin-top: 0.2rem;
}

/* Section separators as “starlight” */
.section {
  position: relative;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: none;
}
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(99, 179, 237, 0.4),
    rgba(255, 255, 255, 0.18),
    rgba(79, 209, 197, 0.32),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.55;
}

.section h2 {
  font-size: var(--fs-xl);
  margin-bottom: 0.5rem;
}

.projects-grid {
  display: grid;
  /* Flagship cards cap at two per row so each keeps room to breathe;
     single column below 640px. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
  list-style: none;
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: #3182ce;
  color: white;
  text-decoration: none;
  font-size: var(--fs-md);
  transition:
    transform 120ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}
.btn:hover {
  background: #2b6cb0;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.contact-list {
  list-style: none;
  margin-top: 0.5rem;
}
.contact-list li {
  margin-bottom: 0.3rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: #a0aec0;
  text-align: center;
}
