/* CSS Custom Properties (Variables) */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-elevation: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --blur-strength: 20px;
    --border-radius: 16px;
    --border-radius-large: 24px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    --shadow-elevation: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    transition: opacity 0.4s ease;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

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

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevation);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(120, 119, 198, 0.1) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 119, 198, 0.1) 50%, transparent 70%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translateX(-50px) translateY(-50px) rotate(0deg); }
    50% { transform: translateX(50px) translateY(50px) rotate(180deg); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-badge i {
    color: #10b981;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero .subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.6s both;
}

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

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.75rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border-color: rgb(0, 213, 255);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.4);
}

/* Section Styles */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 4rem;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevation);
    border-color: rgba(255, 255, 255, 0.3);
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 400;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-item {
    padding: 3rem 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--success-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.5rem;
}

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

/* Qualification Section */
.qualification-section {
  position: relative;
  padding: 8rem 0;
  background: radial-gradient(circle at 30% 50%, rgba(120, 119, 198, 0.2), transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(255, 119, 198, 0.2), transparent 50%);
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.qualification-section h3 {
  background: rgb(0, 179, 255);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  align-items: center;
  gap: 1rem;
}

.journey {
    margin-top: 0%;
    padding-top: 0%;
    display: grid;
    text-align: center;
    color: var(--text-secondary);
}

.qualification-timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  position: relative;
  margin-top: 4rem;
}

.timeline-card {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.timeline-card.left {
  text-align: right;
}

.timeline-card.right {
  text-align: left;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: var(--text-muted);
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 4px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  background: var(--secondary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 2fr));
    gap: 2rem;    
}

.skill-category {
    padding: 3rem;
}

.skill-category h3 {
    background: var(--secondary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-category i {
    font-size: 1.75rem;
    background: var(--secondary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: var(--primary-gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.skill-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    border-radius: var(--border-radius-large);
    overflow: hidden;
    position: relative;
}

.project-header {
    padding: 3rem;
    position: relative;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.tech-tag {
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.project-links {
    display: flex;
    gap: 1.5rem;
    padding: 0 3rem 3rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Contact Section */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.contact-item {
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

.contact-item i {
    font-size: 3rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: block;
}

.contact-item h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.contact-item a:hover {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-item a:hover::after {
    width: 100%;
}

/* Floating Elements */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5);
}

.floating-theme-toggle {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glass);
}

.floating-theme-toggle:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-5px) scale(1.1) rotate(180deg);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.4);
}

/* Footer */
footer {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    color: var(--text-muted);
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        backdrop-filter: blur(var(--blur-strength));
        -webkit-backdrop-filter: blur(var(--blur-strength));
        flex-direction: column;
        padding: 2rem;
        border: 1px solid var(--border-color);
        border-top: none;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 5rem 0;
    }

    .floating-theme-toggle,
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .floating-theme-toggle {
        bottom: 90px;
        right: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
    .qualification-timeline {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .timeline-line {
    left: 5%;
    width: 2px;
  }

  .timeline-card.left,
  .timeline-card.right {
    text-align: left;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 4rem 0;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

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

    .project-card .project-header,
    .project-card .project-links {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .skill-category {
        padding: 2rem;
    }
      .qualification-section {
    padding: 4rem 0;
  }

  .qualification-timeline {
    gap: 3rem;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header h3 {
    font-size: 1.15rem;
  }

  .card-header h4 {
    font-size: 0.95rem;
  }
}