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

/* CSS Variables for theming */
:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-gradient-start: #f1f5f9;
  --bg-gradient-mid: #e2e8f0;
  --bg-gradient-end: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-secondary: #1d4ed8;
  --accent-light: #60a5fa;
  --border-color: rgba(59, 130, 246, 0.2);
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-bg-hover: rgba(248, 250, 252, 0.95);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --shadow-color: rgba(59, 130, 246, 0.15);
  --overlay-gradient-1: rgba(59, 130, 246, 0.05);
  --overlay-gradient-2: rgba(99, 102, 241, 0.03);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-gradient-start: #0f172a;
    --bg-gradient-mid: #1e293b;
    --bg-gradient-end: #0f172a;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-light: #60a5fa;
    --border-color: rgba(59, 130, 246, 0.3);
    --card-bg: rgba(15, 27, 46, 0.8);
    --card-bg-hover: rgba(26, 41, 66, 0.9);
    --nav-bg: rgba(10, 22, 40, 0.85);
    --shadow-color: rgba(59, 130, 246, 0.4);
    --overlay-gradient-1: rgba(59, 130, 246, 0.1);
    --overlay-gradient-2: rgba(99, 102, 241, 0.08);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-mid) 50%,
    var(--bg-gradient-end) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes gradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 30%,
      var(--overlay-gradient-1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      var(--overlay-gradient-2) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

/* Navigation Bar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
  position: fixed;
  left: 20px;
  top: 15px;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.nav-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-light);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
  transform: scale(1.1);
}

body {
  padding-top: 70px;
}

@keyframes gradientShift {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2) rotate(5deg);
  }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 80px;
  animation: fadeInDown 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: center;
}

.logo {
  width: 80px;
  height: 80px;
  position: relative;
  display: block;
  animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1),
    logoFloat 4s ease-in-out infinite;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(-20px) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

.logo::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(
    45deg,
    #0a1628,
    #1d4ed8,
    #3b82f6,
    #1e3a8a,
    #0a1628
  );
  background-size: 400% 400%;
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  animation: gradientRotate 8s ease infinite;
  filter: blur(20px);
  transition: opacity 0.5s ease;
}

@keyframes gradientRotate {
  0%,
  100% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 0% 100%;
  }
}

.logo:hover::before {
  opacity: 0.8;
}

.logo::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.4) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  border-radius: 50%;
  animation: logoPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes logoPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.logo-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover .logo-inner {
  transform: scale(1.1) rotate(10deg);
}

.logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
  transition: filter 0.3s ease;
}

.logo:hover .logo-inner img {
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 1)) brightness(1.2);
}

h1 {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #1e3a8a 20%,
    #3b82f6 40%,
    #60a5fa 60%,
    #1d4ed8 80%,
    #0a1628 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  animation: nameGradient 8s ease-in-out infinite,
    nameFloat 3s ease-in-out infinite;
  background-size: 300% 300%;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  letter-spacing: 2px;
}

@keyframes nameGradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

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

h1::before {
  content: "Aarav Puri";
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #1e3a8a 20%,
    #3b82f6 40%,
    #60a5fa 60%,
    #10b981 80%,
    #3b82f6 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 300%;
  animation: nameGradient 8s ease-in-out infinite reverse;
  filter: blur(15px);
  opacity: 0.5;
  z-index: -1;
}

.subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 300;
  height: 30px;
  animation: fadeIn 1.5s ease 0.3s backwards;
}

.typing-text {
  display: inline;
  color: var(--accent-light);
  font-weight: 500;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2rem;
  background-color: var(--accent-light);
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: middle;
}

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

.profile-section {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 80px;
  animation: fadeInLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: translateY(-8px);
}

.profile-img-inner {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  overflow: hidden;
}

.profile-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-text {
  flex: 1;
}

.intro-text p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: var(--text-secondary);
  animation: fadeIn 1s ease backwards;
}

.intro-text p:first-child {
  animation-delay: 0.6s;
}
.intro-text p:last-child {
  animation-delay: 0.8s;
}

section {
  margin-bottom: 60px;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

section:nth-child(3) {
  animation-delay: 0.5s;
}
section:nth-child(4) {
  animation-delay: 0.6s;
}
section:nth-child(5) {
  animation-delay: 0.7s;
}
section:nth-child(6) {
  animation-delay: 0.8s;
}
section:nth-child(7) {
  animation-delay: 0.9s;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

h2::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.5) 0%,
    transparent 100%
  );
  margin-left: 20px;
}

.emoji {
  font-size: 2rem;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 25px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.15),
    transparent
  );
  transition: left 0.6s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  background: var(--card-bg-hover);
  box-shadow: 0 20px 60px var(--shadow-color), 0 0 40px rgba(96, 165, 250, 0.3);
  border-color: var(--accent-primary);
}

.card h3 {
  color: var(--accent-light);
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 600;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.highlight {
  color: var(--accent-light);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

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

.card:hover .highlight::after {
  width: 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.15),
    transparent
  );
  transition: left 0.6s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.03);
  background: var(--card-bg-hover);
  box-shadow: 0 20px 60px var(--shadow-color), 0 0 40px rgba(96, 165, 250, 0.3);
  border-color: var(--accent-primary);
}

.project-card h3 {
  color: var(--accent-light);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.project-card .tagline {
  color: var(--accent-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  font-style: italic;
}

.project-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

.feature {
  background: rgba(59, 130, 246, 0.1);
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.feature-icon {
  font-size: 1.3rem;
  margin-right: 8px;
}

.project-stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-cta {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 12px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.project-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
}

.new-dot {
  width: 8px;
  height: 8px;
  background: #2fff00;
  border-radius: 50%;
  box-shadow: 0 0 10px #2fff00;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.skill-item {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(29, 78, 216, 0.1) 100%
  );
  padding: 20px 25px;
  border-radius: 15px;
  border-left: 4px solid #3b82f6;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(59, 130, 246, 0.2);
  transition: width 0.4s ease;
}

.skill-item:hover::before {
  width: 100%;
}

.skill-item:hover {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.25) 0%,
    rgba(29, 78, 216, 0.2) 100%
  );
  transform: translateX(10px);
  border-left-color: var(--accent-light);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.skill-item strong {
  position: relative;
  z-index: 1;
  color: var(--accent-light);
}

footer {
  margin-top: 100px;
  padding-top: 50px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  animation: fadeIn 1.5s ease 1s backwards;
}

.footer-circle {
  width: 140px;
  height: 140px;
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  animation: pulse 3s ease-in-out infinite;
}

.footer-logo {
  width: 30px;
  height: 30px;
  display: block;
  transition: transform 0.3s ease;
}

.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
}

.footer-circle:hover .footer-logo {
  transform: scale(1.2) rotate(10deg);
}

.footer-circle:hover .footer-logo img {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 1));
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
  }
}

.footer-circle::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8, #60a5fa);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.footer-circle:hover::before {
  opacity: 1;
  animation: rotateBorder 2s linear infinite;
}

@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.footer-circle:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.6);
}

.footer-circle p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  transition: color 0.3s ease;
}

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

.footer-circle a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-circle:hover a {
  color: var(--accent-light);
  transform: scale(1.1);
}

.links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.links a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  padding: 5px 10px;
}

.links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-light)
  );
  transition: width 0.4s ease;
}

.links a:hover::before {
  width: 100%;
}

.links a:hover {
  color: var(--accent-light);
  transform: translateY(-5px);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 40px 15px;
  }

  .nav-container {
    height: 60px;
  }

  .nav-logo-text {
    font-size: 1.1rem;
  }

  .nav-logo-img {
    width: 35px;
    height: 35px;
  }

  .mobile-menu-btn {
    display: block;
    position: fixed;
    right: 20px;
    top: 10px;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 10px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-end;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    width: auto;
    justify-content: flex-end;
    padding: 14px 20px;
    font-size: 1rem;
  }

  body {
    padding-top: 60px;
  }

  header {
    margin-bottom: 50px;
  }

  h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
  }

  h1::before {
    display: none;
  }

  .subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }

  .cursor {
    height: 1rem;
  }

  .profile-section {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    margin-bottom: 50px;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  .intro-text p {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.8rem;
    gap: 10px;
  }

  h2::after {
    display: none;
  }

  .emoji {
    font-size: 1.5rem;
  }

  section {
    margin-bottom: 40px;
  }

  .card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card {
    padding: 20px;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-features {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature {
    padding: 10px;
  }

  .project-stats {
    flex-direction: column;
    gap: 15px;
  }

  .project-cta {
    width: 100%;
    text-align: center;
  }

  .skill-item {
    padding: 15px 20px;
  }

  .ring {
    width: 110px;
    height: 110px;
    margin: 25px auto;
  }

  .ring p {
    font-size: 0.72em;
  }

  .links {
    flex-direction: column;
    gap: 20px;
  }

  .links a {
    font-size: 1rem;
  }

  footer {
    margin-top: 60px;
    padding-top: 40px;
  }

  .card:hover,
  .project-card:hover,
  .skill-item:hover {
    transform: translateY(-5px) scale(1.01);
  }

  .action-buttons {
    justify-content: center;
  }

  /* Simplify some animations for mobile performance */
  .profile-img {
    animation: fadeInLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
  }

  body::before {
    animation: none;
  }
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 10px;
}

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

