/* Skip to Main Content Link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 1em;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
}

.skip-link:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 20px;
}

/* Reset and Base Styles */
:root {
  --primary-color: #14b8a6;
  /* Teal/Cyan accent */
  --secondary-color: #27272a;
  /* Darker background */
  --bg-color: #18181b;
  /* Main background */
  --text-color: #e4e4e7;
  /* Light text */
  --text-muted: #a1a1aa;
  /* Muted text */
  --border-color: #3f3f46;
  --card-bg: #27272a;
}

/* Light Theme */
[data-theme="light"] {
  --primary-color: #14b8a6;
  --secondary-color: #f4f4f5;
  --bg-color: #ffffff;
  --text-color: #18181b;
  --text-muted: #52525b;
  --border-color: #e4e4e7;
  --card-bg: #fafafa;
}

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

/* Global Image Responsiveness */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  transition: background-color 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  /* Prevent horizontal scroll from animations */
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Animated Background Elements */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.code-symbol {
  position: absolute;
  font-family: 'Courier New', 'Monaco', monospace;
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0.15;
  animation: floatSymbol 20s infinite ease-in-out;
  text-shadow: 0 0 10px rgba(20, 184, 166, 0.3);
  user-select: none;
}

[data-theme="light"] .code-symbol {
  opacity: 0.1;
  color: var(--primary-color);
}

.symbol-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.symbol-2 {
  top: 20%;
  right: 10%;
  animation-delay: 2s;
  animation-duration: 22s;
}

.symbol-3 {
  top: 40%;
  left: 8%;
  animation-delay: 4s;
  animation-duration: 28s;
}

.symbol-4 {
  top: 60%;
  right: 15%;
  animation-delay: 1s;
  animation-duration: 24s;
}

.symbol-5 {
  top: 80%;
  left: 12%;
  animation-delay: 3s;
  animation-duration: 26s;
}

.symbol-6 {
  top: 15%;
  left: 50%;
  animation-delay: 5s;
  animation-duration: 23s;
}

.symbol-7 {
  top: 50%;
  right: 5%;
  animation-delay: 2.5s;
  animation-duration: 27s;
}

.symbol-8 {
  top: 70%;
  left: 30%;
  animation-delay: 1.5s;
  animation-duration: 25s;
}

.symbol-9 {
  top: 30%;
  right: 30%;
  animation-delay: 4.5s;
  animation-duration: 24s;
}

.symbol-10 {
  top: 90%;
  right: 25%;
  animation-delay: 3.5s;
  animation-duration: 26s;
}

@keyframes floatSymbol {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.15;
  }
  25% {
    transform: translate(30px, -50px) rotate(90deg);
    opacity: 0.2;
  }
  50% {
    transform: translate(-20px, -100px) rotate(180deg);
    opacity: 0.1;
  }
  75% {
    transform: translate(40px, -50px) rotate(270deg);
    opacity: 0.2;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.15;
  }
}

.tech-logo {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0.12;
  animation: floatLogo 30s infinite ease-in-out;
  filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.2));
  user-select: none;
}

[data-theme="light"] .tech-logo {
  opacity: 0.08;
}

.tech-logo svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.tech-logo:hover {
  opacity: 0.25;
  transform: scale(1.2);
}

.logo-1 {
  top: 15%;
  left: 20%;
  animation-delay: 0s;
  animation-duration: 35s;
}

.logo-2 {
  top: 35%;
  right: 20%;
  animation-delay: 5s;
  animation-duration: 32s;
}

.logo-3 {
  top: 55%;
  left: 15%;
  animation-delay: 10s;
  animation-duration: 38s;
}

.logo-4 {
  top: 25%;
  right: 15%;
  animation-delay: 3s;
  animation-duration: 33s;
}

.logo-5 {
  top: 75%;
  left: 25%;
  animation-delay: 7s;
  animation-duration: 36s;
}

.logo-6 {
  top: 45%;
  right: 30%;
  animation-delay: 12s;
  animation-duration: 34s;
}

@keyframes floatLogo {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.12;
  }
  25% {
    transform: translate(50px, -80px) rotate(90deg) scale(1.1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-40px, -150px) rotate(180deg) scale(0.9);
    opacity: 0.1;
  }
  75% {
    transform: translate(60px, -80px) rotate(270deg) scale(1.1);
    opacity: 0.15;
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
    opacity: 0.12;
  }
}

