/* Global Styling System */
:root {
  /* Color Palette (Obsidian & Neon Greens/Blues) */
  --bg-primary: #0a0e17;
  --bg-secondary: #0f172a;
  
  --primary-glow: hsla(142, 70%, 50%, 0.15);
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #3b82f6;
  --secondary-glow: hsla(217, 91%, 60%, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(16, 185, 129, 0.4);
  
  --glow-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-shadow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Layout Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Background Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Typography Details */
h1, h2, h3, .nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.text-center {
  text-align: center;
}

/* Button Component System */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #042f1a;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--glow-shadow);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--glass-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-glow:hover {
  animation: glow-pulse 1.5s infinite alternate;
}

@keyframes glow-pulse {
  0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8); }
}

/* Floating Glass Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 2rem;
  z-index: 100;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background-color: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--glass-border);
  padding: 0.9rem 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.4rem;
  color: var(--text-main);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}

.nav-logo:hover {
  filter: brightness(1.2);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-toggle {
  display: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-glow);
}

/* Hamburger Toggle Button & Nav Backdrop */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 42px;
  height: 42px;
  gap: 5px;
  z-index: 101;
  transition: var(--transition);
}

.nav-toggle:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--primary);
}

.nav-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--primary);
}

.nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Universal Section Styling */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Hero Header Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8rem;
}

