/* Variables and Theme */
:root {
    /* Light Theme Colors */
    --primary-color: #4f46e5;
    --secondary-color: #4338ca;
    --text-color: #111827;
    --light-text: #4b5563;
    --background: #ffffff;
    --background-rgb: 255, 255, 255;
    --section-bg: #f9fafb;
    --card-bg: #ffffff;
    --border-color: rgba(229, 231, 235, 0.5);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Colors */
.dark-mode {
    --primary-color: #818cf8;
    --secondary-color: #6366f1;
    --text-color: #f3f4f6;
    --light-text: #9ca3af;
    --background: #111827;
    --background-rgb: 17, 24, 39;
    --section-bg: #1f2937;
    --card-bg: #1f2937;
    --border-color: rgba(75, 85, 99, 0.5);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Light Theme Colors - Explicit */
.light-mode {
    --primary-color: #4f46e5;
    --secondary-color: #4338ca;
    --text-color: #111827;
    --light-text: #4b5563;
    --background: #ffffff;
    --background-rgb: 255, 255, 255;
    --section-bg: #f9fafb;
    --card-bg: #ffffff;
    --border-color: rgba(229, 231, 235, 0.5);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Theme Transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(45deg);
    color: var(--primary-color);
}

/* Background Animation */
#bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding-top: 70px;
}

/* Ensure all content is above the animation */
.section-header,
.about-content,
.projects-content,
.resume-content,
.contact-content {
    position: relative;
    z-index: 1;
}

/* Background Overlays */
body::before {
    content: none;  /* Remove the previous overlay */
}

.light-mode .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 0;
}

.dark-mode .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(var(--background-rgb), 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.nav-brand {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

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

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

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

/* Hero Section */
.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .title {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.hero-text .subtitle {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-button:not(.secondary) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--card-shadow);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-container {
    position: relative;
    width: 400px;
    height: 400px;
    z-index: 2;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--card-shadow);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 4px solid var(--background);
    transition: transform 0.3s ease;
}

.profile-bg {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    z-index: 1;
    opacity: 0.15;
    transition: transform 0.3s ease;
}

.profile-container:hover .profile-img {
    transform: scale(1.02);
}

.profile-container:hover .profile-bg {
    transform: scale(1.1);
}

.blob-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    animation: blob 8s ease-in-out infinite;
    opacity: 0.1;
    z-index: 1;
    filter: blur(30px);
}

@keyframes blob {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--light-text);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    background: var(--light-text);
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 20px); opacity: 0; }
}

/* About Section */
.about {
    padding: 6rem 5%;
    background-color: var(--section-bg);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.about-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.about-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.about-card p {
    color: var(--light-text);
}

/* Journey Timeline */
.journey-section {
    margin-top: 2rem;
}

.journey-section h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-color);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    padding-right: 3rem;
    left: 0;
}

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

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -50px;
}

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

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--light-text);
}

/* Certifications */
.certifications-section {
    margin-top: 4rem;
}

.certifications-section h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.certification-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.certification-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.certification-item:hover {
    transform: translateX(10px);
}

.cert-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cert-icon i {
    font-size: 1.25rem;
    color: white;
}

.cert-details h4 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.cert-details p {
    color: var(--light-text);
}