/* Ensure content is above background */
section,
header,
footer {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: transform 0.6s ease-out;
  transition-delay: 0.3s;
}

section h2.revealed::after {
  transform: translateX(-50%) scaleX(1);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

section {
  padding: 80px 0;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 44px;
  word-wrap: break-word;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: translateY(-3px) scale(1.05);
  text-decoration: none;
  box-shadow: 0 5px 20px rgba(20, 184, 166, 0.4);
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(3px);
}

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

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  animation: slideDownHeader 0.6s ease-out;
}

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

[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

.logo {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
  line-height: 0;
}

.logo-image {
  height: 50px;
  width: auto;
  max-width: 100%;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(1) contrast(1);
  object-fit: contain;
}

.logo:hover .logo-image {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.1) drop-shadow(0 4px 8px rgba(20, 184, 166, 0.4));
}

/* Light theme adjustments */
[data-theme="light"] .logo-image {
  filter: brightness(0.9) contrast(1.1);
}

[data-theme="light"] .logo:hover .logo-image {
  filter: brightness(1) contrast(1.2) drop-shadow(0 4px 8px rgba(20, 184, 166, 0.3));
}

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

.nav-links li {
  margin-left: 25px;
}

.navbar .theme-toggle {
  margin-left: 25px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

/* Hero Section */
#hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(-45deg,
      var(--bg-color),
      var(--secondary-color),
      var(--primary-color),
      var(--secondary-color));
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
  position: relative;
  padding: 70px 20px 20px;
  box-sizing: border-box;
  overflow: hidden;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hero-content {
  max-width: 900px;
  z-index: 1;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero-content > * {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  animation: floatBadge 3s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

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

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  animation-delay: 0.2s;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.hero-content h1 span.highlight {
  color: var(--primary-color);
}

.typing-text {
  display: inline;
  white-space: normal;
}

.typing-name {
  display: inline;
  color: var(--primary-color);
  word-break: break-word;
  overflow-wrap: break-word;
}

.typing-cursor {
  display: inline-block;
  margin-left: 3px;
  color: var(--primary-color);
  font-weight: 300;
  animation: blink 1s infinite;
  vertical-align: baseline;
}

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

.hero-role {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
  animation-delay: 0.5s;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
  animation: pulseNumber 2s ease-in-out infinite;
}

@keyframes pulseNumber {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--card-bg);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.scroll-down {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.5s forwards;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* Modern Arrow SVG Component */
.modern-arrow {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  flex-shrink: 0;
}

.modern-arrow .arrow-path {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-arrow.arrow-down {
  animation: arrowBounce 2s infinite;
}

.scroll-down:hover .modern-arrow {
  animation: arrowBounceHover 1s infinite;
  transform: translateY(3px);
}

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

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

/* Floating Hire Me Button for Mobile */
.floating-hire-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 20px;
  border-radius: 50px;
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  animation: pulseFloat 3s ease-in-out infinite;
}

.floating-hire-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 25px rgba(20, 184, 166, 0.6);
  color: #fff;
  text-decoration: none;
}

.floating-hire-btn i {
  font-size: 1.1rem;
}

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

@media (max-width: 768px) {
  .floating-hire-btn {
    display: flex;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}


/* About Section */
#about {
  background-color: var(--secondary-color);
}

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.about-image {
  flex-basis: 35%;
  text-align: center;
  position: relative;
}

.character-container {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.character-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 3s ease-in-out infinite;
  z-index: 0;
}

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

.developer-character {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(20, 184, 166, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
  animation: characterFloat 4s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(13, 148, 136, 0.1));
  padding: 10px;
  border: 3px solid transparent;
  object-fit: cover;
  display: block;
}

/* Video element styling - ensure video inherits all styles */
.developer-character video {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  box-shadow: inherit;
  transition: inherit;
  animation: inherit;
}

@keyframes characterFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(1deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-1deg);
  }
}

.about-image:hover .developer-character {
  transform: translateY(-10px) scale(1.05) rotate(2deg);
  box-shadow: 0 20px 50px rgba(20, 184, 166, 0.5);
  border-color: var(--primary-color);
  animation: none;
}

