/* =====================
   Variables
===================== */
html {
  scroll-behavior: smooth;
  overflow-y: scroll; /* already present, good */
}

.loading-active {
  overflow: hidden;
  pointer-events: none;
}

:root {
  /* Theme colors - will be overridden in light mode */
  --primary: #7b52eb;
  --primary-dark: #6039e0;
  --secondary: #18cae8;
  --secondary-dark: #0fa3bc;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --dark-lighter: #334155;
  --dark-darker: #141e33;
  --light: #f8fafc;
  --gray: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-alt: linear-gradient(135deg, #ff6b6b, var(--primary));
  
  /* Shadow variables */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.2);
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  
  /* Theme transition */
  --transition-speed: 0.3s;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Loading animation variables */
  --loading-duration: 1.5s;
  --container-size: 250px;
  --box-size: 33px;
  --box-border-radius: 15%;
}

/* Light Theme Variables */
body.light-theme {
  --dark: #ffffff;
  --dark-light: #f1f5f9;
  --dark-lighter: #e2e8f0;
  --light: #0f172a;
  --gray: #64748b;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.1);
}

/* =====================
   Loading Screen Styles
===================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.loading-content h1 {
  font-size: 5rem;
  margin: 0 0 30px 0;
  font-weight: 700;
  background: linear-gradient(135deg, #7b52eb, #18cae8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 5px 30px rgba(123, 82, 235, 0.4);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 2px;
  position: relative;
  animation: pulse 3s infinite alternate;
}

.loading-content h1::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(123, 82, 235, 0.4), rgba(24, 202, 232, 0.4));
  filter: blur(20px);
  z-index: -1;
  opacity: 0.6;
}

.loading-container {
  width: var(--container-size);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 20px 0;
}

.box {
  width: var(--box-size);
  height: var(--box-size);
  position: relative;
  display: block;
  transform-origin: -50% center;
  border-radius: var(--box-border-radius);
}

.box:after {
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  border-radius: var(--box-border-radius);
  box-shadow: 0px 0px 10px 0px rgba(24, 202, 232, 0.4);
}

.box:nth-child(1) {
  animation: slide var(--loading-duration) ease-in-out infinite alternate;
}

.box:nth-child(1):after {
  animation: color-change var(--loading-duration) ease-in-out infinite alternate;
  background-color: #1795FF;
}

.box:nth-child(2) {
  animation: flip-1 var(--loading-duration) ease-in-out infinite alternate;
}

.box:nth-child(2):after {
  animation: squidge-1 var(--loading-duration) ease-in-out infinite alternate;
  background-color: #1C9FFF;
}

.box:nth-child(3) {
  animation: flip-2 var(--loading-duration) ease-in-out infinite alternate;
}

.box:nth-child(3):after {
  animation: squidge-2 var(--loading-duration) ease-in-out infinite alternate;
  background-color: #1FB1FD;
}

.box:nth-child(4) {
  animation: flip-3 var(--loading-duration) ease-in-out infinite alternate;
}

.box:nth-child(4):after {
  animation: squidge-3 var(--loading-duration) ease-in-out infinite alternate;
  background-color: #22C7FB;
}

.box:nth-child(5) {
  animation: flip-4 var(--loading-duration) ease-in-out infinite alternate;
}

.box:nth-child(5):after {
  animation: squidge-4 var(--loading-duration) ease-in-out infinite alternate;
  background-color: #23D3FB;
}

/* Loading progress elements */
.loading-progress {
  width: 300px;
  height: 4px;
  background: var(--dark-lighter);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.loading-percentage {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--light);
  margin-top: 5px;
}

.loading-message {
  color: var(--gray);
  font-size: 0.9rem;
  min-height: 20px;
  margin-top: 5px;
}

/* Loading animation keyframes */
@keyframes slide {
  0% { 
    transform: translateX(0); 
  }
  100% { 
    transform: translateX(calc(var(--container-size) - (var(--box-size) * 1.25))); 
  }
}

