/* ================= BASE STYLES ================= */
:root {
  /* Light Theme Colors */
  --bg-primary-rgb: 255, 255, 255; /* Light mode */
  --bg-primary-dark-rgb: 18, 18, 18; /* Dark mode */
  --primary-light: #6366f1;
  --primary-light-hover: #4f46e5;
  --secondary-light: #10b981;
  --text-primary-light: #1f2937;
  --text-secondary-light: #4b5563;
  --bg-primary-light: #ffffff;
  --bg-secondary-light: #f9fafb;
  --border-light: #e5e7eb;
  --shadow-light: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Dark Theme Colors */
  --primary-dark: #818cf8;
  --primary-dark-hover: #6366f1;
  --secondary-dark: #34d399;
  --text-primary-dark: #f9fafb;
  --text-secondary-dark: #d1d5db;
  --bg-primary-dark: #111827;
  --bg-secondary-dark: #1f2937;
  --border-dark: #374151;
  --shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -2px rgba(0, 0, 0, 0.2);

  /* Common Variables */
  --transition-speed: 0.3s;
  --border-radius: 8px;
  --container-width: 1200px;

  /* Current Theme (defaults to light) */
  --primary: #007bff; /* Light mode default */
  --primary-hover: var(--primary-light-hover);
  --secondary: var(--secondary-light);
  --text-primary: #333333;
  --text-secondary: var(--text-secondary-light);
  --bg-primary: #ffffff;
  --bg-secondary: var(--bg-secondary-light);
  --border: var(--border-light);
  --shadow: var(--shadow-light, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

/* Dark Mode */
.dark-mode {
  --primary: #6200ee;
  --primary-hover: var(--primary-dark-hover);
  --secondary: var(--secondary-dark);
  --text-primary: #eeeeee;
  /* --text-secondary: var(--text-secondary-dark); */
  --bg-primary: #1e1e1e;
  --bg-secondary: var(--bg-secondary-dark);
  --border: var(--border-dark);
  --shadow: var(--shadow-dark);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%; /* Makes 1rem = 10px for easier calculations */
}

body {
  font-family: "Inter", sans-serif;
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-hover);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 10rem 0;
}

.section-title {
  font-size: 3.6rem;
  margin-bottom: 5rem;
  text-align: center;
  position: relative;
  font-weight: 700;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 0.4rem;
  background: var(--primary);
  border-radius: 5rem;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

#theme-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 2rem;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow);
  background-color: var(--bg-primary);
  position: absolute; /* Or 'fixed' if you want it to stay in place */
  top: 70px; /* Adjust the value as needed */
  right: 20%; /* Keep it aligned to the right */
}

#theme-toggle-btn:hover {
  transform: scale(1.1);
}

.fa-moon {
  display: block;
}

.fa-sun {
  display: none;
}

.dark-mode .fa-moon {
  display: none;
}

.dark-mode .fa-sun {
  display: block;
}
#theme-toggle-btn .fa-moon {
  display: none;
}

#theme-toggle-btn .fa-sun {
  display: inline-block;
}

.dark-mode #theme-toggle-btn .fa-moon {
  display: inline-block;
}

.dark-mode #theme-toggle-btn .fa-sun {
  display: none;
}

/* ================= NAVIGATION ================= */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed);
  /* position: relative;
  transform: translateX(-50px); Adjust the value as needed */
}

.navbar.scrolled {
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
  background-color: var(--bg-primary);
}

.logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  z-index: 101;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-link {
  margin: 0 1.5rem;
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-speed);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 0.2rem;
  background-color: var(--primary);
  transition: width var(--transition-speed);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 3rem;
  height: 2.4rem;
  cursor: pointer;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 0.3rem;
  background-color: var(--text-primary);
  border-radius: 0.5rem;
  transition: all var(--transition-speed);
}

/* ================= HERO SECTION ================= */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(16, 185, 129, 0.1) 100%
  );
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.subtitle {
  font-size: 2.4rem;
  margin-bottom: 4rem;
  color: var(--text-secondary);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 3rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.6rem;
  transition: all var(--transition-speed);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

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

.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  color: white;
}

.secondary-btn {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary);
}

.secondary-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.scroll-indicator {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bounce 2s infinite;
  z-index: 2;
}

.mouse {
  width: 3rem;
  height: 5rem;
  border: 2px solid var(--text-primary);
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  padding-top: 0.8rem;
}

