/* General Styles */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #ff006e;
    --dark-color: #14213d;
    --light-color: #f8f9fa;
    --text-color: #333;
    --light-text: #f8f9fa;
    --success-color: #06d6a0;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.underline {
    height: 4px;
    width: 80px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
}

.primary-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    border: none;
}

.primary-btn:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin: 0 1rem;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -5px;
    left: 0;
    border-radius: 5px;
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(rgba(20, 33, 61, 0.8), rgba(20, 33, 61, 0.8)), url('../images/hero-bg.jpg') center/cover;
    color: var(--light-text);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    margin-bottom: 2rem;
}

.cta-buttons .btn {
    margin: 0 0.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    color: var(--light-text);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--light-text);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Enhanced hero section responsiveness */
@media screen and (max-height: 700px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 60px;
    }
    
    .hero-content {
        padding-bottom: 60px;
    }
    
    .scroll-down {
        position: relative;
        bottom: 0;
        margin-top: 20px;
    }
}

@media screen and (max-width: 576px) {
    .social-icons {
        margin-top: 1.5rem;
    }
    
    .social-icons a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid var(--primary-color);
    top: -20px;
    left: -20px;
    z-index: -1;
    border-radius: 10px;
}

.about-img img {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.info-item span {
    font-weight: 600;
    color: var(--dark-color);
    display: block;
}

.info-item p {
    margin-bottom: 0;
}

/* Skills Section */
.skills-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -5px;
    left: 0;
    border-radius: 5px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media screen and (max-width: 576px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.skill-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 10px;
    margin-top: 0.5rem;
}

.progress {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* Projects Section */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    border-radius: 30px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 134, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-link,
.project-code {
    width: 45px;
    height: 45px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.project-item:hover .project-link,
.project-item:hover .project-code {
    transform: translateY(0);
    opacity: 1;
}

.project-link:hover,
.project-code:hover {
    background-color: var(--dark-color);
    color: #fff;
}

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

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.project-info p {
    color: #555;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-tags span {
    background-color: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Contact Section */
.contact {
    background-color: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

@media screen and (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-item .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 1.5rem;
    margin-right: 1.5rem;
}

.contact-item .text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    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 10px rgba(58, 134, 255, 0.2);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

/* Form validation styling */
.form-group input.error,
.form-group textarea.error {
    border-color: #ff006e;
    box-shadow: 0 0 5px rgba(255, 0, 110, 0.2);
}

/* Form submission feedback */
.contact-form button:disabled {
    cursor: not-allowed;
}

.contact-form form {
    position: relative;
}

.form-message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(6, 214, 160, 0.1);
    color: #06d6a0;
    border: 1px solid #06d6a0;
}

.form-message.error {
    background-color: rgba(255, 0, 110, 0.1);
    color: #ff006e;
    border: 1px solid #ff006e;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 3rem 0 1rem;
}

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

.footer-logo h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.footer-social {
    display: flex;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    color: var(--light-text);
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Media Queries */
@media screen and (max-width: 992px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-img {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 850px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1000;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        z-index: 999;
        height: 100vh;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        margin-top: 1.5rem;
    }
    
    .footer-social a {
        margin: 0 0.5rem;
    }

    /* Add animation for mobile menu links */
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

@media screen and (max-width: 576px) {
    section {
        padding: 4rem 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .personal-info {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        margin: 0.5rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 80%;
        margin-bottom: 0.5rem;
    }
    
    .skill-item {
        padding: 1rem;
    }
    
    .about-img::before {
        display: none;
    }
    
    .contact-item .icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Project images responsive behavior */
    .project-img {
        height: 200px;
    }
}

/* Fixing responsive layout issues */
.project-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.project-tags {
    margin-top: auto;
}

/* Responsive form elements */
@media screen and (max-width: 576px) {
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .form-group textarea {
        height: 120px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    animation: slideUp 1s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Typing Animation */
.typing::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Add general animation for nav links */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Better touch behaviors for mobile */
@media (hover: none) {
    .project-overlay {
        opacity: 1;
        background-color: rgba(58, 134, 255, 0.7);
    }
    
    .project-link, 
    .project-code {
        opacity: 1;
        transform: translateY(0);
    }
    
    .btn:active {
        transform: translateY(-3px);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
}
