:root {
  --primary: #00ff88;
  --accent-purple: #7c3aff;
  --bg-dark: #0d1117;
  --bg-card: #1a1f3a;
  --text-light: #e0e0e0;
  --text-muted: #a0a0b0;
}

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

body {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: #0d1117;
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #1a1f3a 0%, #0d1117 100%);
  border-right: 1px solid rgba(0, 255, 136, 0.1);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  left: 0;
  top: 0;
  z-index: 1000;
}

.sidebar-content {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-section {
  margin-bottom: 40px;
  text-align: center;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 3px solid rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3), 0 0 60px rgba(124, 58, 255, 0.2);
  margin: 0 auto;
}

.photo-fallback {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(124, 58, 255, 0.2));
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(0, 255, 136, 0.3);
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.nav-item {
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(0, 255, 136, 0.1);
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.sidebar-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.sidebar-footer .name {
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 4px;
}

.sidebar-footer .title {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(90deg, #0066ff 0%, var(--accent-purple) 50%, #ff0099 100%);
  padding: 80px 60px;
  min-height: 600px;
  display: flex;
  align-items: center;
}

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

.greeting {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

.description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  display: inline-block;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), #00dd77);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

/* Projects Section */
.projects-section,
.skills-section,
.contact-section {
  padding: 60px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.projects-section h2,
.skills-section h2,
.contact-section h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--text-light);
}

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

.project-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  transition: all 0.3s;
  display: flex;
  gap: 20px;
}

.project-card:hover {
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
  transform: translateY(-4px);
}

.project-icon {
  font-size: 3rem;
  min-width: 60px;
}

.project-info {
  flex: 1;
}

.project-card h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.project-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.project-link:hover {
  color: #00ff99;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.skill-item {
  display: flex;
  flex-direction: column;
}

.skill-name {
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.skill-bar {
  height: 12px;
  background: rgba(0, 255, 136, 0.1);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #00ff99);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  transition: width 1s ease;
}

/* Contact Section */
.contact-section p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  transition: all 0.3s;
  font-weight: 600;
}

.contact-link:hover {
  border-color: rgba(0, 255, 136, 0.5);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.contact-icon {
  font-size: 1.3rem;
}

/* Footer */
.footer {
  padding: 20px 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Message Button & Popup */
.message-btn {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #00dd77);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), 0 0 60px rgba(0, 255, 136, 0.3);
  border: 0;
  cursor: pointer;
  z-index: 1200;
  transition: all 0.3s;
  font-weight: 700;
}

.message-btn:hover {
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.7), 0 0 80px rgba(0, 255, 136, 0.4);
  transform: translateY(-3px);
}

.message-btn svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

.message-popup {
  position: fixed;
  right: 20px;
  bottom: 95px;
  width: 340px;
  max-width: calc(100% - 48px);
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.2), 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform-origin: 100% 100%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) translateY(12px);
  z-index: 1199;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.message-popup.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  transition: transform 0.32s cubic-bezier(0.16, 0.84, 0.28, 1), opacity 0.25s;
}

.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  background: rgba(0, 102, 255, 0.05);
}

.mp-title {
  font-weight: 800;
  color: var(--text-light);
  font-size: 1.1rem;
}

.mp-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}

.mp-close:hover {
  color: var(--primary);
}

.mp-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-body form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: rgba(10, 14, 39, 0.8);
  font-family: inherit;
  color: var(--text-light);
  font-size: 0.95rem;
}

.mp-input::placeholder {
  color: var(--text-muted);
}

.mp-input:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.mp-send {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), #00dd77);
  color: #000;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
}

.mp-send:hover {
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.animate .hero {
  animation: fadeUp 0.6s ease both;
}

body.animate .projects-section,
body.animate .skills-section,
body.animate .contact-section {
  animation: fadeUp 0.6s ease both;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  }

  .sidebar-content {
    padding: 24px;
  }

  .main-content {
    margin-left: 0;
  }

  .hero {
    padding: 40px 24px;
    min-height: auto;
  }

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

  .projects-section,
  .skills-section,
  .contact-section {
    padding: 40px 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
