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

:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6f42c1;
    --text-color: #333;
    --bg-color: #fff;
    --section-bg: #f8f9fa;
    --border-color: #eaeaea;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    border-left: 4px solid greenyellow;

}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease; /* smooth color & scale */
}

.nav-links a:hover {
    color: var(--primary-color); /* color change */
    transform: scale(1.1); /* slightly enlarge on hover */
    cursor: pointer; /* ensure cursor changes to pointer */
    border-bottom: 2px solid greenyellow;
}


.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}
.image-placeholder img{
    box-shadow: 5px 5px 10px blue;
}
/* Animation keyframes */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px); /* Start left */
    }
    100% {
        opacity: 1;
        transform: translateX(0); /* End at normal position */
    }
}

/* Apply animation to h2 and p */
.hero h2,
.hero p {
    animation: slideInLeft 2s ease-out forwards;
}

/* Optional: add delay for staggered effect */
.hero h2 {
    animation-delay: 1s; /* Starts after h1 animation */
}

.hero p {
    animation-delay: 1.5s; /* Starts slightly after h2 */
}

/* Animation keyframes */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to h1 */
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1.5s ease-out forwards;
}


.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

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

/* Animation keyframes */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to CTA buttons container */
.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: slideUp 1s ease-out forwards;
    /* Optional: delay for a nicer effect */
    animation-delay: 0.5s;
}


.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

/* Gradient Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4a6cf7, #6f42c1);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(135deg, #6f42c1, #4a6cf7);
    transition: 0.5s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background: linear-gradient(135deg, transparent, transparent);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(135deg, #4a6cf7, #6f42c1);
    transition: 0.5s;
    z-index: -1;
}

.btn-secondary:hover {
    color: white;
    border-color: transparent;
}

.btn-secondary:hover::before {
    left: 0;
}


.image-placeholder {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Keyframes for image animation with rotating, pulsing, and shadow color change */
@keyframes imageAnimate {
    0% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    }
    25% {
        transform: rotate(3deg) scale(1.03);
        box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    }
    50% {
        transform: rotate(5deg) scale(1.05);
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.7);
    }
    75% {
        transform: rotate(3deg) scale(1.03);
        box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    }
    100% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    }
}

/* Apply animation to the image */
.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    animation: imageAnimate 5s ease-in-out infinite;
}


/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

/* About Section */
.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

/* Keyframes for sliding in from left */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px); /* start off to the left */
    }
    100% {
        opacity: 1;
        transform: translateX(0); /* final position */
    }
}

/* Apply animation to about-text */
.about-text {
    flex: 2;
    animation: slideInLeft 1s ease-out forwards;
}


.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Keyframes for infinite pulse animation */
@keyframes floatPulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 15px 25px rgba(0, 123, 255, 0.2);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow);
    }
}

/* Apply animation to stat boxes */
.stat {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: floatPulse 3s ease-in-out infinite;
}


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

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

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Animation keyframes for the skill box */
/* Keyframes for floating and pulsing skill cards */
@keyframes floatPulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow);
    }
}

/* Apply animation to skill cards */
.skill {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: floatPulse 3s ease-in-out infinite;
}


/* Optional: icon animation */
.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.skill:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
    color: #007bff; /* bright blue glow */
}


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

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

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

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tech span {
    padding: 0.3rem 0.8rem;
    background-color: var(--section-bg);
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Contact Section */
.contact-content {
    display: flex;
    gap: 3rem;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-item i {
    margin-right: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--section-bg);
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    align-self: flex-start;
}

/* Footer */
footer {
    background-color: var(--section-bg);
    padding: 2rem 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content, .hero-image {
        flex: none;
        width: 100%;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .image-placeholder {
        width: 300px;
        height: 300px;
    }
}
/* Extra Small Devices (Phones under 576px) */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .image-placeholder {
        width: 220px;
        height: 220px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr; /* single column */
    }

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

    .about-content {
        gap: 1.5rem;
    }

    .contact-content {
        gap: 2rem;
    }

    footer {
        font-size: 0.9rem;
        padding: 1rem;
    }
}

/* Medium-Small Devices (Tablets ~600-768px) */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat {
        flex: 1 1 45%;
    }
}