.about-image:hover .character-glow {
  animation: pulseGlow 1s ease-in-out infinite;
  opacity: 1;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.code-icon {
  position: absolute;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  opacity: 0;
  animation: floatCode 6s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

.code-1 {
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.code-2 {
  top: 60%;
  right: -10%;
  animation-delay: 2s;
}

.code-3 {
  bottom: 10%;
  left: 50%;
  animation-delay: 4s;
}

@keyframes floatCode {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  10%, 90% {
    opacity: 0.7;
    transform: translateY(-20px) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-40px) scale(1.2);
  }
}

.about-image:hover .code-icon {
  opacity: 1;
  animation-duration: 3s;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.about-text {
  flex-basis: 65%;
}

.about-text h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.about-text ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.about-text ul li {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

.about-text ul li strong {
  color: var(--text-color);
  min-width: 100px;
  display: inline-block;
}

/* Skills Section */
#skills {
  background-color: var(--secondary-color);
  padding: 5rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-category {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

.skill-category:hover {
  /* transform: translateY(-8px) scale(1.02); */
  /* box-shadow: 0 12px 30px rgba(20, 184, 166, 0.2); */
  /* border-color: var(--primary-color); */
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.2);
  border-top-color: var(--primary-color);
}

.skill-category h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.skill-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.skill-list li {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  color: var(--text-color);
  padding-left: 1.2rem;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInSkill 0.6s ease forwards;
  transition: transform 0.3s ease, color 0.3s ease;
}

.skill-list li:hover {
  transform: translateX(5px);
  color: var(--primary-color);
}

.skill-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  animation: checkmarkPop 0.5s ease forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
}

@keyframes slideInSkill {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}


/* Experience Section */
#experience {
  background-color: var(--secondary-color);
}

.experience-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.experience-timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.experience-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.experience-item::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  right: -9px;
  background-color: var(--bg-color);
  border: 4px solid var(--primary-color);
  top: 20px;
  border-radius: 50%;
  z-index: 1;
}

.experience-item.left {
  left: 4px;
}

.experience-item.right {
  left: 50%;
}

.experience-item.right::after {
  left: -12px !important;
}

.experience-content {
  padding: 20px 30px;
  background-color: var(--card-bg);
  position: relative;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  border-top: 3px solid transparent;
}

.experience-content:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.2);
  border-top-color: var(--primary-color);
}

.experience-content h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-top: 0;
}

.experience-content .date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.experience-content ul {
  list-style-type: disc;
  padding-left: 20px;
  color: var(--text-muted);
}

.experience-content ul li {
  margin-bottom: 0.5rem;
}

/* Education Section */
.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.education-card {
  display: flex;
  align-items: flex-start;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 2rem;
  gap: 1.5rem;
  position: relative;
  transition: box-shadow 0.2s;
}

[data-theme="light"] .education-card {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.education-card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.edu-icon {
  font-size: 2.5rem;
  color: var(--primary-color, #4f46e5);
  margin-top: 0.2rem;
  transition: transform 0.4s ease, color 0.3s ease;
}

.education-card:hover .edu-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--primary-color);
}


.edu-details h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.edu-institute {
  display: block;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.edu-date {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.edu-cgpa {
  display: inline-block;
  background: var(--border-color);
  color: var(--text-color);
  border-radius: 6px;
  padding: 0.2rem 0.7rem;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

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

.portfolio-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  position: relative;
  border-top: 3px solid transparent;
}


.portfolio-item:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.2);
  border-top-color: var(--primary-color);
}

.portfolio-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.portfolio-info {
  padding: 20px;
}

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

.portfolio-info p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.portfolio-info .tech-stack {
  margin-bottom: 1rem;
}

.portfolio-info .tech-stack span {
  display: inline-block;
  background-color: var(--border-color);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 5px;
  margin-bottom: 5px;
}

.portfolio-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Professional Portfolio Button */
.btn-portfolio {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d9488 100%);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
  cursor: pointer;
  z-index: 1;
  min-height: 44px;
}

.btn-portfolio::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: 0;
}

.btn-portfolio:hover::before {
  left: 100%;
}

.btn-portfolio::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary-color), #06b6d4, var(--primary-color));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-portfolio:hover::after {
  opacity: 1;
}

.btn-portfolio .btn-icon,
.btn-portfolio .btn-text,
.btn-portfolio .btn-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.btn-portfolio .btn-icon {
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.btn-portfolio .btn-text {
  letter-spacing: 0.3px;
}

.btn-portfolio .btn-arrow {
  display: flex;
  align-items: center;
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-portfolio .btn-arrow svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.btn-portfolio:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
  background: linear-gradient(135deg, #0d9488 0%, var(--primary-color) 100%);
  color: #fff;
  text-decoration: none;
}

.btn-portfolio:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-portfolio:hover .btn-icon {
  transform: scale(1.1);
}

.btn-portfolio:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.btn-portfolio:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Dark mode adjustments */
[data-theme="light"] .btn-portfolio {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d9488 100%);
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.25);
}

