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

/* CSS Variables */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --dark-color: #1e293b;
    --gray-color: #64748b;
    --light-color: #f8fafc;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.primary-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Animation Styles */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    transition: all 0.4s ease-in-out;
    transform: translateZ(0);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Add smooth transition for header */
header {
    transition: all 0.4s ease-in-out;
    transform: translateZ(0);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--primary-color);
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    padding: 10rem 0 5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    animation: fadeIn 1s ease-out;
}

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

.hero-content {
    flex: 1;
    animation: fadeInLeft 1s ease-out 0.3s both;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-content h2 span {
    color: var(--primary-color);
}

.hero-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    border: 5px solid white;
    animation: zoomIn 0.8s ease-out 1s both;
}

.hero-image img:hover {
    animation: pulse 2s infinite;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: white;
    animation: fadeIn 1s ease-out;
}

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

.about-text {
    flex: 1;
    animation: fadeInLeft 1s ease-out 0.3s both;
}

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

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.stat {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

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

.stat p {
    font-weight: 500;
    color: var(--dark-color);
}

.about-image {
    flex: 1;
    animation: fadeInRight 1s ease-out 0.3s both;
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background-color: #f1f5f9;
    animation: fadeIn 1s ease-out;
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.skill-bar {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.skill-bar p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress {
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: 5px;
    background-color: var(--primary-color);
    position: relative;
    width: 0;
    transition: width 1s ease-in-out;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill.html { width: 95%; }
.progress-fill.javascript { width: 90%; }
.progress-fill.php { width: 85%; }
.progress-fill.java { width: 80%; }
.progress-fill.android { width: 85%; }
.progress-fill.design { width: 75%; }
.progress-fill.mysql { width: 80%; }
.progress-fill.git { width: 70%; }
.progress-fill.api { width: 85%; }

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: #f8fafc;
    animation: fadeIn 1s ease-out;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInDown 1s ease-out 0.3s both;
}

.filter-btn {
    padding: 10px 24px;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    box-shadow: var(--shadow);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin: 0 0 1rem 0;
    color: var(--dark-color);
    font-size: 1.4rem;
    text-align: center;
}

.project-info p {
    margin: 0 0 1.5rem 0;
    color: var(--gray-color);
    line-height: 1.6;
    flex-grow: 1;
    text-align: center;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background-color: #dbeafe;
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: auto;
}

.project-actions .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 6px;
    flex: 1;
    text-align: center;
    max-width: 150px;
    text-decoration: none; /* Ensure links are styled as buttons */
    display: inline-block; /* Ensure proper link behavior */
    cursor: pointer; /* Ensure cursor indicates clickable */
}

.project-actions .secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.project-actions .secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.project-actions .primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.project-actions .primary-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Fixed size for project cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.7s both;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px; /* Fixed minimum height */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img-gallery {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-img-gallery .gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.project-img-gallery .gallery-slide.active {
    opacity: 1;
}

.project-img-gallery .gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.gallery-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Project Details Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: zoomIn 0.3s ease-out;
}

.modal-content .close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
}

.project-modal-body {
    display: flex;
    flex-direction: column;
}

.project-modal-gallery {
    flex: 1;
    padding: 20px;
}

.gallery-container {
    position: relative;
}

.gallery-main {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.project-modal-info {
    padding: 20px;
}

.project-modal-info h2 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.project-modal-info p {
    margin-bottom: 20px;
    color: var(--gray-color);
    line-height: 1.6;
}

.project-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-modal-tags span {
    background-color: #dbeafe;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-modal-actions {
    display: flex;
    gap: 15px;
}

.project-modal-actions .btn {
    flex: 1;
    text-align: center;
}

/* Auto-scrolling gallery for project cards */
.project-img-gallery {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-img-gallery .gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.project-img-gallery .gallery-slide.active {
    opacity: 1;
}

.project-img-gallery .gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.gallery-dot.active {
    background-color: white;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.7s both;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: #f1f5f9;
    animation: fadeIn 1s ease-out;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    animation: fadeInLeft 1s ease-out 0.3s both;
}

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

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--gray-color);
}

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

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.contact-item h4 {
    margin-bottom: 0.2rem;
    font-size: 1.2rem;
}

.contact-item p {
    margin: 0;
    color: var(--gray-color);
}

.contact-form {
    animation: fadeInRight 1s ease-out 0.3s both;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-logo h2 span {
    color: var(--accent-color);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links ul {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-social a {
    display: inline-block;
    transition: var(--transition);
    color: white;
    text-decoration: none;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links ul {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 2rem;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero {
        padding: 8rem 0 3rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content h3 {
        font-size: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
    }
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hidden {
    display: none;
}
