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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0e17;
  color: #e8edf5;
  line-height: 1.6;
}

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

/* ===== HEADER ===== */
header {
  background: linear-gradient(145deg, #0d1520 0%, #141e2e 100%);
  padding: 80px 0 60px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.3);
}

header h1 {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 20px;
  color: #94a3b8;
  margin-top: 8px;
  font-weight: 400;
}

.header-badge {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}

.badge {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  color: #94a3b8;
}

.links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.btn-github {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

.btn-github:hover {
  background: #334155;
  transform: translateY(-2px);
}

.btn-linkedin {
  background: #0a66c2;
  color: #fff;
}

.btn-linkedin:hover {
  background: #0a5ca8;
  transform: translateY(-2px);
}

.btn-email {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

.btn-email:hover {
  background: #334155;
  transform: translateY(-2px);
}

/* ===== SECTION COMMON ===== */
section {
  padding: 70px 0;
}

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

.section-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.section-header p {
  color: #94a3b8;
  font-size: 18px;
  margin-top: 8px;
}

/* ===== ABOUT ===== */
.about {
  background: #0d1520;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}


.about-text p {
  color: #c8d0dc;
  font-size: 17px;
  margin-bottom: 16px;
}

.about-text strong {
  color: #38bdf8;
}

.research-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.research-interests span {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.12);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #94a3b8;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: #141e2e;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: #38bdf8;
}

.stat-label {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 4px;
}

/* ===== PROJECTS ===== */
.projects {
  background: #0a0e17;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: #141e2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #38bdf8;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #0d1520;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.project-content {
  padding: 20px 24px 24px;
}

.project-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-content p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 10px;
}

.btn-small {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-small.btn-github {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

.btn-small.btn-github:hover {
  background: #334155;
}

.btn-small.btn-demo {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-small.btn-demo:hover {
  background: rgba(56, 189, 248, 0.2);
}

/* ===== RESEARCH ===== */
.research {
  background: #0d1520;
}

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

.research-card {
  background: #141e2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s ease;
}

.research-card:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
}

.research-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.research-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.research-card p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.research-status {
  display: inline-block;
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== SKILLS ===== */
.skills {
  background: #0a0e17;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.skill-category {
  background: #141e2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-color: #38bdf8;
}

.skill-category h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.skill-category ul {
  list-style: none;
}

.skill-category ul li {
  color: #94a3b8;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.skill-category ul li:last-child {
  border-bottom: none;
}

/* ===== CONTACT ===== */
.contact {
  background: linear-gradient(145deg, #0d1520 0%, #141e2e 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.08);
}

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

.contact-content h2 {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.contact-content p {
  color: #94a3b8;
  font-size: 18px;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
footer {
  background: #0a0e17;
  padding: 24px 0;
  text-align: center;
  border-top: 1px solid #141e2e;
}

footer p {
  color: #475569;
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  header h1 {
    font-size: 32px;
  }

  .tagline {
    font-size: 16px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

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

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

  .header-badge {
    gap: 8px;
  }

  .badge {
    font-size: 12px;
    padding: 4px 12px;
  }

  .links {
    gap: 8px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-number {
    font-size: 24px;
  }
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #1e293b;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
  border-color: #38bdf8;
  color: #e2e8f0;
}

.filter-btn.active {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

/* ===== CATEGORY BADGE ON CARDS ===== */
.category-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  padding: 2px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ===== PROJECT COUNTER ===== */
.project-count {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 24px;
}


/* ===== PROJECT CARD - FLEX LAYOUT FOR ALIGNMENT ===== */
.project-card {
  background: #141e2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-content {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Push tags and links to bottom */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  margin-top: auto;
}

/* Button container stays at bottom */
.project-links {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* ===== ENSURE ALL CARDS IN GRID HAVE SAME HEIGHT ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  align-items: stretch;
}


.skill-tags{
    display:flex;
    flex-wrap:wrap;
    gap:6px;              /* Space between badges */
    margin-top:12px;
}

.skill-tags span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:4px 10px;     /* Much tighter */
    border-radius:999px;
    background:#f3f4f6;
    color:#333;
    font-size:0.82rem;
    font-weight:500;
    line-height:1.2;
    border:1px solid #e5e7eb;
    transition:all .2s ease;
}

.skill-tags span:hover{
    background:#2563eb;
    color:#fff;
    border-color:#2563eb;
    transform:translateY(-1px);
    cursor:default;
}