/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --dark-bg: #2c3e50;
    --light-text: #fff;
    --gray-bg: #f5f5f5;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

section {
    padding: 100px 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text);
    border: 2px solid var(--light-text);
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: var(--dark-bg);
    color: var(--light-text);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
}

.header.scrolled {
    padding: 10px 50px;
    background-color: rgba(44, 62, 80, 0.95);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

.nav-link {
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    color: var(--light-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width var(--transition-speed) ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9)), url('./Images/heroimage.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--light-text);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--light-text);
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.hero-buttons {
    margin-top: 30px;
}

/* About Section */
.about-section {
    background-color: #F7ECE1;
}

.about-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
    align-items: center;
}

.profile-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease;
}

.profile-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 2;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
}

/* Skills Section */
.skills-section {
    background-color: var(--gray-bg);
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
}

.skill-category h3 {
    margin-bottom: 25px;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.animate-grow .skill-progress {
    transform: scaleX(1);
}

/* Projects Section */
.projects-section {
    background-color: var(--light-text);
}
.projectimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--light-text);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-content {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.project-card p {
    margin-bottom: 20px;
    color: var(--text-color);
    flex-grow: 1;
}

.tech-stack {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 20px;
    font-style: italic;
}

.project-links {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
}

.project-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.project-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.project-link i {
    margin-left: 5px;
}

/* Contact Section */
.contact-section {
    background-color: var(--gray-bg);
    position: relative;
}

.contact-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.contact-form {
    flex: 2;
    background-color: var(--light-text);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-submit {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-info {
    flex: 1;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 40px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.contact-item p {
    margin: 0;
}

.contact-item a {
    color: var(--primary-color);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 30px 20px;
    text-align: center;
    display: flex;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #ccc;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Animation Classes */
.animate-text {
    animation: colorChange 5s infinite alternate;
}

@keyframes colorChange {
    0% { color: var(--primary-color); }
    50% { color: var(--accent-color); }
    100% { color: var(--primary-color); }
}

.animate-slide-down {
    animation: slideDown 1s ease forwards;
    opacity: 0;
    transform: translateY(-30px);
}

.animate-slide-up {
    animation: slideUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideRight 1s ease forwards;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(50px);
    animation: slideLeft 1s ease forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.animate-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* Keyframes */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer Animation Triggers */
.skill-progress {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

/* Media Queries */
@media (max-width: 992px) {
    .about-container,
    .contact-container {
        flex-direction: column;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 20px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px 10px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .profile-image {
        margin-bottom: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}