/* ==========================================================================
   Skyrocket Inc — site styles
   Hand-written port of the original Tailwind design.
   Breakpoint: 640px (Tailwind "sm").
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --background: 250 40% 6%;
  --foreground: 260 20% 96%;
  --card: 255 35% 9%;
  --primary: 282 90% 66%;
  --primary-foreground: 260 30% 8%;
  --secondary: 255 30% 14%;
  --secondary-foreground: 260 20% 96%;
  --muted-foreground: 258 15% 66%;
  --accent: 190 90% 55%;
  --border: 258 30% 20%;

  --font-body: "Space Grotesk", sans-serif;
  --font-display: "Sora", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);

  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-4xl: 2rem;
}

/* ---------- Reset (Tailwind preflight equivalent) ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid hsl(var(--border)); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
h1, h2, h3, p { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }

body {
  font-family: var(--font-body);
  overflow-x: clip;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* ---------- Utilities ---------- */
.font-display { font-family: var(--font-display); }
.text-primary { color: hsl(var(--primary)); }
.text-glow { text-shadow: 0 0 24px hsl(var(--primary) / 0.55); }
.icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.br-sm { display: none; }
@media (min-width: 640px) { .br-sm { display: inline; } }

.container { margin-inline: auto; max-width: 72rem; padding-inline: 1.25rem; }
.container--narrow { max-width: 56rem; }

/* Small uppercase label above headings ("Portfolio", "About") */
.eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--accent));
}

/* ---------- Site shell ---------- */
.site {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.site__bg { position: fixed; inset: 0; pointer-events: none; }
.site__bg--stars {
  opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 20% 30%, hsl(0 0% 100% / 0.7), transparent),
    radial-gradient(1px 1px at 70% 60%, hsl(280 90% 80% / 0.6), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, hsl(190 90% 80% / 0.6), transparent),
    radial-gradient(1px 1px at 85% 20%, hsl(0 0% 100% / 0.5), transparent),
    radial-gradient(1px 1px at 10% 70%, hsl(320 90% 80% / 0.5), transparent);
  background-size: 100% 100%;
}
.site__bg--glow {
  background:
    radial-gradient(60% 50% at 50% -10%, hsl(282 90% 40% / 0.35), transparent),
    radial-gradient(50% 40% at 90% 20%, hsl(190 90% 45% / 0.18), transparent);
}

main { position: relative; z-index: 10; }

/* ---------- Header ---------- */
.header { position: relative; z-index: 20; }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-xl);
  background: hsl(var(--primary));
  box-shadow: 0 0 24px hsl(var(--primary) / 0.6);
}
.brand__mark img { width: 1.75rem; height: 1.75rem; object-fit: contain; filter: invert(1); }
.brand__name { font-weight: 600; letter-spacing: -0.025em; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem;
  border-width: 1px;
  border-radius: 9999px;
  background: hsl(var(--card) / 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav__link {
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
  transition: color 150ms var(--ease-default), background-color 150ms var(--ease-default);
}
.nav__link:hover { color: hsl(var(--foreground)); }
.nav__link[aria-current="page"] {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  margin-top: 6rem;
  border-top: 1px solid hsl(var(--border) / 0.6);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: 2.5rem;
  text-align: center;
}
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}
.footer__socials a {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
  transition: color 150ms var(--ease-default);
}
.footer__socials a:hover { color: hsl(var(--accent)); }
.footer__copy {
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground) / 0.7);
}

/* ==========================================================================
   Home page
   ========================================================================== */

/* ---------- Hero ---------- */
.hero { padding-top: 2rem; padding-bottom: 4rem; }
.hero__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius-4xl);
}
.hero__img { width: 100%; height: 46vh; min-height: 320px; object-fit: cover; }
.hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(var(--background)), hsl(var(--background) / 0.6), transparent);
}
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.hero__badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid hsl(var(--accent) / 0.4);
  border-radius: 9999px;
  background: hsl(var(--accent) / 0.1);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--accent));
}
.hero__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hero__tagline {
  max-width: 36rem;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: hsl(var(--muted-foreground));
}
@media (min-width: 640px) {
  .hero { padding-top: 3.5rem; }
  .hero__img { height: 56vh; }
  .hero__content { padding: 3rem; }
  .hero__title { font-size: 3.75rem; line-height: 1; }
  .hero__tagline { font-size: 1.125rem; line-height: 1.75rem; }
}

