/* General Styles */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-light: #7f8c8d;
  --snow-white: #f8f9fa;
  --warm-white: #f5f7fa;
  --soft-white: #f2f4f8;
  
  /* Light mode colors */
  --bg-gradient-start: #f2e6ee;
  --bg-gradient-end: #977dff;
  --card-bg: rgba(248, 249, 250, 0.95);
  --card-hover-bg: #f8f9fa;
  --header-bg-start: rgba(242, 230, 238, 0.25);
  --header-bg-end: rgba(151, 125, 255, 0.25);
  --skill-bg: #f5f7fa;
  --contact-form-bg: #f8f9fa;
  
  /* Transition for CSS variables */
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --text-color: #e0e6ed;
  --text-light: #a0a6b0;
  --snow-white: #e0e6ed;
  --warm-white: #d1d7e0;
  --soft-white: #c2c8d5;
  
  /* Dark mode colors - more visible purple gradient */
  --bg-gradient-start: #4a2c5a;
  --bg-gradient-end: #1c0a2e;
  --card-bg: rgba(30, 35, 45, 0.95);
  --card-hover-bg: #242938;
  --header-bg-start: rgba(74, 44, 90, 0.8);
  --header-bg-end: rgba(28, 10, 46, 0.8);
  --skill-bg: #1e2329;
  --contact-form-bg: #242938;
  
  /* Transition for dark mode CSS variables */
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth background transitions */
html, body, 
[data-theme="dark"], 
:root {
  transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
              background-image 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              background 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(to right, var(--bg-gradient-start), var(--bg-gradient-end));
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  position: relative;
  transition: color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #4a2c5a, #1c0a2e);
  opacity: 0;
  z-index: -1;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

[data-theme="dark"] body::before {
  opacity: 1;
}

.wave {
  display: inline-block;
  animation: wave-animation 2s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave-animation {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.hero-heading {
  font-size: 3rem;
}

.white-text {
  color: #ffffff;
}

.purple-text {
  color: #8e44ad;
}

.typewriter {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
}

.cursor {
  font-size: 2.5rem;
  color: #ffffff;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul {
  list-style: none;
}

.about-text {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
}

.view-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border: 2px solid #6a0dad; /* Purple border */
  border-radius: 12px;
  background-color: transparent;
  color: #6a0dad;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 140px;
  max-height: 140px;
}

.view-details-btn:hover {
  transform: translateY(-5px);
  background-color: #6a0dad;
  color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn {
  display: inline-block;
  background: transparent;
  color: #6a0dad;
  padding: 0.8rem 1.5rem;
  border: 2px solid #6a0dad;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
  text-align: center;
}

.btn:hover {
  background: #6a0dad;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(106, 13, 173, 0.5);
  border-color: #6a0dad;
}

/* Dark mode button - lighter purple */
[data-theme="dark"] .btn {
  color: #977dff;
  border-color: #977dff;
  box-shadow: 0 4px 12px rgba(151, 125, 255, 0.2);
}

[data-theme="dark"] .btn:hover {
  background: #977dff;
  border-color: #977dff;
  box-shadow: 0 6px 16px rgba(151, 125, 255, 0.4);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 10px;
}

.section {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section h2 {
  position: relative;
  display: inline-block;
  font-weight: 700;
  text-align: center;
  font-size: 2rem;
  color: #333;
  text-shadow: 2px 2px 4px rgba(151, 125, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode section headings */
[data-theme="dark"] .section h2 {
  color: #e0e6ed;
  text-shadow: 2px 2px 4px rgba(151, 125, 255, 0.3);
}

.section h2::after {
  content: '';
  position: absolute;
  display: block;
  width: 50px;
  height: 4px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #977dff, #8e44ad);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.section h2:hover::after {
    width: 100px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-top: -1rem;
  margin-bottom: 2rem;
  font-weight: 400;
  font-style: italic;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode section subtitle */
[data-theme="dark"] .section-subtitle {
  color: #a0a6b0;
}

/* Header Styles */
header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;

  /* Translucent glass effect */
  background: linear-gradient(
    to right,
    var(--header-bg-start),
    var(--header-bg-end)
  );
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  /* Optional effects */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
}

/* Navbar Brand - Hidden on Desktop */
.navbar-brand {
  display: none;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-brand:active {
  filter: invert(1);
  transform: scale(0.95);
}

[data-theme="dark"] .navbar-brand {
  color: #e0e6ed;
}

[data-theme="dark"] .navbar-brand:active {
  filter: invert(1);
}

/* Navbar Controls Container */
.navbar-controls {
  display: contents;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  color: black;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding-bottom: 4px;
}

.navbar ul li a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 0;
  background-color: black;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar ul li a:hover::after {
  width: 100%;
}

/* Dark mode navbar styles */
[data-theme="dark"] .navbar ul li a {
  color: #e0e6ed;
}

[data-theme="dark"] .navbar ul li a::after {
  background-color: #e0e6ed;
}

[data-theme="dark"] .navbar ul li a:hover {
  color: #977dff;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: absolute;
  right: 2rem;
  background: none;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  width: 45px;
  height: 45px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.dark-mode-toggle i {
  font-size: 1.2rem;
  color: #333;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.dark-mode-toggle.clicked i {
  animation: slideUpOnly 0.4s ease forwards;
}

@keyframes slideUpOnly {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px);
    opacity: 0;
  }
}

/* Dark mode toggle styles */
[data-theme="dark"] .dark-mode-toggle {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dark-mode-toggle i {
  color: #e0e6ed;
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
  width: 45px;
  height: 45px;
  position: relative;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .hamburger {
  border-color: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
  display: block;
  position: absolute;
  height: 3px;
  width: 60%;
  background-color: #333;
  border-radius: 3px;
  opacity: 1;
  left: 20%;
  transition: 0.25s ease-in-out;
}

[data-theme="dark"] .hamburger-line {
  background-color: #e0e6ed;
}

.hamburger-line:nth-child(1) {
  top: 12px;
}

.hamburger-line:nth-child(2) {
  top: 20px;
}

.hamburger-line:nth-child(3) {
  top: 28px;
}

.hamburger.active .hamburger-line:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger.active .hamburger-line:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

/* Hero Section */
.hero {
  background-image: url("images/homebglight.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  color: white;
  transition: background-image 0.5s ease;
}

/* Dark mode hero background */
[data-theme="dark"] .hero {
  background-image: url("images/homebgdark.jpg");
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  z-index: 0;
  transition: background-color 0.5s ease;
}

/* Dark mode hero overlay - darker */
[data-theme="dark"] .hero::before {
  background-color: rgba(0, 0, 0, 0.5);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(151, 125, 255, 0.1),
    rgba(248, 249, 250, 0.2),
    transparent
  );
  transform: translateX(-100%);
  transition: 0.6s ease;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(151, 125, 255, 0.25);
  border-color: rgba(151, 125, 255, 0.3);
  background: var(--card-hover-bg);
}

.project-card:hover::before {
  transform: translateX(100%);
}

.project-card:hover::before {
  transform: translateX(100%);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  padding: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  filter: brightness(0.97);
}

.project-card:hover img {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(151, 125, 255, 0.25);
  filter: brightness(1);
}

.project-card h3 {
  padding: 1rem 1rem 0;
  color: var(--secondary-color);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.project-card:hover h3 {
  color: #8e44ad;
  transform: scale(1.02);
}

.project-card p {
  padding: 0 1rem 1rem;
  color: var(--text-light);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

/* Dark mode project card text */
[data-theme="dark"] .project-card h3 {
  color: #e0e6ed;
}

[data-theme="dark"] .project-card:hover h3 {
  color: #977dff;
}

[data-theme="dark"] .project-card p,
[data-theme="dark"] .project-caption {
  color: #a0a6b0;
}

[data-theme="dark"] .project-caption .tagline {
  color: #8a9199;
}

/* Dark mode button styles */
[data-theme="dark"] .view-details-btn {
  border-color: #b59eff;
  color: #b59eff;
}

[data-theme="dark"] .view-details-btn:hover {
  background-color: #b59eff;
  color: #1c0a2e;
}

.project-card .view-details-btn {
  margin-top: auto;
  margin-bottom: 1rem;
  margin-left: 1rem;
  margin-right: 1rem;
  display: inline-flex;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.card-buttons {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  margin-top: auto;
  padding-bottom: 1rem;
}

.project-caption {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  text-align: left;
  padding: 0 1rem;
  line-height: 1.5;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-caption .caption-text {
  margin-bottom: 0.5rem;
}

.project-caption .tagline {
  display: block;
  margin-top: 0.3rem;
  font-style: italic;
  color: #666;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.see-more-btn {
  background: none;
  border: none;
  color: #977dff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.3rem;
  transition: all 0.3s ease;
  text-decoration: underline;
}

.see-more-btn:hover {
  color: #8e44ad;
  transform: scale(1.05);
}

.caption-short,
.caption-full {
  transition: all 0.3s ease;
}

.caption-full {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill {
  background: #f8f8ff; /* Ghost white for light mode */
  padding: 2rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* Dark mode skill background */
[data-theme="dark"] .skill {
  background: var(--skill-bg);
}

.skill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(151, 125, 255, 0.05), rgba(248, 249, 250, 0.1), transparent);
  transform: translateX(-100%) translateY(-100%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill:hover {
  transform: translateY(-20px) scale(1.05);
  box-shadow: 0 25px 50px rgba(151, 125, 255, 0.25);
  border-color: rgba(151, 125, 255, 0.4);
  background: var(--card-hover-bg);
}

.skill:hover::before {
  transform: translateX(100%) translateY(100%);
}

.skill-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(151, 125, 255, 0.1), rgba(151, 125, 255, 0.05));
  transition: all 0.4s ease;
}

/* Technology-specific icon wrapper backgrounds */
.skill:nth-child(1) .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(227, 79, 38, 0.1), rgba(227, 79, 38, 0.05)); /* HTML5 */
}

.skill:nth-child(2) .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(21, 114, 182, 0.1), rgba(21, 114, 182, 0.05)); /* CSS3 */
}

.skill:nth-child(3) .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(247, 223, 30, 0.1), rgba(247, 223, 30, 0.05)); /* JavaScript */
}

.skill:hover .skill-icon-wrapper {
  transform: scale(1.1);
}

.skill:nth-child(1):hover .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(227, 79, 38, 0.2), rgba(227, 79, 38, 0.1));
  box-shadow: 0 8px 20px rgba(227, 79, 38, 0.2);
}

.skill:nth-child(2):hover .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(21, 114, 182, 0.2), rgba(21, 114, 182, 0.1));
  box-shadow: 0 8px 20px rgba(21, 114, 182, 0.2);
}

.skill:nth-child(3):hover .skill-icon-wrapper {
  background: linear-gradient(135deg, rgba(247, 223, 30, 0.2), rgba(247, 223, 30, 0.1));
  box-shadow: 0 8px 20px rgba(247, 223, 30, 0.2);
}

.skill i {
  font-size: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

/* Original brand colors for technology icons */
.skill .fa-html5 {
  color: #E34F26; /* HTML5 Orange */
}

.skill .fa-css3-alt {
  color: #1572B6; /* CSS3 Blue */
}

.skill .fa-js {
  color: #F7DF1E; /* JavaScript Yellow */
}

.skill:hover i {
  transform: scale(1.1);
  filter: brightness(1.1) saturate(1.2);
}

@keyframes iconBounce {
  0%, 100% {
    transform: scale(1.2) translateY(0) rotate(10deg);
  }
  50% {
    transform: scale(1.2) translateY(-10px) rotate(10deg);
  }
}

.skill h3 {
  margin-bottom: 1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill:hover h3 {
  color: #8e44ad;
  transform: scale(1.05);
}

.skill-level-text {
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
  color: #8e44ad;
  font-size: 1rem;
  padding: 0.3rem 1rem;
  background: linear-gradient(135deg, rgba(151, 125, 255, 0.1), rgba(151, 125, 255, 0.05));
  border-radius: 20px;
  display: inline-block;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(151, 125, 255, 0.2);
}

.skill:hover .skill-level-text {
  color: #977dff;
  background: linear-gradient(135deg, rgba(151, 125, 255, 0.15), rgba(151, 125, 255, 0.08));
  border-color: rgba(151, 125, 255, 0.3);
  transform: scale(1.05);
}

.skill-description {
  font-size: 0.9rem;
  color: #7f8c8d;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
  opacity: 0.8;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill:hover .skill-description {
  color: #666;
  opacity: 1;
  transform: translateY(-2px);
}

/* Education Section */
.education-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.education-item {
  display: flex;
  gap: 2rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 4px solid #6a0dad;
}

.education-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.education-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #977dff, #6a0dad);
  border-radius: 50%;
  flex-shrink: 0;
}

.education-icon.elementary {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.education-icon.highschool {
  background: linear-gradient(135deg, #2196F3, #1565C0);
}

.education-icon.seniorhigh {
  background: linear-gradient(135deg, #977dff, #6a0dad);
}

.education-icon i {
  font-size: 1.8rem;
  color: white;
}

.education-content {
  flex: 1;
}

.education-content h3 {
  font-size: 1.5rem;
  color: #6a0dad;
  margin-bottom: 0.5rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.school-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.3rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.education-year {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  font-style: italic;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.education-description {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode education section */
[data-theme="dark"] .education-content h3 {
  color: #977dff;
}

[data-theme="dark"] .education-item {
  border-left-color: #977dff;
}

/* About Section */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 3rem;
  margin-top: 2rem;
  padding: 2rem;
  text-align: left;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* About Section */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 3rem;
  margin-top: 2rem;
  padding: 2rem;
  text-align: left;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img {
  flex: 0 0 auto;
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(106, 13, 173, 0.2);
  border: 4px solid #977dff;
  transition: all 0.3s ease;
  margin-top: 3.5rem;
}

.profile-img:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 12px 35px rgba(106, 13, 173, 0.3);
  border-color: #6a0dad;
}

.about-text {
  flex: 1;
  min-width: 300px;
  color: black;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #6a0dad;
  font-weight: 700;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text p {
  margin-bottom: 1rem;
  color: black;
  line-height: 1.8;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 1.2rem 2.5rem;
  background: linear-gradient(135deg, #977dff 0%, #6a0dad 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(106, 13, 173, 0.4);
  position: relative;
  overflow: hidden;
  align-self: flex-start;
}

.resume-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.resume-btn:hover::before {
  left: 100%;
}

.resume-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 30px rgba(106, 13, 173, 0.5);
  background: linear-gradient(135deg, #6a0dad 0%, #977dff 100%);
}

.resume-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.resume-btn i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.resume-btn:hover i {
  transform: translateY(2px);
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Dark mode about section */
[data-theme="dark"] .about-text {
  color: #e0e6ed;
}

[data-theme="dark"] .about-text h3 {
  color: #977dff;
}

[data-theme="dark"] .about-text p {
  color: #e0e6ed;
}

[data-theme="dark"] .profile-img {
  border-color: #977dff;
  box-shadow: 0 8px 25px rgba(151, 125, 255, 0.3);
}

[data-theme="dark"] .profile-img:hover {
  border-color: #6a0dad;
  box-shadow: 0 12px 35px rgba(151, 125, 255, 0.4);
}

/* Contact Section */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-top: 2rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form {
  flex: 2;
  min-width: 300px;
  background: var(--contact-form-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(151, 125, 255, 0.15);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #977dff;
    box-shadow: 0 0 0 3px rgba(151, 125, 255, 0.2);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  background: #fff;
  color: #333;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group textarea {
  resize: vertical;
}

/* Dark mode form styles */
.form-group label {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .form-group label {
  color: #e0e6ed;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #2c3238;
  border-color: #404650;
  color: #e0e6ed;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  background: #353b41;
  border-color: #977dff;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: #8a9199;
}

/* Dark mode contact section - grayish backgrounds */
[data-theme="dark"] .contact-form {
  background: #2a2a2a;
}

[data-theme="dark"] .contact-info {
  background: #2a2a2a;
}

/* Dark mode footer - grayish background */
[data-theme="dark"] footer {
  background: #2a2a2a;
}

.contact-info {
  flex: 1;
  min-width: 250px;
  background: var(--secondary-color);
  color: var(--snow-white);
  padding: 2rem;
  border-radius: 8px;
  text-align: left;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.contact-info i {
  margin-right: 1rem;
  width: 20px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  color: var(--snow-white);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: #977dff !important;
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: var(--snow-white);
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Hamburger Menu - Show on Mobile */
  .hamburger {
    display: flex;
  }

  /* Show Brand Name on Mobile */
  .navbar-brand {
    display: block;
    flex: 1;
    text-align: left;
    font-size: 1.8rem;
  }

  /* Navbar Controls - Group buttons on right */
  .navbar-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  /* Navbar mobile styles */
  .navbar {
    padding: 0.8rem 1.2rem;
    justify-content: space-between;
    min-height: 60px;
  }

  /* Larger Hamburger for Mobile */
  .hamburger {
    width: 48px;
    height: 48px;
  }

  .hamburger-line {
    height: 3px;
    width: 55%;
    left: 22.5%;
  }

  .hamburger-line:nth-child(1) {
    top: 14px;
  }

  .hamburger-line:nth-child(2) {
    top: 22px;
  }

  .hamburger-line:nth-child(3) {
    top: 30px;
  }

  .hamburger.active .hamburger-line:nth-child(1) {
    top: 22px;
  }

  .hamburger.active .hamburger-line:nth-child(3) {
    top: 22px;
  }

  /* Mobile Navigation Menu - Horizontal Dropdown */
  .nav-menu {
    position: fixed;
    left: 0;
    top: 60px;
    right: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1rem;
    background: linear-gradient(135deg, rgba(242, 230, 238, 0.95) 0%, rgba(220, 200, 230, 0.95) 50%, rgba(200, 180, 220, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    text-align: center;
    transition: max-height 0.4s ease, padding 0.4s ease;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    padding: 0;
    z-index: 999;
    border-bottom: none;
  }

  /* Dark mode menu background */
  [data-theme="dark"] .nav-menu {
    background: linear-gradient(135deg, rgba(74, 44, 90, 0.95) 0%, rgba(90, 60, 110, 0.95) 50%, rgba(110, 80, 130, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
  }

  .nav-menu.active {
    max-height: 400px;
    padding: 0.6rem 0.2rem !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(151, 125, 255, 0.2);
  }

  [data-theme="dark"] .nav-menu.active {
    border-bottom: 1px solid rgba(151, 125, 255, 0.3);
  }

  .nav-menu li {
    margin: 0;
    width: 50%;
    min-width: 140px;
  }

  .nav-menu li a {
    display: block;
    padding: 0.3rem 0.4rem !important;
    width: 100%;
    color: #333;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(240, 230, 250, 0.5) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .nav-menu li a i {
    font-size: 1.1rem;
    margin-right: 0.2rem;
    display: inline-block;
  }

  .nav-menu li a:hover {
    background: rgba(151, 125, 255, 0.4);
    transform: scale(1.05);
  }

  .nav-menu li a::after {
    display: none;
  }

  [data-theme="dark"] .nav-menu li a {
    color: #e0e6ed;
    background: linear-gradient(135deg, rgba(100, 80, 130, 0.4) 0%, rgba(120, 100, 150, 0.5) 100%);
    border: 1px solid rgba(151, 125, 255, 0.3);
  }

  .dark-mode-toggle {
    position: relative;
    right: auto;
    width: 48px;
    height: 48px;
  }

  .dark-mode-toggle i {
    font-size: 1.2rem;
  }

  /* Hero section mobile adjustments */
  .hero {
    padding: 1rem;
    min-height: 90vh;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  .hero-heading {
    font-size: 2rem;
  }

  .typewriter {
    font-size: 1.8rem;
  }

  .cursor {
    font-size: 1.8rem;
  }

  /* Section padding adjustments */
  .section {
    padding: 2rem 1rem;
  }

  .section h2 {
    font-size: 1.8rem;
  }

  /* Projects grid mobile */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .project-card {
    margin: 0 auto;
    max-width: 100%;
  }

  .card-buttons {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .view-details-btn {
    max-width: 200px;
    width: 100%;
    text-align: center;
  }

  /* Tech Stack section mobile */
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .skill {
    padding: 1.5rem 1rem;
  }

  .skill-icon-wrapper {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .skill i {
    font-size: 2rem;
  }

  .skill-level-text {
    font-size: 0.9rem;
    padding: 0.25rem 0.8rem;
  }

  .skill-description {
    font-size: 0.85rem;
  }

  /* Education section mobile */
  .education-container {
    padding: 1rem 0.5rem;
  }

  .education-item {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
  }

  .education-icon {
    margin: 0 auto;
  }

  .education-content h3 {
    font-size: 1.3rem;
  }

  .school-name {
    font-size: 1rem;
  }

  .education-year {
    font-size: 0.9rem;
  }

  .education-description {
    font-size: 0.95rem;
  }

  /* About section mobile */
  .about-content {
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    text-align: center;
  }

  .profile-img {
    width: 200px;
    height: 200px;
    max-width: 200px;
    margin: 0 auto;
    object-fit: cover;
  }

  .about-text {
    min-width: 100%;
    text-align: left;
  }

  /* Contact section mobile */
  .contact-container {
    flex-direction: column;
    gap: 2rem;
  }

  .contact-form,
  .contact-info {
    min-width: 100%;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .contact-info {
    padding: 1.5rem;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Additional mobile styles for smaller screens */
@media (max-width: 480px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-controls {
    gap: 0.5rem;
  }

  .hamburger {
    width: 44px;
    height: 44px;
  }

  .hamburger-line {
    height: 3px;
    width: 55%;
    left: 22.5%;
  }

  .hamburger-line:nth-child(1) {
    top: 13px;
  }

  .hamburger-line:nth-child(2) {
    top: 20px;
  }

  .hamburger-line:nth-child(3) {
    top: 27px;
  }

  .hamburger.active .hamburger-line:nth-child(1) {
    top: 20px;
  }

  .hamburger.active .hamburger-line:nth-child(3) {
    top: 20px;
  }

  .navbar {
    padding: 0.8rem 1rem;
    min-height: 56px;
  }

  .nav-menu {
    top: calc(56px + 1px);
    margin-top: -1px;
  }

  .nav-menu.active {
    max-height: 450px;
    padding: 1.2rem 0.8rem;
  }

  .nav-menu li {
    width: 50%;
    min-width: 130px;
  }

  .nav-menu li a {
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
  }

  .nav-menu li a i {
    font-size: 1rem;
    margin-right: 0.5rem;
  }

  .dark-mode-toggle {
    width: 44px;
    height: 44px;
  }

  .dark-mode-toggle i {
    font-size: 1.1rem;
  }

  .hero {
    padding: 0.5rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-heading {
    font-size: 1.5rem;
  }

  .typewriter {
    font-size: 1.4rem;
  }

  .cursor {
    font-size: 1.4rem;
  }

  .section {
    padding: 1.5rem 0.5rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .view-details-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
  }

  .project-card {
    padding: 0.5rem;
  }

  .project-card h3 {
    font-size: 1.1rem;
    padding: 0.8rem 0.8rem 0;
  }

  .project-card p {
    padding: 0 0.8rem 0.8rem;
    font-size: 0.9rem;
  }

  .project-caption {
    padding: 0 0.8rem;
    font-size: 0.8rem;
  }

  .see-more-btn {
    font-size: 0.75rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .skill {
    padding: 1.2rem 0.8rem;
  }

  .skill-icon-wrapper {
    padding: 0.6rem;
    margin-bottom: 0.8rem;
  }

  .skill i {
    font-size: 1.8rem;
  }

  .skill h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }

  .skill-level-text {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.6rem;
  }

  .skill-description {
    font-size: 0.8rem;
  }

  .contact-form,
  .contact-info {
    padding: 1rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .contact-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .social-links a {
    font-size: 1.3rem;
  }

  footer {
    padding: 1.5rem;
    font-size: 0.9rem;
  }
}

/* Extra mobile optimization for touch targets */
@media (max-width: 360px) {
  .navbar ul li a {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-heading {
    font-size: 1.3rem;
  }

  .typewriter {
    font-size: 1.2rem;
  }

  .cursor {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .view-details-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(151, 125, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #977dff, #8e44ad);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8e44ad, #977dff);
    border: 2px solid transparent;
    background-clip: content-box;
}