/* =========================================================
   Parth Patel — Portfolio Stylesheet
   Edit theme tokens in :root below to change the whole look.
   ========================================================= */

/* ---------- Theme tokens (dark default) ---------- */
:root,
[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-soft: #11141b;
  --bg-elev: #161a23;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #e9edf5;
  --text-soft: #aab2c3;
  --text-muted: #6c7387;
  --brand: #7c5cff;       /* purple */
  --brand-2: #21d4fd;     /* cyan */
  --accent: #ff7ac6;      /* pink */
  --ok: #2ecc71;
  --grad: linear-gradient(135deg, #7c5cff 0%, #21d4fd 50%, #ff7ac6 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,.18), rgba(33,212,253,.10) 50%, rgba(255,122,198,.14));
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 16px;
  --radius-sm: 10px;
}

[data-theme="light"] {
  --bg: #fbfbfd;
  --bg-soft: #f3f4f8;
  --bg-elev: #ffffff;
  --surface: rgba(15, 18, 30, 0.04);
  --surface-border: rgba(15, 18, 30, 0.08);
  --text: #11141b;
  --text-soft: #4a5163;
  --text-muted: #7a8197;
  --brand: #5b3bff;
  --brand-2: #0aa6c7;
  --accent: #d6488f;
  --ok: #1e9d57;
  --grad: linear-gradient(135deg, #5b3bff 0%, #0aa6c7 50%, #d6488f 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,59,255,.10), rgba(10,166,199,.06) 50%, rgba(214,72,143,.08));
  --shadow: 0 20px 60px rgba(15,18,30,.10);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}
.section--alt {
  background: var(--bg-soft);
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin: 0 0 .75rem;
}

.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}

.lead {
  color: var(--text-soft);
  font-size: 1.1rem;
  max-width: 720px;
}
.lead--center { margin: 0 auto 2.5rem; text-align: center; }

.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.ok { color: var(--ok); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--block { width: 100%; justify-content: center; }

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 255, .35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124, 92, 255, .5); }

.btn--ghost {
  background: transparent;
  border-color: var(--surface-border);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--surface-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700;
}
.nav__logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .85rem;
  letter-spacing: .05em;
}
.nav__name { font-family: 'Space Grotesk', sans-serif; }

