/* Harshit Bharti — portfolio. Dark card UI. */

:root {
  --bg: #0a0a0b;
  --card: #141416;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --pill: #1e1e21;
  --btn: #2a2a2e;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #f5f5f5; color: #0a0a0b; }

h1, h2, h3, .brand, .btn-talk, .btn-cv {
  font-family: "Poppins", "Inter", sans-serif;
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #f5f5f5;
  color: #0a0a0b;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 1rem 1.25rem 0;
}

.nav {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(20, 20, 22, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.55rem 0.6rem 0.55rem 1.2rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  color: #0a0a0b;
  border-radius: 50%;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.btn-talk {
  background: var(--btn);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  white-space: nowrap;
}
.btn-talk:hover { background: #f5f5f5; color: #0a0a0b; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* ---------- layout ---------- */
main { display: block; }

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.sec-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.sec-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 2.8rem;
}
.sec-mini {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 3rem 0 1.4rem;
}

/* ---------- hero ---------- */
.hero {
  max-width: 1060px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 30rem;
  margin: 0 0 1.8rem;
}

.hero-actions { margin-bottom: 1.6rem; }

.btn-cv {
  display: inline-block;
  background: var(--btn);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.9rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-cv:hover { background: #f5f5f5; color: #0a0a0b; transform: translateY(-2px); }
.btn-cv.big { font-size: 1rem; padding: 0.9rem 2rem; word-break: break-all; }

.hero-socials { display: flex; gap: 1rem; }
.hero-socials a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.hero-socials a:hover { color: var(--text); border-color: var(--text); }
.hero-socials svg { width: 20px; height: 20px; }

.hero-visual { display: flex; justify-content: center; }
.hero-photo {
  width: min(300px, 70vw);
  height: min(300px, 70vw);
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  display: block;
}

/* ---------- cards ---------- */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  max-width: 760px;
  margin: 0 auto;
}
.cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.2); }
.card h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.7rem; }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.2rem; }

.card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-tags.wrap { margin-bottom: 1.2rem; }
.card-tags span {
  background: var(--pill);
  border: 1px solid var(--card-border);
  color: #d4d4d8;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}

/* ---------- about ---------- */
.about-text {
  max-width: 46rem;
  margin: 0 auto 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
}

.step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.step-no {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  background: #f5f5f5;
  color: #0a0a0b;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  flex: none;
}
.step p { margin: 0; font-size: 0.92rem; font-weight: 500; }

.stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-no {
  font-family: "Poppins", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}
.stat-label { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- projects ---------- */
.project-role {
  font-size: 0.8rem;
  color: #d4d4d8;
  margin: -0.4rem 0 0.9rem !important;
  font-weight: 500;
}
.project-links { margin: 0 !important; display: flex; gap: 1.3rem; }
.project-links a {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid #52525b;
}
.project-links a:hover { border-color: var(--text); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact .sec-sub { margin-bottom: 2rem; }
.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}
.contact-socials a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--muted);
}
.contact-socials a:hover { color: var(--text); }

/* ---------- footer ---------- */
.footer {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; border-radius: 22px; }
  .nav-toggle { display: block; order: 2; }
  .btn-talk { order: 3; }
  .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0.4rem 0.6rem;
  }
  .nav-links.open { display: flex; }

  .hero { grid-template-columns: 1fr; padding-top: 3rem; text-align: left; }
  .hero-visual { order: -1; justify-content: flex-start; }
  .hero-photo { width: 140px; height: 140px; }

  .cards-4, .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .stats { gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-cv:hover, .card:hover { transform: none; }
}