@keyframes color-change {
  0% { 
    background-color: #1795FF; 
  }
  100% { 
    background-color: #23D3FB; 
  }
}

@keyframes flip-1 {
  0%, 15% { 
    transform: rotate(0); 
  }  
  35%, 100% { 
    transform: rotate(-180deg); 
  }
}

@keyframes squidge-1 {
  5% { 
    transform-origin: center bottom; 
    transform: scalex(1) scaley(1);
  }
  15% { 
    transform-origin: center bottom; 
    transform: scalex(1.3) scaley(0.7);
  }
  25%, 20% { 
    transform-origin: center bottom; 
    transform: scalex(0.8) scaley(1.4);
  }
  55%, 100% { 
    transform-origin: center top; 
    transform: scalex(1) scaley(1);
  }
  40% { 
    transform-origin: center top; 
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-2 {
  0%, 30% { 
    transform: rotate(0); 
  }  
  50%, 100% { 
    transform: rotate(-180deg); 
  }
}

@keyframes squidge-2 {
  20% { 
    transform-origin: center bottom; 
    transform: scalex(1) scaley(1);
  }
  30% { 
    transform-origin: center bottom; 
    transform: scalex(1.3) scaley(0.7);
  }
  40%, 35% { 
    transform-origin: center bottom; 
    transform: scalex(0.8) scaley(1.4);
  }
  70%, 100% { 
    transform-origin: center top; 
    transform: scalex(1) scaley(1);
  }
  55% { 
    transform-origin: center top; 
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-3 {
  0%, 45% { 
    transform: rotate(0); 
  }  
  65%, 100% { 
    transform: rotate(-180deg); 
  }
}

@keyframes squidge-3 {
  35% { 
    transform-origin: center bottom; 
    transform: scalex(1) scaley(1);
  }
  45% { 
    transform-origin: center bottom; 
    transform: scalex(1.3) scaley(0.7);
  }
  55%, 50% { 
    transform-origin: center bottom; 
    transform: scalex(0.8) scaley(1.4);
  }
  85%, 100% { 
    transform-origin: center top; 
    transform: scalex(1) scaley(1);
  }
  70% { 
    transform-origin: center top; 
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-4 {
  0%, 60% { 
    transform: rotate(0); 
  }  
  80%, 100% { 
    transform: rotate(-180deg); 
  }
}

@keyframes squidge-4 {
  50% { 
    transform-origin: center bottom; 
    transform: scalex(1) scaley(1);
  }
  60% { 
    transform-origin: center bottom; 
    transform: scalex(1.3) scaley(0.7);
  }
  70%, 65% { 
    transform-origin: center bottom; 
    transform: scalex(0.8) scaley(1.4);
  }
  100% { 
    transform-origin: center top; 
    transform: scalex(1) scaley(1);
  }
  85% { 
    transform-origin: center top; 
    transform: scalex(1.3) scaley(0.7);
  }
}

/* =====================
   Global Styles
===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) var(--transition-ease),
              color var(--transition-speed) var(--transition-ease);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--dark-lighter);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

section {
  padding: 100px 0;
  position: relative;
  transition: background-color var(--transition-speed) var(--transition-ease);
}

/* =====================
  Typography
===================== */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  color: var(--light);
  margin-bottom: 0.5rem;
  transition: color var(--transition-speed) var(--transition-ease);
}

p {
  margin-bottom: 1rem;
  transition: color var(--transition-speed) var(--transition-ease);
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s var(--transition-ease);
}

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

/* =====================
  Progress Bar
===================== */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 2000;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.1s;
}

/* =====================
  Navigation
===================== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  transition: none !important;
}

body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.85);
}

.navbar.scrolled {
  box-shadow: var(--shadow-xl);
  padding: 12px 30px;
  transform: translateX(-50%) translateY(-10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Center navigation links */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  align-items: center;
}

/* Right side elements */
.nav-right {
  position: relative;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  transition: transform 0.3s var(--transition-ease);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-speed) var(--transition-ease);
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: all 0.3s var(--transition-ease);
  font-size: 1.2rem;
}

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

.nav-links a:hover {
  color: var(--secondary);
  transform: translateY(-3px);
}

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

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-light);
  color: var(--light);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s var(--transition-ease);
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s var(--transition-ease);
  z-index: 0;
}

