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

:root {
    --navbar-height: 60px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--navbar-height);
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    width: 100%;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #007bff;
}

nav a.active {
    color: #007bff;
    position: relative;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

#home {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

#home .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 4rem;
}

.home-content-left {
    flex: 1;
}

.profile-photo {
    flex-shrink: 0;
}

.profile-photo img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.typing-text {
    font-size: 1.5rem;
    margin-top: 1rem;
    border-right: 2px solid white;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(30, end), blink-caret 0.75s step-end infinite;
}

.about-content {
    margin-top: 2rem;
    max-width: 600px;
}

.skills {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.skill {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

/* New About Me Section Styles */
#about {
    background: #f0f4f8;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
    margin-top: 2rem;
}

.about-text {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hobby-list {
    list-style: none;
    margin-top: 1rem;
}

.hobby-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hobby-list i {
    color: #007bff;
}

/* Photo Collage Section Styles */
#photos {
    background: linear-gradient(135deg, #f6d365, #fda085);
}

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

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

#experience {
    background: white;
}

/* Updated Timeline Styles */
.timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #007bff;
    top: 0;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.timeline-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 45%;
    position: relative;
    text-align: left; /*Override main content*/
}

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

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

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

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

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

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-header-text {
    flex: 1;
}

/* Update media query for mobile responsiveness */
@media (max-width: 768px) {
    .timeline-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }
}

.timeline-date {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#projects {
    background: #f8f9fa;
}

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

.project {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
}

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

.project h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.project-content {
    position: relative;
}

.project-text {
    margin: 0;
    line-height: 1.6;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.project-text.collapsed {
    max-height: 100px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.read-more-toggle {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.read-more-toggle:hover {
    color: #0056b3;
    text-decoration: underline;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    /* color: #666; */
    color: black;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.project-link:hover {
    color: #007bff;
}

.project-link i {
    font-size: 16px;
}

footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 0;
    position: relative;
}

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

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-section h3 {
    /* color: #007bff; */
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* color: #ccc; */
    color: white;
}

.contact-item i {
    /* color: #007bff; */
    color: white;
    width: 20px;
}

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

.social-icon {
    /* color: #007bff; */
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    text-align: center;
    /* color: #666; */
    color: white;
    font-size: 0.9rem;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white }
}

@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    #home .content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .profile-photo img {
        width: 200px;
        height: 200px;
    }

    .skills {
        justify-content: center;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 2rem;
    }

    .timeline-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }

    .timeline-content {
        width: 100%;
    }

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

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white }
}

@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    #home .content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .profile-photo img {
        width: 200px;
        height: 200px;
    }

    .skills {
        justify-content: center;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 2rem;
    }

    .timeline-date {
        text-align: left;
        padding-right: 0;
        margin-bottom: 0.5rem;
    }

    .timeline-content {
        width: 100%;
    }

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

    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}