/* Base Styles & Theme Variables */
:root {
  /* Light Theme (Default) */
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #e0e7ff;
  --secondary-color: #7c3aed;
  --accent-color: #06b6d4;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* Border & Divider */
  --border-color: #e2e8f0;
  --divider: #e2e8f0;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Typography */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Dark Theme with Glow Effects */
[data-theme="dark"] {
  --primary-color: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #4f46e5;
  --secondary-color: #a78bfa;
  --accent-color: #22d3ee;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  
  /* Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  
  /* Border & Divider */
  --border-color: #3b82f6;
  --divider: #2d3748;
  
  /* Card Styles */
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-hover: rgba(51, 65, 85, 0.9);
  
  /* Glow Effects */
  --glow: 0 0 15px rgba(129, 140, 248, 0.5);
  --card-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition-slow);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

section {
    padding: var(--space-xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

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

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

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--black);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.bg-light {
    background-color: var(--light-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.btn.secondary:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-slow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

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

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

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

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

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

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

/* Nav Actions (Theme Toggle & Hamburger) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0.8;
}

.theme-toggle:hover {
    opacity: 1;
    background-color: var(--bg-tertiary);
    transform: rotate(30deg);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.theme-toggle i {
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.theme-toggle .fa-sun {
    opacity: 1;
    transform: translateY(0) scale(1);
    color: var(--warning);
}

.theme-toggle .fa-moon {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    color: var(--info);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Theme transition */
html {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar styles for theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

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

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* For smooth theme transitions */
body.loaded * {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.1s ease;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    .theme-toggle {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: #0000EE !important;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .line {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Animate hamburger to X */
.hamburger.active .line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
#hero {
    position: relative;
    overflow: hidden;
}

.profile-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-light) 0%, rgba(79, 70, 229, 0.1) 50%, transparent 70%);
    opacity: 0.6;
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    position: relative;
    display: inline-block;
    padding: 0 0.2em;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(124, 58, 237, 0.2));
    z-index: -1;
    transform: skew(-12deg);
    border-radius: 4px;
    transition: var(--transition);
}

.hero-content:hover .highlight::after {
    height: 12px;
    bottom: 3px;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(10%, 5%) rotate(5deg);
    }
}

.profile-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.profile-image-container:hover .profile-image {
    transform: scale(1.05);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.about-details p {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.about-details i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    perspective: 1000px;
}

.skill-category.project-card {
    background: var(--card-bg, var(--bg-secondary));
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--card-glow, var(--shadow));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-category.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    z-index: -1;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .skill-category.project-card::before {
    opacity: 0.3;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { filter: blur(5px); opacity: 0.2; }
    50% { filter: blur(8px); opacity: 0.4; }
    100% { filter: blur(5px); opacity: 0.2; }
}

.skill-category:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 30px rgba(99, 102, 241, 0.3);
    border-color: rgba(129, 140, 248, 0.3);
}

.skill-category:hover::before {
    opacity: 1;
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.5), 
        rgba(79, 70, 229, 0.2), 
        rgba(99, 102, 241, 0.1));
}

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

.skill-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(129, 140, 248, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(129, 140, 248, 0.1);
    backdrop-filter: blur(5px);
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-tag:hover::before {
    opacity: 1;
}

.skill-tag:hover {
    transform: translateY(-3px);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    border-color: transparent;
}

.skill-tag::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    margin-left: 8px;
    box-shadow: 0 0 10px var(--success);
    flex-shrink: 0;
}

.skill-tag[data-level="intermediate"]::after {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.skill-tag[data-level="beginner"]::after {
    background: var(--error);
    box-shadow: 0 0 10px var(--error);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg, var(--bg-secondary));
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--card-glow, var(--shadow));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    z-index: -1;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .project-card::before {
    opacity: 0.3;
    animation: borderGlow 3s linear infinite;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), var(--card-glow, var(--shadow-md));
    border-color: var(--primary-color);
    background: var(--card-hover, var(--bg-tertiary));
}

.project-header {
    padding: 1.5rem 1.5rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-header h3 {
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.project-links a {
    color: var(--text-color);
    margin-left: 0.75rem;
    font-size: 1.25rem;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.project-card p {
    padding: 0 1.5rem 1rem;
    color: var(--secondary-color);
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.5rem 1rem;
}

.project-tech span {
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-features {
    padding: 0 1.5rem 1.5rem;
    list-style: none;
}

.project-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

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

/* Highlights Section */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.highlight-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

.highlight-card h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.highlight-card p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Contact Section */
#contact {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(129, 140, 248, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.1) 0%, transparent 25%);
    pointer-events: none;
    z-index: 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 4rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.contact-info {
    position: relative;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    right: -2rem;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(129, 140, 248, 0.3), 
        transparent);
    opacity: 0.5;
}

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

.contact-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(129, 140, 248, 0.1);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.contact-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.2), 
        rgba(99, 102, 241, 0.1), 
        rgba(79, 70, 229, 0.05));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    transition: all 0.4s ease;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 30px rgba(99, 102, 241, 0.2);
    border-color: rgba(129, 140, 248, 0.3);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.05), 
        rgba(255, 255, 255, 0.02));
}

.contact-item:hover::before {
    opacity: 1;
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.3), 
        rgba(99, 102, 241, 0.15), 
        rgba(79, 70, 229, 0.1));
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(129, 140, 248, 0.1);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

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

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    position: relative;
}

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

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

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

.contact-form {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(129, 140, 248, 0.1);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.contact-form::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.2), 
        rgba(99, 102, 241, 0.1), 
        rgba(79, 70, 229, 0.05));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    transition: all 0.4s ease;
}

.contact-form:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 30px rgba(99, 102, 241, 0.2);
    border-color: rgba(129, 140, 248, 0.3);
}

.contact-form:hover::before {
    opacity: 1;
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.3), 
        rgba(99, 102, 241, 0.15), 
        rgba(79, 70, 229, 0.1));
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0.8;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover, var(--shadow-lg)), var(--glow);
    border-color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

/* Floating label effect */
.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-1.5rem) scale(0.9);
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .contact-content {
        grid-template-columns: 1fr 1.5fr;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info::before {
        display: none;
    }
    
    .contact-item,
    .contact-form {
        transform: none !important;
    }
}

/* Animation for form elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.contact-item:nth-child(1) { animation: float 6s ease-in-out infinite; }
.contact-item:nth-child(2) { animation: float 6s ease-in-out 1s infinite; }
.contact-item:nth-child(3) { animation: float 6s ease-in-out 2s infinite; }

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(129, 140, 248, 0.1);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid transparent;
}

.social-link span {
    font-size: 0.9rem;
    font-weight: 500;
}

[data-theme="dark"] .social-link {
    background: rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    border-color: rgba(129, 140, 248, 0.3);
}

/* Ensure Font Awesome icons are properly aligned */
.fab, .fas {
    line-height: 1;
    vertical-align: middle;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background-color: var(--black);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        transition: var(--transition);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-content h2 {
        font-size: 1.25rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .btn.secondary {
        margin-left: 0;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-details {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.1rem;
    }

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

    .project-card,
    .highlight-card {
        margin: 0 1rem;
        width: auto;
    }

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