/* Raxit Soni — portfolio ---------------------------------------------- */

:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #161b22;
  --line: #21262d;
  --fg: #e6edf3;
  --fg-mute: #8b949e;
  --accent: #58a6ff;
  --accent-2: #bc8cff;
  --green: #3fb950;
  --radius: 14px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.accent { color: var(--accent); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 24px;
  background: rgba(13, 17, 23, 0.92);
}
.nav-brand {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600; font-size: 20px; color: var(--fg);
}
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--fg-mute); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }

/* buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f14; font-weight: 600; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(88,166,255,.25); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* hero ----------------------------------------------------------------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 72px 24px 48px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px;
  align-items: center;
}
.hero-kicker { color: var(--green); font-size: 14px; margin-bottom: 14px; min-height: 1.5em; }
.cursor {
  display: inline-block; width: .55em; height: 1.05em;
  margin-left: 3px; vertical-align: text-bottom;
  background: var(--green);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  background: linear-gradient(110deg, var(--fg) 30%, var(--accent) 46%, var(--accent-2) 54%, var(--fg) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* rise must be re-declared here: this shorthand replaces the .hero-text > * animation */
  animation: rise .7s cubic-bezier(.22,.9,.3,1) .15s forwards, shimmer 6.5s ease-in-out 1s infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 110% 0; }
  50% { background-position: -10% 0; }
}

/* hero entrance -------------------------------------------------------- */
.hero-text > * , .hero-photo {
  opacity: 0;
  transform: translateY(22px);
  animation: rise .7s cubic-bezier(.22,.9,.3,1) forwards;
}
.hero-photo { transform: translateY(0) scale(.94); animation-name: rise-photo; animation-duration: .9s; }
.hero-text > *:nth-child(1) { animation-delay: .05s; }
.hero-text > *:nth-child(2) { animation-delay: .15s; }
.hero-text > *:nth-child(3) { animation-delay: .25s; }
.hero-text > *:nth-child(4) { animation-delay: .35s; }
.hero-text > *:nth-child(5) { animation-delay: .45s; }
.hero-text > *:nth-child(6) { animation-delay: .55s; }
.hero-photo { animation-delay: .25s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes rise-photo { to { opacity: 1; transform: scale(1); } }
.hero h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600; color: var(--fg-mute); margin: 10px 0 22px;
}
.hero-lede { color: var(--fg-mute); max-width: 56ch; }
.hero-lede strong { color: var(--fg); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-stats {
  list-style: none; display: flex; gap: 40px; margin-top: 40px;
}
.hero-stats li { display: flex; flex-direction: column; }
.stat-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--fg-mute); font-size: 13px; }

.hero-photo { position: relative; justify-self: center; }
.hero-photo img {
  width: min(320px, 70vw); height: auto; aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 6px rgba(88,166,255,.07);
}
.hero-badge {
  position: absolute; bottom: -14px; left: 50%;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; white-space: nowrap;
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -7px); }
}

/* clients row ---------------------------------------------------------- */
.clients { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 8px; }
.clients-title { color: var(--fg-mute); font-size: 13px; margin-bottom: 14px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients-row {
  list-style: none;
  display: flex; flex-wrap: nowrap; gap: 14px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .clients-row { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.clients-row li {
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  color: var(--fg-mute);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.clients-row li:hover { color: var(--fg); border-color: var(--accent); }

/* sections ------------------------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 72px 24px 8px; }
.section-title {
  font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 34px;
}
.section-title .mono { font-size: .7em; margin-right: 10px; }

/* app cards ------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(88,166,255,.5);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.card-media { overflow: hidden; border-bottom: 1px solid var(--line); }
.card > img, .card-media > img {
  width: 100%; height: 190px; object-fit: cover; object-position: top;
  transition: transform .5s cubic-bezier(.22,.9,.3,1);
}
.card:hover img { transform: scale(1.045); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h4 { font-size: 19px; font-weight: 700; }
.card-body p { color: var(--fg-mute); font-size: 14.5px; }
.tags { font-size: 12.5px; color: var(--accent); }
.stores { margin-top: auto; display: flex; gap: 14px; font-size: 14px; font-weight: 600; }

/* timeline ------------------------------------------------------------- */
.timeline { list-style: none; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li {
  position: relative;
  display: grid; grid-template-columns: 170px 1fr; gap: 18px;
  padding: 0 0 30px 28px;
}
.timeline li::before {
  content: "";
  position: absolute; left: -7px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline li:first-child::before {
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88,166,255,.55); }
  55% { box-shadow: 0 0 0 9px rgba(88,166,255,0); }
}
.tl-when { color: var(--fg-mute); font-size: 13.5px; padding-top: 2px; }
.tl-what h4 { font-size: 17px; font-weight: 700; }
.tl-what p { color: var(--fg-mute); font-size: 14.5px; }

/* skills --------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.skill-group h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: 13px; color: var(--fg);
  background: rgba(88,166,255,.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 12px;
}

/* contact -------------------------------------------------------------- */
.section-contact { text-align: center; padding-bottom: 40px; }
.contact-lede { color: var(--fg-mute); max-width: 52ch; margin: -10px auto 30px; }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.contact-social { margin-top: 30px; color: var(--fg-mute); font-size: 15px; }

/* footer --------------------------------------------------------------- */
.footer {
  max-width: var(--maxw); margin: 40px auto 0;
  padding: 26px 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--fg-mute); font-size: 13px;
}

/* reveal animation ------------------------------------------------------ */
.reveal {
  opacity: 0; transform: translateY(26px) scale(.985);
  transition: opacity .65s cubic-bezier(.22,.9,.3,1), transform .65s cubic-bezier(.22,.9,.3,1);
  transition-delay: var(--stagger, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* nav hide-on-scroll ---------------------------------------------------- */
.nav { transition: transform .35s cubic-bezier(.22,.9,.3,1); }
.nav.nav-hidden { transform: translateY(-110%); }

/* reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .hero-text > *, .hero-photo { opacity: 1 !important; transform: none !important; }
  .clients-row { animation: none !important; flex-wrap: wrap; width: auto; }
}

/* responsive ------------------------------------------------------------ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: left; }
  .hero-photo { order: -1; }
  .hero-stats { gap: 28px; }
  .nav-links { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
