a {
  color: white;
  text-decoration: underline;
}

html {
  background: #202324;
  background-attachment: fixed;
}

body {
  background: linear-gradient(135deg, #202324 0%, #2a2d2e 100%);
  font-family: Optima, sans-serif;
  margin: 0;
  color: white;
  min-height: 100vh;
  animation: fadeIn 1s ease-in;
}

/* Container for centering content on desktop */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1cm;
}

/* Mobile-first approach - full width on mobile */
@media (max-width: 768px) {
  .container {
    max-width: none;
    margin: 0;
    padding: 1cm;
  }
}

/* fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-icon {
  text-decoration: none;
  font-size: 1.2em;
  margin: 0 5px;
  transition: transform 0.2s ease, color 0.3s ease;
  transform: scale(1);
}

h1 .social-icon {
  font-size: 0.8em; // adjust h1 icon size
  margin-left: 10px;
}

.social-icon:hover {
  color: #0077b5;
  transform: scale(1.1);
}

.social-icon:hover .fa-github {
  color: #333; // GitHub dark gray
}

.social-icon:hover .fa-linkedin {
  color: #0077b5; // LinkedIn blue
}

/* smooth transitions */
* {
  transition: all 0.3s ease;
}

h1 {
  font-size: 2.5em;
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 0em;
  padding-bottom: 0em;
  display: inline-block;
}

p {
  line-height: 1.6;
  margin-bottom: 1.2em;
}

.hero {
  text-align: center;
  margin-bottom: 0em;
  padding: 0.5em 0;
}

.tagline {
  font-style: italic;
  color: #888;
  font-size: 1.1em;
  margin-top: 0.5em;
}

.nav-links {
  text-align: center;
  margin-bottom: 2em;
  padding: 1em 0;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
}

.nav-links a {
  margin: 0 1em;
  padding: 0.5em 0.5em;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.nav-links a:hover {
  background-color: #333;
  text-decoration: none;
}

.home-link {
  text-decoration: none;
  color: white;
}

.home-link:hover {
  color: #ccc;
}

/* Active nav link */
.nav-links a.active {
  background-color: #333;
  color: white;
}

/* Resource section styling */
.resource-section {
  margin-bottom: 2em;
  padding: 1.5em;
  border: 1px solid #333;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.resource-section:hover {
  border-color: #555;
  background-color: rgba(255, 255, 255, 0.05);
}

.resource-section h2 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: white;
  font-size: 1.5em;
  font-weight: 400;
}

.resource-section p {
  margin-bottom: 1em;
  color: #ccc;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.resource-link:hover {
  background-color: #555;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Paper section styling (reuses resource section styling) */
.paper-section {
  margin-bottom: 2em;
  padding: 1.5em;
  border: 1px solid #333;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.paper-section:hover {
  border-color: #555;
  background-color: rgba(255, 255, 255, 0.05);
}

.paper-section h2 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: white;
  font-size: 1.5em;
  font-weight: 400;
}

.paper-section p {
  margin-bottom: 1em;
  color: #ccc;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.paper-link:hover {
  background-color: #555;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Timeline styling */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 2em 0;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.timeline-section-heading {
  font-size: 1.4em;
  color: #ccc;
  font-weight: 500;
  margin: 2em 0 1em 0;
  letter-spacing: 1px;
  text-align: left;
  border-left: 4px solid #333;
  padding-left: 0.7em;
}
.timeline > .timeline-section-heading:first-child {
  margin-top: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 2em;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5em;
  transition: border-color 0.3s, background 0.3s;
}

.timeline-item:hover {
  border-color: #555;
  background: rgba(255, 255, 255, 0.05);
}

.timeline-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 80px;
  min-width: 80px;
}

.timeline-image i {
  width: 70px;
  height: 70px;
  font-size: 2.5em;
  background: #333;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5em;
  border: 3px solid #555;
  transition: all 0.3s;
}

/* .timeline-image i:hover {
  background: #444;
  border-color: #777;
} */

.timeline-year {
  font-size: 1em;
  color: #ccc;
  margin-top: 0.2em;
  font-weight: bold;
  letter-spacing: 1px;
}

.timeline-text {
  flex: 1;
}

.timeline-text h3 {
  margin: 0 0 0.3em 0;
  color: white;
  font-size: 1.3em;
  font-weight: 400;
}

.timeline-text h4 {
  margin: 0 0 0.8em 0;
  color: #ccc;
  font-size: 1em;
  font-weight: 400;
  font-style: italic;
}

.timeline-text p {
  margin: 0 0 1em 0;
  color: #ccc;
  line-height: 1.5;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 0.9em;
}

.project-link:hover {
  background-color: #555;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2em;
    gap: 1em;
  }

  .timeline-image {
    order: 2; /* Move icon to bottom on mobile */
    margin: 0.5em 0;
  }

  .timeline-text {
    order: 1; /* Keep text at top */
    text-align: left;
    width: 100%;
  }

  .timeline-text h3,
  .timeline-text h4 {
    text-align: center;
  }

  .timeline-text h4 {
    margin-bottom: 1em; /* Extra padding below h4 on mobile */
  }

  .timeline-bullets {
    text-align: left;
  }

  .timeline-bullets li {
    text-align: left;
  }

  /* Adjust icon size for mobile */
  .timeline-image i {
    width: 60px;
    height: 60px;
    font-size: 2em;
  }

  .timeline-year {
    font-size: 0.9em;
  }

  /* Improved mobile navigation */
  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3em;
    padding: 0.8em 0.5em;
  }

  .nav-links a {
    margin: 0;
    padding: 0.4em 0.6em;
    font-size: 0.85em;
    white-space: nowrap;
    min-width: fit-content;
  }

  /* Header responsive design */
  .hero h1 {
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3em;
  }

  h1 .social-icon {
    font-size: 0.7em;
    margin-left: 0;
  }
}

/* Extra small screens like iPhone SE and iPhone 12 */
@media (max-width: 390px) {
  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2em;
    padding: 0.6em 0.3em;
  }

  .nav-links a {
    margin: 0;
    padding: 0.3em 0.5em;
    font-size: 0.8em;
    white-space: nowrap;
    min-width: fit-content;
  }

  /* Adjust hero for very small screens */
  .hero h1 {
    font-size: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2em;
  }

  h1 .social-icon {
    font-size: 0.6em;
    margin-left: 0;
  }

  .tagline {
    font-size: 0.9em;
  }
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-bullets li {
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 0.5em;
  position: relative;
  padding-left: 1.2em;
}

.timeline-bullets li:before {
  content: "•";
  color: #555;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.timeline-bullets li:last-child {
  margin-bottom: 0;
}
