/* ============================================================
   alex-leader.me
   Hand-built, no template.
   Early-web personal homepage — with a dash of vaporwave.
   Structure over decoration; the color just winks.
   ============================================================ */

:root {
  --bg:       #f7f5f0;   /* off-white */
  --text:     #1a1a1a;
  --muted:    #5a5a5a;
  --rule:     #cbc7bd;

  --link:     #cc2b8f;   /* magenta — link */
  --visited:  #7a3ff2;   /* purple — visited, deliberately different */
  --cyan:     #14a5c0;   /* used only in gradients */

  --thumb-bg: #ece9e1;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Berkeley Mono", "IBM Plex Mono", "Courier New", ui-monospace,
               SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
}

main {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ---------- Rules — a faint sunset seam ---------- */

hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg,
              transparent, var(--link) 30%, var(--cyan) 70%, transparent);
  opacity: 0.5;
  margin: 2.5rem 0;
}

/* ---------- Links ---------- */

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:visited { color: var(--visited); }
a:hover   { text-decoration: none; }

/* ---------- Header ---------- */

header h1 {
  font-size: 1.9rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin: 0 0 1rem;
}

.tagline {
  margin: 0 0 1rem;
  color: var(--text);
}

.contact {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Intro ---------- */

.intro p {
  margin: 0 0 1rem;
  max-width: 62ch;
}
.intro p:last-child { margin-bottom: 0; }

/* ---------- Row head ---------- */

.row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.row h2 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

/* the number is the one place the vaporwave shows its hand */
.row h2 .n {
  background: linear-gradient(90deg, var(--link), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.framing {
  margin: 0;
  color: var(--muted);
}

/* ---------- Nav arrows ---------- */

.nav {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.nav button {
  font: inherit;
  font-size: 0.7rem;
  line-height: 1;
  color: var(--link);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}
.nav button:hover {
  border-color: var(--link);
  color: var(--cyan);
}

/* ---------- Carousel / slide track ---------- */

.carousel {
  position: relative;
}

/* right-edge fade to hint there's more to slide to */
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}

.track {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.25rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* slim, tinted scrollbar */
.track { scrollbar-width: thin; scrollbar-color: var(--link) transparent; }
.track::-webkit-scrollbar { height: 6px; }
.track::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--link), var(--cyan));
}
.track::-webkit-scrollbar-track { background: transparent; }

/* ---------- Cards ---------- */

.card {
  flex: 0 0 300px;
  width: 300px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.card .thumb {
  width: 100%;
  height: 140px;
  border: 1px solid var(--rule);
  /* the faintest pink→cyan wash over the placeholder */
  background:
    linear-gradient(135deg, rgba(204,43,143,0.10), rgba(20,165,192,0.10)),
    var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.25rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

/* thumbnail holding a real preview image — cover the tile, no wash */
.card .thumb--img {
  padding: 0;
  background: var(--thumb-bg);
}
.card .thumb--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spotlight's white logo needs a dark tile to read */
.card .thumb--dark {
  padding: 1.1rem;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(204,43,143,0.28), transparent 60%),
    #171226;
  border-color: #171226;
}
.card .thumb--dark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* New Foundry — deliberately blank */
.card .thumb--blank {
  background: var(--thumb-bg);
}
.card .thumb--blank::after {
  content: "";
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.card .caption {
  margin: 0 0 0.6rem;
}

.card .label {
  margin: 0;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

/* small parenthetical aside inside a caption */
.aside {
  color: var(--muted);
  opacity: 0.85;
}

/* text-only cards (the WRITTEN row) — no thumbnail, a gradient hairline instead */
.card--text {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--link), var(--cyan)) 1;
  padding-top: 0.85rem;
}
.card--text h3 { margin-bottom: 0.6rem; }

/* ---------- Attribution ---------- */

.attribution {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Footer ---------- */

footer {
  color: var(--muted);
  font-size: 0.85rem;
}
footer p { margin: 0 0 0.4rem; }
footer .meta { color: var(--muted); opacity: 0.85; }

.glint {
  background: linear-gradient(90deg, var(--link), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.1em;
}

/* ---------- Responsive: narrow the cards a touch below 700px ---------- */

@media (max-width: 700px) {
  .card { flex-basis: 82vw; width: 82vw; max-width: 320px; }
  .row-head { flex-wrap: wrap; }
}