.hero-content {
  max-width: 700px;
  animation: fade-in-up 1s ease-out;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-subtitle .animated-text {
  color: var(--primary);
  font-weight: 600;
  border-right: 2px solid var(--primary);
  padding-right: 4px;
  animation: blink 0.75s step-end infinite;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Animations declarations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  from, to { border-color: transparent }
  50% { border-color: var(--primary); }
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.about-details {
  display: flex;
  flex-column: wrap;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-label i {
  color: var(--primary);
}

.detail-value {
  color: var(--text-main);
  font-weight: 600;
}

/* Skills & Tools System */
.skills h3 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

.tools-header {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.skill-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.skill-badge img {
  width: 24px;
  height: 24px;
}

.skill-badge span {
  font-size: 0.95rem;
  font-weight: 500;
}

.skill-badge:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-3px);
}

/* Custom glow borders for tech badges on hover */
.js-badge:hover { border-color: #f7df1e; box-shadow: 0 0 15px rgba(247, 223, 30, 0.15); }
.html-badge:hover { border-color: #e34c26; box-shadow: 0 0 15px rgba(227, 76, 38, 0.15); }
.css-badge:hover { border-color: #264de4; box-shadow: 0 0 15px rgba(38, 77, 228, 0.15); }
.python-badge:hover { border-color: #3572a5; box-shadow: 0 0 15px rgba(53, 114, 165, 0.15); }
.git-badge:hover { border-color: #f05032; box-shadow: 0 0 15px rgba(240, 80, 50, 0.15); }
.github-badge:hover { border-color: #ffffff; box-shadow: 0 0 15px rgba(255, 255, 255, 0.15); }
.vscode-badge:hover { border-color: #007acc; box-shadow: 0 0 15px rgba(0, 122, 204, 0.15); }
.node-badge:hover { border-color: #339933; box-shadow: 0 0 15px rgba(51, 153, 51, 0.15); }

/* Projects Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-6px);
  box-shadow: var(--primary-glow);
}

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

.project-icon {
  font-size: 1.4rem;
  color: var(--primary);
}

.project-badge {
  background-color: var(--primary-glow);
  color: var(--primary);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-badge.pending {
  background-color: var(--secondary-glow);
  color: var(--secondary);
}

.project-badge.active-project {
  background-color: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.project-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

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

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-links {
  margin-top: auto;
}

.project-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary);
  gap: 0.5rem;
}

/* Contact Card and Actions */
.contact-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.copy-email-section {
  position: relative;
  display: inline-block;
}

.copy-btn {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tooltip {
  visibility: hidden;
  background-color: var(--bg-secondary);
  color: var(--text-main);
  text-align: center;
  border: 1px solid var(--glass-border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip.show {
  visibility: visible;
  opacity: 1;
}

/* Footer Section */
.footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Grid and Typography Rules */
@media (max-width: 968px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 270px;
    height: 100vh;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 5.5rem 1.5rem 2rem;
    gap: 0.75rem;
    z-index: 100;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .nav-resume-btn {
    justify-content: center;
    margin-top: 0.5rem;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .section-title {
    font-size: 1.85rem;
    margin-bottom: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .detail-value {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
  }

  .editor-body {
    overflow-x: auto;
  }

  .editor-body pre {
    white-space: pre-wrap;
    word-break: break-word;
  }

  .stat-number {
    font-size: 1.4rem;
    word-break: break-word;
  }

  .internship-role {
    font-size: 1.2rem;
  }

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

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

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

  .contact-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .navbar {
    padding: 1rem 1.25rem;
  }
  .navbar.scrolled {
    padding: 0.8rem 1.25rem;
  }
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .circular-skills-container {
    gap: 1.25rem;
  }
  .circular-skill {
    transform: scale(0.9);
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3.25rem 1rem;
  }

  .card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
  }

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

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-actions, .contact-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

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

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

  .code-indent {
    padding-left: 0.4rem;
  }

  .code-input {
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
  }

  .editor-body {
    padding: 0.85rem;
    font-size: 0.78rem;
  }
}

/* Dynamic Hero Grid & Avatar Glow */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero-avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-glow {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  animation: avatar-pulse 3s infinite alternate;
}

@keyframes avatar-pulse {
  0% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.6);
    transform: scale(1.03);
    border-color: var(--secondary);
  }
}

/* Credentials (Certifications & Hackathons) Grid */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.credential-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.credential-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.credential-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.credential-name:hover {
  color: var(--primary);
}

.credential-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 1.25rem;
  margin-top: 0.4rem;
}

.credential-meta span i {
  color: var(--primary);
  margin-right: 0.25rem;
}

/* Loading Spinner Placeholder */
.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.loading-spinner::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Responsive Overrides for new elements */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-avatar-container {
    order: -1; /* Place avatar above text on mobile */
  }
  .credentials-grid {
    grid-template-columns: 1fr;
  }
}

/* Journey Timeline Section Styling */
.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 3rem auto 0;
}

/* Central vertical path line */
.timeline-container::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

/* Individual timeline item blocks */
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: transparent;
  width: 50%;
  transition: var(--transition);
}

/* Interactive timeline dots */
.timeline-dot {
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-primary);
  border: 3px solid var(--primary);
  position: absolute;
  top: 35px;
  border-radius: 50%;
  z-index: 2;
  transition: var(--transition);
  box-shadow: 0 0 10px var(--primary);
}

.timeline-item:nth-child(even) .timeline-dot {
  border-color: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.35);
  background-color: var(--primary);
  box-shadow: 0 0 20px var(--primary);
}

.timeline-item:nth-child(even):hover .timeline-dot {
  background-color: var(--secondary);
  box-shadow: 0 0 20px var(--secondary);
}

/* Left side alignment */
.timeline-item.left {
  left: 0;
}

/* Right side alignment */
.timeline-item.right {
  left: 50%;
}

.timeline-item.right .timeline-dot {
  left: -8px;
}

/* Timeline card content style */
.timeline-content {
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.timeline-item:hover .timeline-content {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.03);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.08);
}

.timeline-item:nth-child(even):hover .timeline-content {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.03);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.08);
}

/* Date tag */
.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-item:nth-child(even) .timeline-date {
  color: var(--secondary);
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  font-weight: 600;
}

.timeline-org {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Responsive timeline for mobile devices */
@media (max-width: 768px) {
  .timeline-container::after {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 45px;
    padding-right: 10px;
    margin-bottom: 1.5rem;
  }
  
  .timeline-item.left, .timeline-item.right {
    left: 0;
  }
  
  .timeline-item.left .timeline-dot, .timeline-item.right .timeline-dot {
    left: 12px;
    right: auto;
    top: 30px;
  }
  
  .timeline-content {
    padding: 1.25rem;
  }
}

/* Internships Section Styling */
.internships-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.internship-item {
  padding: 0.5rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.internship-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.internship-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.internship-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.internship-role {
  font-size: 1.4rem;
  color: var(--text-main);
  font-weight: 600;
}

.internship-company .company-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.internship-company .company-link:hover {
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.internship-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.internship-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.internship-meta span i {
  color: var(--primary);
}

.internship-details {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.internship-details li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.internship-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

@media (max-width: 768px) {
  .internship-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  .internship-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  .internship-actions {
    flex-direction: column;
    gap: 0.6rem;
  }
  .internship-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Reusable Lightbox Modal */
.media-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-modal.show {
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--text-muted);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1010;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.modal-close:hover {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: rotate(90deg);
}

.modal-content-wrapper {
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.modal-content {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-modal.show .modal-content {
  transform: scale(1);
}

.modal-caption {
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* Internship Actions Button Group */
.internship-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.internship-actions .btn {
  border-color: var(--glass-border);
}

.internship-actions .btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Button Size Modifier */
.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}

/* ==========================================================================
   Hero Section Layout, Avatar & Code Window
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

.avatar-glow {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
}

.avatar-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px rgba(16, 185, 129, 0.7);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse-ring 1.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-code-editor {
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  background: #090d16 !important;
  border: 1px solid var(--glass-border);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--glass-border);
}

.editor-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.editor-tabs {
  display: flex;
  gap: 0.35rem;
}

.editor-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: monospace;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.editor-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.editor-tab.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.editor-body {
  padding: 1.2rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}

.code-keyword { color: #f472b6; font-weight: 600; }
.code-variable { color: #38bdf8; }
.code-prop { color: #a78bfa; }
.code-string { color: #34d399; }
.code-func { color: #fbbf24; }
.code-indent { padding-left: 1.25rem; }

/* Resume Components Styling */
.nav-resume-btn {
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.nav-resume-btn:hover {
  background-color: var(--primary) !important;
  color: #042f1a !important;
  box-shadow: var(--glow-shadow) !important;
}

.btn-glow-resume {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-glow-resume:hover {
  background-color: var(--primary);
  color: #042f1a;
  box-shadow: var(--glow-shadow);
}

.resume-link {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.resume-link:hover {
  color: #34d399;
  text-decoration: underline;
}

/* ==========================================================================
   About Stats Cards
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

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

/* ==========================================================================
   Circular Skills Progress Meters
   ========================================================================== */
.circular-skills-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.circular-skill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 7;
}

.progress-ring-circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 7;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.circle-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-percent {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.circle-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Project Search Bar & Category Filters
   ========================================================================== */
.project-search-container {
  position: relative;
  max-width: 520px;
  margin: 0 auto 1.5rem auto;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

.project-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--primary);
  color: #042f1a;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Contact Section 2-Column Split & IDE Form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
  margin-top: 2rem;
}

.contact-info-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-subtitle {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.contact-editor-card {
  padding: 0 !important;
  overflow: hidden;
  background: #090d16 !important;
  display: flex;
  flex-direction: column;
}

.contact-code-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.code-line {
  font-family: monospace;
  font-size: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: monospace;
  font-size: 0.85rem;
}

.code-input {
  width: 100%;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--primary);
  font-family: monospace;
  font-size: 0.88rem;
  transition: var(--transition);
}

.code-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.code-textarea {
  resize: vertical;
  min-height: 80px;
}

.btn-submit-code {
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
}

.terminal-status {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--text-muted);
  min-height: 24px;
  display: none;
}

.terminal-status.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Ambient Background Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  animation: orb-float 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  top: 10%;
  left: -100px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: 10%;
  right: -100px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.1); }
  100% { transform: translate(-40px, -50px) scale(0.95); }
}

@media (max-width: 900px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Additional Mobile View Fixes
   ========================================================================== */

@media (max-width: 768px) {
  /* Stats grid: allow items to wrap on narrow screens */
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.3rem;
    word-break: break-word;
  }

  /* Status pill: allow wrapping text */
  .status-pill {
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Internship meta: prevent horizontal overflow */
  .internship-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .internship-meta span {
    font-size: 0.85rem;
  }

  /* Hero actions: stack vertically and fill width */
  .hero-actions {
    align-items: stretch;
  }

  /* Company link: wrap long names */
  .company-link {
    word-break: break-word;
  }

  /* Internship item separation on mobile */
  .internship-item {
    padding-bottom: 1.5rem;
    margin-bottom: 0.5rem;
  }

  /* Credentials grid single column */
  .credentials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* Stats cards on very small screens */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Internship role title font size */
  .internship-role {
    font-size: 1.1rem;
    word-break: break-word;
  }

  /* Smaller modal close button on tiny screens */
  .modal-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    width: 38px;
    height: 38px;
  }

  /* Timeline content padding reduction */
  .timeline-content {
    padding: 1rem;
  }

  /* Credential name wrapping */
  .credential-name {
    font-size: 0.95rem;
    word-break: break-word;
  }
}

/* ── Internship Tech Tags ── */
.internship-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  transition: var(--transition);
}

.tech-tag:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.tech-tag i {
  font-size: 0.78rem;
}

/* ── Small Button Variant ── */
.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  gap: 0.4rem;
}

/* ── Internship Actions Row ── */
.internship-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

/* ── Multi-Page Modal Enhancements ── */

/* Smooth page-flip fade on the image */
#modal-img {
  transition: opacity 0.15s ease;
}

/* Footer: caption + page counter side by side */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.25rem 0;
  width: 100%;
}

/* Page counter pill */
.modal-page-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Prev / Next arrow buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--primary);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: none;           /* hidden by default, JS shows them */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  z-index: 10;
  backdrop-filter: blur(6px);
}
.modal-nav:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.modal-prev { left: -54px; }
.modal-next { right: -54px; }

/* On small screens arrows go inside the wrapper */
@media (max-width: 600px) {
  .modal-prev { left: 4px; }
  .modal-next { right: 4px; }
  .modal-nav {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
}

/* Doc pages badge inside button */
.doc-pages {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}