/* ---------- Link-in-bio buttons ---------- */
.links { max-width: 28rem; margin-top: -2rem; }
.links__list { display: flex; flex-direction: column; gap: 0.75rem; }
.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-2xl);
  background: hsl(var(--card) / 0.7);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    border-color 150ms var(--ease-default),
    background-color 150ms var(--ease-default),
    transform 200ms var(--ease-out);
}
.link-btn:hover { border-color: hsl(var(--accent) / 0.6); transform: translateY(-2px); }
.link-btn:active { transform: scale(0.98); }
.link-btn--primary {
  border-color: transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 0 30px hsl(var(--primary) / 0.45);
}
.link-btn--primary:hover { border-color: transparent; }
.link-btn .icon { opacity: 0.7; transition: transform 150ms var(--ease-default); }
.link-btn:hover .icon { transform: translate(2px, -2px); }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  margin-block: 4rem;
  padding-block: 1rem;
  overflow: hidden;
  border-block: 1px solid hsl(var(--border) / 0.5);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 2rem;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee__word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  color: hsl(var(--muted-foreground) / 0.4);
}
.marquee__star { color: hsl(var(--primary) / 0.6); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius-3xl);
  background: hsl(var(--border) / 0.6);
}
.stats__item { padding: 2rem 1.5rem; background: hsl(var(--card)); text-align: center; }
.stats__value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 800;
  color: hsl(var(--primary));
}
.stats__label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Section heading (reusable) ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-title {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.section-head__link {
  display: none;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}
.section-head__link:hover { color: hsl(var(--foreground)); }
@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; line-height: 2.5rem; }
  .section-head__link { display: flex; }
}

/* ---------- Projects ---------- */
.projects { padding-top: 5rem; scroll-margin-top: 6rem; }
.projects__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .projects__grid { grid-template-columns: repeat(2, 1fr); } }

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius-3xl);
  background: hsl(var(--card));
}
.project-card__media { overflow: hidden; }
.project-card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 500ms var(--ease-default);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__body { padding: 1.25rem; }
.project-card__top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
}
.project-card__status {
  padding: 0.125rem 0.625rem;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.project-card__blurb {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}
.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
}
.project-card__year { color: hsl(var(--muted-foreground) / 0.7); }

.tag {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

/* ---------- CTA ---------- */
.cta { margin-top: 5rem; }
.cta__box {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid hsl(var(--primary) / 0.3);
  border-radius: var(--radius-4xl);
  background: linear-gradient(to bottom right, hsl(var(--primary) / 0.2), hsl(var(--card)), hsl(var(--accent) / 0.1));
  text-align: center;
}
.cta__title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.cta__text {
  max-width: 32rem;
  margin: 0.75rem auto 0;
  color: hsl(var(--muted-foreground));
}
@media (min-width: 640px) {
  .cta__box { padding: 3.5rem; }
  .cta__title { font-size: 2.25rem; line-height: 2.5rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  transition: transform 150ms var(--ease-default);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }

/* ==========================================================================
   About page
   ========================================================================== */
.about { padding-top: 2.5rem; padding-bottom: 5rem; }
.about__intro { display: grid; grid-template-columns: 1fr; align-items: center; gap: 2rem; }
@media (min-width: 640px) { .about__intro { grid-template-columns: 1fr 1.2fr; } }

.about__portrait {
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius-4xl);
  animation: float-slow 6s ease-in-out infinite;
}
.about__portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.about__title {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.025em;
}
@media (min-width: 640px) { .about__title { font-size: 3rem; line-height: 1; } }

.muted { color: hsl(var(--muted-foreground)); }
.about__lede { margin-top: 1rem; }

.subheading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}

/* Timeline */
.timeline-section { margin-top: 4rem; }
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid hsl(var(--border) / 0.6);
  list-style: none;
}
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute;
  left: -31px;
  top: 0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  box-shadow: 0 0 12px hsl(var(--primary) / 0.8);
}
.timeline__year {
  font-family: var(--font-display);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: hsl(var(--primary));
}
.timeline__text { margin-top: 0.25rem; }

/* Say hello card */
.hello {
  margin-top: 4rem;
  padding: 2rem;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius-3xl);
  background: hsl(var(--card) / 0.7);
}
.hello__text { margin-top: 0.5rem; }
.hello__socials { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.chip {
  padding: 0.5rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--secondary));
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 150ms var(--ease-default), border-color 150ms var(--ease-default);
}
.chip:hover { border-color: hsl(var(--accent) / 0.6); color: hsl(var(--accent)); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--primary));
}
.text-link:hover { text-decoration: underline; }

/* ==========================================================================
   Entrance animations
   Elements marked [data-reveal] start hidden only when JS is running
   (html.js), so the page is fully visible without JavaScript.
   --reveal-delay is set per element in the HTML.
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.5s var(--ease-out) var(--reveal-delay, 0s),
    border-color 150ms var(--ease-default);
}
.js [data-reveal="left"] {
  transform: translateX(-16px);
  transition-duration: 0.4s;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
/* After the entrance finishes, drop the delay so hover effects feel instant */
.js [data-reveal].is-done { transition-delay: 0s; }
.js .link-btn[data-reveal].is-visible:hover { transform: translateY(-2px); }
.js .link-btn[data-reveal].is-visible:active { transform: scale(0.98); }

/* ---------- Keyframes ---------- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .about__portrait { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
