/* ==========================================================================
   1. GLOBAL VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  /* Color Palette */
  --bg: #090d16;
  --card-bg: rgba(22, 27, 46, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.4);
  
  /* Brand & Accent Colors */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #38bdf8;
  --rating-color: #f59e0b;
  --status-active: #22c55e;
  
  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #cbd5e1;
}

/* ==========================================================================
   2. BASE RESET & GLOBAL STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   3. NAVIGATION BAR COMPONENT
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 8%;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-brand a {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.6rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-btn-connect {
  background: var(--primary);
  color: #ffffff !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s ease !important;
}

.nav-btn-connect:hover {
  background: var(--primary-hover) !important;
}

/* ==========================================================================
   4. SECTION LAYOUTS & HEADERS
   ========================================================================== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

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

.section-header-flex .section-subtitle {
  margin-bottom: 0;
}

.view-all-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: text-decoration 0.2s;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   5. HERO / PROFILE COMPONENT
   ========================================================================== */
.hero-section {
  padding-top: 6rem;
}

.hero-container {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

/* Avatar with gradient border glow & availability indicator */
.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #1e293b;
  display: block;
}

.status-indicator {
  width: 22px;
  height: 22px;
  background-color: var(--status-active);
  border: 3px solid var(--bg);
  border-radius: 50%;
  position: absolute;
  bottom: 8px;
  right: 12px;
}

.hero-text h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin: 0.8rem 0;
  letter-spacing: -0.5px;
}

.badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.headline {
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.bio {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   6. BUTTONS & ACTIONS
   ========================================================================== */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

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

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn.icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn.icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   7. CORE EXPERTISE & SKILLS COMPONENT
   ========================================================================== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.skill-tag:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

/* ==========================================================================
   8. CAREER JOURNEY / TIMELINE COMPONENT
   ========================================================================== */
.timeline {
  position: relative;
  border-left: 2px solid rgba(99, 102, 241, 0.3);
  padding-left: 2rem;
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.65rem;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--bg);
  box-shadow: 0 0 10px var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.timeline-period {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.timeline-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.timeline-tech {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-tech span {
  color: #e2e8f0;
  font-weight: 500;
}

/* ==========================================================================
   9. CARD & GRID FOUNDATIONS
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.8rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--card-hover-border);
}

/* ==========================================================================
   10. FEATURED PROJECTS COMPONENT
   ========================================================================== */
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
}

.project-card h3 {
  font-size: 1.2rem;
  margin: 0.3rem 0 0.8rem 0;
  color: #ffffff;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-tech {
  font-size: 0.82rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}

/* ==========================================================================
   11. GITHUB REPOSITORIES COMPONENT
   ========================================================================== */
.repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.repo-card h3 a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.15rem;
  transition: color 0.2s ease;
}

.repo-card h3 a:hover {
  color: var(--accent);
}

.repo-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.8rem 0 1.2rem 0;
  flex-grow: 1;
}

.repo-meta {
  display: flex;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

/* ==========================================================================
   12. CLIENT FEEDBACK & TESTIMONIALS COMPONENT
   ========================================================================== */
.feedback-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feedback-text {
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.feedback-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.author-info strong {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
}

.author-info .designation {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Clickable source badge (LinkedIn, Twitter, Portfolio) */
.source-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.source-link:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  text-decoration: underline;
}

.rating-stars {
  color: var(--rating-color);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* ==========================================================================
   13. FORMS & INPUTS (Feedback & Connect)
   ========================================================================== */
.feedback-box {
  margin-top: 2.5rem;
}

.form-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

input, textarea {
  width: 100%;
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, outline 0.2s ease;
}

input:focus, textarea:focus {
  outline: 1px solid var(--primary);
  border-color: var(--primary);
}

.status-msg {
  margin-top: 1rem;
  font-weight: 500;
}

/* ==========================================================================
   14. FOOTER COMPONENT
   ========================================================================== */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   15. RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text h1 {
    font-size: 2.3rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none; /* Hide default nav items on small mobile screens */
  }

  .timeline {
    padding-left: 1.5rem;
    margin-left: 0.5rem;
  }

  .timeline-dot {
    left: -2.15rem;
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   16. EDUCATION COMPONENT
   ========================================================================== */
.edu-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 3px solid var(--primary);
}

.edu-period {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.edu-degree {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.edu-institution {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.edu-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   NATIVE APP-STYLE FEEDBACK FORM
   ========================================================================== */
.native-feedback-box {
  margin-top: 3rem;
  padding: 2.5rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.feedback-header {
  text-align: center;
  margin-bottom: 2rem;
}

.feedback-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.native-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Star Picker (App Store / Google Play style) */
.native-rating-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.native-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.75rem;
}

.native-stars input {
  display: none;
}

/* Touch targets for mobile */
.native-stars .star {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

/* The magic: Highlight hovered star AND all preceding siblings (which are actually succeeding in HTML due to row-reverse) */
.native-stars .star:hover,
.native-stars .star:hover ~ .star,
.native-stars input:checked ~ .star {
  color: #fbbf24; /* Google Play Yellow */
}

/* Active touch feedback */
.native-stars .star:active {
  transform: scale(0.85);
}

.rating-text {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  height: 20px; /* Reserve space to prevent layout shift */
}

/* Input Group Styling (Native Material/iOS look) */
.input-group {
  display: flex;
  gap: 1rem;
  width: 100%;
}

@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }
}

.native-form input,
.native-form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.native-form textarea {
  resize: vertical;
  min-height: 120px;
}

.native-form input:focus,
.native-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.native-form input::placeholder,
.native-form textarea::placeholder {
  color: var(--text-muted);
}

/* Action Button */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn.native-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
  border-radius: 25px; /* Pill shape like modern OS */
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn.native-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn.native-submit:active {
  transform: scale(0.98);
}