* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #2563eb;
  --secondary-blue: #1e40af;
  --light-blue: #3b82f6;
  --accent-blue: #60a5fa;
  --bg-light: #ffffff;
  --bg-secondary-light: #f8fafc;
  --text-light: #1e293b;
  --text-secondary-light: #475569;
  --border-light: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #0f172a;
    --bg-secondary-light: #1e293b;
    --text-light: #f1f5f9;
    --text-secondary-light: #cbd5e1;
    --border-light: #334155;
  }
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
  background: var(--bg-secondary-light);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid var(--primary-blue);
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-blue);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary-blue);
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--secondary-blue)
  );
  color: white;
  padding: 6rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
}

.hero .subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.hero .tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: white;
  color: var(--primary-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-blue);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--primary-blue);
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 2px;
}

/* About Section */
.about-content {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary-light);
  padding: 3rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary-light);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--bg-secondary-light);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid var(--primary-blue);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 2rem;
  color: var(--primary-blue);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-blue);
}

.project-type {
  color: var(--text-secondary-light);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--text-secondary-light);
  margin-bottom: 1.5rem;
}

.features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.features li {
  padding: 0.4rem 0;
  color: var(--text-secondary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features li::before {
  content: "✓";
  color: var(--primary-blue);
  font-weight: bold;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: var(--primary-blue);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--bg-secondary-light);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 0.5rem 0;
  color: var(--text-secondary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category li::before {
  content: "▹";
  color: var(--primary-blue);
  font-weight: bold;
}

/* Experience Timeline */
.timeline {
  max-width: 800px;
  margin: 2rem auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--primary-blue);
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-content {
  background: var(--bg-secondary-light);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  width: calc(50% - 2rem);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-content h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.timeline-date {
  color: var(--text-secondary-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Education Section */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.education-card {
  background: var(--bg-secondary-light);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-blue);
}

.education-card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.education-card .degree {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.education-card .year {
  color: var(--text-secondary-light);
  font-size: 0.9rem;
}

/* Contact Section */
.contact {
  background: var(--bg-secondary-light);
}

.contact-info {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 2rem;
  color: var(--primary-blue);
}

.contact-item a {
  color: var(--text-light);
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--primary-blue);
}

/* Footer */
footer {
  background: var(--bg-secondary-light);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary-light);
  border-top: 2px solid var(--primary-blue);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .timeline::before {
    left: 0;
  }

  .timeline-content {
    width: 100%;
    margin-left: 2rem !important;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary-light);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  nav ul.active {
    display: flex;
  }
}
