:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.btn-download-resume {
    background-color: var(--success-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-download-resume:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray-color);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: #2a75e6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f6ff;
    transform: translateY(-3px);
}

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

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

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

.hero-image {
    position: relative;
}

.code-snippet {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.code-snippet pre {
    margin: 0;
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'Courier New', Courier, monospace;
    color: #9cdcfe;
    font-size: 0.9rem;
    line-height: 1.5;
}
/* Add these new styles to your existing CSS file */

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Profile image styles */
.profile-image-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 30px;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero section adjustments */
.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .hero .container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        align-items: center;
    }
    
    .hero-content {
        flex: 1;
        padding-right: 50px;
    }
    
    .hero-image {
        flex: 1;
        margin-top: 0;
        align-items: flex-end;
    }
}

/* Certification logo adjustments */
.certification-header .university-logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certification-header .university-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Responsive adjustments */

/* About Section */
.about {
    padding: 100px 0;
    background-color: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
}

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

.personal-info {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.info-label {
    font-weight: 600;
    margin-right: 10px;
    min-width: 100px;
    color: var(--primary-color);
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.skill-tag {
    background-color: #f0f6ff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-color);
    border: 1px solid #d0e0ff;
}

/* Expertise Section */
.expertise {
    padding: 100px 0;
    background-color: #f8f9fa;
}

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

.expertise-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.expertise-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.expertise-card ul {
    list-style-position: inside;
}

.expertise-card ul li {
    margin-bottom: 10px;
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background-color: white;
}

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

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 0;
    position: relative;
}

.timeline-date {
    position: absolute;
    width: 120px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 8px 15px;
    border-radius: 20px;
    left: 50%;
    margin-left: -60px;
    top: 20px;
    font-weight: 500;
}

.timeline-content {
    width: calc(50% - 40px);
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #f8f9fa;
    top: 30px;
    transform: rotate(45deg);
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -10px;
}

.timeline-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.timeline-content ul {
    list-style-position: inside;
}

.timeline-content ul li {
    margin-bottom: 8px;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background-color: #f8f9fa;
}

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

.project-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h3 {
    color: var(--primary-color);
}

.project-links a {
    margin-left: 10px;
    color: var(--gray-color);
    transition: color 0.3s;
}

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

.project-tech {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: var(--dark-color);
}

/* Certifications Section */
.certifications {
    padding: 100px 0;
    background-color: white;
}

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

.certification-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.certification-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.university-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.certification-header .university-logo img {
    width: 50px; /* Adjust as needed */
    height: 50px; /* Adjust as needed */
    object-fit: contain;
}

.uc-davis {
    background-image: url('images/UC-Davis.png');
}

.duke {
    background-image: url('images/Duke-Uni.png');
}

.uc-santa-cruz {
    background-image: url('images/ucsc.png');
}

.rice {
    background-image: url('images/rice-uni.png');
}

.u-michigan {
    background-image: url('images/uni-michigan.png');
}

.u-buffalo {
    background-image: url('images/uni-bufallo.png');
}

.certification-card h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.university-name {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cert-date {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.certification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.btn-verify {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-verify:hover {
    background-color: #2a75e6;
}

.credential-id {
    font-size: 0.7rem;
    color: var(--gray-color);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: #f8f9fa;
}

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

.contact-info h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.contact-info .info-item {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.contact-info .info-item i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Back to top button */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 99;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Base improvements */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Larger tap targets */
    a, button, input, .btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Header */
    nav ul {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    nav ul.show {
        transform: translateY(0);
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .mobile-menu {
        display: block;
        font-size: 1.8rem;
    }
    
    /* Hero section */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero h2 {
        font-size: 1.4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .code-snippet {
        font-size: 0.8rem;
        padding: 15px;
        margin-top: 30px;
    }
    
    /* Grid layouts */
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Form inputs */
    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .contact-form button[type="submit"] {
        width: 100%;
        padding: 15px;
    }
    
    /* Loading spinner */
    .spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    .profile-image-container {
        width: 150px;
        height: 150px;
    }
    
    .logo-image {
        width: 35px;
        height: 35px;
    }

    
    /* Error message */
    .mobile-error-alert {
        background: #ff4444;
        color: white;
        padding: 15px;
        border-radius: 5px;
        margin-bottom: 20px;
        animation: fadeIn 0.3s ease;
    }
    
    /* Back to top button */
    #backToTop {
        width: 40px;
        height: 40px;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 90px);
        margin-left: 70px !important;
    }
    
    .timeline-date {
        left: 0;
        right: auto;
        text-align: left;
        width: auto;
        max-width: 120px;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

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

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}