/* GENERAL */

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

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --dark-bg: #0f172a;
  --light-text: #f1f5f9;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Light theme variables */
body.light-theme {
  --primary-color: #4f46e5;
  --secondary-color: #7c3aed;
  --accent-color: #db2777;
  --dark-bg: #ffffff;
  --light-text: #1e293b;
  --glass-bg: rgba(15, 23, 42, 0.03);
  --glass-border: rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--light-text);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background 0.5s ease, color 0.3s ease;
}

body.light-theme {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  /* Match sticky nav height to avoid snap misalignment */
  scroll-padding-top: 17vh;
}

/* PARTICLE BACKGROUND */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

/* GLASS MORPHISM EFFECT */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px 0 rgba(99, 102, 241, 0.4);
}

/* NAVIGATION */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 17vh;
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.8);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transform: none;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, background 0.3s ease;
  padding: 0 3rem;
}

nav.nav-shrink {
  height: 8vh;
}

body.light-theme nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

body.light-theme .logo-title {
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  height: 3rem;
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-carousel {
  position: relative;
  width: auto;
  max-width: 100%;
  height: 3rem;
  overflow: visible;
  display: flex;
  align-items: center;
}

.logo-title {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  width: auto;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  opacity: 0;
  min-height: 3rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 0.5rem;
}

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

.nav-links a {
  color: var(--light-text);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

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

/* HAMBURGER MENU */
#hamburger-nav {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--light-text);
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(20, 30, 50, 0.98) 100%);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 220px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.menu-links a {
  display: block;
  padding: 14px 20px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--light-text);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-color);
  padding-left: 24px;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 400px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

/* SECTIONS */
section {
  padding: 4vh 10rem;
  min-height: 96vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  overflow: visible;
}

/* Add safe zones when corner nav is active to prevent content overlap */
body.corners-nav-active section {
  padding: 4vh 11rem;
}

@media (max-width: 1400px) {
  body.corners-nav-active section {
    padding: 4vh 10rem;
  }
}

.section__text__p1 {
  text-align: center;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.value-proposition {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 1rem auto 2.5rem;
  line-height: 1.7;
  font-weight: 500;
  opacity: 0.9;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.4s both;
}

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

.title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInDown 1s ease-out 0.2s both;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* PROFILE SECTION */
#profile {
  min-height: 85vh;
}

.profile-container {
  display: flex;
  gap: 5rem;
  align-items: center;
  justify-content: center;
}

.section__pic-container {
  position: relative;
  display: flex;
  max-width: 400px;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: auto 0;
  animation: fadeInProfile 1s ease-out 0.3s both;
}

@keyframes fadeInProfile {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.profile-card {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.5);
}

.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    var(--primary-color),
    var(--accent-color),
    var(--secondary-color),
    var(--primary-color)
  );
  animation: rotate 4s linear infinite;
  opacity: 0.5;
  z-index: -1;
}

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

.floating {
  animation: float 3s ease-in-out infinite;
}

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

.section__text {
  flex: 1;
  text-align: center;
}

.typing-effect {
  animation: typing 3s steps(20) 1s both;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  display: inline-block;
}

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

.fade-in {
  animation: fadeIn 1s ease;
}

.fade-in-delay {
  animation: fadeIn 1s ease 0.5s both;
}

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

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

.role-tag {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  margin: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.role-tag:hover {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* BUTTONS */
.btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 200px;
  max-width: 280px;
  white-space: nowrap;
}

.btn-glow {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-glow:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.btn-glow:active {
  transform: translateY(-2px) scale(1.02);
}

.btn-color-1 {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  font-weight: 700;
}

.btn-color-2 {
  background: linear-gradient(45deg, #4c63d2, #6366f1);
  color: #ffffff;
  font-weight: 700;
}

.btn-color-1:hover,
.btn-color-2:hover {
  filter: brightness(1.15);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

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

/* SOCIALS */
#socials-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

.social-icon-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-6px) scale(1.1);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.social-icon-link:active {
  transform: translateY(-3px) scale(1.05);
}

.social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(0);
  transition: filter 0.3s ease;
}

.social-icon-link:hover .social-icon {
  filter: brightness(0) invert(1);
}

/* ABOUT ME SECTION */
#about {
  min-height: auto;
  padding: 4vh 10rem;
}

.about-introduction {
  margin: 2rem auto 3rem;
  max-width: 900px;
  text-align: center;
}

.about-intro-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-intro-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--light-text);
  opacity: 0.9;
}

