/* ========== RESET & VARIABLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --bg-primary: #0f172a;      /* Dark slate background */
  --bg-secondary: #1e293b;    /* Lighter slate for cards */
  --bg-nav: #020617;          /* Deepest slate for navbar */
  --accent: #38bdf8;          /* Sky blue accent color */
  --accent-glow: #00a3ff;     /* Brighter blue for glow effects */
  --text-primary: #ffffff;    /* White text */
  --text-secondary: #94a3b8;  /* Muted gray text */
  --border: #334155;          /* Border color */
  --card-hover: #2d3a4e;      /* Card hover state */
}

/* ========== BASE STYLES ========== */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Particles.js Background Canvas */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  top: 0;
  left: 0;
}

/* ========== NAVIGATION BAR ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(2, 6, 23, 0.95);
  border-bottom: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
}

/* Terminal-Style MK Logo */
.logo {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.logo::before {
  content: '>';
  color: var(--accent);
  margin-right: 5px;
  font-weight: normal;
}

.logo::after {
  content: '_';
  animation: blink 1s infinite;
  opacity: 1;
}

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

@media (max-width: 768px) {
  .logo {
    font-size: 1.5rem;
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { width: 0; }
  to { width: 100%; }
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ========== HERO SECTION ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

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

.hero-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  background: var(--accent);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(56, 189, 248, 0.4);
}

.btn-outline {
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s;
}

.social-icons a:hover {
  color: var(--accent);
  transform: translateY(-3px);
  text-shadow: 0 0 10px var(--accent);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.image-wrapper {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  padding: 5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.3); }
  50% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.6); }
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ========== GENERAL SECTION STYLES ========== */
.section {
  padding: 5rem 2rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}

/* ========== ABOUT SECTION ========== */
.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text {
  font-size: 1.1rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.skills span {
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border-left: 3px solid var(--accent);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat {
  text-align: center;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  transition: transform 0.3s;
}

.stat:hover {
  transform: translateY(-5px);
}

.stat h3 {
  font-size: 2rem;
  color: var(--accent);
}

.stat p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Tools Section (Internal - Used within About) */
.tools-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tools-section p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tools span {
  background: rgba(56, 189, 248, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.tools span:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.tools span i {
  color: var(--accent);
  font-size: 1rem;
}

/* ========== PROJECTS SECTION ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.project-image {
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Coming Soon Badge for Projects */
.coming-soon-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #000;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.5rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-stack span {
  background: var(--bg-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

.project-links a:hover {
  opacity: 0.8;
}

/* ========== CERTIFICATES SECTION ========== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.cert-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(56, 189, 248, 0.2);
}

.cert-card i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.cert-card h3 {
  margin-bottom: 0.5rem;
}

.cert-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.cert-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

.cert-link:hover {
  opacity: 0.8;
}

/* Certificate Status Badges */
.cert-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 10px;
  transition: all 0.3s;
}

.cert-card:hover .cert-badge {
  background: rgba(56, 189, 248, 0.25);
  transform: scale(1.02);
}

/* Spinner Animation for In Progress Certificates */
.fa-pulse {
  animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== EXPERIENCE TIMELINE ========== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  z-index: 1;
}

.timeline-date {
  width: 45%;
  text-align: right;
  padding-right: 2rem;
  font-weight: bold;
  color: var(--accent);
}

.timeline-content {
  width: 45%;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  position: relative;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.timeline-content:hover {
  transform: translateX(5px);
}

.timeline-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-content h4 {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

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

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-skills span {
  background: var(--bg-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* ========== CONTACT SECTION ========== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-details div {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.contact-details i {
  color: var(--accent);
  font-size: 1.2rem;
}

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

.contact-form input,
.contact-form textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.submit-btn {
  width: fit-content;
}

#form-status {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  position: relative;
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(56, 189, 248, 0.5);
}

.back-to-top.show {
  display: flex;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ========== RESPONSIVE DESIGN ========== */
/* Tablet and medium screens */
@media (max-width: 968px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    flex-direction: column;
    margin-left: 40px;
  }
  
  .timeline-dot {
    left: 20px;
  }
  
  .timeline-date,
  .timeline-content {
    width: 100%;
    text-align: left;
    padding-left: 2rem;
  }
  
  .timeline-date {
    padding-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(2, 6, 23, 0.98);
    padding: 1rem;
    text-align: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .hero-text h2 {
    font-size: 1.2rem;
  }
  
  .image-wrapper {
    width: 250px;
    height: 250px;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .certificates-grid {
    grid-template-columns: 1fr;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
}