/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background: #ededed;
}

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  z-index: 1000;
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}
.nav-logo:hover {
  text-decoration: none;
  color: #2563eb;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #1a1a2e;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #2563eb;
  text-decoration: none;
}

/* ===== Hero ===== */
#hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.25rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links .icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  margin-right: 0.35rem;
}

.hero-links a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.hero-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

/* ===== Sections ===== */
section {
  padding: 2rem 0;
}

section .container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}

.subsection-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

/* ===== About ===== */
#about p {
  font-size: 1.05rem;
  color: #374151;
  max-width: 700px;
}

/* ===== Experience Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.6rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  transform: translateX(-4px);
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
}

.timeline-header .company {
  display: inline-block;
  font-weight: 500;
  color: #2563eb;
  margin-right: 0.75rem;
}

.timeline-header .dates {
  display: inline-block;
  font-size: 0.85rem;
  color: #6b7280;
}

.timeline-item ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  color: #4b5563;
}

.timeline-item li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

/* ===== Education ===== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.edu-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}


.edu-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.edu-card .institution {
  color: #2563eb;
  font-weight: 500;
  font-size: 0.95rem;
}

.edu-card .dates {
  font-size: 0.85rem;
  color: #6b7280;
}

/* ===== Projects ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.project-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  width: calc(100% + 3rem);
  display: block;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.project-card h3 a {
  color: #1a1a2e;
  font-weight: 600;
}
.project-card h3 a:hover {
  color: #2563eb;
}

.project-card p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* ===== Contributions ===== */
.contributions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contribution-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s;
}

.contribution-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contribution-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contribution-item h3 a {
  color: #1a1a2e;
}
.contribution-item h3 a:hover {
  color: #2563eb;
}

.merged-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: #7c3aed;
  color: #fff;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contribution-item p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

.contribution-item .tags {
  margin-top: 0;
}

/* ===== Publications ===== */
.publications-list {
  padding-left: 1.5rem;
}

.publications-list li {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.7;
}

/* ===== Skills ===== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #1a1a2e;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== Resume Download ===== */
#resume p {
  margin-bottom: 1rem;
  color: #374151;
}

.download-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.download-btn:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* ===== Footer ===== */
footer {
  padding: 2rem 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  border-top: 1px solid #e5e7eb;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  section {
    padding: 1.5rem 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }
}