.theme-toggle:hover::before {
  opacity: 1;
}

.theme-toggle i {
  position: relative;
  z-index: 1;
}

.theme-toggle:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* =====================
  Hero Section
===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 5;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.hero-subtitle::before {
  content: '';
  display: inline-block;
  width: 50px;
  height: 2px;
  background: var(--secondary);
  margin-right: 15px;
}

.hero-text {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  position: relative;
}

.typing-cursor {
  font-weight: bold;
  color: var(--secondary);
  animation: blink 1s infinite;
}

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

.profile-container {
  position: relative;
  z-index: 5;
}

.profile-image {
  width: 380px;
  height: 380px;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: 50% 30%;
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow-xl);
  transition: transform 0.5s var(--transition-ease);
}

@keyframes pulse-reverse {
  0% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1.07);
  }
}

.profile-circle {
  position: absolute;
  width: 410px;
  height: 410px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.6;
  top: -15px;
  left: -15px;
  z-index: 1;
  animation: pulse 6s infinite alternate;
}


.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 5;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--dark-light);
  color: var(--light);
  font-size: 1.8rem;
  text-decoration: none;
  transition: all 0.3s var(--transition-ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s var(--transition-ease);
  z-index: 0;
}

.social-link:hover::before {
  opacity: 1;
}

.social-link i {
  position: relative;
  z-index: 1;
  transition: transform 0.3s var(--transition-ease);
}

