/* =========================================================================
   alexcorrino.com — "After Hours"
   Lo-fi neon city at night, finance edition: starfield, lit-window skyline,
   a neon chart line climbing over the rooftops, and a ticker band under the
   hero. Pure CSS/SVG, no dependencies. Every animation is decorative and
   switched off under prefers-reduced-motion.
   ========================================================================= */

:root {
  --sky-top: #06040f;
  --sky-mid: #100a24;
  --horizon: #241040;
  --bg: #0a0716;
  --panel: #151024;
  --ink: #f2edfa;
  --muted: #a89dc8;
  --line: #2c2344;
  --line-soft: #221a38;

  --pink: #ff5fd2;
  --cyan: #43e8ff;
  --violet: #a78bfa;
  --green: #3dffa8;
  --amber: #ffb454;

  --radius: 14px;
  --maxw: 760px;
  --glow-pink: 0 0 18px rgba(255, 95, 210, 0.35);
  --glow-cyan: 0 0 18px rgba(67, 232, 255, 0.3);
  --shadow-soft: 0 14px 40px -16px rgba(0, 0, 0, 0.8);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 85% 30%, rgba(255, 95, 210, 0.05), transparent 60%),
    radial-gradient(800px 520px at 8% 60%, rgba(67, 232, 255, 0.05), transparent 60%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--pink); color: var(--sky-top); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--sky-top);
  font-weight: 600;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.inline-link {
  color: var(--cyan);
  border-bottom: 1px solid rgba(67, 232, 255, 0.4);
  transition: border-color 0.15s ease, text-shadow 0.15s ease;
}
.inline-link:hover { border-bottom-color: var(--cyan); text-shadow: 0 0 12px rgba(67, 232, 255, 0.6); }

/* ---------- Header (floats over the night sky) ---------- */
.site-header { position: relative; z-index: 5; padding: 26px 0 0; }
.header-inner { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--cyan);
  background: rgba(67, 232, 255, 0.06);
  border: 1px solid rgba(67, 232, 255, 0.55);
  box-shadow: var(--glow-cyan), inset 0 0 10px rgba(67, 232, 255, 0.14);
  text-shadow: 0 0 8px rgba(67, 232, 255, 0.8);
}
.brand-name { font-family: var(--font-display); font-size: 1.06rem; letter-spacing: -0.01em; }
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.93rem;
}
.nav a { transition: color 0.15s ease, text-shadow 0.15s ease; }
.nav a:hover { color: var(--ink); text-shadow: 0 0 10px rgba(242, 237, 250, 0.5); }

/* ---------- Hero: the city scene ---------- */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: -86px;         /* pull the sky up behind the header */
  padding: 176px 0 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--horizon) 100%);
}
.hero-inner { position: relative; z-index: 3; padding-bottom: 236px; }

/* stars: two drifting/twinkling layers */
.stars {
  position: absolute;
  inset: 0 0 120px;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 22px 44px, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(1px 1px at 120px 108px, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(1.5px 1.5px at 233px 27px, rgba(167, 139, 250, 0.9), transparent 55%),
    radial-gradient(1px 1px at 310px 87px, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(1px 1px at 68px 152px, rgba(67, 232, 255, 0.75), transparent 55%);
  background-size: 380px 190px;
  animation: twinkle 5.5s ease-in-out infinite;
}
.stars.s2 {
  background-position: 190px 95px;
  background-size: 460px 230px;
  opacity: 0.6;
  animation-duration: 8s;
  animation-delay: 1.6s;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* moon with halo */
.moon {
  position: absolute;
  top: 84px;
  right: 8%;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 38% 34%, #fdf6ff, #d9c8f2 60%, #b9a3e0);
  box-shadow: 0 0 40px 10px rgba(217, 200, 242, 0.35), 0 0 120px 40px rgba(167, 139, 250, 0.18);
  animation: moonfloat 11s ease-in-out infinite;
}
@keyframes moonfloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* skyline SVG pinned to the hero floor */
.skyline {
  position: absolute;
  bottom: 52px;              /* sits on the ticker band */
  left: 0;
  z-index: 2;
  width: 100%;
  height: 240px;
  display: block;
  pointer-events: none;
}
.sky-far { fill: #1d1338; }
.sky-near { fill: #0c0718; }
.sky-wins .w-c { fill: rgba(67, 232, 255, 0.5); }
.sky-wins .w-p { fill: rgba(255, 95, 210, 0.42); }
.sky-wins .w-f { animation: winflick 7s steps(1) infinite; }
@keyframes winflick {
  0%, 100% { opacity: 1; }
  12% { opacity: 0.1; }
  18% { opacity: 1; }
  47% { opacity: 0.15; }
  53% { opacity: 1; }
}
.sky-lights .beacon {
  fill: #ff4d6d;
  animation: beacon 2.6s ease-in-out infinite;
}
@keyframes beacon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* the market line climbing over the rooftops */
.chart-line {
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(61, 255, 168, 0.8));
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: drawline 3s ease-out 0.5s forwards;
}
@keyframes drawline { to { stroke-dashoffset: 0; } }
.chart-dot {
  fill: var(--green);
  filter: drop-shadow(0 0 8px rgba(61, 255, 168, 0.9));
  opacity: 0;
  animation: dotpulse 2.2s ease-in-out 3.4s infinite;
}
@keyframes dotpulse {
  0%, 100% { opacity: 1; r: 5; }
  50% { opacity: 0.5; r: 3.4; }
}

/* lo-fi scanlines over the whole scene */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}

/* ticker band at the hero floor */
.ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(5, 3, 12, 0.92);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ticker-track {
  display: flex;
  flex: none;
  width: max-content;
  animation: tick 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-seq {
  display: flex;
  flex: none;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ticker-seq > span { padding: 0 26px; color: var(--muted); }
.ticker-seq .up { color: var(--green); text-shadow: 0 0 8px rgba(61, 255, 168, 0.5); }
.ticker-seq .down { color: var(--pink); text-shadow: 0 0 8px rgba(255, 95, 210, 0.5); }
.ticker-seq .sym { color: var(--ink); font-weight: 700; }
@keyframes tick { to { transform: translateX(-50%); } }

/* hero copy */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(67, 232, 255, 0.55);
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  margin: 0 0 22px;
  max-width: 12em;
  text-shadow: 0 2px 30px rgba(6, 4, 15, 0.9);
}
.hero h1 .neon {
  font-style: italic;
  font-weight: 500;
  color: var(--pink);
  text-shadow:
    0 0 8px rgba(255, 95, 210, 0.9),
    0 0 26px rgba(255, 95, 210, 0.55),
    0 0 60px rgba(255, 95, 210, 0.3);
  animation: neonflick 9s linear infinite;
}
@keyframes neonflick {
  0%, 41%, 44.5%, 46%, 100% { opacity: 1; }
  42%, 45% { opacity: 0.35; }
  43% { opacity: 0.8; }
}
.hero-sub {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--muted);
  margin: 0;
  max-width: 34em;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 58px 0 6px; }
.section-head { margin-bottom: 30px; }
.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(67, 232, 255, 0.5);
  margin: 0 0 10px;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0 0 6px; }
.section-head .muted { margin: 0; font-size: 0.97rem; }

/* neon hairline between sections */
.rule {
  border: 0;
  height: 1px;
  margin: 54px 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 95, 210, 0.5) 30%, rgba(67, 232, 255, 0.5) 70%, transparent);
}