/* Projects Section */
.projects {
    padding: 6rem 5%;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--section-bg);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.project-content p {
    margin: 0 0 1rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-stack span {
    background: var(--section-bg);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.project-link i {
    font-size: 1.1rem;
}

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

/* Project Details Modal */
.project-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-details.active {
    display: flex;
    opacity: 1;
}

.project-details .project-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.project-details .project-preview {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.project-details .project-preview:hover {
    transform: scale(1.02);
}

.details-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--hover-shadow);
}

.project-details.active .details-content {
    transform: translateY(0);
}

.details-content::-webkit-scrollbar {
    width: 8px;
}

.details-content::-webkit-scrollbar-track {
    background: var(--section-bg);
    border-radius: 4px;
}

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

.details-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-description {
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.details-content h4 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.details-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.details-content ul li {
    color: var(--light-text);
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
    line-height: 1.6;
}

.details-content ul li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.metric {
    text-align: center;
    padding: 1.5rem;
    background: var(--section-bg);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.5rem;
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Resume Section */
.resume {
    padding: 6rem 5%;
    background-color: var(--section-bg);
}

/* Interests Section */
.interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.interest-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(var(--background-rgb), 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.interest-item:hover i {
    transform: scale(1.1);
}

.interests-card {
    text-align: center;
}

.resume-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.resume-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.resume-section h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.resume-card {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    background: var(--background);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resume-card:last-child {
    margin-bottom: 0;
}

.resume-card:hover {
    transform: translateX(10px);
    box-shadow: var(--card-shadow);
}

.resume-card h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.resume-card .institution {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.resume-card .description {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.resume-card .skills {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.resume-card .date {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.certification-list {
    list-style: none;
    margin: 1rem 0;
}

.certification-list li {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

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

.resume-cta {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Blog Section */
.blog {
    padding: 6rem 5%;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 2rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}

/* Contact Section */
.contact {
    padding: 6rem 5%;
    background-color: var(--section-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

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

.submit-btn {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* Footer */
footer {
    background-color: var(--section-bg);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

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

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

.copyright {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

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

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .resume-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .profile-container {
        width: 300px;
        height: 300px;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--background);
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--card-shadow);
    }

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

    .hamburger {
        display: block;
    }

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

    .footer-links {
        justify-content: center;
    }

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

    .timeline-item {
        width: 100%;
        padding-left: 80px !important;
        padding-right: 0 !important;
        left: 0 !important;
    }

    .timeline-icon {
        left: 10px !important;
    }

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

    .certification-item {
        flex-direction: column;
        text-align: center;
    }

    .cert-icon {
        margin: 0 auto;
    }

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

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

    .details-content {
        padding: 2rem;
    }

    .project-image {
        padding-bottom: 75%; /* 4:3 aspect ratio for mobile */
    }

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

    .resume-card {
        padding: 1.25rem;
    }

    .resume-card .date {
        position: static;
        display: block;
        margin-bottom: 1rem;
    }

    .resume-card:hover {
        transform: translateX(0);
        transform: translateY(-5px);
    }

    .project-preview,
    .project-image-gallery .main-image {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text .title {
        font-size: 1.2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .project-filters {
        flex-wrap: wrap;
    }

    .profile-container {
        width: 250px;
        height: 250px;
    }
}

/* Project Detail Page */
.project-detail-container {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 2rem;
}

.back-to-projects {
    margin-bottom: 2rem;
}

.back-to-projects a {
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-projects a:hover {
    color: var(--primary-color);
}

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

.project-header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.project-tags span {
    background: var(--section-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-image-gallery {
    margin-bottom: 4rem;
}

.project-image-gallery .main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.image-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

.project-description {
    margin-bottom: 4rem;
}

.project-description h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.project-description p {
    color: var(--light-text);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--light-text);
}

.technical-details {
    margin: 4rem 0;
}

.tech-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.tech-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.tech-section ul {
    list-style: none;
}

.tech-section li {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tech-section li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

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

.metric-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.5rem;
}

.metric-card .metric-label {
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .project-header h1 {
        font-size: 2.5rem;
    }

    .project-image-gallery .main-image {
        height: 300px;
    }

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

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

    .project-links {
        flex-direction: column;
        align-items: center;
    }

    .project-links .cta-button {
        width: 100%;
        text-align: center;
    }
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1rem 0;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--background);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link i {
    font-size: 1.5rem;
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--section-bg);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: loader-spin 1s ease-in-out infinite;
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

/* Page Transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.page-transition.active {
    transform: translateY(0);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--section-bg) 25%,
        var(--card-bg) 50%,
        var(--section-bg) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

/* Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--section-bg);
    z-index: 1001;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 0.1s ease;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* Interactive Elements */
a, button, .project-card, .nav-links a, .social-link, .cta-button {
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* Enhanced Hover Effects */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(var(--primary-color-rgb), 0.2),
        rgba(var(--secondary-color-rgb), 0.2)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(10px);
    white-space: nowrap;
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* High Contrast Mode */
.high-contrast {
    --primary-color: #0066cc;
    --secondary-color: #003366;
    --text-color: #000000;
    --light-text: #333333;
    --background: #ffffff;
    --section-bg: #f0f0f0;
    --card-bg: #ffffff;
    --border-color: #000000;
}

.high-contrast.dark-mode {
    --primary-color: #66ccff;
    --secondary-color: #3399ff;
    --text-color: #ffffff;
    --light-text: #cccccc;
    --background: #000000;
    --section-bg: #1a1a1a;
    --card-bg: #000000;
    --border-color: #ffffff;
}