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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --accent-cyan: #00d9ff;
  --accent-green: #00ff88;
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --text-muted: #6b6b6b;
}

body.light-mode {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e8e8e8;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #999999;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.mobile .cursor-follower,
body.mobile .cursor-trail {
  display: none !important;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow-effect {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
  transition: all 0.3s ease;
  mix-blend-mode: screen;
}

.cursor-follower {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.15s ease;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--accent-green);
}

.cursor-trail {
  width: 5px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
  animation: trailFade 0.5s ease-out forwards;
}

@keyframes trailFade {
  to {
    opacity: 0;
    transform: scale(0);
  }
}

html {
  scroll-behavior: smooth;
}

.social-sidebar {
  position: fixed;
  left: 2rem;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-sidebar.hidden {
  opacity: 0;
  transform: translateX(-100px);
  pointer-events: none;
}

.sidebar-link-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.sidebar-link::before {
  content: attr(aria-label);
  position: absolute;
  left: 60px;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  transform: translateX(-10px);
  z-index: 10;
}

.sidebar-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-link:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  color: var(--bg-primary);
  transform: translateX(5px) scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

button.sidebar-link {
  border: none;
  font-family: inherit;
}

.copy-tooltip {
  position: absolute;
  left: calc(100% + 1rem);
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  padding: 0.5rem 1rem;
  background: var(--accent-green);
  color: var(--bg-primary);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.copy-tooltip.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.copy-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--accent-green);
}

.sidebar-line {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  margin: 0.5rem auto;
  align-self: center;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-mode nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

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.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

nav .nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

nav .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}

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

nav .nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--accent-green);
  transform: rotate(180deg);
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  width: 0%;
  z-index: 1001;
  transition: width 0.15s linear;
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

body.light-mode .scroll-progress-bar {
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

.hero-content {
  max-width: 900px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2rem;
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 217, 255, 0.3); }
  50% { box-shadow: 0 0 50px rgba(0, 217, 255, 0.5); }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.typing-text {
  color: var(--accent-green);
  border-right: 3px solid var(--accent-green);
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.hero .subtitle {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.hero .highlight {
  color: var(--accent-cyan);
  font-weight: 600;
}

.hero .location {
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 8rem;
}

section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

section > * {
  position: relative;
  z-index: 3;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
}

#about {
  padding-top: 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.about-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

.about-card i {
  font-size: 2rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.skill-card {
  background: var(--bg-secondary);
  padding: 1.5rem 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.skill-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 40px rgba(0, 217, 255, 0.15);
  background: rgba(26, 26, 26, 0.8);
}

.skill-card i {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  display: block;
}

.skill-card span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 255, 136, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 50px rgba(0, 217, 255, 0.2);
}

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

.project-content {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent-cyan);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(0, 217, 255, 0.2);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link:hover {
  gap: 1rem;
  color: var(--accent-cyan);
}

.projects-cta {
  text-align: center;
  margin-top: 4rem;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-secondary);
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  border: 2px solid var(--accent-cyan);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.github-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.github-btn:hover::before {
  left: 100%;
}

.github-btn:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 217, 255, 0.4);
}

.github-btn i:first-child {
  font-size: 1.5rem;
}

.github-btn i:last-child {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.github-btn:hover i:last-child {
  transform: translateX(5px);
}

.languages {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.language-badge {
  background: var(--bg-secondary);
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.language-badge:hover {
  border-color: var(--accent-cyan);
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.why-card {
  background: var(--bg-secondary);
  padding: 2.5rem 2rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  text-align: center;
}

.why-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 255, 136, 0.15);
}

.why-card .icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.why-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.why-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: inherit;
  justify-content: flex-start;
}

.contact-btn i {
  font-size: 2rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  min-width: 50px;
  text-align: center;
}

.contact-btn div {
  text-align: left;
}

.btn-title {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.btn-subtitle {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.contact-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 217, 255, 0.05);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.contact-btn:hover i {
  color: var(--accent-green);
  transform: scale(1.1);
}

.contact-footer {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.footer-item i {
  color: var(--accent-green);
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.social-link {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  color: var(--bg-primary);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 968px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .hero .subtitle {
    font-size: 1.1rem;
  }

  nav .nav-links {
    gap: 1.5rem;
  }

  .why-me-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .skill-card {
    padding: 1rem 0.5rem;
  }

  .skill-card i {
    font-size: 2rem;
  }

  .skill-card span {
    font-size: 0.75rem;
  }

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

  .hero .subtitle {
    font-size: 1rem;
  }

  .hero p {
    font-size: 1rem;
  }

  nav .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .social-link {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 2rem;
  }

  section {
    padding: 2.5rem 1.5rem;
  }

  body {
    cursor: auto;
  }

  .cursor, .cursor-follower, .cursor-trail {
    display: none;
  }

  .social-sidebar {
    display: none;
  }

  .github-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}
