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

:root {
  --bg-dark: #0b0c10;
  --bg-light: #f9fafb;
  --text-dark: #e8e8e8;
  --text-light: #232946;
  --accent: #66fcf1;
  --card-dark: #1a1b26;
  --card-light: #f5f5f5;
  --border-dark: #16213e;
  --border-light: #e0e0e0;
  --muted-dark: #a8a8a8;
  --muted-light: #666666;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-dark);
  transition: background-color 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
  line-height: 1.6;
}

body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
}

body.light-mode .section-title,
body.light-mode .skill-title,
body.light-mode .project-title {
  color: #0b0c10;
}

body.light-mode .btn-primary {
  background: #232946;
  color: #fff;
}

body.light-mode .btn-primary .arrow-dark {
  color: #fff;
}

body.light-mode .btn-secondary {
  background: #e0e7ef;
  color: #232946;
  border: 1px solid #cbd5e1;
}

body.light-mode .btn-secondary:hover {
  background: #dbeafe;
}

body.light-mode .project-card,
body.light-mode .skill-card,
body.light-mode .cert-card {
  background: #fff;
  border-color: #e0e0e0;
  box-shadow: 0 2px 12px rgba(60, 60, 60, 0.04);
}

body.light-mode .project-card:hover,
body.light-mode .skill-card.skill-fadeup,
body.light-mode .cert-card:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08);
  border-color: #232946;
}

body.light-mode .about-image {
  background: linear-gradient(135deg, #e0e7ef 60%, #f9fafb 100%);
}

body.light-mode .section-underline {
  background: #232946;
}
}

/* Optimized animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(102, 252, 241, 0.4);
  }
}

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

@keyframes mouseHoverFadeUp {
  from {
    opacity: 0.7;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-mouse-hover {
  animation: mouseHoverFadeUp 0.4s ease-out forwards, glow 1.5s ease-in-out infinite;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11, 12, 16, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(102, 252, 241, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

body.light-mode nav {
  background: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(102, 252, 241, 0.2);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo:hover {
  text-shadow: 0 0 20px rgba(102, 252, 241, 0.5);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

body.light-mode .nav-links a {
  color: var(--text-light);
}

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

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

.theme-toggle {
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(102, 252, 241, 0.1);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

@keyframes themeToggleSpin {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}

.theme-toggle:hover {
  background: rgba(102, 252, 241, 0.2);
  transform: scale(1.1);
}

/* Typing Animation Cursor */
.typing-cursor {
  display: inline-block;
  font-weight: 400;
  font-size: inherit;
  color: var(--accent);
  animation: blink-cursor 0.8s steps(1) infinite;
  margin-left: 2px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
}

.hero-orb-1 {
  width: 300px;
  height: 300px;
  background: rgba(102, 252, 241, 0.2);
  top: 80px;
  left: 40px;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(102, 252, 241, 0.1);
  bottom: 80px;
  right: 40px;
  animation: float 10s ease-in-out infinite 1s;
}

.hero-content {
  max-width: 900px;
  text-align: center;
  z-index: 1;
  animation: slideInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent), rgba(102, 252, 241, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted-dark);
  margin-bottom: 2rem;
}

body.light-mode .hero p {
  color: var(--muted-light);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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


.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 8px 20px rgba(102, 252, 241, 0.3);
  position: relative;
}

.btn-primary .arrow-dark {
  color: #0b0c10;
  font-size: 1.2em;
  font-weight: bold;
  margin-left: 0.3em;
  transition: transform 0.2s;
}

.btn-primary:hover .arrow-dark {
  transform: translateX(5px);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(102, 252, 241, 0.5);
}

.btn-secondary {
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent);
  border: 1px solid rgba(102, 252, 241, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(102, 252, 241, 0.2);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-underline {
  width: 80px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 3rem;
}

/* About Section */
@keyframes floatHorizontal {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-15px);
  }
  100% {
    transform: translateX(0);
  }
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--muted-dark);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

body.light-mode .about-text p {
  color: var(--muted-light);
}

