/* ===== VARIABLES ===== */
:root {
  --primary-color: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary-color: #ec4899;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-primary: 'Outfit', sans-serif;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
  scroll-padding-top: 8rem;
}

body {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

section {
  padding: 10rem 0;
  position: relative;
}

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

.logo-dot {
  color: var(--secondary-color);
  font-size: 3.5rem;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader svg {
  width: 100%;
  height: 100%;
  animation: rotate 2s linear infinite;
}

.loader svg circle {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 4;
  stroke: var(--primary-color);
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    stroke-dashoffset: 200;
  }
  50% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 200;
  }
}

.loader-text {
  position: absolute;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--primary-color);
  letter-spacing: 1px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: difference;
}

.cursor-outline {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, transform 0.3s;
  opacity: 0.5;
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9997;
  transform: translateY(100%);
  pointer-events: none;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

header.sticky {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 1.5rem 5%;
}

.logo {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  gap: 3.5rem;
}

.nav-link {
  font-size: 1.6rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.3s ease-in-out;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-toggle {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger {
  width: 30px;
  height: 20px;
  position: relative;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--text-color);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 8px;
}

.hamburger span:nth-child(3) {
  top: 16px;
}

.nav-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.nav-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  border-radius: 5rem;
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

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

.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-header h2 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.underline {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
  position: relative;
}

.underline::before,
.underline::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 4px;
  background-color: var(--primary-color);
}

.underline::before {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.underline::after {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.hero-content {
  max-width: 80rem;
  z-index: 2;
}

.greeting {
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--primary-color);
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.2s;
}

.hero h1 {
  font-size: 6.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.4s;
}

.hero h2 {
  font-size: 3.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-light);
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.6s;
}

.hero-description {
  font-size: 2rem;
  margin-bottom: 4rem;
  color: var(--text-light);
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.8s;
}

.cta-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.8s forwards 1s;
}

/* Glitch Effect */
.glitch {
  position: relative;
  color: var(--text-color);
}

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

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--secondary-color);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 var(--primary-color);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(2px, 9999px, 6px, 0);
  }
  10% {
    clip: rect(42px, 9999px, 44px, 0);
  }
  20% {
    clip: rect(68px, 9999px, 84px, 0);
  }
  30% {
    clip: rect(24px, 9999px, 66px, 0);
  }
  40% {
    clip: rect(88px, 9999px, 98px, 0);
  }
  50% {
    clip: rect(54px, 9999px, 96px, 0);
  }
  60% {
    clip: rect(60px, 9999px, 78px, 0);
  }
  70% {
    clip: rect(10px, 9999px, 85px, 0);
  }
  80% {
    clip: rect(66px, 9999px, 82px, 0);
  }
  90% {
    clip: rect(8px, 9999px, 12px, 0);
  }
  100% {
    clip: rect(95px, 9999px, 99px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(95px, 9999px, 99px, 0);
  }
  10% {
    clip: rect(8px, 9999px, 12px, 0);
  }
  20% {
    clip: rect(66px, 9999px, 82px, 0);
  }
  30% {
    clip: rect(10px, 9999px, 85px, 0);
  }
  40% {
    clip: rect(60px, 9999px, 78px, 0);
  }
  50% {
    clip: rect(54px, 9999px, 96px, 0);
  }
  60% {
    clip: rect(88px, 9999px, 98px, 0);
  }
  70% {
    clip: rect(24px, 9999px, 66px, 0);
  }
  80% {
    clip: rect(68px, 9999px, 84px, 0);
  }
  90% {
    clip: rect(42px, 9999px, 44px, 0);
  }
  100% {
    clip: rect(2px, 9999px, 6px, 0);
  }
}

/* Typewriter Effect */
.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--primary-color);
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s forwards 1.5s;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 6px;
  height: 6px;
  background-color: var(--text-color);
  border-radius: 50%;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 10px;
  }
  100% {
    opacity: 0;
    top: 30px;
  }
}

.arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.arrow {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-color);
  border-bottom: 2px solid var(--text-color);
  transform: rotate(45deg);
  animation: arrow 1.5s infinite;
}

.arrow:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes arrow {
  0%, 100% {
    opacity: 0.2;
    transform: rotate(45deg) translate(-5px, -5px);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) translate(0, 0);
  }
}

/* Particles */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  display: flex;
  gap: 5rem;
  align-items: center;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.about-image {
  flex: 1;
  position: relative;
}

.image-container {
  position: relative;
  z-index: 1;
}

.image-container img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.image-outline {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 5px solid var(--primary-color);
  border-radius: var(--border-radius);
  z-index: -1;
  animation: pulse-border 2s infinite;
}

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