/* Stats Section */
.about-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  min-width: 200px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
  border-color: var(--primary-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--secondary-text);
  font-weight: 500;
}

/* Highlights Grid */
.about-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.highlight-card {
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
  border-color: var(--primary-color);
}

.highlight-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.highlight-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--light-text);
}

.highlight-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.highlight-description {
  font-size: 0.95rem;
  color: var(--secondary-text);
  line-height: 1.6;
}

.highlight-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.highlight-item strong {
  color: var(--light-text);
  font-size: 1rem;
}

.highlight-item span {
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlight-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--light-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.highlight-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Expertise Section */
.about-expertise {
  margin: 3rem 0;
}

.about-section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.expertise-card {
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.expertise-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
  border-color: var(--primary-color);
}

.expertise-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--light-text);
}

.expertise-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--secondary-text);
}

/* Light theme adjustments */
body.light-theme .about-intro-text,
body.light-theme .highlight-title,
body.light-theme .expertise-title,
body.light-theme .highlight-item strong,
body.light-theme .highlight-list li {
  color: #0f172a;
}

body.light-theme .highlight-card,
body.light-theme .expertise-card,
body.light-theme .stat-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .highlight-card:hover,
body.light-theme .expertise-card:hover,
body.light-theme .stat-item:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

/* SKILLS SECTION */
.skills-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 2rem 0 1.5rem;
}

.skill-category {
  padding: 2rem;
}

.experience-sub-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.skill-card {
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  animation: slideInLeft 0.5s ease backwards;
}

.skill-card:hover {
  /* keep static for marquee rows and modal — no lift on hover */
  transform: none;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.skill-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-level {
  font-size: 0.9rem;
  opacity: 0.8;
}

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

/* EXPERIENCE TIMELINE */
.experience-timeline {
  display: grid;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.exp-item {
  position: relative;
  padding: 1.75rem 1.75rem 1.75rem 2.25rem;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(var(--primary-color), var(--accent-color));
  opacity: 0.4;
}

.exp-item::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--primary-color));
  box-shadow: 0 0 12px rgba(99,102,241,0.8);
}

.exp-header {
  margin-bottom: 0.5rem;
}

.exp-role {
  font-size: 1.2rem;
  margin: 0 0 0.25rem 0;
}

.exp-meta {
  font-size: 0.95rem;
  opacity: 0.85;
}

.exp-points {
  margin: 0.75rem 0 0.5rem 1rem;
  line-height: 1.6;
}

.exp-points li { margin: 0.25rem 0; }

.exp-skills {
  font-size: 0.9rem;
  opacity: 0.9;
}

.key-skills {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
}

/* PROJECTS SECTION - Horizontal Carousel */
.projects-carousel-wrapper {
  width: 100%;
  margin: 2rem 0;
  overflow: hidden;
}

.projects-carousel-track {
  --project-card-w: 380px;
  --project-gap: 1.5rem;
  display: flex;
  gap: var(--project-gap);
  padding: 1.5rem;
  overflow: hidden;
  /* Show 3 cards on large screens */
  max-width: calc(var(--project-card-w) * 3 + var(--project-gap) * 2 + 3rem);
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.15);
}

.projects-carousel-track::-webkit-scrollbar { height: 8px; }
.projects-carousel-track::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 8px; }

/* For projects.html page - keep grid layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 2rem;
}

.projects-grid .project-card {
  width: 100%;
  min-width: unset;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.projects-grid .project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.25);
}

.projects-grid .project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.projects-grid .project-card:hover .project-image {
  transform: scale(1.05);
}

/* Carousel project cards (home page) */
.projects-carousel-track .project-card {
  width: 380px;
  min-width: 380px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.projects-carousel-track .project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.25);
}

.projects-carousel-track .project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.projects-carousel-track .project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  background: #ffffff;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

.project-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4B5563;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.25rem 0.65rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-color);
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* ===== Skills carousel and modal ===== */
.skills-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skills-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skills-row-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 0;
  color: var(--light-text);
  margin-bottom: 0.75rem;
}

