/* Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #38bdf8;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    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: #fff;
}

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

ul {
    list-style: none;
}

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

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    position: relative;
    display: inline-block;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.underline {
    height: 4px;
    width: 60px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

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

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #fff;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    background: linear-gradient(to right, rgba(30, 58, 138, 0.9), rgba(59, 130, 246, 0.9)), url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1172&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    position: relative;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

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

/* About Section */
.about {
    background-color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.personal-details {
    margin-top: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.detail-item i {
    width: 30px;
    color: var(--primary-color);
}

.about-image {
    text-align: center;
}

.img-border {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

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

.about-image img {
    width: 100%;
    border-radius: 10px;
    transition: var(--transition);
}

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

/* Skills Section */
.skills {
    background-color: #fff;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 40px;
}

.skill-category {
    margin-bottom: 30px;
}

.skill-category h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--dark-color);
}

.skill-category h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    display: flex;
    flex-direction: column;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.skill-bar {
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    position: relative;
}

.skill-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 5px;
    background-color: var(--primary-color);
}

.expert {
    width: 95%;
}

.advanced {
    width: 85%;
}

.intermediate {
    width: 70%;
}

.skill-percent {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 12px;
    color: var(--text-light);
}

/* Projects Section */
.projects {
    background-color: var(--light-color);
}

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

.project-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

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

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

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.project-info p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tags span {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.project-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.project-link:hover i {
    transform: translateX(5px);
}

/* Experience Section */
.experience {
    background-color: #fff;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 30px;
    box-sizing: border-box;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    top: 30px;
    right: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.timeline-content {
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.timeline-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.company {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.period {
    font-size: 14px;
    color: var(--text-light);
    display: block;
    margin-bottom: 15px;
}

.timeline-content p {
    margin-bottom: 15px;
}

.timeline-content ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.timeline-content ul li {
    margin-bottom: 10px;
    position: relative;
}

.timeline-content ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -15px;
}

/* Contact Section */
.contact {
    background-color: var(--light-color);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    font-size: 24px;
}

.text h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.text p {
    color: var(--text-color);
}

.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .skills-container {
        grid-template-columns: 1fr;
    }
}

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        margin-bottom: 30px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px;
        z-index: 20;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .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);
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 20px;
    }

    section {
        padding: 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }

    .timeline-icon {
        left: 10px;
        right: auto;
    }
}
#formMessage {
    padding: 10px;
    border-radius: 5px;
}
#formMessage.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}
#formMessage.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