.social-link:hover i {
  transform: translateY(-2px);
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.cta-btn {
  display: inline-block;
  padding: 12px 30px;
  background-image: var(--gradient);
  border-radius: var(--radius-full);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s var(--transition-ease);
  box-shadow: 0 10px 20px rgba(123, 82, 235, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  opacity: 0;
  transition: opacity 0.3s var(--transition-ease);
  z-index: -1;
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(123, 82, 235, 0.4);
}

/* =====================
  Experience Timeline
===================== */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 30px;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(odd) .card {
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 0;
}

.timeline-item:nth-child(even) .card {
  border-radius: var(--radius-lg) var(--radius-lg) 0 var(--radius-lg);
}

/* =====================
  Projects Showcase
===================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: 'Poppins', sans-serif;
  padding: 12px 30px;
  background: var(--dark-light);
  border: none;
  border-radius: var(--radius-full);
  color: var(--light);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--transition-ease);
  font-size: 1.1rem;
  min-width: 120px;
  text-align: center;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--dark-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s var(--transition-ease);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--transition-ease);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: var(--light);
  position: relative;
}

.project-desc {
  margin-bottom: 20px;
  color: var(--gray);
}

.project-desc a {
  color: var(--secondary);
  font-weight: 500;
  text-decoration: none;
}

.project-desc a:hover {
  color: var(--primary);
  text-decoration: underline;
}


.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  padding: 5px 12px;
  background: rgba(123, 82, 235, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary);
  transition: all 0.3s var(--transition-ease);
}

.tag:hover {
  background: rgba(123, 82, 235, 0.3);
  transform: translateY(-2px);
}

.project-details-btn {
  margin-top: auto;
  color: var(--primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--transition-ease);
  padding: 8px 0;
}

.project-details-btn i {
  transition: transform 0.3s var(--transition-ease);
}

.project-card:hover .project-details-btn {
  color: var(--secondary);
}

.project-card:hover .project-details-btn i {
  transform: rotate(90deg);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--transition-ease);
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--dark-light);
  width: 95%;
  max-width: 900px;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: translateY(30px);
  transition: transform 0.5s var(--transition-ease);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--dark-lighter);
  position: relative;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient);
}

.modal-header h3 {
  font-size: 1.8rem;
  margin-bottom: 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-close {
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s var(--transition-ease);
}

.modal-close:hover {
  color: var(--secondary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section h4 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--secondary);
  border-bottom: 1px solid var(--dark-lighter);
  padding-bottom: 10px;
}

.modal-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-tech-tag {
  padding: 8px 15px;
  background: rgba(123, 82, 235, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary);
}

.modal-list {
  list-style-type: none;
  padding-left: 0;
}

.modal-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--light);
}

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

/* =====================
  Skills Chart
===================== */
.skills-container {
  background: var(--dark-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 30px;
  box-shadow: var(--shadow-lg);
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.skill-category {
  margin-bottom: 0;
}

.skill-category h3 {
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid rgba(123, 82, 235, 0.3);
  padding-bottom: 10px;
  position: relative;
}

.skill-category h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--gradient);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-item {
  padding: 10px 18px;
  background: var(--dark-darker, #141e33);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--light);
  transition: all 0.3s var(--transition-ease);
  cursor: default;
}

body.light-theme .skill-item {
  background: rgba(123, 82, 235, 0.1);
}

/* =====================
  Contact Section
===================== */
.contact-section {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at bottom left, rgba(123, 82, 235, 0.05), transparent 60%);
  z-index: 0;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.contact-info {
  padding-right: 40px;
}

.contact-form {
  background: var(--dark-light);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--dark-lighter);
  border-radius: var(--radius-md);
  background: var(--dark);
  color: var(--light);
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s var(--transition-ease);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(123, 82, 235, 0.2);
}

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

.submit-btn {
  font-size: 0.9rem; /* increase text size */
  display: inline-block;
  padding: 15px 20px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--transition-ease);
  box-shadow: 0 10px 20px rgba(123, 82, 235, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(123, 82, 235, 0.4);
}

/* =====================
  Floating Action Button
===================== */
.floating-action-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s var(--transition-ease);
  opacity: 0;
  transform: translateY(20px);
}

.floating-action-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.floating-action-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* =====================
  Card Styles (Enhanced)
===================== */
.card {
  background: var(--dark-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--transition-ease), 
              box-shadow 0.3s var(--transition-ease), 
              background-color var(--transition-speed) var(--transition-ease);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid transparent;
  height: 100%;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(123, 82, 235, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--transition-ease);
  z-index: 0;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-left: 3px solid var(--primary);
}

/*
* Updated card-header styling:
* Date on the left, title on the right.
*/
.card-header {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem; /* space between date and title */
}

.card-title-container {
  flex: 1;
}

.card-date {
  color: var(--secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 14px;
  background-color: rgba(24, 202, 232, 0.1);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.3s var(--transition-ease);
  border: 1px solid rgba(24, 202, 232, 0.2);
}

.card:hover .card-date {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.card-title {
  font-size: 1.3rem;
  color: var(--light);
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  transition: color var(--transition-speed) var(--transition-ease);
}

.card-subtitle {
  display: flex;
  align-items: center;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.card-subtitle a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  transition: all 0.3s var(--transition-ease);
}

.card-subtitle a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.card-list {
  list-style-type: none;
  padding-left: 0;
  padding-top: 15px;
  position: relative;
  z-index: 1;
}

.card-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--light);
  transition: all 0.3s var(--transition-ease);
}

.card-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  transition: transform 0.3s var(--transition-ease);
}

.card-list li:hover::before {
  transform: translateX(5px);
  color: var(--secondary);
}

/* =====================
  Footer
===================== */
footer {
  background: var(--dark-light);
  padding: 50px 0 20px;
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition-speed) var(--transition-ease);
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  z-index: 10;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  text-align: center;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 15px;
  display: inline-block;
}

