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

/* Body and Global Styles */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(45deg, #d1eaff, #ffffff);
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Container for consistent layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
header {
    background-color: rgba(0, 123, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 8px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

header p {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 15px 0;
}

nav ul li {
    font-size: 1.2rem;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

nav ul li a {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffd700;
}

nav ul {
    display: flex;
    gap: 40px;
    padding: 20px 0;
}

nav ul li a {
    position: relative;
    padding: 8px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffd700;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
                url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?w=500&auto=format&fit=crop&q=60');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    position: relative;
    margin-top: 0;
    padding-top: 0;
}

.hero .container {
    padding: 80px 20px;
    max-width: 800px;
}

.hero h2 {
    font-size: 4.5rem;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    animation: fadeInDown 1.2s ease;
}

.hero p {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
    animation: fadeInUp 1.2s ease;
    line-height: 1.4;
}

.cta-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.cta-btn:hover {
    background-color: #0056b3;
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

.about-content p {
    font-size: 1.2rem;
    max-width: 600px;
}

.cta-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 5px;
    margin-top: 15px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.cta-btn:hover {
    background-color: #0056b3;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.skill-card {
    background-color: #f4f4f4;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.progress-bar {
    height: 10px;
    background-color: #007bff;
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

.skill-card:hover .progress-bar {
    width: 100%;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

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

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 1.8rem;
    margin: 20px;
    color: #2d3436;
}

.project-card p {
    padding: 0 20px;
    margin-bottom: 20px;
    color: #636e72;
    line-height: 1.6;
}

.project-link {
    display: inline-block;
    margin: 0 20px 20px;
    padding: 10px 25px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
#contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

#contact .container {
    max-width: 800px;
}

#contact h2 {
    font-size: 2.8rem;
    color: #2d3436;
    margin-bottom: 40px;
    text-align: center;
}

#contact form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#contact label {
    font-size: 1.2rem;
    color: #2d3436;
    margin-bottom: 8px;
    font-weight: 500;
}

#contact input,
#contact textarea {
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#contact textarea {
    min-height: 150px;
    resize: vertical;
}

#contact button {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

#contact button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-info {
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info p {
    font-size: 1.3rem;
    margin: 15px 0;
}

.contact-info a {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Footer Styles */
footer {
    background: linear-gradient(to right, #1a1a1a, #2d3436);
    color: #fff;
    padding: 60px 0 20px;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h3 {
    color: #007bff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: #007bff;
}

.footer-section p {
    color: #f1f1f1;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p i {
    color: #007bff;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: #f1f1f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007bff;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #f1f1f1;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
    transform: translateY(-3px);
}

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

.footer-bottom p {
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Footer */
@media screen and (max-width: 768px) {
    .footer-info {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-image {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    nav ul {
        gap: 20px;
        flex-direction: column;
        padding: 10px 0;
        display: none;
    }

    nav.active ul {
        display: flex;
    }

    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }

    .highlight-text {
        font-size: 3.5rem;
    }
    
    .highlight-subtext {
        font-size: 1.8rem;
    }
    
    .project-card img {
        height: 200px;
    }
}

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

    .hero h2 {
        font-size: 3rem;
    }

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

    #contact form {
        padding: 25px;
    }

    .highlight-text {
        font-size: 2.8rem;
    }
    
    .highlight-subtext {
        font-size: 1.5rem;
    }
}

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

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

/* Flask icon specific styling */
.flask-icon {
    filter: brightness(0.8);
    max-width: 60px;
    margin: 10px auto;
}

/* Glow effect for CTA button */
.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: glow 3s infinite;
}

@keyframes glow {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

/* Enhanced Navigation Styles */
nav {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 10px 20px;
    margin-top: 10px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
}

/* Active nav item indicator */
nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
}

/* Enhanced Contact Form Styles */
.form-group {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#success-message {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    transition: opacity 0.3s ease;
}

/* Improved button styles */
#contact button {
    position: relative;
    overflow: hidden;
}

#contact button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

#contact button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}
