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

:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --accent: #00d4ff;
  --accent-hover: #00b8e6;
  --border: #333;
  --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --accent: #007bff;
  --accent-hover: #0056b3;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--accent);
}

.theme-toggle {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.theme-toggle:hover {
  background: var(--accent-hover);
}

section {
  min-height: 100vh;
  padding: 6rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease;
}

.home h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.home h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.home p {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  animation: fadeInUp 1s ease 0.6s both;
}

.home-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 1s ease 0.8s both;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow);
}

.about {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-content h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--accent);
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-image {
  text-align: center;
}

.about-img {
  width: 250px;
  height: 250px;
  border-radius: 15px;
  object-fit: cover;
  margin-bottom: 2rem;
}

.philosophy {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  border-left: 4px solid var(--accent);
}

.philosophy h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.technologies h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--accent);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.tech-item {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.tech-item:hover {
  transform: translateY(-5px);
}

.tech-item i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.projects h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--accent);
}

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

.project-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.project-card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

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

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

.project-links a {
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.experience h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--accent);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 45%;
}

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

.timeline-item:nth-child(even) {
  left: 55%;
}

.timeline-content {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border);
  position: relative;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  right: -20px;
  border-left-color: var(--bg-secondary);
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: -20px;
  border-right-color: var(--bg-secondary);
}

.timeline-date {
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-company {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
  }

  .timeline-content::before {
    left: -20px !important;
    border-right-color: var(--bg-secondary) !important;
    border-left-color: transparent !important;
  }

  .home-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    justify-content: center;
  }
}

html {
  scroll-behavior: smooth;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}