.footer-text {
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto 20px;
  transition: color var(--transition-speed) var(--transition-ease);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-social a {
  color: var(--light);
  font-size: 1.5rem;
  transition: all 0.3s var(--transition-ease);
}

.footer-social a:hover {
  color: var(--secondary);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 5px;
  font-size: 1rem;
  text-align: center;
  color: var(--gray);
  transition: color var(--transition-speed) var(--transition-ease);
}

/* =====================
  Animations
===================== */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

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

/* =====================
  Responsive Design
===================== */
@media (max-width: 1200px) {
  .skills-container {
    /* No direct .skills-grid changes here */
  }
  
  .skills-text {
    padding-right: 0;
    text-align: center;
  }
  
  .skills-text h2 {
    margin-left: auto;
    margin-right: auto;
  }
  
  .skills-text h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  .skill-categories {
    grid-template-columns: 1fr;
  }
  
  .timeline-container::after {
    left: 40px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 0;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 27px;
  }
  
  .timeline-item:nth-child(odd) .card,
  .timeline-item:nth-child(even) .card {
    border-radius: var(--radius-lg);
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-info {
    padding-right: 0;
    text-align: center;
  }
  
  .contact-info h2 {
    margin-left: auto;
    margin-right: auto;
  }
  
  .contact-info h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Responsive card date position */
  .card-header {
    flex-direction: column;
  }
  
  .card-date {
    margin-left: 0;
    margin-top: 10px;
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .hero-content {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-subtitle {
    justify-content: center;
  }
  
  .hero-subtitle::before {
    display: none;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .profile-container {
    margin: 0 auto;
    max-width: 300px;
  }
  
  .profile-image {
    width: 280px;
    height: 280px;
  }
  
  .profile-circle {
    width: 300px;
    height: 300px;
  }
  
  .navbar {
    width: 100%;
    border-radius: 0;
    top: 0;
    padding: 15px 20px;
  }
  
  .navbar.scrolled {
    transform: translateX(-50%);
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    gap: 15px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s var(--transition-ease), opacity 0.3s var(--transition-ease);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  
  body.light-theme .nav-links {
    background: rgba(255, 255, 255, 0.95);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 100px;
  }

  /* ============================
    ADDED FOR MOBILE FIX
    Force timeline single-column,
    move line to left, and
    force skills 1-column.
  ============================ */
  .timeline-container::before {
    left: 20px !important;
    margin-left: 0 !important;
  }
  .timeline-item {
    width: 100% !important;
    left: 0 !important;
    padding-left: 60px !important; 
    padding-right: 20px;
  }
  .timeline-item:nth-child(even) {
    left: 0 !important;
  }
  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 7px;
  }

  .skills-grid {
    grid-template-columns: 1fr; /* Single column on phones */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.2rem;
  }
  
  .profile-image {
    width: 240px;
    height: 240px;
  }
  
  .profile-circle {
    width: 260px;
    height: 260px;
  }
  
  .cta-btn {
    display: block;
    text-align: center;
  }
  
  .form-input, .form-textarea {
    padding: 10px;
  }
  /* (Timeline logic removed here so the above 768px rules handle phone layout) */
}

/* Make the timeline circles cyan and remove the line */
.timeline-item::after {
  background: #0f172a !important;
  border: 4px solid #18cae8 !important;
  z-index: 100 !important;
  box-shadow: 0 0 0 5px #0f172a !important;
}

.timeline-item:hover::after {
  background: #18cae8 !important;
}

/* Remove the original timeline line */
.timeline-container::after {
  display: none !important;
}

/* Create a new vertical timeline line */
.timeline-container::before {
  display: none !important;
}

/* Skills hover state */
.skill-item:hover {
  background: var(--secondary) !important; /* Light blue background */
  color: white !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

