/* ====== Global Styles ====== */
:root {
  --primary: #2563eb; /* Modern blue */
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-lighter: #93c5fd;
  --secondary: #64748b;
  --secondary-dark: #475569;
  --secondary-light: #94a3b8;
  --dark: #1e293b;
  --dark-light: #334155;
  --light: #f8fafc;
  --light-dark: #e2e8f0;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --error: #ef4444;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --rounded-sm: 0.125rem;
  --rounded: 0.25rem;
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;
  --rounded-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== Base Reset ====== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ====== Typography ====== */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 3rem;
  position: relative;
  text-align: center;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--rounded-full);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
  color: var(--secondary-dark);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style-position: inside;
}

li {
  margin-bottom: 0.5rem;
  color: var(--secondary-dark);
}

/* ====== Layout ====== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* ====== Progress Bar ====== */
#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 1001;
  transition: width 0.3s ease;
}

/* ====== Header & Navbar ====== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.header.scrolled {
  padding: 1rem 0;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  border-radius: var(--rounded);
  font-weight: bold;
}

/* Navbar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--secondary-dark);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-outline {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--secondary-dark);
  color: var(--secondary-dark);
  border-radius: var(--rounded);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-outline:hover {
  background-color: var(--secondary-dark);
  color: var(--light);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
  z-index: 1001;
}

/* Mobile styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--light);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-link {
    padding: 0.5rem 1rem;
  }

  .btn-outline {
    margin-top: 1rem;
  }
}

/* ====== Hero Section ====== */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero h4 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-accent {
  color: var(--accent);
  font-weight: 600;
  position: relative;
}

/* ====== Button Styles ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--rounded-lg);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background-color: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ====== About Section ====== */
.about {
  background-color: white;
}

.about-content {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.profile-photo {
  width: 280px;
  height: 280px;
  border-radius: var(--rounded-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1.5rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--gray-100);
  padding: 1rem;
  border-radius: var(--rounded);
  font-weight: 500;
}

.highlight-item i {
  color: var(--primary);
  font-size: 1.25rem;
}

/* ====== Skills Section ====== */
.skills {
  background-color: var(--gray-100);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background-color: white;
  padding: 2rem;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.skill-category h3 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.skill {
  background-color: var(--gray-100);
  padding: 0.5rem 1rem;
  border-radius: var(--rounded-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.skill:hover {
  background-color: var(--primary-lighter);
  color: var(--primary-dark);
}

.skill-icon {
  color: var(--primary);
  font-size: 1rem;
}

/* ====== Experience & Education ====== */
.experience,
.education {
  background-color: white;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.5rem;
  height: 100%;
  width: 2px;
  background-color: var(--gray-200);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  left: -0.5rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: var(--primary);
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-card {
  background-color: white;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: var(--transition);
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  display: inline-block;
  background-color: var(--primary-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--rounded-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline-card h3 {
  margin-bottom: 0.5rem;
}

.timeline-card h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.timeline-card ul {
  margin-left: 1.25rem;
  color: var(--secondary);
}

.timeline-card li {
  margin-bottom: 0.5rem;
}

/* ====== Projects Section ====== */
.projects {
  background-color: var(--gray-100);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: white;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.project-image-container {
  height: 200px;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  background-color: var(--gray-100);
  padding: 0.25rem 0.75rem;
  border-radius: var(--rounded-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--dark);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary-dark);
}

.project-link i {
  font-size: 0.9rem;
}

/* ====== Contact Section ====== */
.contact {
  background-color: white;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background-color: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.25rem;
}

.contact-text h3 {
  margin-bottom: 0.25rem;
  color: var(--dark);
}

.contact-text a, 
.contact-text p {
  color: var(--secondary);
  margin-bottom: 0;
}

.contact-text a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background-color: var(--gray-100);
  padding: 2rem;
  border-radius: var(--rounded-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--rounded);
  font-family: inherit;
  transition: var(--transition);
  background-color: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  background-color: var(--primary);
  color: white;
  padding: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--rounded);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background-color: var(--primary-dark);
}

.success-message {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--success);
  color: white;
  border-radius: var(--rounded);
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.success-message i {
  font-size: 1.25rem;
}

/* ====== Footer ====== */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer .logo {
  color: white;
}

.footer .logo-icon {
  background-color: white;
  color: var(--primary);
}

.footer-quote {
  font-style: italic;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
}

.copyright {
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* ====== Back to Top Button ====== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* ====== Responsive Design ====== */
@media (max-width: 1024px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-photo {
    margin: 0 auto 2rem;
  }
  
  .about-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  section {
    padding: 4rem 0;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    order: -1;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .profile-photo {
    width: 220px;
    height: 220px;
  }
}