[data-theme="light"] .btn-portfolio:hover {
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn-portfolio {
    padding: 10px 20px;
    font-size: 0.9rem;
    gap: 8px;
  }
  
  .btn-portfolio .btn-icon {
    font-size: 0.9rem;
  }
  
  .btn-portfolio .btn-arrow {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .btn-portfolio {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
}

/* Contact Section */
#contact {
  position: relative;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-color) 100%);
  padding: 80px 0;
  overflow: hidden;
}

/* Contact Background Animation */
.contact-background-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--primary-color);
  opacity: 0.1;
  animation: floatParticle 20s infinite ease-in-out;
}

.particle-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.particle-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 30s;
}

.particle-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 28s;
}

.particle-4 {
  width: 50px;
  height: 50px;
  top: 30%;
  right: 30%;
  animation-delay: 1s;
  animation-duration: 22s;
}

.particle-5 {
  width: 70px;
  height: 70px;
  bottom: 40%;
  right: 10%;
  animation-delay: 3s;
  animation-duration: 26s;
}

@keyframes floatParticle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.1;
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-30px, -100px) scale(0.9);
    opacity: 0.08;
  }
  75% {
    transform: translate(40px, -50px) scale(1.05);
    opacity: 0.12;
  }
}

/* Celebration Confetti */
#celebration-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  top: -10px;
  animation: confettiFall 3s linear forwards;
  border-radius: 2px;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti-burst {
  position: absolute;
  border-radius: 2px;
  animation: confettiBurst 1.5s ease-out forwards;
}

@keyframes confettiBurst {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--burst-x, 100px)), calc(-50% + var(--burst-y, 100px))) scale(1) rotate(720deg);
    opacity: 0;
  }
}

/* Button Sending State */
.contact-form .btn.sending {
  animation: pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(20, 184, 166, 0);
  }
}

.contact-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.contact-info {
  flex: 1;
  text-align: left;
  position: relative;
  padding: 30px;
  background: rgba(20, 184, 166, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(20, 184, 166, 0.1);
  transition: all 0.3s ease;
}

.contact-info:hover {
  background: rgba(20, 184, 166, 0.05);
  border-color: rgba(20, 184, 166, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.1);
}

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
  position: relative;
  display: inline-block;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.contact-info h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.5s ease;
}

.contact-info:hover h3::after {
  width: 100%;
}

.contact-info p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  padding: 12px 15px;
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.02);
  transition: all 0.3s ease;
  cursor: pointer;
  flex-wrap: wrap;
  gap: 10px;
}

.info-item:hover {
  transform: translateX(8px);
  background: rgba(20, 184, 166, 0.08);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.info-item i {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-right: 15px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.info-item:hover i {
  transform: scale(1.15) rotate(10deg);
  background: rgba(20, 184, 166, 0.2);
  box-shadow: 0 4px 10px rgba(20, 184, 166, 0.3);
}

.info-item a {
  color: var(--text-color);
  transition: color 0.3s ease;
  word-break: break-all;
  overflow-wrap: break-word;
  hyphens: auto;
  flex: 1;
  min-width: 0;
}

.info-item a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 1.5rem;
}

.social-links a {
  font-size: 1.8rem;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: inline-block;
  animation: socialIconFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--social-index, 0) * 0.2s);
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-5px) scale(1.2) rotate(5deg);
}

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

.contact-form {
  flex: 1;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 15px 12px;
  border: 2px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
  transform: translateY(-2px);
}

.contact-form input.focused,
.contact-form textarea.focused {
  border-color: var(--primary-color);
  padding-top: 20px;
  padding-bottom: 8px;
}

/* Floating Labels */
.form-group {
  position: relative;
}

