:root {
    --primary: #2196F3; /* Material Blue 500 */
    --primary-light: #64B5F6; /* Material Blue 300 */
    --primary-dark: #1976D2; /* Material Blue 700 */
    --secondary: #FF9800; /* Material Orange 500 */
    --accent: #4CAF50; /* Material Green 500 */
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --success: #4CAF50; /* Material Green 500 */
    --card-bg: #ffffff;
    --section-bg: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Material Design Color Palette */
    --material-red: #F44336;
    --material-pink: #E91E63;
    --material-purple: #9C27B0;
    --material-deep-purple: #673AB7;
    --material-indigo: #3F51B5;
    --material-blue: #2196F3;
    --material-light-blue: #03A9F4;
    --material-cyan: #00BCD4;
    --material-teal: #009688;
    --material-green: #4CAF50;
    --material-light-green: #8BC34A;
    --material-lime: #CDDC39;
    --material-yellow: #FFEB3B;
    --material-amber: #FFC107;
    --material-orange: #FF9800;
    --material-deep-orange: #FF5722;
    --material-brown: #795548;
    --material-grey: #9E9E9E;
    --material-blue-grey: #607D8B;
}

[data-theme="dark"] {
    --primary: #64B5F6; /* Material Blue 300 */
    --primary-light: #90CAF9; /* Material Blue 200 */
    --primary-dark: #42A5F5; /* Material Blue 400 */
    --secondary: #FFB74D; /* Material Orange 300 */
    --accent: #81C784; /* Material Green 300 */
    --light: #0f172a;
    --dark: #f1f5f9;
    --gray: #94a3b8;
    --success: #81C784; /* Material Green 300 */
    --card-bg: #1e293b;
    --section-bg: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--text-primary);
    display: inline-block;
    position: relative;
    font-weight: 700;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Header & Navigation */
header {
    background-color: var(--card-bg);
    color: var(--text-primary);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo span {
    color: var(--primary);
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

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

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--section-bg);
    transform: rotate(15deg);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    background-color: var(--section-bg);
    color: var(--text-primary);
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* This prevents the background from blocking interactions */
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    z-index: 1;
    pointer-events: none; /* This prevents individual shapes from blocking interactions */
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    left: -50px;
    animation-delay: 2s;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    animation-delay: 4s;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.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:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    background-color: var(--primary-dark);
}

.hero-btn {
    position: relative;
    z-index: 3;
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Simple Grid Approach - Most Reliable */
.about-content {
    display: grid;
    grid-template-columns: 280px 1fr; /* Fixed image width, flexible text */
    gap: 60px;
    align-items: start; /* Start from top */
}

.profile-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 373px; /* 280px * 4/3 = 373px for 3:4 ratio */
}

.profile-img {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 3/4;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.about-text {
    padding: 20px 0; /* Add some vertical padding to help with visual centering */
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 12px;
    display: block;
}

.name-space {
    display: inline-block;
    width: 4px; /* Creates space between first and last name */
}

/* Logo Image Styles for Header */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--primary);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.skill-item {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    border-color: var(--primary);
    background-color: var(--primary);
    color: white;
}

.skill-item:hover i {
    color: white;
}

.skill-item i {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Experience Section */
.experience {
    background-color: var(--section-bg);
}

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

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

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 50%;
    padding: 0 40px;
}

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

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

.timeline-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--card-bg);
    transform: rotate(45deg);
    border: 1px solid var(--border-color);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
    border-left: none;
    border-bottom: none;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-right: none;
    border-top: none;
}

.timeline-date {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1rem;
}

.timeline-content ul {
    padding-left: 20px;
}

.timeline-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Education Section */
.education-content {
    max-width: 900px;
    margin: 0 auto;
}

.education-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.education-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-date {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.education-item h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.education-item h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1rem;
}

.education-item p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.education-item strong {
    color: var(--text-primary);
}

/* Skills Section */
.skills {
    background-color: var(--section-bg);
}

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

/* Skills Section - Improved Spacing */
.skill-category {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 30px; /* Increased from 20px to 30px */
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    padding-bottom: 15px; /* Added padding */
    border-bottom: 2px solid var(--section-bg); /* Optional: Add a subtle separator */
    transition: all 0.3s ease;
}

.skill-category:hover h3 {
    color: var(--primary); /* Highlight title on hover */
    border-bottom-color: var(--primary); /* Change separator color on hover */
}

.skill-category h3 i {
    margin-right: 10px;
    color: var(--primary);
    transition: color 0.3s ease;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px; /* Added space above skills chips */
}

.skill-tag {
    background-color: var(--section-bg);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.skill-tag:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.project-img {
    height: 200px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background-color: var(--section-bg);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

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

.project-link i {
    margin-right: 5px;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.cert-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cert-info {
    flex: 1;
    min-width: 0;
}

.cert-info h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.cert-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Contact Section */
.contact {
    background-color: var(--section-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-side {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-details h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.contact-details p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-5px);
    border-color: transparent;
}

.contact-message {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
}

.contact-message i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-message h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    color: var(--text-primary);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
}