:root {
  --primary: #6a5acd;
  --primary-light: #9d90e8;
  --primary-dark: #483d8b;
  --secondary: #ea4c89;
  --accent: #00c2cb;
  --dark: #121212;
  --dark-surface: #1e1e1e;
  --dark-card: #272727;
  --light: #f8f9fa;
  --light-surface: #ffffff;
  --text-light: #f8f9fa;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-radius: 12px;
  --card-radius: 20px;
  --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Montserrat', sans-serif;
}

/* Base Styles & Reset */
*
  {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--dark);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
  background-color: var(--light);
  color: var(--text-dark);
}

body.light-mode .navbar,
body.light-mode .footer {
  background-color: var(--light-surface);
  color: var(--text-dark);
}

body.light-mode .topnav a,
body.light-mode .theme-toggle {
  color: var(--text-dark);
}

body.light-mode .info-card,
body.light-mode .project-card,
body.light-mode .contact-form {
  background-color: var(--light-surface);
  color: var(--text-dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

body.light-mode .section-title,
body.light-mode .card-header h3 {
  color: var(--text-dark);
}

body.light-mode .btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
}

body.light-mode .btn-outline {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Custom Cursor */
.cursor {
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease;
}

.cursor-follower {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary-light);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease;
  opacity: 0.5;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 1rem 5%;
}

.logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
  transition: var(--transition);
}

.logo a:hover {
  color: var(--primary-light);
}

.topnav {
  display: flex;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  margin-left: 2rem;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.2rem;
  margin-left: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--primary-light);
  transform: rotate(45deg);
}

.icon {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0 5%;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.title-main {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(106, 90, 205, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(106, 90, 205, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-light);
  transform: translateY(-3px);
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}

.hero-shape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to top, var(--dark) 10%, transparent 100%);
  z-index: 2;
}

/* Section Common Styles */
section {
  padding: 8rem 5% 5rem;
  position: relative;
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
  position: relative;
  display: inline-block;
}

.section-divider {
  height: 4px;
  width: 70px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 0 auto;
  border-radius: 2px;
}

/* About Section */
.about-section {
  background-color: var(--dark-surface);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin: 0 auto;
  max-width: 1400px;
}

.info-card {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.card-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.info-card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.card-body p {
  font-size: 1rem;
  color: var(--text-light);
  opacity: 0.8;
}

/* Project Section */
.project-section {
  background-color: var(--dark);
  padding-top: 6rem;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(72, 61, 139, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-buttons {
  display: flex;
  gap: 1rem;
}

.project-btn {
  padding: 0.8rem 1.5rem;
  background-color: var(--dark);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.project-btn:hover {
  background-color: var(--primary-dark);
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.4rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-light);
  opacity: 0.8;
  margin-bottom: 1.2rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.8rem;
  background-color: rgba(106, 90, 205, 0.2);
  color: var(--primary-light);
  font-size: 0.8rem;
  border-radius: 50px;
}

/* Contact Section */
.contact-section {
  background-color: var(--dark-surface);
  padding-bottom: 8rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-text p {
  font-size: 1rem;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--dark-card);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary);
  transform: translateY(-5px);
}

.contact-form {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.3);
}

.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Footer */
.footer {
  background-color: var(--dark-surface);
  position: relative;
  padding: 5rem 5% 2rem;
}

.footer-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, var(--dark) 0%, transparent 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.footer-logo h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 1rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-social-icon {
  color: var(--text-light);
  font-size: 1.3rem;
  transition: var(--transition);
}

.footer-social-icon:hover {
  color: var(--primary);
  transform: translateY(-5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  opacity: 0.7;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-bottom i {
  color: var(--secondary);
}

/* Media Queries */
@media (max-width: 1024px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .title-main {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .topnav a:not(:first-child) {
    display: none;
  }

  .topnav .theme-toggle {
    display: none;
  }

  .topnav a.icon {
    float: right;
    display: block;
    margin-left: 1rem;
  }

  .topnav.responsive {
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--dark-surface);
    padding: 1rem 5%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .topnav.responsive a {
    display: block;
    width: 100%;
    margin: 1rem 0;
    padding: 0.8rem;
  }

  .topnav.responsive .theme-toggle {
    display: block;
    margin: 1rem 0 0;
    align-self: flex-start;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .title-main {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .project-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .project-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
}
