:root {
  --bg-color: #0d1117;
  --card-color: #161b22;
  --sidebar-bg-color: #1c2128;
  --primary-color: #f87171;
  --text-color: #f3f4f6;
  --subtle-text-color: #bfbfbf;
  --border-color: #30363d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  background-color: #ac4d4d;
}

.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  margin: 0 auto;
  gap: 2rem;
}

#name {
  font-size: 32px;
  text-transform: uppercase;
}

.sidebar {
  background-color: var(--sidebar-bg-color);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
}

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

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 20px #f8717196;
  margin-bottom: 1.5rem;
}

.sidebar h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--subtle-text-color);
  margin-bottom: 2rem;
}

.contact-info {
  text-align: left;
  align-self: flex-start;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact-info div {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--subtle-text-color);
}

.contact-info i {
  color: var(--primary-color);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.social-links {
  margin-bottom: 2rem;
}

.social-links a {
  color: var(--subtle-text-color);
  font-size: 1.8rem;
  margin: 0 15px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.sidebar footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.9rem;
  color: var(--subtle-text-color);
}

.main-content {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.main-content section {
  margin-bottom: 4rem;
}

.main-content h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

#about p {
  font-size: 1.1rem;
  max-width: 800px;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tech-item {
  background-color: var(--card-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.tech-item:hover {
  background-color: var(--primary-color);
  color: #fff;
}

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

.project-card {
  background-color: var(--card-color);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  flex-grow: 1;
  color: var(--subtle-text-color);
  margin-bottom: 1rem;
}

.project-tags {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags span {
  background-color: var(--bg-color);
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-size: 0.8rem;
}

.project-link {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  text-align: center;
}

.project-link:hover {
  background-color: #ac4d4d;
  color: white;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.timeline {
  max-width: 800px;
  position: relative;
}
.timeline-item {
  padding: 1rem 2rem;
  margin-bottom: 1rem;
  position: relative;
  background: var(--card-color);
  border-left: 3px solid var(--primary-color);
  border-radius: 5px;
}
.timeline-item h3 {
  font-size: 1.2rem;
}
.timeline-item p {
  font-style: italic;
  color: var(--subtle-text-color);
  margin-bottom: 0.5rem;
}
.timeline-item ul {
  list-style-type: disc;
  padding-left: 20px;
}

@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr; /* Stack cols */
    gap: 0;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 2rem 1rem;
  }
  .contact-info {
    align-self: center;
  }
  .sidebar footer {
    margin-top: 2rem;
  }
  .main-content {
    padding: 2rem 1rem;
  }
}
