
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --accent: #00ff88;
  --accent-hover: #00cc6a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 40px 80px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

body {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 204, 106, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
}

/* Rising stars particle background container (above radial gradients but under content) */
.stars-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1; /* above body::before (-2) but below .container (1) */
  overflow: hidden;
}

.star {
  position: absolute;
  background: var(--accent);
  border-radius: 50%;
  animation: rise linear infinite;
  opacity: 0;
  box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent), 0 0 18px var(--accent), 0 0 24px var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

.star.small { width: 1px; height: 1px; }
.star.medium { width: 2px; height: 2px; }
.star.large { width: 3px; height: 3px; }
.star.extra-large { width: 4px; height: 4px; }

.star.pulse {
  animation: rise linear infinite, pulse 2s ease-in-out infinite alternate;
}

/* Varied durations handled by inline style on elements (JS) */

@keyframes rise {
  0% { opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes pulse {
  from {
    box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent), 0 0 18px var(--accent), 0 0 24px var(--accent);
  }
  to {
    box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent), 0 0 36px var(--accent), 0 0 48px var(--accent);
  }
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  min-height: 100vh;
  position: relative;
  z-index: 1; /* sit above particles */
}

/* Animated particles background (above radial gradient but under content) */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0; /* above body::before (-2) but below .container (1) */
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: sticky;
  top: 2rem;
  height: fit-content;
  box-shadow: var(--shadow);
}

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


.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  padding: 4px;
  position: relative;
  overflow: hidden; 
  box-shadow: 0 0 0 0 rgba(0,255,136,0.6), 0 0 0 0 rgba(0,204,106,0.4);
  transition: box-shadow 0.4s cubic-bezier(.4,2,.6,1), transform 0.3s cubic-bezier(.4,2,.6,1), width 0.3s, height 0.3s;
}
a{
  /* remove underline  */
  text-decoration: none;
}
.avatar-link:hover .avatar,
.avatar:hover {
  box-shadow: 0 0 30px 4px rgba(0,255,136,0.5);
  transform: scale(1.13);
  z-index: 2;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.profile .title {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: transparent;
  border-radius: 20px;
  border: 1px solid var(--accent);
  display: inline-block;
}

.title{
  box-shadow: 0 0 100px 0px rgba(0,255,136,0.5), inset 0 0 60px 2px rgba(0,255,136,0.2);
}


.contact-info {
  margin: 2rem 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.contact-item i {
  color: var(--accent);
  width: 20px;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease, box-shadow 0.3s;
  box-shadow: 0 0 0 0 rgba(0,255,136,0);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 10px 1px rgba(0,255,136,0.7), 0 0 32px 8px rgba(0,204,106,0.5);
  z-index: 2;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  position: sticky;
  top: 2rem;
  z-index: 10;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.nav-btn:hover, .nav-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* Section */
.section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* About Section */
.about-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.about-text .lead {
  font-size: 1.08rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-weight: 400;
}

.accent {
  color: var(--accent);
  font-weight: 600;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
}

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

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.timeline-date {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.skill-name {
  font-weight: 500;
}

.skill-percent {
  color: var(--accent);
  font-weight: 600;
}

.skill-bar {
  height: 6px;
  width: 50vw;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 1s ease;
}

/* Projects */
.filter-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

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

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}


/* Make cover image span the whole card and provide an overlay for text readability */
.project-card {
  min-height: 260px; /* ensures image area is visible */
  position: relative;
  overflow: hidden;
}

/* Cover image fills the entire card */
.project-image {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  overflow: hidden;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0; /* ensure image sits at the back */
}

.project-image img,
.project-image span {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-image i {
  position: relative; /* center inside flex container */
  font-size: 3rem;
  color: var(--accent);
  z-index: 0; /* keep icon behind the overlay */
}

.project-content {
  padding: 1.25rem 1.5rem 1.6rem; /* slightly tighter top padding, more bottom space */
  position: absolute; /* anchor content to bottom */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2; /* content sits above the overlay */
  overflow: hidden;
  pointer-events: none; /* allow clicks to pass through to link except text (children will be pointer-events:auto) */
}

/* Bottom-anchored left-to-right gradient banner: covers lower portion of the card */
.project-content::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90%; /* smaller bottom banner for clearer image visibility */
  /* softer dark-to-transparent left->right gradient */
  background: linear-gradient(90deg, rgba(102, 102, 102, 0.88) 0%, rgba(78, 78, 78, 0.6) 25%, rgba(41, 41, 41, 0.35) 50%, transparent 100%);
  backdrop-filter: blur(3px);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  pointer-events: none;
  z-index: 1; /* overlay sits above image but below content */
}

/* Ensure project text and controls render above the gradient overlay */
.project-content > * {
  position: relative;
  z-index: 3; /* ensure text and controls are above the overlay */
  pointer-events: auto; /* make text and links clickable */
}

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-category {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 500;
}

.project-link {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover .project-link {
  opacity: 1;
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 2rem;
}

.blog-card {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.blog-card:hover {
  background: var(--bg-card-hover);
  transform: translateX(10px);
}

.blog-image {
  width: 100px;
  height: 100px;
  background: var(--gradient-card);
  border-radius: 12px;
  flex-shrink: 0;
}

.blog-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.blog-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.blog-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

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

.form-group label {
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input, .form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

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

.btn-primary {
  background: var(--gradient-primary);
  margin-top: 1rem;
  border: none;
  color: var(--bg-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.map-container {
  height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Render map in dark monochrome: stronger darkness */
  filter: grayscale(1) contrast(1.05) brightness(0.5);
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .sidebar {
    position: static;
    margin-bottom: 2rem;
  }

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

@media (max-width: 768px) {
  .services-grid, .projects-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-btn {
    flex: none;
    min-width: 100px;
  }

  .blog-card {
    flex-direction: column;
  }

  .blog-image {
    width: 100%;
    height: 150px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}