.skills-row-track {
  --skill-card-w: 160px;
  --skill-gap: 1rem;
  display: flex;
  gap: var(--skill-gap);
  padding: 1rem 1.25rem;
  /* fixed visible window: show up to 6 items on large screens */
  overflow: hidden;
  max-width: calc(var(--skill-card-w) * 6 + var(--skill-gap) * 5 + 2.5rem);
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
}

.skills-row-track::-webkit-scrollbar { height: 8px; }
.skills-row-track::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }

.skill-card {
  width: 160px;
  min-width: 160px;
  height: 140px;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0.8rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
  text-align: center;
}

body.light-theme .skill-card {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Bottom actions (Show All Skills button) */
.skills-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

#showAllSkillsBtn {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  border-radius: 10px;
  min-width: 160px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

#showAllSkillsBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99,102,241,0.55);
}

.skill-card .skill-icon { 
  font-size: 1.7rem; 
  opacity: 0.95; 
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}
.skill-card .skill-icon img.skill-logo { 
  width: 36px; 
  height: 36px; 
  display: block;
  object-fit: contain;
  padding: 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.skill-card:hover .skill-icon img.skill-logo {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
body.light-theme .skill-card .skill-icon img.skill-logo {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
body.light-theme .skill-card:hover .skill-icon img.skill-logo {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Light theme for project cards */
body.light-theme .project-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .project-content {
  background: #ffffff;
}

body.light-theme .project-description {
  color: #4B5563;
}

body.light-theme .projects-carousel-track {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.08);
}

.skill-card .skill-icon .skill-logo-fallback {
  font-size: 1.7rem;
}
.skill-card .skill-title { font-size: 1rem; font-weight: 700; margin-top: 6px; }
.skill-card .skill-desc { font-size: 0.78rem; color: rgba(17,24,39,0.65); margin-top: 6px; line-height: 1.1; }
.skill-card .skill-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }

/* Modal */
.skills-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.skills-modal.show {
  display: flex;
}
.skills-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.skills-modal-content {
  position: relative;
  width: min(1100px, 95%);
  max-height: 85vh;
  overflow: auto;
  padding: 2rem;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

body.light-theme .skills-modal-content {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.skills-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-text);
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.skills-modal-close:hover {
  opacity: 1;
}
.skills-modal-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.skills-category-heading {
  grid-column: 1/-1;
  font-size: 1.1rem;
  margin: 1rem 0 0.25rem 0;
}

@media (max-width: 768px) {
  .skill-card { min-width: 120px; }
  .skills-modal-content { width: 95%; padding: 1rem; }
}

@media (max-width: 1200px) {
  /* show 4 cards on medium screens */
  .skills-row-track { max-width: calc(var(--skill-card-w) * 4 + var(--skill-gap) * 3); }
}

/* TESTIMONIALS SECTION */
#testimonials {
  min-height: 70vh;
}

.testimonials-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
}

.testimonials-carousel-track {
  display: flex;
  gap: 2rem;
  overflow-x: hidden;
  padding: 1rem;
  width: fit-content;
}

.testimonial-card {
  min-width: 350px;
  max-width: 350px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
  border-color: var(--primary-color);
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--light-text);
  margin: 0;
}

.testimonial-title {
  font-size: 0.85rem;
  color: var(--secondary-text);
  margin: 0.25rem 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--light-text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.testimonial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-date {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.testimonial-read-more {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Testimonial Modal */
.testimonial-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  overflow-y: auto;
}

.testimonial-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.testimonial-modal-content {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  max-width: 800px;
  width: 100%;
  position: relative;
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.testimonial-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--light-text);
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.testimonial-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-testimonial-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.modal-testimonial-avatar {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.modal-testimonial-info h2 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--light-text);
}

.modal-testimonial-info p {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin: 0.25rem 0;
}

.modal-testimonial-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--light-text);
  margin: 1.5rem 0;
}

.modal-testimonial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, #0077b5, #00a0dc);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modal-linkedin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

body.light-theme .testimonial-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .testimonial-name,
body.light-theme .testimonial-text {
  color: #0f172a;
}

body.light-theme .testimonial-modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .modal-testimonial-info h2,
body.light-theme .modal-testimonial-text {
  color: #0f172a;
}

/* CONTACT SECTION */
#contact {
  min-height: 70vh;
  padding: 4rem 0;
}

.contact-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.contact-header {
  margin-bottom: 4rem;
  text-align: center;
}

.contact-main-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

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

