/* ============================================
   ABHINAV PUROHIT — PORTFOLIO
   Minimalist, inspired by aschmelyun.com
   Mobile-optimized with hamburger menu
   ============================================ */

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- Gradient background (top area) ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(180deg, #f1f0fb 0%, #e8e6f3 30%, #ffffff 100%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---- Layout Wrapper ---- */
.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* ======================
   HEADER / NAV
   ====================== */
header {
  padding: 1.25rem 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.logo-link:hover {
  opacity: 0.75;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.06);
}

/* ---- Hamburger Toggle ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Desktop Nav ---- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.938rem;
  font-weight: 500;
  color: #1a1a2e;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* CronStar accent nav link */
.nav-link--accent {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  color: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  line-height: 1.4;
}

/* ======================
   HERO
   ====================== */
.hero {
  padding: 2rem 1.5rem 0;
  margin-top: 1rem;
}

.hero-content {
  max-width: 680px;
}

.hero-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}

.highlight {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  position: relative;
  display: inline-block;
}

/* Colored underline decorations */
.highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  z-index: -1;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.highlight:hover::after {
  opacity: 0.55;
}

.highlight-build::after {
  background: #7c5cfc;
}

.highlight-learn::after {
  background: #38bdf8;
}

.highlight-ship::after {
  background: #fb7185;
}

.hero-body {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: #475569;
  line-height: 1.75;
  max-width: 600px;
}

/* ---- Social Icons ---- */
.social-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.social-icon:hover {
  color: #64748b;
  transform: translateY(-3px);
}

.social-icon svg {
  width: 32px;
  height: 32px;
}

/* ======================
   SECTIONS
   ====================== */
.section {
  margin-top: 5rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.01em;
}

.see-all-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  color: #475569;
  background: #fff;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.see-all-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ======================
   CRONSTAR FEATURED CARD
   ====================== */
.cronstar-section {
  margin-top: 4rem;
}

.cronstar-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: linear-gradient(135deg, #faf5ff 0%, #f0ebff 50%, #ede9fe 100%);
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.cronstar-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.1);
  transform: translateY(-2px);
}

.cronstar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  color: #fff;
  flex-shrink: 0;
}

.cronstar-text {
  flex: 1;
  min-width: 0;
}

.cronstar-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cronstar-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
}

.cronstar-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #22c55e;
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  line-height: 1.5;
}

.cronstar-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

.cronstar-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7c5cfc;
  transition: color 0.2s;
}

.cronstar-card:hover .cronstar-link {
  color: #6d4de6;
}

/* ======================
   PROJECT CARDS
   ====================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem;
  border: 1px solid #e8e8f0;
  border-radius: 12px;
  background: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.project-card:hover {
  border-color: #c8c8d8;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
}

.project-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #64748b;
}

.project-stars svg {
  width: 15px;
  height: 15px;
}

.project-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
}

.project-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 1rem;
}

.lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ======================
   ABOUT
   ====================== */
.about-content {
  font-size: 1rem;
  color: #475569;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 1rem;
}

.about-content strong {
  color: #1a1a2e;
  font-weight: 600;
}

.stats-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e8e8f0;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.825rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* ======================
   EXPERIENCE
   ====================== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.experience-item {
  padding: 1.5rem 1.75rem;
  border: 1px solid #e8e8f0;
  border-radius: 12px;
  background: #fff;
}

.experience-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.experience-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
}

.experience-company {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.experience-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ======================
   SKILLS
   ====================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.skill-card {
  padding: 1.25rem 1.5rem;
  border: 1px solid #e8e8f0;
  border-radius: 12px;
  background: #fff;
}

.skill-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.skill-list {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}


/* ======================
   CONTACT
   ====================== */
.contact-text {
  font-size: 1rem;
  color: #475569;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a2e;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-pill:hover {
  border-color: #c8c8d8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.contact-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ======================
   FOOTER
   ====================== */
.footer {
  margin-top: 6rem;
  padding: 0 1.5rem;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  line-height: 1.7;
}

.footer-name {
  font-weight: 600;
  color: #1a1a2e;
}

.footer-meta {
  font-size: 0.875rem;
  color: #64748b;
}

.footer-meta a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-meta a:hover {
  text-decoration: none;
}

.footer-right {
  text-align: right;
}

.footer-follow {
  font-weight: 600;
  color: #1a1a2e;
}

.footer-follow-links {
  font-size: 0.875rem;
  color: #64748b;
}

.footer-follow-links a {
  transition: color 0.2s;
}

.footer-follow-links a:hover {
  color: #1a1a2e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-sep {
  color: #cbd5e1;
  margin: 0 0.15rem;
}

/* ======================
   ANIMATIONS (on load)
   ====================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-heading,
.hero-body,
.social-links {
  animation: fadeInUp 0.6s ease both;
}

.hero-body {
  animation-delay: 0.1s;
}

.social-links {
  animation-delay: 0.2s;
}

/* Scroll-triggered reveal class */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================
   RESPONSIVE — TABLET
   ====================== */
@media (max-width: 768px) {
  /* Show hamburger */
  .menu-toggle {
    display: flex;
  }

  /* Mobile nav overlay */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-radius: 10px;
    border: none;
    text-align: left;
  }

  .nav-link:hover,
  .nav-link:active {
    background: #f1f0fb;
  }

  /* Projects single column */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 1.25rem 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stats-row {
    gap: 1.5rem;
  }

  .hero {
    margin-top: 0;
  }

  /* CronStar card */
  .cronstar-card {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
  }

  .footer-right {
    text-align: left;
  }
}

/* Mobile overlay background */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ======================
   RESPONSIVE — SMALL PHONE
   ====================== */
@media (max-width: 480px) {
  header {
    padding: 0.85rem 1rem;
  }

  .avatar {
    width: 44px;
    height: 44px;
  }

  .hero {
    padding: 1.25rem 1rem 0;
  }

  .hero-heading {
    font-size: 1.45rem;
    line-height: 1.4;
  }

  .hero-body {
    font-size: 0.925rem;
  }

  .social-links {
    gap: 1.25rem;
    margin-top: 1.5rem;
  }

  .social-icon svg {
    width: 28px;
    height: 28px;
  }

  .section {
    padding: 0 1rem;
    margin-top: 3.5rem;
  }

  .cronstar-section {
    margin-top: 3rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .project-card {
    padding: 1.15rem 1.25rem;
  }

  .project-name {
    font-size: 0.95rem;
  }

  .project-desc {
    font-size: 0.85rem;
  }

  .stats-row {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .stat-item {
    min-width: 80px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .about-content {
    font-size: 0.925rem;
  }

  .contact-text {
    font-size: 0.925rem;
  }

  .contact-pill {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }

  .footer {
    padding: 0 1rem;
    margin-top: 4rem;
  }

  .footer-name,
  .footer-follow {
    font-size: 0.925rem;
  }

  .footer-meta,
  .footer-follow-links {
    font-size: 0.8rem;
  }
}

/* ======================
   RESPONSIVE — VERY SMALL
   ====================== */
@media (max-width: 360px) {
  .hero-heading {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.15rem;
  }

  .cronstar-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .cronstar-name {
    font-size: 1rem;
  }

  .cronstar-desc {
    font-size: 0.82rem;
  }
}

/* ======================
   SAFE AREA (notch phones)
   ====================== */
@supports (padding: env(safe-area-inset-top)) {
  header {
    padding-top: calc(1.25rem + env(safe-area-inset-top));
    padding-left: calc(1.5rem + env(safe-area-inset-left));
    padding-right: calc(1.5rem + env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
}