.floating-label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2;
  background: var(--bg-color);
  padding: 0 5px;
  white-space: nowrap;
  max-width: calc(100% - 30px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-group textarea + .floating-label {
  top: 20px;
  transform: none;
}

.contact-form input:focus + .floating-label,
.contact-form textarea:focus + .floating-label,
.floating-label.active {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

.form-group textarea:focus + .floating-label,
.form-group textarea + .floating-label.active {
  top: 0;
  transform: translateY(-50%);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
}

.contact-form .btn {
  align-self: flex-start;
  padding: 14px 35px;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.contact-form .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.contact-form .btn:hover::before {
  width: 300px;
  height: 300px;
}

.contact-form .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.4);
}

/* Form Message Styling */
#form-message {
  margin-top: 15px;
  font-size: 0.95rem;
  text-align: center;
  padding: 12px 20px;
  border-radius: 8px;
  animation: slideInUp 0.5s ease;
  font-weight: 500;
}

#form-message i {
  margin-right: 8px;
  font-size: 1.1rem;
}

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

/* Blog Section */
.repo-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  text-decoration: none;
  border-radius: 5px;
  width: 140px;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.repo-button:hover {
  background-color: var(--secondary-color);
}

.tech-tag {
  background-color: var(--border-color);
  color: var(--text-color);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 6px;
  display: inline-block;
}

/* Scroll Animation Styles */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s cubic-bezier(0.645, 0.045, 0.355, 1),
    transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
  transition-delay: var(--anim-delay, 0s);
}

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

/* Responsive Design */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1200px;
  }
  
  .hero-content {
    max-width: 1000px;
  }
}

/* Desktop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .container {
    max-width: 1100px;
  }
}

/* Tablet Landscape (992px - 1023px) */
@media (max-width: 1023px) and (min-width: 992px) {
  .container {
    width: 95%;
  }
}

@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: 65px;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - 65px);
    background: var(--secondary-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .nav-links li {
    margin: 18px 0;
    margin-left: 0;
  }

  .navbar .theme-toggle {
    margin-left: 0;
    position: fixed;
    top: 20px;
    right: 60px;
    z-index: 1001;
  }
  
  .navbar {
    padding: 0 10px;
  }
  
  .logo {
    flex-shrink: 0;
  }

  .menu-toggle {
    display: block;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .about-content,
  .contact-content {
    flex-direction: column;
    gap: 2rem;
  }

  .about-image,
  .about-text,
  .contact-info,
  .contact-form {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }

  .character-container {
    max-width: 280px;
  }

  .developer-character {
    padding: 8px;
  }

  .code-icon {
    font-size: 1.2rem;
  }

  .about-image {
    margin-bottom: 1.5rem;
  }

  .character-container {
    max-width: 280px;
  }

  .developer-character {
    padding: 8px;
  }

  .code-icon {
    font-size: 1.2rem;
  }

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

  .experience-timeline {
    max-width: 100%;
  }

  .experience-item {
    width: 100%;
    padding-left: 40px;
    padding-right: 10px;
    left: 0 !important;
    margin-bottom: 2rem;
  }

  .experience-timeline::after {
    left: 20px;
    margin-left: 0;
  }

  .experience-item::after,
  .experience-item.right::after {
    left: 10px !important;
    right: auto;
  }

  #hero {
    /* Adjust hero padding for header on tablet */
    padding-top: 65px;
  }
}

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

  h2 {
    font-size: 1.8rem;
  }

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

  .portfolio-item img {
    height: 180px;
    width: 100%;
    object-fit: cover;
  }

  .hero-stats {
    gap: 2rem;
  }

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

  section {
    padding: 60px 0;
  }

  .container {
    width: 95%;
    padding: 0 15px;
    box-sizing: border-box;
  }

  /* Hero specific for 768px */
  #hero {
    padding-top: 70px;
    /* Consistent header spacing */
    padding-bottom: 30px;
    /* More space at the bottom of hero content area */
    min-height: 550px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    padding: 0 15px;
  }
  
  .typing-name {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
  }

  .hero-content .subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .logo-image {
    height: 42px;
  }

  .btn,
  .btn-secondary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .about-image img {
    border-radius: 8px;
  }

  .portfolio-item img {
    height: 150px;
    width: 100%;
    object-fit: cover;
  }

  .portfolio-info {
    padding: 15px;
  }

  .experience-content {
    padding: 15px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.95rem;
  }

  .contact-form .btn {
    width: 100%;
  }

  /* Hero specific for 480px */
  #hero {
    padding-top: 65px;
    /* Space for potentially smaller header */
    padding-bottom: 20px;
    /* Content padding, scroll-down will be positioned relative to hero edge */
    min-height: max(480px,
        100vh);
    /* Ensure it's tall enough but respects viewport */
  }

  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    padding: 0 10px;
  }
  
  .typing-name {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
  }

  .hero-content .subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    /* Better for wrapped text */
  }

  .hero-buttons .btn {
    margin: 8px 5px;
    /* Allow side-by-side if space allows */
    padding: 10px 18px;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: fit-content;
  }

  .hero-stats {
    gap: 1.5rem;
  }

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

  .stat-label {
    font-size: 0.8rem;
  }

  .scroll-down {
    bottom: 30px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 0.8rem;
    padding: 10px 16px;
    width: auto;
    max-width: 90%;
  }
  
  .scroll-down .modern-arrow {
    width: 20px;
    height: 20px;
  }
  
  .scroll-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 375px) {
  /* Targeting iPhone SE, Galaxy Fold (narrow state) and similar */
  #hero {
    padding-top: 60px;
    /* Adjust header spacing if needed */
  }

  .hero-content h1 {
    font-size: 1.8rem;
    /* More compact */
    line-height: 1.3;
    padding: 0 10px;
  }
  
  .typing-text {
    display: block;
    margin-bottom: 4px;
  }
  
  .typing-name {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.2;
  }

  .hero-content .subtitle {
    font-size: 1rem;
    /* More compact */
    line-height: 1.5;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    /* Stack buttons */
    align-items: center;
    /* Center stacked buttons */
    width: 100%;
  }

  .hero-buttons .btn {
    margin: 8px 0;
    /* Vertical margin for stacked buttons */
    width: 75%;
    /* Make buttons take up more width when stacked */
    max-width: 240px;
    /* But not too wide */
    padding: 12px 15px;
    /* Adjust padding for better tap targets */
    white-space: nowrap;
  }
  
  .container {
    width: 100%;
    padding: 0 12px;
  }
  
  .navbar .theme-toggle {
    right: 50px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .logo-image {
    height: 40px;
  }
  
  .contact-info {
    padding: 20px 15px;
  }
  
  .info-item {
    padding: 10px 12px;
    font-size: 0.9rem;
    flex-wrap: wrap;
  }
  
  .info-item a {
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.85rem;
    flex: 1 1 100%;
    min-width: 0;
  }
  
  .info-item i {
    flex-shrink: 0;
    margin-right: 10px;
  }
  
  .scroll-down {
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 25px;
    padding: 8px 14px;
    font-size: 0.75rem;
  }
  
  .scroll-text {
    font-size: 0.7rem;
  }
  
  .scroll-down .modern-arrow {
    width: 18px;
    height: 18px;
  }
  
  .portfolio-info h3 {
    font-size: 1.1rem;
    word-wrap: break-word;
  }
  
  .experience-content h3 {
    font-size: 1.2rem;
    word-wrap: break-word;
  }
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
}

footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 998;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
  padding: 0;
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.6);
}

.scroll-to-top-btn:active {
  transform: translateY(-3px) scale(0.95);
}

.scroll-to-top-btn .modern-arrow {
  width: 20px;
  height: 20px;
  color: #fff;
}

.scroll-to-top-btn .modern-arrow .arrow-path {
  stroke: #fff;
}

/* Responsive Scroll to Top Button */
@media (max-width: 768px) {
  .scroll-to-top-btn {
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .scroll-to-top-btn .modern-arrow {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top-btn {
    bottom: 70px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .scroll-to-top-btn .modern-arrow {
    width: 16px;
    height: 16px;
  }
}

/* Additional Responsive Breakpoints */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1200px;
  }
  
  .hero-content {
    max-width: 1000px;
  }
}

/* Desktop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .container {
    max-width: 1100px;
  }
}

/* Mobile Landscape (414px - 479px) */
@media (max-width: 479px) and (min-width: 414px) {
  .hero-content h1 {
    font-size: 2.4rem;
    line-height: 1.3;
  }
  
  .container {
    width: 95%;
    padding: 0 20px;
  }
}

/* Small Mobile (320px - 374px) */
@media (max-width: 374px) {
  .hero-content h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .hero-content .subtitle {
    font-size: 0.95rem;
  }
  
  .container {
    width: 100%;
    padding: 0 10px;
  }
  
  .floating-hire-btn {
    bottom: 15px;
    right: 15px;
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .floating-hire-btn span {
    display: none;
  }
  
  .floating-hire-btn i {
    font-size: 1.2rem;
  }
}
