/* ============================================================
   DEVELOPER PORTFOLIO - Dark Theme Stylesheet
   Premium glassmorphism design with purple accent palette
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.07);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Text */
  --text-primary: #e8e8ed;
  --text-secondary: #8b8b9e;
  --text-muted: #5a5a6e;

  /* Accent */
  --accent-primary: #6c5ce7;
  --accent-secondary: #a29bfe;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);

  /* Utility */
  --success: #00b894;
  --card-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. GLOBAL RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Themed Selection (Obsidian Purple) */
::selection {
  background: rgba(108, 92, 231, 0.45);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(108, 92, 231, 0.45);
  color: #ffffff;
}

/* Prevent accidental text selection and mobile touch popups on UI chrome */
.navbar,
.hero-greeting,
.hero-title,
.hero-subtitle,
.btn,
.filter-btn,
.card-header,
.card-footer,
.stat-number,
.stat-label,
.skill-card,
.social-link,
.tag,
.search-clear-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1 { font-weight: 700; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

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

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

/* ============================================================
   3. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
}

.logo i {
  font-size: 1.6rem;
  color: var(--accent-primary);
}

.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent-secondary);
}

/* Hamburger (mobile toggle) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   4. HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-secondary);
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* Decorative hero background shapes */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: 10%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  bottom: 20%;
  left: 5%;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--success);
  top: 50%;
  right: 30%;
  animation: float 12s ease-in-out infinite;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  min-height: 2.2rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.subtitle-handle {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-left: 8px;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.15em;
  background: var(--accent-secondary);
  margin-left: 3px;
  vertical-align: -0.15em;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(162, 155, 254, 0.85);
  animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-description {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Shared button base */
.btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.45);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* ============================================================
   5. PROJECTS SECTION
   ============================================================ */
.projects {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
}

/* Filter pill buttons & Search */
.search-container {
  max-width: 540px;
  margin: 0 auto 28px;
  padding: 0 10px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 44px 13px 46px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
  background: var(--bg-card-hover);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.filter-btn.active {
  background: rgba(108, 92, 231, 0.16);
  border-color: rgba(162, 155, 254, 0.5);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.2);
}

.filter-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 100px;
  line-height: 1;
  transition: var(--transition);
}

.filter-btn.active .filter-count {
  background: rgba(108, 92, 231, 0.35);
  color: var(--accent-secondary);
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  color: var(--accent-primary);
  opacity: 0.6;
}

/* ============================================================
   6. PROJECT CARD
   ============================================================ */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-secondary);
  stroke-width: 1.75;
}

.badges-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.featured-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.18), rgba(255, 107, 0, 0.18));
  color: #ffb300;
  border: 1px solid rgba(255, 179, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tech-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-secondary);
}

.card-body {
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.project-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}

.btn-live {
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
}

.btn-live:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse 2s infinite;
}

.btn-source {
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
}

.btn-source:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

/* ============================================================
   7. ABOUT SECTION
   ============================================================ */
.about {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Skills */
.skills-section {
  margin-top: 32px;
}

.skills-section h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skill-item {
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
  transition: var(--transition);
}

.skill-item:hover {
  border-color: var(--accent-primary);
}

.skill-item i {
  font-size: 1.5rem;
  margin-bottom: 6px;
  display: block;
  color: var(--accent-secondary);
}

.skill-item span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--card-radius);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   8. CONTACT SECTION
   ============================================================ */
.contact {
  padding: 100px 0;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--accent-secondary);
  width: 24px;
  flex-shrink: 0;
}

.contact-item div {
  text-align: left;
}

.contact-item h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.contact-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-secondary);
  transform: translateY(-3px);
}

/* ============================================================
   9. FOOTER
   ============================================================ */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.heart {
  color: #e74c3c;
}

/* ============================================================
   10. AI CREDIT BADGE
   ============================================================ */
.ai-credit {
  margin-top: 40px;
  padding: 12px 20px;
  border-radius: 100px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--accent-secondary);
}

/* ============================================================
   11. KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Scroll-triggered fade-in utility */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   12. RESPONSIVE - Tablet & Below (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    padding: 20px;
    transform: translateX(-100%);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .subtitle-handle {
    display: block;
    margin-left: 0;
    margin-top: 6px;
    font-size: 0.5em;
  }

  .hero-subtitle {
    font-size: 1.15rem;
    min-height: 3.4rem;
    line-height: 1.45;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 6px 14px;
  }
}

/* ============================================================
   13. RESPONSIVE - Small Mobile (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-greeting {
    font-size: 0.95rem;
    letter-spacing: 1.5px;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    min-height: 3.2rem;
    line-height: 1.45;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* AI Credit wrapper for centering */
.ai-credit-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}