.form-group label {
  color: var(--accent-light);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: var(--accent-primary);
  background: var(--card-bg-hover);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  background: var(--card-bg-hover);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px var(--shadow-color);
  transform: translateY(-2px);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.contact-form .btn-primary {
  margin-top: 10px;
  padding: 16px 32px;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-form .btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

.contact-form .btn-primary:active {
  transform: translateY(-2px);
}

/* n8n Chat Widget Customization */
#n8n-chat {
  z-index: 9999;
}

/* Simple direct button styling */
#n8n-chat button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  border: none !important;
}

#n8n-chat button:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  h2 {
    font-size: 1.5rem;
  }

  .card,
  .project-card {
    padding: 15px;
  }

  .project-stats {
    padding: 10px 0;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .ring {
    width: 100px;
    height: 100px;
    margin: 20px auto;
  }

  .ring p {
    font-size: 0.7em;
  }
}

/* Additional chat widget styling with higher specificity */
body #n8n-chat button,
body div[id*="n8n"] button,
body .n8n-chat-widget button {
  background-color: #3b82f6 !important;
  background-image: linear-gradient(
    135deg,
    #3b82f6 0%,
    #1d4ed8 100%
  ) !important;
}

body #n8n-chat button:hover,
body div[id*="n8n"] button:hover,
body .n8n-chat-widget button:hover {
  background-color: #60a5fa !important;
  background-image: linear-gradient(
    135deg,
    #60a5fa 0%,
    #3b82f6 100%
  ) !important;
}

.ring {
    margin: 30px auto;
    position: relative;
    width: 120px; 
    height: 120px; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.ring1, .ring2 {
    position: absolute;
    inset: 0;
    border-radius: 40%;
    animation-timing-function: ease-in-out;
}

.ring1 {
    border: 3px solid #337aff;
    border-radius: 41% 71% 57% 35% / 38% 51% 64% 49%; 
    animation: animate 20s linear infinite;
}

.ring2 {
    border: 3px solid #01238b;
    animation: animate2 15s linear infinite;
}

.ring p {
    font-size: 0.75em;
    line-height: 1.3;
    margin: 0;
    color: var(--text-muted);
}

.ring a {
    position: relative;
    z-index: 10;
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ring a:hover {
    color: var(--accent-light);
    transform: scale(1.05);
}

@keyframes animate {
    from {transform: rotate(0deg)}
    to {transform: rotate(360deg)}
}

@keyframes animate2 {
    from {transform: rotate(360deg)}
    to {transform: rotate(0deg)}
}