.contact-divider {
  height: 4px;
  width: 80px;
  background: var(--primary-color);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.contact-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon-box {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  border-radius: 10px;
  color: white;
}

.contact-svg-icon {
  width: 24px;
  height: 24px;
}

.contact-method-content {
  flex: 1;
}

.contact-method-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-method-link {
  color: var(--text-secondary);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.3s ease;
}

.contact-method-link:hover {
  color: var(--primary-color);
}

.contact-social-section {
  padding-top: 1rem;
}

.contact-social-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-social-links {
  display: flex;
  gap: 1rem;
}

.contact-social-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.contact-social-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.contact-social-icon {
  width: 20px;
  height: 20px;
}

.contact-form-side {
  padding: 2rem;
  border-radius: 15px;
}

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

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.contact-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.contact-form-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.contact-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.contact-submit-icon {
  width: 20px;
  height: 20px;
}

/* THEME TOGGLE */
.theme-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--light-text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: all 0.25s ease;
  z-index: 2;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  transition: transform 0.3s ease;
}

body.light-theme .theme-toggle {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

/* Theme toggle in menu dropdown */
.menu-theme-toggle {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding: 12px 8px 0;
  list-style: none;
}

.theme-toggle-menu {
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15) 0%, rgba(150, 100, 255, 0.15) 100%);
  border: 1px solid rgba(100, 200, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--light-text);
  transition: all 0.3s ease;
}

.theme-toggle-menu:hover {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.25) 0%, rgba(150, 100, 255, 0.25) 100%);
  border-color: rgba(100, 200, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 200, 255, 0.2);
}

.theme-toggle-menu:active {
  transform: scale(0.98);
}

.theme-toggle-menu .theme-icon {
  font-size: 1.3rem;
}

.theme-toggle-menu .theme-label {
  font-weight: 600;
}

body.light-theme .theme-toggle-menu {
  background: linear-gradient(135deg, rgba(200, 150, 50, 0.15) 0%, rgba(255, 180, 100, 0.15) 100%);
  border-color: rgba(200, 150, 50, 0.3);
  color: #0f172a;
}

body.light-theme .theme-toggle-menu:hover {
  background: linear-gradient(135deg, rgba(200, 150, 50, 0.25) 0%, rgba(255, 180, 100, 0.25) 100%);
  border-color: rgba(200, 150, 50, 0.5);
  box-shadow: 0 4px 12px rgba(200, 150, 50, 0.2);
}

body.light-theme .menu-theme-toggle {
  border-top-color: rgba(15, 23, 42, 0.15);
}

/* ARROW */
.arrow {
  position: absolute;
  right: 5rem;
  bottom: 2rem;
  height: 3rem;
  cursor: pointer;
  filter: brightness(0) invert(1);
  transition: all 0.3s ease;
}

.arrow:hover {
  transform: translateY(10px);
}

.pulse {
  animation: pulse 2s infinite;
}

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

/* FOOTER */
footer {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-top: 2px solid var(--glass-border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.8;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  color: var(--primary-color);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-column ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glass-border) 20%,
    var(--glass-border) 80%,
    transparent
  );
  margin: 2rem 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
}

.footer-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.5;
  margin: 0;
  font-style: italic;
}

body.light-theme footer {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(0, 0, 0, 0.1);
}

/* 3D TILT EFFECT */
[data-tilt] {
  transform-style: preserve-3d;
}

