/* ryanbradley.me — Neon Horizon (sunset) theme
   Shared across the home page (/) and the /fun page. */

:root {
  --bg: #0a0418;
  --ink: #f3e9ff;
  --dim: #9a86c4;
  --pink: #ff2e97;
  --magenta: #d946ef;
  --violet: #7c3aed;
  --cyan: #22d3ee;
  /* name treatment — lavender */
  --name: #d8c2ff;
  --glow: rgba(167, 139, 250, 0.75);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Rajdhani', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* sky, sun and driving grid are drawn on a fixed canvas by /horizon.js
   (true 3D projection, so the grid stays crisp all the way to the horizon).
   This flat fill is the fallback if the script doesn't run. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #150826 0%, #240a3a 38%, #3a0f4d 60%, #120420 60.5%);
}

.wrap { position: relative; z-index: 2; width: 100%; max-width: 980px; margin: 0 auto; padding: 7vh 28px 8vh; }

/* hero */
/* The hero fills the sky: it runs from the top of the page down to the
   horizon (--horizon-y is set by horizon.js) and its content sits at the
   bottom, so the text lands on the sun and everything after it starts on
   the grid floor, on every screen size. */
.hero {
  position: relative;
  min-height: calc(var(--horizon-y, 60vh) - 7vh);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 28px;
}
/* /games has no buttons under its title, so center it on the sun instead */
body.games .hero { justify-content: center; padding-bottom: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* eyebrow / kicker */
.kicker {
  text-align: center; letter-spacing: .5em; text-transform: uppercase;
  font-weight: 600; font-size: 13px; color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan); margin-bottom: 8px;
  animation: rise .7s ease both;
}

/* the name */
h1 {
  font-family: 'Monoton', cursive; text-align: center; line-height: 1;
  font-size: clamp(40px, 11vw, 116px); font-weight: 400;
  color: var(--name);
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 0 4px rgba(8, 2, 18, 0.85),
    0 0 24px var(--glow),
    0 0 52px var(--glow);
  animation: rise .8s .05s ease both;
}

.tag {
  text-align: center; max-width: 56ch; margin: 22px auto 0;
  font-size: clamp(16px, 2.4vw, 21px); color: #f3e9ff; font-weight: 600;
  line-height: 1.6; animation: rise .8s .12s ease both;
  /* dark halo keeps the tagline legible over the bright sun without dimming it */
  text-shadow: 0 0 4px #0a0418, 0 0 9px #0a0418, 0 1px 2px rgba(0, 0, 0, 0.9);
}
.tag b { color: var(--cyan); text-shadow: 0 0 10px rgba(34, 211, 238, 0.6); font-weight: 700; }

/* primary call-to-action button (home → /fun) */
.cta-row { text-align: center; margin-top: 34px; animation: rise .8s .18s ease both; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: 14px; color: #120420;
  padding: 15px 30px; border-radius: 100px;
  background: linear-gradient(120deg, var(--cyan), #67e8f9);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
  transition: .25s cubic-bezier(.2, .8, .2, 1);
}
.cta:hover { transform: translateY(-3px); box-shadow: 0 0 34px rgba(34, 211, 238, 0.7); }
.cta .arr { transition: transform .25s; }
.cta + .cta { margin-left: 12px; }
.cta.ghost {
  background: rgba(10, 4, 24, 0.55); color: var(--cyan);
  box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 18px rgba(34, 211, 238, 0.25);
}
.cta.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 30px rgba(34, 211, 238, 0.5); }
.cta:hover .arr { transform: translateX(5px); }

/* section label */
.label {
  text-align: center; letter-spacing: .4em; text-transform: uppercase;
  font-size: 12px; color: var(--dim); margin: 64px 0 22px; font-weight: 600;
  text-shadow: 0 0 4px #0a0418, 0 0 9px #0a0418;
}

/* game / project cards */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; max-width: 760px; margin: 0 auto;
}
.card {
  position: relative; text-decoration: none; color: inherit;
  padding: 26px 24px; border-radius: 14px;
  background: rgba(20, 8, 38, 0.66); backdrop-filter: blur(8px);
  border: 1px solid rgba(217, 70, 239, 0.4);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2), 0 18px 40px rgba(0, 0, 0, 0.4);
  transition: .3s cubic-bezier(.2, .8, .2, 1); overflow: hidden;
  animation: rise .8s .2s ease both;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 46, 151, 0.15));
  opacity: 0; transition: .3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--pink); box-shadow: 0 0 28px rgba(255, 46, 151, 0.4), 0 24px 50px rgba(0, 0, 0, 0.5); }
.card:hover::after { opacity: 1; }
.icon { font-size: 30px; margin-bottom: 14px; display: block; filter: drop-shadow(0 0 10px var(--magenta)); }
.card h3 { font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.card p { color: var(--dim); margin-top: 6px; font-size: 15px; line-height: 1.5; }
.go {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px; color: var(--cyan);
}
.card:hover .go { color: var(--pink); }
.soon { opacity: .55; border-style: dashed; }
.soon .go { color: var(--dim); }

/* back link (on /fun) */
.back {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  margin: 32px 0 0 32px; text-decoration: none; color: var(--dim);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px;
  transition: color .2s;
}
.back:hover { color: var(--cyan); }

/* project cards (home) */
.cards.projects { max-width: 900px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.project { padding: 0; display: flex; flex-direction: column; }
.project img {
  display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top;
  border-bottom: 1px solid rgba(217, 70, 239, 0.3);
}
.project .body { padding: 18px 22px 22px; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px; margin-bottom: 10px;
}
.chip.live { color: #0a0418; background: var(--cyan); }
.chip.private { color: var(--ink); background: rgba(124, 58, 237, 0.55); }
.chip.upcoming { color: #0a0418; background: #ffd86b; }
.go.dim, .card:hover .go.dim { color: var(--dim); }
div.card:hover { transform: none; }
#projects { scroll-margin-top: 24px; }
.label:first-child { margin-top: 40px; }

/* phones: tighter gutters, stacked buttons */
@media (max-width: 520px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .cta-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .cta + .cta { margin-left: 0; }
  .back { margin: 20px 0 0 16px; }
}

footer { text-align: center; margin-top: 70px; color: var(--dim); font-size: 14px; font-weight: 500; text-shadow: 0 0 4px #0a0418, 0 0 9px #0a0418; }
footer a { color: var(--pink); text-decoration: none; margin: 0 10px; }
footer a:hover { text-shadow: 0 0 10px var(--pink); }