.nav__links {
  display: flex; gap: 1.75rem;
  font-size: .92rem;
}
.nav__links a { color: var(--text-soft); position: relative; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 0; height: 2px; background: var(--grad);
  transition: width .25s ease;
}
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: .75rem; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  display: grid; place-items: center;
  position: relative;
  transition: background .2s ease;
}
.theme-toggle:hover { background: var(--surface-border); }
.theme-toggle__icon {
  position: absolute;
  font-size: 1rem;
  transition: opacity .25s ease, transform .25s ease;
}
[data-theme="dark"] .theme-toggle__icon[data-icon="sun"]  { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .theme-toggle__icon[data-icon="moon"] { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .theme-toggle__icon[data-icon="sun"]  { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .theme-toggle__icon[data-icon="moon"] { opacity: 1; transform: rotate(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; text-align: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: .85rem;
  color: var(--text-soft);
  margin-bottom: 1.75rem;
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); }
  70% { box-shadow: 0 0 0 12px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

.hero__lead {
  max-width: 720px;
  margin: 0 auto 2.25rem;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.hero__cta {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero__stats {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 820px;
  margin-inline: auto;
}
.hero__stats li {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
}
.hero__stats strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__stats span {
  display: block;
  font-size: .85rem;
  color: var(--text-soft);
  margin-top: .25rem;
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
}
.orb--1 { width: 380px; height: 380px; background: var(--brand);   top: -80px; left: -80px; }
.orb--2 { width: 420px; height: 420px; background: var(--brand-2); top: 30%; right: -120px; }
.orb--3 { width: 340px; height: 340px; background: var(--accent);  bottom: -120px; left: 30%; }

/* ---------- About ---------- */
.grid { display: grid; gap: 3rem; }
.grid--about { grid-template-columns: 1.4fr 1fr; align-items: start; }

.chips { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.chip {
  padding: .45rem .9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: .85rem;
  color: var(--text-soft);
}

.about__card {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.about__card-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px dashed var(--surface-border);
  font-size: .92rem;
}
.about__card-row:last-child { border-bottom: 0; }
.about__card-row span { color: var(--text-muted); }
.about__card-row strong { text-align: right; }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.service {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.service::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 0;
}
.service:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow); }
.service:hover::before { opacity: 1; }
.service > * { position: relative; z-index: 1; }

.service__icon {
  font-size: 1.8rem;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 1rem;
}
.service h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  margin: 0 0 .5rem;
}
.service p { color: var(--text-soft); margin: 0; font-size: .95rem; }

/* ---------- Filter ---------- */
.filter {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin: 2rem 0 2.5rem;
}
.filter__btn {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: .88rem;
  color: var(--text-soft);
  transition: all .2s ease;
}
.filter__btn:hover { color: var(--text); }
.filter__btn.is-active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.project {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project.is-hidden { display: none; }

.project__media {
  aspect-ratio: 16/10;
  background: var(--grad-soft);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.project__media::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.08), transparent 50%);
}

/* Mock device renders */
.mock {
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #1a1f2e 0%, #0e1119 100%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  position: relative;
}
.mock--phone {
  width: 110px; height: 180px;
  border-radius: 18px;
  font-size: .8rem;
  padding: 0 .5rem;
  text-align: center;
}
.mock--phone::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px; background: rgba(255,255,255,.15); border-radius: 4px;
}
.mock--tv {
  width: 220px; height: 130px;
  border-radius: 8px;
  font-size: 1.1rem;
}
.mock--tv::before {
  content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 6px; background: rgba(255,255,255,.15); border-radius: 0 0 4px 4px;
}
.mock--pos {
  width: 130px; height: 170px;
  border-radius: 14px;
  font-size: .9rem;
}
.mock--pos::after {
  content: ''; position: absolute; bottom: 10px; left: 12px; right: 12px; height: 28px;
  background: rgba(255,255,255,.08); border-radius: 6px;
}

.project__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.project__body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin: 0;
}
.project__body p { color: var(--text-soft); margin: 0; font-size: .92rem; flex: 1; }
.project__tags {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.project__tags li {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  padding: .25rem .6rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-soft);
}

/* ---------- Stack ---------- */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.stack__group {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.stack__group h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin: 0 0 1rem;
}
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span {
  padding: .35rem .75rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: .82rem;
  color: var(--text);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  position: relative;
}
.timeline::before {
  content: ''; position: absolute;
  top: 0; bottom: 0; left: 11px;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-2), transparent);
}
.timeline__item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}
.timeline__dot {
  position: absolute; left: 0; top: 12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline__card {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.timeline__head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: .5rem;
  margin-bottom: .75rem;
}
.timeline__head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin: 0;
}
.timeline__date {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  color: var(--text-muted);
}
.timeline__card ul { margin: 0; padding-left: 1.2rem; color: var(--text-soft); }
.timeline__card li { margin: .35rem 0; font-size: .95rem; }

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.testimonial {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px; left: 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 5rem;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .6;
}
.testimonial blockquote {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}
.testimonial figcaption {
  color: var(--text-muted);
  font-size: .85rem;
  font-style: italic;
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact__list {
  list-style: none; padding: 0; margin: 2rem 0;
}
.contact__list li {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--surface-border);
  display: flex; gap: 1rem;
  font-size: .95rem;
}
.contact__list li > span:first-child {
  width: 90px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}
.contact__list a { color: var(--text); border-bottom: 1px solid var(--surface-border); }
.contact__list a:hover { color: var(--brand-2); border-color: var(--brand-2); }

.contact__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.contact__form {
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.contact__form label {
  display: flex; flex-direction: column; gap: .4rem;
  font-size: .85rem;
  color: var(--text-soft);
}
.contact__form input,
.contact__form select,
.contact__form textarea {
  font-family: inherit;
  font-size: .95rem;
  padding: .75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
  resize: vertical;
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .18);
}
.form__hint {
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  margin: 0;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: .9rem;
}
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer__inner p { margin: 0; }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a:hover { color: var(--text); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .grid--about { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 2rem; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4.5rem 0; }
  .timeline__head { flex-direction: column; gap: .25rem; }
}

@media (max-width: 540px) {
  .nav__name { display: none; }
  .hero { padding: 4.5rem 0 3rem; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .filter { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .5rem; }
  .filter__btn { flex-shrink: 0; }
}