.floating-shape {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

.shape1 {
  width: 80px;
  height: 80px;
  background-color: rgba(124, 58, 237, 0.2);
  top: -30px;
  right: -20px;
}

.shape2 {
  width: 60px;
  height: 60px;
  background-color: rgba(236, 72, 153, 0.2);
  bottom: -20px;
  left: -30px;
  animation-delay: 1s;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

.floating-icon:nth-child(3) {
  top: -25px;
  left: -25px;
  color: var(--primary-color);
}

.floating-icon:nth-child(4) {
  bottom: -25px;
  right: -25px;
  color: var(--secondary-color);
  animation-delay: 2s;
}

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

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.about-text h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

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

.personal-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.info-value {
  color: var(--text-light);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-light);
  color: var(--text-color);
  transition: var(--transition);
  position: relative;
}

.social-icon::before {
  content: attr(data-tooltip);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  white-space: nowrap;
}

.social-icon::after {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--text-color) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.social-icon:hover::before,
.social-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

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

.resume-btn {
  margin-top: 2rem;
}

/* ===== SKILLS SECTION ===== */
.skills-content {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.skill-categories {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.skill-category {
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  background-color: var(--bg-light);
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  transition: var(--transition);
}

.skill-category.active,
.skill-category:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
}

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

.skill-item {
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  clip-path: circle(0% at 100% 100%);
  transition: clip-path 0.5s ease;
}

.skill-item:hover::before {
  clip-path: circle(150% at 100% 100%);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

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

.skill-item:hover .skill-icon {
  transform: scale(1.1);
}

.skill-item h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.skill-level {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-percentage {
  position: absolute;
  top: -25px;
  right: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* ===== PROJECTS SECTION - FIXED ===== */
.projects {
  padding: 8rem 0; /* Reduced from 10rem */
}

.projects .section-header {
  margin-bottom: 4rem; /* Reduced from 6rem */
}

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

.filter-btn {
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  background-color: var(--bg-light);
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(35rem, 1fr));
  gap: 3rem;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.project-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.project-item:hover {
  transform: translateY(-10px);
}

.project-img {
  position: relative;
  overflow: hidden;
}

.project-img img {
  transition: transform 0.5s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

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

.project-info {
  text-align: center;
  color: white;
  padding: 2rem;
  transform: translateY(20px);
  transition: transform 0.5s ease;
  z-index: 3;
}

.project-item:hover .project-info {
  transform: translateY(0);
}

.project-number {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  background-color: rgba(255, 255, 255, 0.1);
}

.project-info h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.project-info p {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

/* FIXED PROJECT LINKS */
.project-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white !important;
  transition: var(--transition);
  position: relative;
  z-index: 10;
}

.project-link:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.project-link i {
  font-size: 1.8rem;
  color: white !important;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  background-color: white;
}

.project-tags span {
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  background-color: var(--bg-light);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-light);
}

/* ===== CONTACT SECTION - FIXED ===== */
.contact {
  padding: 8rem 0; /* Reduced from 10rem */
}

.contact .section-header {
  margin-bottom: 4rem; /* Reduced from 6rem */
}

.contact-content {
  display: flex;
  gap: 4rem; /* Slightly reduced from 5rem */
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.contact-info {
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem; /* Reduced from 4rem */
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-right: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-light);
  border-radius: 50%;
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  background-color: var(--primary-color);
  color: white;
  transform: rotateY(180deg);
}

.contact-text h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

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

.contact-social {
  margin-top: 2rem; /* Reduced spacing */
}

.contact-social h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem; /* Reduced from 2rem */
}

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

.form-header {
  margin-bottom: 2.5rem; /* Reduced from 3rem */
}

.form-header h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.form-header p {
  color: var(--text-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.form-group {
  position: relative;
  margin-bottom: 2.5rem; /* Reduced from 3rem */
}

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

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

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

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

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
  top: -2.5rem;
  left: 0;
  font-size: 1.4rem;
  color: var(--primary-color);
}

.form-icon {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  color: var(--text-light);
  transition: var(--transition);
}

.form-group textarea ~ .form-icon {
  top: 2rem;
}

.form-group input:focus ~ .form-icon,
.form-group textarea:focus ~ .form-icon,
.form-group input:valid ~ .form-icon,
.form-group textarea:valid ~ .form-icon {
  color: var(--primary-color);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--bg-dark);
  color: white;
  padding: 5rem 0 2rem;
  position: relative;
}

.footer-content {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-logo {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

footer p {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

footer .social-links {
  justify-content: center;
  margin: 3rem 0;
}

footer .social-icon {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

footer .social-icon:hover {
  background-color: var(--primary-color);
}

.copyright {
  font-size: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
}

.back-to-top {
  position: absolute;
  right: 5rem;
  bottom: 5rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

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

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

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 1200px) {
  .about-content,
  .contact-content {
    gap: 3rem;
  }
}

@media screen and (max-width: 992px) {
  html {
    font-size: 55%;
  }
  
  .about-content,
  .contact-content {
    flex-direction: column;
  }
  
  .about-image {
    margin-bottom: 4rem;
  }
  
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  }
  
  .hero h1 {
    font-size: 5.5rem;
  }
  
  .projects {
    padding: 6rem 0;
  }
  
  .contact {
    padding: 6rem 0;
  }
  
  .contact-content {
    gap: 3rem;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 50%;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero h1 {
    font-size: 4.5rem;
  }
  
  .hero h2 {
    font-size: 2.8rem;
  }
  
  .personal-info {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .btn {
    width: 100%;
  }
  
  .projects {
    padding: 5rem 0;
  }
  
  .contact {
    padding: 5rem 0;
  }
  
  .project-links {
    gap: 1rem;
  }
  
  .project-link {
    width: 40px;
    height: 40px;
  }
  
  .project-link i {
    font-size: 1.6rem;
  }
}

@media screen and (max-width: 576px) {
  .skill-categories,
  .projects-filter {
    flex-direction: column;
    align-items: center;
  }
  
  .skill-category,
  .filter-btn {
    width: 100%;
    text-align: center;
  }
  
  .contact-form {
    padding: 3rem 2rem;
  }
  
  .back-to-top {
    right: 2rem;
    bottom: 2rem;
  }
}