:root {
  --primary-color: #3f51b5;
  --secondary-color: #303f9f;
  --dark-color: #1a237e;
  --light-color: #c5cae9;
  --text-color: #212121;
  --background-color: #ffffff;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

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

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  color: white;
}

.hero-content {
  max-width: 1200px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-text h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.25rem;
  }

  .hero-image img {
    width: 200px;
    height: 200px;
  }
}

.primary-btn,
.secondary-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.primary-btn {
  background-color: white;
  color: var(--primary-color);
}

.secondary-btn {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

/* Projects Section */
.projects {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  color: var(--primary-color);
}

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

/* Mobile Menu */
.mobile-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  position: relative;
  margin-left: auto;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.mobile-menu:hover {
  background-color: var(--light-color);
}

.mobile-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary-color);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu span:first-child {
  top: 12px;
}

.mobile-menu span:nth-child(2) {
  top: 21px;
}

.mobile-menu span:last-child {
  top: 30px;
}

.mobile-menu.active span:first-child {
  transform: translate(-50%, 9px) rotate(45deg);
}

.mobile-menu.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
}

.mobile-menu.active span:last-child {
  transform: translate(-50%, -9px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: var(--background-color);
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-nav.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(0);
}

.mobile-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.mobile-nav a:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.25rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    text-align: center;
  }
}

/* Project Cards */
.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.project-image {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: #f8f9fa;
}

.project-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  padding: 1rem 0;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(63, 81, 181, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.project-card:hover .project-links {
  transform: translateY(0);
}

.project-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-btn:hover {
  background: var(--dark-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.project-content {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.project-content p {
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag {
  padding: 0.35rem 0.85rem;
  background: var(--light-color);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }

  .project-card {
    max-width: 500px;
    margin: 0 auto;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-content h3 {
    font-size: 1.25rem;
  }

  .project-content p {
    font-size: 0.95rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .project-image {
    padding-top: 66.67%; /* 3:2 Aspect Ratio for mobile */
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .project-content p {
    font-size: 0.9rem;
  }

  .project-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Experience Timeline */
.experience {
  padding: 80px 0;
  background-color: #f8f9fa;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Timeline center line */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  margin-bottom: 40px;
}

/* Timeline item positioning */
.timeline-item:nth-child(odd) {
  padding-right: calc(50% + 40px);
}

.timeline-item:nth-child(even) {
  padding-left: calc(50% + 40px);
}

/* Education entries styling */
.timeline-item:nth-last-child(-n + 2) .timeline-content {
  background: linear-gradient(135deg, var(--light-color), white);
  border-left: 4px solid var(--primary-color);
}

.timeline-item:nth-last-child(-n + 2) .timeline-content h3 {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--dark-color);
}

.timeline-item:nth-last-child(-n + 2) .timeline-content h4 {
  color: var(--primary-color);
  font-weight: 600;
}

.timeline-item:nth-last-child(-n + 2) .timeline-dot {
  background: var(--dark-color);
}

/* Work experience styling */
.timeline-item:not(:nth-last-child(-n + 2)) .timeline-content {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.timeline-item:not(:nth-last-child(-n + 2)) .timeline-content:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Timeline dot */
.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid white;
  top: 15px;
  box-shadow: 0 0 0 4px rgba(63, 81, 181, 0.15);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(63, 81, 181, 0.2);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: calc(50% - 10px);
}

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

/* Timeline date */
.timeline-date {
  position: absolute;
  top: 12px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-date {
  color: var(--dark-color);
}

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

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

/* Timeline content */
.timeline-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.timeline-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.timeline-content h4 {
  color: #555;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.timeline-content ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.timeline-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: #444;
}

.timeline-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.5em;
  line-height: 1;
  top: -0.1em;
}

.timeline-content .timeline-tags {
  margin-top: 1.5rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline {
    padding: 20px 0;
  }

  .timeline::before {
    left: 20px;
    opacity: 0.3;
  }

  .timeline-item {
    padding-left: 45px !important;
    padding-right: 15px !important;
    margin-bottom: 50px;
    width: 100%;
    box-sizing: border-box;
  }

  .timeline-dot {
    left: 12px !important;
    right: auto !important;
    width: 16px;
    height: 16px;
    border-width: 3px;
  }

  .timeline-date {
    position: relative !important;
    transform: none !important;
    margin-bottom: 0.75rem;
    display: inline-block;
    left: 0 !important;
    top: 5px;
    color: var(--dark-color);
    opacity: 0.8;
    font-size: 1rem;
    background: var(--light-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
  }

  .timeline-content {
    padding: 1.25rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    max-width: calc(100vw - 60px);
  }

  .timeline-content h3 {
    font-size: 1.25rem;
  }

  .timeline-content h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .timeline-content ul {
    margin-bottom: 1.25rem;
  }

  .timeline-content ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
  }

  .timeline-item:nth-last-child(-n + 2) .timeline-content {
    background: linear-gradient(135deg, var(--light-color), white);
    border-left: none;
    border-top: 4px solid var(--primary-color);
  }

  .timeline-tags {
    gap: 0.4rem;
  }

  .timeline-item:hover .timeline-dot {
    transform: scale(1.1);
  }
}

@media (max-width: 480px) {
  .timeline {
    padding: 10px 0;
  }

  .timeline-item {
    padding-left: 45px !important;
    margin-bottom: 40px;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-dot {
    left: 7px !important;
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .timeline-content {
    padding: 1.25rem;
    border-radius: 10px;
  }

  .timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }

  .timeline-content h4 {
    font-size: 0.95rem;
  }

  .timeline-content ul li {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .timeline-date {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.5rem;
  }

  .timeline-tags {
    gap: 0.35rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .timeline-item:nth-last-child(-n + 2) .timeline-content h3 {
    font-size: 1.1rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-item {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.2s;
}
.timeline-item:nth-child(2) {
  animation-delay: 0.4s;
}
.timeline-item:nth-child(3) {
  animation-delay: 0.6s;
}
.timeline-item:nth-child(4) {
  animation-delay: 0.8s;
}

/* Skills Section */
.skills {
  padding: 80px 0;
  background-color: var(--background-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.skill-category h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 500;
  color: var(--text-color);
}

.skill-level {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background: var(--light-color);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  transition: width 1s ease;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .skill-category h3 {
    font-size: 1.25rem;
  }
}

/* Contact Section */
.contact {
  padding: 80px 0;
  background-color: #f8f9fa;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info > p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.contact-item p {
  color: #666;
  line-height: 1.4;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  background: var(--dark-color);
}

/* Contact Form */
.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background: var(--dark-color);
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 20px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  /* padding-top: 0.2rem; */
  /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

.credits {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

.upwork {
  filter: contrast(0%) brightness(1.95);
}
