/* Main CSS file for George Xue's personal website */
:root {
  --dark-green: #1a5d1a;
  --medium-green: #2e8b57;
  --light-green: #e6f7e6;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --dark-gray: #333333;
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Lato', sans-serif;
}

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

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--dark-green);
  color: var(--white);
  padding: 2rem 0;
  position: relative;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--white);
  margin-bottom: 1rem;
  object-fit: cover;
}

.name {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.contact-info {
  margin-top: 1rem;
}

.contact-info a {
  color: var(--light-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Navigation */
nav {
  background-color: var(--medium-green);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  list-style: none;
}

.nav-item {
  padding: 1rem 1.5rem;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--light-green);
}

/* Section Styles */
section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  color: var(--dark-green);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--medium-green);
  margin: 0.5rem auto;
}

/* About Section */
.about {
  background-color: var(--light-gray);
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
}

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

.project-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.2rem;
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.project-description {
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.project-link {
  display: inline-block;
  color: var(--medium-green);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--dark-green);
  text-decoration: underline;
}

/* Publications Section */
.publications-list {
  list-style: none;
}

.publication-item {
  background-color: var(--white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.publication-title {
  font-size: 1.2rem;
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.publication-authors {
  font-style: italic;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.publication-year {
  color: var(--medium-green);
  font-weight: 500;
}

.publication-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--medium-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

.publication-link:hover {
  color: var(--dark-green);
  text-decoration: underline;
}

/* Experience Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--medium-green);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--white);
  border: 4px solid var(--dark-green);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline-item:nth-child(odd)::after {
  right: -12px;
}

.timeline-item:nth-child(even)::after {
  left: -12px;
}

.timeline-content {
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  color: var(--medium-green);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.2rem;
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.timeline-location {
  font-style: italic;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: var(--dark-gray);
}

/* Skills Section */
.skills {
  background-color: var(--light-gray);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.skill-category {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.skill-category-title {
  font-size: 1.2rem;
  color: var(--dark-green);
  margin-bottom: 1rem;
  text-align: center;
}

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

.skill-item {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.skill-item::before {
  content: '•';
  color: var(--medium-green);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-right: 0.5em;
}

/* Resume Section */
.resume-container {
  text-align: center;
  margin-top: 2rem;
}

.resume-btn {
  display: inline-block;
  background-color: var(--dark-green);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.resume-btn:hover {
  background-color: var(--medium-green);
}

/* Footer */
footer {
  background-color: var(--dark-green);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  margin: 1rem 0;
}

.footer-link {
  color: var(--light-green);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-text {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-list {
    flex-direction: column;
    align-items: center;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item::after {
    left: 15px;
  }
  
  .timeline-item:nth-child(odd)::after {
    right: auto;
    left: 15px;
  }
  
  .timeline-item:nth-child(even)::after {
    left: 15px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-container {
    flex-direction: column;
    align-items: center;
  }
  
  .skill-category {
    width: 100%;
  }
}