.about-image {
  aspect-ratio: 1;
  border-radius: 1rem;
  border: 1px solid rgba(102, 252, 241, 0.3);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(102, 252, 241, 0.2), rgba(102, 252, 241, 0.05));
  animation: floatHorizontal 3s ease-in-out infinite;
  position: relative;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(102, 252, 241, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 200%;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.about-image:hover {
  animation-play-state: paused;
  box-shadow: 0 0 30px rgba(102, 252, 241, 0.3);
}

.about-image:hover img {
  transform: scale(1.05);
}

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

.skill-card {
  background: rgba(26, 27, 38, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 252, 241, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

body.light-mode .skill-card {
  background: rgba(245, 245, 245, 0.8);
  border-color: rgba(102, 252, 241, 0.2);
}

.skill-card {
  will-change: transform, box-shadow, border-color;
}

.skill-card.skill-fadeup {
  animation: fadeUp 0.4s ease-out forwards, glow 1.5s ease-in-out infinite;
  z-index: 2;
  border-color: rgba(102, 252, 241, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(102, 252, 241, 0.1);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.skill-icon {
  font-size: 2rem;
}

.skill-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.4rem 0.8rem;
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  background: rgba(102, 252, 241, 0.2);
  transform: scale(1.1);
}

/* Projects Section */
.project-categories {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.project-category-btn {
  padding: 0.5rem 1.5rem;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 25px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

body.light-mode .project-category-btn {
  color: var(--text-light);
}

.project-category-btn:hover {
  background: rgba(102, 252, 241, 0.2);
  transform: translateY(-2px);
}

.project-category-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

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

.project-card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

body.light-mode .project-card {
  background: var(--card-light);
  border-color: var(--border-light);
}

.project-card:hover {
  border-color: rgba(102, 252, 241, 0.5);
  box-shadow: 0 8px 32px rgba(102, 252, 241, 0.1);
}

.project-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(102, 252, 241, 0.2), rgba(102, 252, 241, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 3rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--muted-dark);
  margin-bottom: 1rem;
  line-height: 1.6;
}

body.light-mode .project-description {
  color: var(--muted-light);
}

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

.tech-tag {
  padding: 0.3rem 0.6rem;
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

.project-links a {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-links .btn-code {
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent);
  border: 1px solid rgba(102, 252, 241, 0.3);
}

.project-links .btn-code:hover {
  background: rgba(102, 252, 241, 0.2);
}

.project-links .btn-live {
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent);
  border: 1px solid rgba(102, 252, 241, 0.3);
}

.project-links .btn-live:hover {
  background: rgba(102, 252, 241, 0.2);
}

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

.cert-card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

body.light-mode .cert-card {
  background: var(--card-light);
  border-color: var(--border-light);
}

.cert-card:hover {
  border-color: rgba(102, 252, 241, 0.5);
  box-shadow: 0 8px 32px rgba(102, 252, 241, 0.1);
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cert-icon {
  width: 50px;
  height: 50px;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cert-category {
  font-size: 1.1rem;
  font-weight: 600;
}

.cert-list {
  space-y: 1rem;
}

.cert-item {
  padding: 0.75rem;
  background: rgba(102, 252, 241, 0.05);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.cert-item:hover {
  background: rgba(102, 252, 241, 0.1);
  transform: translateX(5px);
}

.cert-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--muted-dark);
}

body.light-mode .cert-issuer {
  color: var(--muted-light);
}

/* Experience Section */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(102, 252, 241, 0.05);
  border: 1px solid var(--border-dark);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

body.light-mode .experience-item {
  background: rgba(102, 252, 241, 0.05);
  border-color: var(--border-light);
}

.experience-item:hover {
  border-color: rgba(102, 252, 241, 0.5);
  background: rgba(102, 252, 241, 0.1);
}

.experience-icon {
  width: 50px;
  height: 50px;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.experience-content {
  flex: 1;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.experience-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.experience-org {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.experience-date {
  font-size: 0.85rem;
  color: var(--muted-dark);
  white-space: nowrap;
}

body.light-mode .experience-date {
  color: var(--muted-light);
}

.experience-description {
  color: var(--muted-dark);
  font-size: 0.95rem;
  line-height: 1.6;
}

body.light-mode .experience-description {
  color: var(--muted-light);
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--muted-dark);
  line-height: 1.8;
}

body.light-mode .contact-info p {
  color: var(--muted-light);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

body.light-mode .contact-item {
  background: var(--card-light);
  border-color: var(--border-light);
}

.contact-item:hover {
  border-color: rgba(102, 252, 241, 0.5);
  transform: translateX(5px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 45px;
  height: 45px;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--accent);
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-link:hover {
  background: var(--accent);
  color: var(--bg-dark);
  transform: scale(1.1);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-dark);
  font-family: inherit;
  transition: all 0.3s ease;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: var(--card-light);
  border-color: var(--border-light);
  color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 252, 241, 0.3);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.3);
  color: var(--accent);
}

/* Footer */
footer {
  background: rgba(26, 27, 38, 0.5);
  border-top: 1px solid var(--border-dark);
  padding: 2rem;
  text-align: center;
  color: var(--muted-dark);
}

body.light-mode footer {
  background: rgba(245, 245, 245, 0.5);
  border-top-color: var(--border-light);
  color: var(--muted-light);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }

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

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

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

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