/* ===== Corner Nav Animation (Desktop) ===== */
@media (min-width: 1024px) {
  /* When corner items are moved to body, hide the original nav */
  body.corners-nav-active #desktop-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: transparent;
    border-bottom: none;
    overflow: visible;
    transition: all 400ms ease;
    pointer-events: none;
    z-index: 9999;
  }

  body.corners-nav-active #desktop-nav .logo {
    opacity: 0;
    transition: opacity 300ms ease;
  }
  
  /* When NOT in corner mode, ensure nav is fully visible */
  body:not(.corners-nav-active) #desktop-nav {
    opacity: 1;
  }
  
  body:not(.corners-nav-active) #desktop-nav .logo {
    opacity: 1;
    transition: opacity 300ms ease 200ms;
  }

  body.corners-nav-active #desktop-nav .nav-links {
    gap: 0;
    position: static;
  }

  /* Style buttons when they're attached directly to body */
  body > li.corner-item {
    list-style: none;
    position: fixed !important;
    margin: 0;
    padding: 0;
    z-index: 99999 !important;
    transition: all 400ms ease;
    pointer-events: auto;
    will-change: transform, top, left, bottom, right;
  }

  /* Map each nav item to corners/edges using data attribute
     Scalable positioning system for 4+ buttons:
     - First 4: Corners (TL, TR, BL, BR)
     - Additional: Right edge (top to bottom), then left edge
     - Safe zones: 1.5rem from edges to avoid content overlap
  */
  
  /* Corner Positions (1-4) with safe spacing */
  body > li.corner-item[data-corner-index="1"] { /* About - Top Right */
    top: 1.5rem !important;
    right: 1.5rem !important;
    bottom: auto !important;
    left: auto !important;
  }
  body > li.corner-item[data-corner-index="2"] { /* Experience - Bottom Left */
    bottom: 1.5rem !important;
    left: 1.5rem !important;
    top: auto !important;
    right: auto !important;
  }
  body > li.corner-item[data-corner-index="3"] { /* Projects - Top Left */
    top: 1.5rem !important;
    left: 1.5rem !important;
    bottom: auto !important;
    right: auto !important;
  }
  body > li.corner-item[data-corner-index="4"] { /* Contact - Bottom Right */
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    top: auto !important;
    left: auto !important;
  }
  
  /* Additional positions for 5+ items (Right Edge) */
  body > li.corner-item[data-corner-index="5"] {
    top: 35% !important;
    right: 1.5rem !important;
    bottom: auto !important;
    left: auto !important;
  }
  body > li.corner-item[data-corner-index="6"] {
    top: 50% !important;
    right: 1.5rem !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%);
  }
  body > li.corner-item[data-corner-index="7"] {
    top: 65% !important;
    right: 1.5rem !important;
    bottom: auto !important;
    left: auto !important;
  }
  
  /* Additional positions for 8+ items (Left Edge) */
  body > li.corner-item[data-corner-index="8"] {
    top: 35% !important;
    left: 1.5rem !important;
    bottom: auto !important;
    right: auto !important;
  }
  body > li.corner-item[data-corner-index="9"] {
    top: 50% !important;
    left: 1.5rem !important;
    bottom: auto !important;
    right: auto !important;
    transform: translateY(-50%);
  }
  body > li.corner-item[data-corner-index="10"] {
    top: 65% !important;
    left: 1.5rem !important;
    bottom: auto !important;
    right: auto !important;
  }

  body > li.corner-item a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-text);
    padding: 0.5rem 0.75rem;
    min-width: 90px;
    max-width: 110px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(99, 102, 241, 0.6);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4), 
                0 0 30px rgba(139, 92, 246, 0.2);
    position: relative !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
  }
  
  /* Hide icon spans */
  body > li.corner-item a .corner-icon {
    display: none;
  }
  
  /* Light theme corner buttons */
  body.light-theme > li.corner-item a {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(99, 102, 241, 0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(139, 92, 246, 0.2);
  }
  
  body > li.corner-item a:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5), 0 0 60px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
  }
  
  body.light-theme > li.corner-item a:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #1e293b;
  }
  
  /* Keep the old selectors for backwards compatibility during animation */
  body.corners-nav-active #desktop-nav .nav-links li {
    position: fixed !important;
    margin: 0;
    padding: 0;
    z-index: 10000 !important;
    transition: all 400ms ease;
    pointer-events: auto;
    will-change: transform, top, left, bottom, right;
  }

  /* Map each nav item to a corner of the VIEWPORT
     1: About       -> top-right
     2: Experience  -> bottom-left
     3: Projects    -> top-left
     4: Contact     -> bottom-right
  */
  body.corners-nav-active #desktop-nav .nav-links li:nth-child(3) { /* Projects */
    top: 24px !important;
    left: 24px !important;
    bottom: auto !important;
    right: auto !important;
  }
  body.corners-nav-active #desktop-nav .nav-links li:nth-child(1) { /* About */
    top: 24px !important;
    right: 24px !important;
    bottom: auto !important;
    left: auto !important;
  }
  body.corners-nav-active #desktop-nav .nav-links li:nth-child(2) { /* Experience */
    bottom: 24px !important;
    left: 24px !important;
    top: auto !important;
    right: auto !important;
  }
  
  body.corners-nav-active #desktop-nav .nav-links li:nth-child(4) { /* Contact */
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
  }

  body.corners-nav-active #desktop-nav .nav-links a {
    font-size: 1.1rem;
    color: var(--light-text);
    padding: 0.5rem 0.75rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5), 0 0 12px rgba(99,102,241,0.6);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.3);
    position: relative !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease;
  }
  
  body.corners-nav-active #desktop-nav .nav-links a:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5), 0 0 60px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
  }

  /* Persistent underline for active link */
  #desktop-nav .nav-links a.active::after,
  body.corners-nav-active #desktop-nav .nav-links a.active::after {
    width: 100%;
  }
}

