@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #56b68b;
    --background-color: #f5f5f5;
    --text-color: #333333;
    --accent-color: #7f8c8d;
    --dark-accent: #34495e;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background: var(--background-color);
    overflow: hidden; /* Change this to hidden */
    height: 100vh; /* Set the body height to full viewport height */
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

header {
    position: fixed; /* Change from sticky to fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4a90e2, #34495e);
    opacity: 0.9;
    z-index: 1;
    transition: all 0.3s ease;
}

header.scrolled .header-content {
    transform: scale(0.9);
}

.header-content h1,
.header-content .subtitle {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

header.scrolled .header-content h1,
header.scrolled .header-content .subtitle {
    opacity: 0;
    transform: translateY(-20px);
    position: absolute;
    pointer-events: none;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 4; /* Increased z-index */
}

.subtitle {
    font-size: 1.2rem;
    color: #f0f0f0;
    margin-top: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 4; /* Increased z-index */
}

nav {
    margin-top: 1.5rem;
    position: relative;
    z-index: 5; /* Increased z-index */
    transition: margin 0.3s ease;
}

header.scrolled nav {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    display: block;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

nav ul li a:hover::before {
    transform: scale(1);
}

nav ul li a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}


/* Remove the animation for the header background */
.header-background:hover {
    background-size: 100% 100%;
}

/* Remove the clip-path animation */
header h1::after {
    display: none;
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    .header-content {
        padding: 0 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    main {
        padding: 1rem;
        padding-top: calc(70px + 3rem);
    }

    h2 {
        font-size: 1.8rem;
    }

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

    .about-image-container {
        width: 250px;
        height: 350px;
        margin-bottom: 2rem;
    }

    .about-text {
        text-align: center;
    }

    .skills-grid {
        justify-content: space-around;
    }

    .skill-item {
        width: 140px;
        height: 140px;
    }

    .skill-item svg {
        width: 55px;
        height: 55px;
    }

    .timeline-item {
        padding: 15px;
    }

    .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-skills {
        flex-wrap: wrap;
    }

    .timeline-skill {
        margin-bottom: 5px;
    }

    .contact-info {
        flex-direction: column;
    }
    
    .contact-info li {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .about-image-container {
        width: 200px;
        height: 280px;
    }

    .skill-item {
        width: 120px;
        height: 120px;
    }

    .skill-item svg {
        width: 45px;
        height: 45px;
    }

    .timeline-item {
        padding: 10px;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.9rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }

    .timeline-details {
        font-size: 0.9rem;
    }

    .timeline-skills {
        flex-wrap: wrap;
    }

    .timeline-skill {
        margin-bottom: 5px;
    }
}

/* Add this to create a subtle parallax effect */
.header-content {
    transform: translateZ(0);
    will-change: transform;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 180px;
}

section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    background-color: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.timeline {
    padding: 20px 0;
}

.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content {
    position: relative;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.timeline-description {
    margin-bottom: 10px;
}

.timeline-details {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.timeline-details li {
    margin-bottom: 5px;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.timeline-skill {
    background-color: var(--accent-color);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .timeline-item {
        padding: 15px;
    }

    .timeline-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: 2rem;
    }

    header h1::after {
        font-size: 0.9rem;
        bottom: -18px;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 5px 10px;
    }

    main {
        padding: 1rem;
        padding-top: calc(70px + 3rem);
    }

    h2 {
        font-size: 1.8rem;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item {
    animation: fadeInRight 0.5s ease forwards;
    animation-play-state: paused;
}

.timeline-item.visible {
    animation-play-state: running;
}

#skills ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    list-style-type: none;
}

#skills li {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#skills li:hover {
    transform: translateY(-5px) rotate(3deg);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    background-color: var(--dark-accent);
}

#contact ul {
    list-style-type: none;
    padding: 0;
}

#contact li {
    margin-bottom: 1rem;
}

#contact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

#contact a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

#contact a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, background-color 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

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

.scroll-to-top:hover {
    background-color: var(--secondary-color);
}

#about {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.about-image-container {
    position: relative;
    width: 300px;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.about-image-container:hover {
    transform: scale(1.05) rotate(2deg);
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.8), rgba(108, 92, 231, 0.8));
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-image-container:hover .image-overlay {
    opacity: 1;
}

.overlay-text {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.about-text {
    flex: 1;
}

.contact-info {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-info li {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.contact-info li:hover {
    background-color: var(--primary-color);
}

.contact-info li:hover a,
.contact-info li:hover .contact-icon {
    color: white;
}

.contact-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.contact-info a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
    }
    
    .contact-info li {
        width: 100%;
    }
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 0;
}

.skill-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.skill-item:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-item svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    fill: var(--primary-color);
}

.skill-item span {
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
    opacity: 1;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .skills-grid {
        gap: 0.75rem;
    }

    .skill-item {
        width: 90px;
        height: 90px;
        padding: 0.5rem;
    }

    .skill-item svg {
        width: 30px;
        height: 30px;
    }

    .skill-item span {
        font-size: 0.7rem;
    }
}

#about {
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '<about>';
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    opacity: 0.5;
    font-size: 1rem;
}

#about::after {
    content: '</about>';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    opacity: 0.5;
    font-size: 1rem;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.code-snippet {
    background-color: #f4f4f4;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.code-snippet pre {
    margin: 0;
}

.code-snippet code {
    font-family: 'Courier New', monospace;
    color: var(--dark-accent);
}

.fun-fact {
    background-color: #f0f8ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.fun-fact i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.fun-fact p {
    margin: 0;
    font-style: italic;
}

@media (max-width: 768px) {
    #about::before,
    #about::after {
        font-size: 0.8rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .code-snippet {
        font-size: 0.9rem;
    }

    .fun-fact {
        flex-direction: column;
        text-align: center;
    }

    .fun-fact i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

.company-section {
    border-left: 4px solid var(--primary-color);
    margin-left: 20px;
    padding-left: 30px;
    position: relative;
    margin-bottom: 40px;
}

.company-section::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    width: 16px;
    height: 16px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    border: 2px solid #fff;
}

.timeline-company {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.timeline-date {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 1.2rem;
    color: var(--dark-accent);
    margin-bottom: 10px;
}

.timeline-description {
    margin-bottom: 10px;
}

.timeline-details {
    padding-left: 20px;
}

.timeline-skills {
    margin-top: 10px;
}

.timeline-skill {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.scrollable-content {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 100px; /* Add this line */
}

.header-content h1,
.header-content .subtitle {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

header.scrolled .header-content h1,
header.scrolled .header-content .subtitle {
    opacity: 0;
    transform: translateY(-20px);
}

/* Add this new rule */
header.hidden {
    transform: translateY(-100%);
}

@media (max-width: 768px) {
    main {
        padding-top: 80px; /* Adjust for smaller screens */
    }

    .scrollable-content {
        padding-top: 80px; /* Adjust for smaller screens */
    }
}