/* ===== Tango palette (dark) ===== */
:root {
  --bg:        #1c2022;
  --bg-card:   #2e3436;
  --bg-raised: #555753;
  --fg:        #eeeeec;
  --muted:     #888a85;
  --green:     #8ae234;   /* Chameleon Light */
  --blue:      #729fcf;   /* Sky Blue Light  */
  --orange:    #fcaf3e;   /* Orange Light    */
  --yellow:    #fce94f;   /* Butter Light    */
  --plum:      #ad7fa8;   /* Plum Light      */
  --red:       #ef2929;   /* Scarlet Light   */
}

/* ===== 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: var(--fg);
  background: var(--bg);
}

a {
  color: var(--blue);
  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(28, 32, 34, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg-raised);
  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: var(--green);
  letter-spacing: -0.02em;
}
.nav-logo:hover {
  text-decoration: none;
  color: var(--yellow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fg);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--fg);
  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: var(--bg-card);
  color: var(--fg);
  border-bottom: 2px solid var(--bg-raised);
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.tagline {
  font-size: 1.1rem;
  color: var(--muted);
  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 var(--bg-raised);
  border-radius: 6px;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  background: var(--bg);
}
.hero-links a:hover {
  background: var(--bg-raised);
  border-color: var(--blue);
  color: var(--fg);
  text-decoration: none;
}

/* ===== Sections ===== */
section {
  padding: 2rem 0;
}

section .container {
  background: var(--bg-card);
  border: 1px solid var(--bg-raised);
  border-radius: 12px;
  padding: 2rem;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--green);
  letter-spacing: -0.02em;
}

.subsection-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--yellow);
}

/* ===== About ===== */
#about p {
  font-size: 1.05rem;
  color: var(--fg);
  max-width: 700px;
  margin: 0 auto;
}

/* ===== Experience Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--bg-raised);
}

.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: var(--green);
  border: 2px solid var(--bg-card);
  transform: translateX(-4px);
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.timeline-header .company {
  display: inline-block;
  font-weight: 600;
  color: var(--orange);
  margin-right: 0.75rem;
}

.timeline-header .dates {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
}

.timeline-item ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  color: var(--fg);
}

.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: var(--bg);
  border: 1px solid var(--bg-raised);
  border-radius: 8px;
  padding: 1.5rem;
}

.edu-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.edu-card .institution {
  color: var(--blue);
  font-weight: 500;
  font-size: 0.95rem;
}

.edu-card .dates {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Projects ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--bg-raised);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  border-color: var(--green);
}

.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: var(--fg);
  font-weight: 600;
}
.project-card h3 a:hover {
  color: var(--green);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  display: inline-block;
  background: var(--bg-raised);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* ===== Contributions ===== */
.contributions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contribution-item {
  background: var(--bg);
  border: 1px solid var(--bg-raised);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.contribution-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  border-color: var(--blue);
}

.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: var(--fg);
}
.contribution-item h3 a:hover {
  color: var(--blue);
}

.merged-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  background: var(--plum);
  color: var(--bg);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contribution-item p {
  font-size: 0.9rem;
  color: var(--muted);
  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: var(--fg);
  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: var(--bg-raised);
  color: var(--plum);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.skill-tag:hover {
  border-color: var(--plum);
  color: var(--fg);
}

/* ===== Resume Download ===== */
#resume p {
  margin-bottom: 1rem;
  color: var(--fg);
}

.download-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--green);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.download-btn:hover {
  background: var(--yellow);
  text-decoration: none;
}

/* ===== Footer ===== */
footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--bg-raised);
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--bg-raised);
    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: 1rem;
  }

  section {
    padding: 1.5rem 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }
}