/* ---------- Projects ---------- */
.projects { display: grid; gap: 16px; }
.project {
  position: relative;
  display: block;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(28, 20, 48, 0.75), rgba(15, 10, 30, 0.9));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.project.is-linked:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 95, 210, 0.65);
  box-shadow: var(--shadow-soft), var(--glow-pink);
}
.project-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.project.is-linked .project-top { padding-right: 34px; }
.project-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
  margin: 0;
}
/* The name is the link; its ::after stretches over the card so the whole
   card stays clickable without a paragraph-long accessible name. */
.project-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.project-domain {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.project-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.project-status .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.project-status.is-live { color: var(--green); text-shadow: 0 0 10px rgba(61, 255, 168, 0.6); }
.project-status.is-live .dot {
  background: var(--green);
  box-shadow: 0 0 8px rgba(61, 255, 168, 0.9);
  animation: beacon 2.4s ease-in-out infinite;
}
.project-status.is-building { color: var(--amber); text-shadow: 0 0 10px rgba(255, 180, 84, 0.5); }
.project-status.is-building .dot { background: var(--amber); box-shadow: 0 0 8px rgba(255, 180, 84, 0.8); }
.project-blurb { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 46em; }
.project-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--pink);
  font-size: 1.05rem;
  text-shadow: 0 0 10px rgba(255, 95, 210, 0.8);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.project.is-linked:hover .project-arrow { opacity: 1; transform: translateX(0); }
.project.is-soon { background: transparent; border-style: dashed; }
.projects-note { margin: 18px 0 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- About ---------- */
.about-body p { margin: 0 0 16px; max-width: 40em; }
.about-body p:last-child { margin-bottom: 0; }

/* ---------- Elsewhere (config-driven; hidden until links exist) ---------- */
.elsewhere[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.chip:hover { border-color: rgba(67, 232, 255, 0.65); box-shadow: var(--glow-cyan); transform: translateY(-1px); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  background: linear-gradient(180deg, rgba(5, 3, 12, 0.6), transparent);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner .top-link { transition: color 0.15s ease, text-shadow 0.15s ease; }
.footer-inner .top-link:hover { color: var(--ink); text-shadow: 0 0 10px rgba(242, 237, 250, 0.5); }

/* ---------- Responsive & motion ---------- */
@media (max-width: 720px) {
  .moon { right: 7%; top: 118px; width: 52px; height: 52px; }
  .skyline { height: 190px; }
  .hero-inner { padding-bottom: 190px; }
}

@media (max-width: 480px) {
  .hero { padding-top: 150px; }
  .project-status { margin-left: 0; width: 100%; order: 3; }
  .project-arrow { display: none; }
  .project.is-linked .project-top { padding-right: 0; }
  .ticker-seq { font-size: 0.72rem; }
  .ticker-seq > span { padding: 0 18px; }
}

@media (max-width: 360px) {
  .header-inner { flex-wrap: wrap; }
  .brand-name { white-space: nowrap; }
  .nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .moon, .sky-wins .w-f, .sky-lights .beacon, .ticker-track,
  .hero h1 .neon, .project-status.is-live .dot { animation: none; }
  .chart-line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .chart-dot { animation: none; opacity: 1; }
  .project, .chip, .project-arrow { transition: none; }
}
