@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&display=swap");

/* === GLOBAL & UTILITY === */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

:root {
  --primary: #00d9ff;
  --secondary: #ff00c8;
  --accent: #7c3aed;
  --bg: #0a0a0a;
  --card: #111;
  --text: #e0e0e0;
  --muted: #888;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lexend", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* === SECTION GENERAL STYLES & TYPOGRAPHY === */

section {
  padding: 5rem 5%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === BACKGROUND ANIMATION & GRID === */

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

#bgCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      90deg,
      rgba(0, 217, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

/* === CUSTOM CURSOR === */

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  box-shadow: 0 0 20px var(--primary);
  transition: transform 0.1s ease;
  transform: translate(-50%, -50%);
  left: 0;
  top: 0;
}

/* === NAVBAR === */

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  padding: 15px 30px;
  background: rgba(15, 15, 15, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.navbar.scrolled {
  background: rgba(15, 15, 15, 0.95) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(0, 217, 255, 0.3) !important;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 1.4rem;
}

.logo img {
  width: 45px;
  border-radius: 50%;
  object-fit: cover;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

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

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-links a.scroll-active {
  color: var(--secondary) !important;
  text-shadow: 0 0 10px var(--secondary);
  transform: scale(1.05);
}

.nav-links a.scroll-active::after {
  width: 100%;
  background: var(--secondary);
  height: 3px;
  box-shadow: 0 0 10px var(--secondary);
}

/* === MOBILE MENU (BURGER) === */

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.burger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* === HERO SECTION === */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 strong {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typing {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  min-width: 0;
  border-right: 3px solid transparent;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  0%, 100% { border-color: var(--primary); }
  50% { border-color: transparent; }
}

.desc {
  margin: 1.5rem 0;
  color: var(--muted);
  line-height: 1.7;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

.social-icons a,
.social a {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.social-icons a::before,
.social a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.social-icons a:hover::before,
.social a:hover::before {
  opacity: 1;
}

.social-icons a:hover,
.social a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 0 20px var(--primary);
  color: white;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 769px) {
  .hero-actions {
    align-items: flex-start;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
  box-shadow: 
    0 4px 15px rgba(0, 217, 255, 0.3),
    0 0 20px rgba(0, 217, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--secondary), #ff00c8, #00ffaa);
  border-radius: 52px;
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.4s ease;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
}

.btn-primary:hover::before {
  opacity: 1;
  animation: borderPulse 2s infinite;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-primary:active {
  transform: translateY(-2px) scale(0.98);
}

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

.btn-primary:hover i {
  transform: translateX(4px);
}

/* Pulsing Border Animation */
@keyframes borderPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.hero-img {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  cursor: pointer;
  transition: all 0.5s ease;
  border: 3px solid rgba(0, 217, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.img-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease;
  filter: brightness(0.95) contrast(1.05);
}

.hero-img:hover {
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2),
    0 0 30px rgba(0, 217, 255, 0.15);
  transform: translateY(-8px);
}

.hero-img:hover .img-wrapper {
  transform: scale(1.06);
}

.hero-img:hover img {
  transform: scale(1.1);
  filter: brightness(1.05) contrast(1.1) saturate(1.15);
}

.hero-img::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-img:hover::before {
  opacity: 0.3;
}

/* === AOS CUSTOM ANIMATION === */

[data-aos] {
  transition-property: transform, opacity;
}

[data-aos].aos-animate {
  transition-duration: 0.8s;
}

[data-aos="slide-up"] {
  transform: translateY(30px);
  opacity: 0;
}

[data-aos="slide-up"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

/* === ABOUT SECTION === */

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-img img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
  object-fit: cover;
  animation: float 6s ease-in-out infinite;
  transition: all 0.6s ease;
}

.about-img img:hover {
  animation-play-state: paused;
  transform: translateY(-10px) rotate(2deg) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.4);
}

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

.about-text ul {
  list-style: none;
  margin-top: 1.5rem;
}

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

.about-text ul strong {
  color: white;
}

/* === ANIMATED TITLE UNDERLINE (Shared Component) === */

.title-animated {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.title-animated .animated-underline {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  border-radius: 2px;
  background-size: 200% 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
  animation: shimmer 2s infinite linear;
  overflow: hidden;
}

.title-animated:hover .animated-underline {
  width: 100%;
}

.title-animated .animated-underline::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Specific animation for About section */
.about-text .title-animated .animated-underline {
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text.aos-animate .title-animated .animated-underline {
  width: 100%;
}

/* === SKILLS SWIPER === */

.skills-swiper {
  padding: 3rem 0;
  background: rgba(0, 217, 255, 0.02);
}

.swiper-slide img {
  height: 60px;
  filter: grayscale(1) brightness(1);
  transition: all 0.3s ease;
  object-fit: contain;
}

.swiper-slide img:hover {
  filter: grayscale(0);
  transform: scale(1.2);
}

/* === SKILLS BARS (DETAIL) === */

.skills {
  padding: 4rem 0;
}

.skill-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.skill {
  background: #111;
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 217, 255, 0.15);
  transition: all 0.3s ease;
  overflow: hidden;
}

.skill:hover {
  transform: translateY(-5px);
  border-color: #00d9ff;
  box-shadow: 0 10px 25px rgba(0, 217, 255, 0.15);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.skill-icon {
  width: 35px;
  height: 35px;
  transition: transform 0.3s ease;
}

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

.percentage {
  opacity: 0;
  color: white;
  font-weight: 600;
  transform: translateY(8px);
  transition: all 0.4s ease;
}

.skill:hover .percentage {
  opacity: 1;
  transform: translateY(0);
}

.bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.fill {
  height: 100%;
  border-radius: 5px;
  width: 0 !important;
  transition: width 2s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  overflow: hidden;
}

.fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: shimmerFill 1.8s infinite;
}

@keyframes shimmerFill {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* === TIMELINE (EXPERIENCE/EDUCATION) === */

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 2px;
  transform: translateX(-50%);
  z-index: 0;
}

.timeline-item {
  position: relative;
  margin: 4rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: var(--bg);
  border: 4px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--bg), 0 0 20px var(--primary);
  z-index: 2;
}

.content {
  background: var(--card);
  padding: 1.5rem 1.8rem;
  border-radius: 16px;
  width: 45%;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin: 0 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 217, 255, 0.15);
}

.content::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 12px solid transparent;
  transform: translateY(-50%);
  z-index: 2;
}

.timeline-item:nth-child(even) .content {
  margin-left: 0;
  margin-right: auto;
}

.timeline-item:nth-child(even) .content::before {
  right: -24px;
  border-left-color: var(--card);
}

.timeline-item:nth-child(odd) .content {
  margin-left: auto;
  margin-right: 0;
}

.timeline-item:nth-child(odd) .content::before {
  left: -24px;
  border-right-color: var(--card);
}

/* === SERVICES GRID === */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(0, 217, 255, 0.2);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
  border-color: var(--primary);
}

.card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* === PROJECTS – RESPONSIVE MOCKUP BROWSER === */
.projects {
  padding: 5rem 5%;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 217, 255, 0.15);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-12px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

/* Browser Mockup */
.project-mockup {
  padding: 10px;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.browser-frame {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,.3);
}

.browser-header {
  height: 36px;
  background: #222;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid #333;
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #444;
}

.browser-dots span:first-child { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:last-child { background: #27c93f; }

.browser-url {
  flex: 1;
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-content {
  height: 180px;
  overflow: hidden;
}

.browser-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .browser-content img {
  transform: scale(1.06);
}

/* Info */
.info {
  padding: 1.3rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info h3 {
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

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

.project-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-view,
.btn-github {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-view {
  background: var(--primary);
  color: #000;
}

.btn-view:hover {
  background: #00eaff;
  box-shadow: 0 0 12px rgba(0,234,255,.6);
  transform: translateY(-2px);
}

.btn-github {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(0,217,255,.3);
}

.btn-github:hover {
  background: rgba(0,217,255,.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* See More */
.project-more {
  text-align: center;
  margin-top: 3rem;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.more-link:hover {
  color: var(--secondary);
  transform: translateX(6px);
}

.more-link i {
  transition: transform 0.3s ease;
}

.more-link:hover i {
  transform: translateX(4px);
}

/* Responsive Breakpoints */

/* Mobile Small (< 480px) */
@media (max-width: 480px) {
  .projects {
    padding: 3rem 4%;
  }

  .project-grid {
    gap: 2rem;
  }

  .project-mockup {
    padding: 8px;
  }

  .browser-header {
    height: 32px;
    padding: 0 8px;
  }

  .browser-dots span {
    width: 8px;
    height: 8px;
  }

  .browser-url {
    font-size: 0.7rem;
  }

  .browser-content {
    height: 150px;
  }

  .info {
    padding: 1rem;
  }

  .info h3 {
    font-size: 1.15rem;
  }

  .info p {
    font-size: 0.85rem;
  }

  .btn-view,
  .btn-github {
    padding: 0.5rem 0;
    font-size: 0.8rem;
    min-width: 90px;
  }

  .more-link {
    font-size: 1rem;
  }
}

/* Mobile Large & Tablet Small (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .browser-content {
    height: 170px;
  }

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

  .project-buttons {
    gap: 0.7rem;
  }
}

/* Tablet (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .browser-content {
    height: 190px;
  }
}

/* Desktop Small (993px - 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Large (> 1200px) */
@media (min-width: 1201px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Touch Devices – Disable hover */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .btn-view:active,
  .btn-github:active {
    transform: translateY(-2px) !important;
  }
}

/* === FOOTER === */
footer {
  padding: 5rem 5% 2rem;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.98), transparent);
  border-top: 1px solid rgba(0, 217, 255, 0.15);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-top {
  margin-bottom: 2.5rem;
}

.footer-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.footer-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
  transition: all 0.4s ease;
}

.footer-logo:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.footer-logo-section h3 {
  font-size: 1.8rem;
  font-weight: 700;
}

.footer-logo-section .dev {
  color: var(--primary);
  font-weight: 700;
}

.footer-tagline {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0;
}

.footer-social a {
  width: 50px;
  height: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  font-size: 1.3rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 217, 255, 0.2);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.footer-social a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.footer-social a:hover::before {
  opacity: 1;
}

.footer-social a:hover {
  color: white;
  transform: translateY(-6px) scale(1.15);
  box-shadow: 0 10px 25px rgba(0, 217, 255, 0.3);
  border-color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(0, 217, 255, 0.15);
}

.made-with {
  font-size: 0.85rem;
}

.heart {
  color: #ff00c8;
  animation: pulse 1.5s infinite;
}

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

/* Responsive */

/* Extra Small Devices (Phones < 480px) */
@media (max-width: 480px) {
  section {
    padding: 3rem 4%;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .hero {
    padding-top: 120px;
    text-align: center;
  }

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

  .typing {
    font-size: 1.3rem;
  }

  .hero-img {
    width: 220px;
    height: 220px;
  }

  .btn-primary {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  .social-icons a,
  .footer-social a {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .navbar {
    padding: 10px 16px;
    top: 15px;
  }

  .logo a {
    font-size: 1.2rem;
  }

  .logo img {
    width: 38px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card img {
    height: 180px;
  }

  .btn-view,
  .btn-github {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    min-width: 100px;
  }

  .more-link {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
  }

  .footer-logo {
    width: 55px;
    height: 55px;
  }

  .footer-logo-section h3 {
    font-size: 1.4rem;
  }

  .footer-tagline {
    font-size: 1rem;
  }
}

/* Small Devices (Phones 480px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  section {
    padding: 4rem 5%;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }

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

  .typing {
    font-size: 1.5rem;
  }

  .hero-img {
    width: 260px;
    height: 260px;
  }

  .hero-actions {
    align-items: center;
  }

  .navbar {
    padding: 12px 20px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 75%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    z-index: 999;
    padding: 2rem;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .burger {
    display: flex;
  }

  .about .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .about-img img {
    max-width: 300px;
    margin: 0 auto;
  }

  .timeline::before {
    left: 30px;
  }

  .dot {
    left: 30px;
    transform: translateX(-50%);
  }

  .timeline-item {
    justify-content: flex-start;
  }

  .content {
    width: calc(100% - 80px);
    margin-left: 50px !important;
    margin-right: 0 !important;
  }

  .content::before {
    left: -24px !important;
    border-right-color: var(--card) !important;
    border-left-color: transparent !important;
  }

  .skill-bars {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .project-card img {
    height: 200px;
  }

  .project-buttons {
    flex-direction: column;
  }

  .btn-view,
  .btn-github {
    width: 100%;
  }
}

/* Medium Devices (Tablets 769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 80px;
    gap: 2rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-img {
    width: 320px;
    height: 320px;
    margin: 0 auto;
  }

  .about .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-img img {
    max-width: 380px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    left: 50%;
  }

  .content {
    width: 48%;
  }

  .skill-bars {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Devices (Laptops 993px - 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
  .container {
    max-width: 1000px;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-img {
    width: 350px;
    height: 350px;
  }
}

/* Extra Large Devices (Desktops > 1200px) */
@media (min-width: 1201px) {
  .container {
    max-width: 1300px;
  }

  .hero-img {
    width: 400px;
    height: 400px;
  }

  .project-grid {
    gap: 2.5rem;
  }
}

/* High DPI Screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-img,
  .about-img img,
  .footer-logo {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Touch Devices - Disable hover on tap */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .skill:hover,
  .project-card:hover,
  .hero-img:hover,
  .social-icons a:hover,
  .footer-social a:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .social-icons a:active,
  .footer-social a:active {
    transform: translateY(-3px) scale(1.05) !important;
  }
}