/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Averta Demo PE';
    src: url('fonts/AvertaDemoPE-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Averta Demo PE';
    src: url('fonts/AvertaDemoPE-Regular.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

body {
    font-family: 'Averta Demo PE', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-home a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-home a:hover {
    color: #00a2ff;
}

.nav-menu a:hover {
    color: #00a2ff;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: #ffffff;
    color: #333;
    text-align: center;
}

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

.hero h1 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.5s forwards; /* Changed from 0.5s to 0.5s */
    color: #1a1a1a;
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.7s forwards;
    color: #666;
    font-weight: 400;
    text-align: center;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.9s forwards;
    color: #888;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-image {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    border-color: #999;
    transition: transform 0.3s ease;
}

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

.highlight {
    color: #1a1a1a;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 1.1s forwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn.primary {
    background: #1a1a1a;
    color: white;
    border: 1px solid #1a1a1a;
}

.btn.primary:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.btn.secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.btn.secondary:hover {
    background: #f8f8f8;
    border-color: #bbb;
    transform: translateY(-1px);
}

/* Section Styling */
section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

/* About Section */
.about {
    background: #ffffff;
    padding: 100px 0;
}

.about > .container > h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 3rem;
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text h2 {
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.7;
}

/* Skills section */
.about-skills {
    text-align: center;
}

.about-skills h2 {
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.skills-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
}

.skills-icons img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.skills-icons img:hover {
    transform: scale(1.1);
}

/* Experience Section Timeline */
.experience {
    background: #fafafa;
    padding: 100px 0;
}

.experience h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 3rem;
}

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

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e5e5e5;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-left {
    flex: 1;
    text-align: right;
    padding-right: 2.5rem;
}

.timeline-right {
    flex: 1;
    padding-left: 2.5rem;
}

.timeline-left h4 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.timeline-left .date {
    color: #888;
    font-size: 0.85rem;
    font-weight: 400;
}

.timeline-right h3 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.timeline-right p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.timeline-item {
    display: flex;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    transform: translateX(-50%) scale(0); 
    z-index: 2;
    transition: transform 0.5s ease 0.3s; 
}

.timeline-item.animate::before {
    transform: translateX(-50%) scale(1); 
}

.timeline-left {
    flex: 1;
    text-align: right;
    padding-right: 2.5rem;
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.6s ease 0.2s;
}

.timeline-right {
    flex: 1;
    padding-left: 2.5rem;
    transform: translateX(30px);
    opacity: 0;
    transition: all 0.6s ease 0.4s;
}

.timeline-item.animate .timeline-left {
    transform: translateX(0);
    opacity: 1;
}

.timeline-item.animate .timeline-right {
    transform: translateX(0);
    opacity: 1;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.projects h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 3rem;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    padding-top: 10px;
    padding-bottom: 10px;
}

.project-card {
    min-width: 33.333%;
    padding: 0 25px; 
    box-sizing: border-box;
    position: relative;
}

.project-card > div {
    background: white;
    border-radius: 16px; 
    padding: 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08); 
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #000000;
    position: relative;
    z-index: 1;
}

.project-card:hover > div {
    transform: translateY(-8px); 
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f8f8f8;
}

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

.project-card {
    min-width: 33.333%;
    padding: 0 25px; 
    box-sizing: border-box;
}

.project-card > div {
    background: white;
    border-radius: 16px; 
    padding: 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08); 
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #000000;
    /* Add position relative to allow proper z-index handling */
    position: relative;
    z-index: 1;
}

.project-card:hover > div {
    transform: translateY(-8px); 
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    /* Increase z-index on hover to ensure it appears above other elements */
    z-index: 2;
}

.project-content {
    padding: 2rem; 
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.project-header h3 {
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    flex: none;
    padding: 1rem 1rem 0rem 1rem;
}

.project-date {
    color: #00a2ff;
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: -1.5rem;
    margin-left: 1rem;
}

.project-content h3 {
    color: #1a1a1a;
    margin-bottom: 1.2rem;
    font-size: 1.3rem; 
    font-weight: 600;
    line-height: 1.3;
    flex: none;
}

.project-content p {
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 1rem; 
    line-height: 1.7; 
    flex: 1;
    font-size: 0.95rem;
    padding: 1rem 1rem 0rem 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; 
    margin-bottom: 2rem;
    padding: 0rem 1rem 0rem 1rem;
}

.tech-tag {
    background: #f8f9fa; 
    color: #495057; 
    padding: 0.4rem 0.8rem;
    border-radius: 8px; 
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef; 
}

.project-link {
    color: #666;
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: -0.1rem;
}

.project-link:hover {
    color: #00a2ff;
    background: #f5f5f5;
    transform: translateY(-1px);
}

.project-link svg {
    display: block;
    width: 18px;
    height: 18px;
}

.project-links {
    display: none;
}

.project-links .btn {
    text-align: center;
    padding: 12px 32px; 
    background: #1a1a1a;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 120px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-links .btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}

/* Carousel Navigation */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e5e5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: white;
    color: #1a1a1a;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #1a1a1a;
    transform: scale(1.2);
}

.indicator:hover {
    background: #999;
}

/* Contact Section */
.contact {
    background: #1a1a1a;
    color: white;
    padding: 100px 0;
}

.contact h2 {
    color: white;
    margin-bottom: 3rem;
    font-size: 2.2rem;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #ccc;
    line-height: 1.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #ccc;
    text-decoration: none;
    padding: 10px 10px 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    color: white;
    background: #00a2ff;
    transform: translateY(-2px);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

section {
    scroll-margin-top: 80px;
}

/* hamburger menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #666;
    transition: all 0.3s ease-in-out;
}

body.no-scroll {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {

    .nav-container {
        position: relative;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        padding-top: 70px;
        transition: all 0.4s ease;
        z-index: 1000;
        align-items: center;
        justify-content: center;
        transform: translateY(-100%);
        opacity: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu li {
        margin: 20px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: calc(0.1s * var(--item-index, 0));
    }
    
    .nav-menu a {
        font-size: 1.4rem;
        font-weight: 500;
    }
    
    .menu-toggle {
        display: block !important;
        position: relative;
        z-index: 1001;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-overlay {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }

    .hero-image {
        margin-bottom: 1.5rem;
    }
    
    .hero-image img {
        width: 160px;
        height: 160px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .skills-icons {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .skills-icons img {
        width: 40px;
        height: 40px;
    }
    
    .timeline-item.animate::before {
        transform: translateX(-50%) scale(1); 
    }
    
    .timeline-left,
    .timeline-right {
        padding-left: 20px; 
        text-align: left;
        transform: none; 
        opacity: 0;
        transition: all 0.6s ease;
    }
    
    .project-card {
        min-width: 100%;
        padding: 0 20px;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .project-content p {
        margin-bottom: 1.5rem;
    }
    
    .project-tech {
        margin-bottom: 1.5rem;
    }

    .project-header {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .project-header h3 {
        font-size: 1.2rem;
    }

    .project-link svg {
        width: 16px;
        height: 16px;
    }
    
    .tech-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .carousel-btn.prev {
        left: -18px;
    }
    
    .carousel-btn.next {
        right: -18px;
    }

    .social-links {
        gap: 1.5rem;
    }
    
    .social-links a {
        padding: 10px;
    }
    
    .social-links svg {
        width: 20px;
        height: 20px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .about,
    .experience,
    .projects,
    .contact {
        padding: 80px 0;
    }
    
    h2 {
        font-size: 2rem;
    }
}