.wheel {
  width: 0.6rem;
  height: 0.6rem;
  background-color: var(--text-primary);
  border-radius: 50%;
  animation: wheel 2s infinite;
}

.arrow {
  margin-top: 1rem;
}

.arrow span {
  display: block;
  width: 1rem;
  height: 1rem;
  border-bottom: 2px solid var(--text-primary);
  border-right: 2px solid var(--text-primary);
  transform: rotate(45deg);
  margin: -0.5rem;
  animation: arrow 2s infinite;
}

/* Glitch effect */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text::before {
  color: #0ff;
  z-index: -1;
  animation: glitch-animation 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  color: #f0f;
  z-index: -2;
  animation: glitch-animation 2s infinite linear alternate-reverse;
}

/* ================= ABOUT SECTION ================= */
.about {
  background-color: var(--bg-primary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  width: 80%;
  padding-bottom: 80%;
  overflow: hidden;
  border-radius: 50% /*var(--border-radius)*/;
  box-shadow: var(--shadow);
}

.image-container img,
.placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 5rem;
}

.about-text p {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.stat-item p {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

/* ================= SKILLS SECTION ================= */
.skills {
  background-color: var(--bg-secondary);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 3rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all var(--transition-speed);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.skill-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.skill-item h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ================= PORTFOLIO SECTION ================= */
.portfolio {
  background-color: var(--bg-primary);
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 1rem 2rem;
  margin: 0.5rem;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-speed);
  border-radius: var(--border-radius);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.1);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
  gap: 3rem;
}

.portfolio-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-speed);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info {
  text-align: center;
  color: white;
  padding: 2rem;
}

.portfolio-info h3 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.portfolio-link {
  display: inline-block;
  width: 4rem;
  height: 4rem;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  line-height: 4rem;
  font-size: 1.6rem;
  transition: all var(--transition-speed);
}

.portfolio-link:hover {
  background-color: white;
  color: var(--primary);
  transform: rotate(360deg);
}

/* ================= CONTACT SECTION ================= */
.contact {
  background-color: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.contact-icon {
  font-size: 2.4rem;
  color: var(--primary);
  margin-right: 2rem;
  width: 5rem;
  height: 5rem;
  background-color: rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-text h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-text p {
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  margin-top: 3rem;
}

.social-link {
  width: 4rem;
  height: 4rem;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  font-size: 1.8rem;
  transition: all var(--transition-speed);
}

.social-link:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
  color: white;
}

.contact-form {
  background-color: var(--bg-primary);
  padding: 4rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-group {
  position: relative;
  margin-bottom: 3rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  background-color: transparent;
  color: var(--text-primary);
  font-size: 1.6rem;
  transition: all var(--transition-speed);
}

.form-group textarea {
  min-height: 15rem;
  resize: vertical;
}

.form-group label {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  pointer-events: none;
  transition: all var(--transition-speed);
  color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -1.2rem;
  left: 1rem;
  font-size: 1.2rem;
  background-color: var(--bg-primary);
  padding: 0 0.5rem;
  color: var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: transparent;
}

.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-btn i {
  margin-left: 1rem;
  transition: transform var(--transition-speed);
}

.submit-btn:hover i {
  transform: translateX(5px);
}

/* ================= FOOTER ================= */
.footer {
  background-color: var(--bg-primary);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--text-secondary);
}

/* ================= BACK TO TOP BUTTON ================= */
.back-to-top {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  width: 4rem;
  height: 4rem;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
}

/* ================= ANIMATIONS ================= */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

@keyframes wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes arrow {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes glitch-animation {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* ================= MEDIA QUERIES ================= */
@media (max-width: 1200px) {
  html {
    font-size: 60%;
  }
}

@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 40rem;
    margin: 0 auto 4rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 58%;
  }

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

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    transition: right var(--transition-speed);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    margin: 2rem 0;
    font-size: 2rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 4.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }

  .btn {
    width: 100%;
  }

  .portfolio-filter {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 100%;
    max-width: 20rem;
  }

  .contact-form {
    padding: 3rem 2rem;
  }
}
s {
  display: flex;
  justify-content: space-between;
  margin: 4rem 0;
}

#form-status {
  margin-top: 10px;
  font-weight: bold;
  color: green;
}

.stat-item {
  text-align: center;
}

.stat-item h3 {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-item p {
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 2rem;
}

/* @media (prefers-color-scheme: dark) {
  body {
    --primary: #6200ee;
    --text-primary: #eeeeee;
    --bg-primary: #1e1e1e;
  }
} */