/* Sparkle trail for flying nav */
.sparkle {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sz, 6px);
  height: var(--sz, 6px);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #ffffff, rgba(236, 72, 153, 0.8) 50%, rgba(99, 102, 241, 0.6) 80%, transparent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 1), 0 0 24px rgba(139, 92, 246, 0.8), 0 0 36px rgba(236, 72, 153, 0.6);
  transform: translate(-50%, -50%);
  z-index: 9998;
  animation: sparkle-move 800ms ease-out forwards;
}

@keyframes sparkle-move {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  50% {
    opacity: 0.8;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.5), calc(-50% + var(--dy, 0px) * 0.5)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(0);
  }
}

/* ===== MOBILE RESPONSIVENESS ===== */

/* Tablet and below */
@media (max-width: 1024px) {
  section {
    padding: 3vh 5rem;
  }
  
  body.corners-nav-active section {
    padding: 3vh 5rem;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  /* Theme toggle - smaller on tablet */
  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

/* Mobile landscape and below */
@media (max-width: 768px) {
  section {
    padding: 2vh 2rem;
    min-height: auto;
  }
  
  body.corners-nav-active section {
    padding: 2vh 2rem;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .section__text__p1 {
    font-size: 1rem;
  }
  
  /* Profile section */
  .profile-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .profile-card {
    max-width: 250px;
    aspect-ratio: 1 / 1;
  }
  
  .section__pic-container {
    max-width: 250px;
    aspect-ratio: 1 / 1;
  }
  
  .section__text {
    text-align: center;
  }
  
  .role-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
  
  /* Bento grid - stack on mobile */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .bento-large,
  .bento-tall,
  .bento-wide {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  /* Projects grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Skills rows */
  .skills-row-track {
    max-width: calc(var(--skill-card-w) * 3 + var(--skill-gap) * 2);
    padding: 0.75rem;
  }
  
  .skill-card {
    min-width: 140px;
    width: 140px;
  }
  
  /* Contact */
  .contact-container {
    padding: 2rem;
  }
  
  .contact-info-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* Hide corner navigation on mobile - use hamburger instead */
  body.corners-nav-active > li.corner-item {
    display: none !important;
  }
  
  /* Arrow indicators */
  .arrow {
    right: 2rem;
    bottom: 1rem;
    height: 2.5rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  section {
    padding: 2vh 1.5rem;
  }
  
  .title {
    font-size: 1.75rem;
  }
  
  .profile-card {
    max-width: 200px;
    aspect-ratio: 1 / 1;
  }
  
  .section__pic-container {
    max-width: 200px;
    aspect-ratio: 1 / 1;
  }
  
  /* Skills */
  .skills-row-track {
    max-width: calc(var(--skill-card-w) * 2 + var(--skill-gap) * 1);
    padding: 0.5rem;
  }
  
  .skill-card {
    min-width: 130px;
    width: 130px;
    height: 130px;
    padding: 0.6rem;
  }
  
  .skill-card .skill-title {
    font-size: 0.9rem;
  }
  
  .skill-card .skill-desc {
    font-size: 0.72rem;
  }
  
  /* Skills button */
  #showAllSkillsBtn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    min-width: 140px;
  }
  
  /* Modal adjustments */
  .skills-modal-content {
    padding: 1.5rem;
    max-height: 90vh;
  }
  
  .skills-modal-inner {
    grid-template-columns: 1fr;
  }
  
  /* Contact items */
  .contact-item {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  /* Theme toggle */
  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 0.75rem;
  }
  
  /* Experience timeline */
  .exp-item {
    padding: 1.25rem 1.25rem 1.25rem 1.75rem;
  }
  
  .exp-role {
    font-size: 1rem;
  }
  
  .exp-meta {
    font-size: 0.85rem;
  }
}
