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

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #1e293b;
  padding: 2rem;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1000px; /* Widened slightly for grid */
  margin: auto;
  background: #ffffffd9;
  padding: 2.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #0f172a;
}

.subtitle {
  color: #64748b;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.dept a {
  color: #2563eb;
  text-decoration: none;
  font-size: 1rem;
}

.dept a:hover {
  text-decoration: underline;
}

/* Section Headers */
.section {
  margin-top: 3.5rem;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  color: #334155;
}

/* Skills Tags */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

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

.project-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

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

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

/* Badges */
.badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 8px;
}

.badge.systems { background: #ecfdf5; color: #047857; }
.badge.ai { background: #eff6ff; color: #1d4ed8; }
.badge.research { background: #fef2f2; color: #b91c1c; }

.project-desc {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1rem;
}

.tech-list {
    list-style-position: inside;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes tech stack to bottom */
}

.tech-list li {
    margin-bottom: 4px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.tech-stack span {
    font-size: 0.75rem;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 4px;
    color: #64748b;
    font-family: monospace;
}

/* Competitive Programming */
.cp-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cp-card {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  transition: transform 0.2s ease;
}

.cp-card:hover {
  transform: translateY(-4px);
}

.cp-card img {
  max-width: 100%;
  width: 350px;
  border-radius: 8px;
}

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

.links a {
  font-size: 1.15rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.links a::after {
  content: "";
  width: 0%;
  height: 2px;
  background: #2563eb;
  position: absolute;
  left: 0;
  bottom: -3px;
  transition: width 0.25s ease;
}

.links a:hover::after {
  width: 100%;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 600px) {
    .container { padding: 1.5rem; }
    .header h1 { font-size: 1.8rem; }
    .cp-container { gap: 1rem; }
}