/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #10b981;
    --text-color: #333;
    --light-text: #f4f4f4;
    --dark-bg: #222;
    --light-bg: #fff;
    --gray-bg: #f5f7fa;
    --border-color: #e1e4e8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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);
    margin: 0;
    padding: 0;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    color: var(--secondary-color);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--gray-bg);
}

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

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

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

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

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

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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

header.scrolled {
    background-color: var(--light-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links li a {
    font-weight: 600;
    position: relative;
}

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

.nav-links li a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1545235617-7a424c1a60cc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

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

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: rotate(0deg); /* Ensure the image is straight */
}

.about-text {
    flex: 1.5;
}

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

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

.social-links a {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

/* Skills Section */
.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.skill-category {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skill-category h3 i {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.skills-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.skills-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.technical-skills h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.skill-bars {
    max-width: 800px;
    margin: 0 auto;
}

.skill {
    margin-bottom: 30px;
}

.skill span {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

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

/* Experience Section */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

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

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

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: var(--light-bg);
    position: relative;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-dot {
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -12.5px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -12.5px;
}

.timeline-content h3 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.timeline-content h4 {
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

.timeline-content ul {
    margin-top: 15px;
    list-style: disc;
    padding-left: 20px;
}

.timeline-content ul li {
    margin-bottom: 8px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

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

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.project-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.project-header h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.project-card p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tech span {
    background-color: var(--gray-bg);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.cert-card {
    background-color: var(--light-bg);
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.cert-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.cert-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.cert-card p {
    color: #666;
    font-style: italic;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
    align-items: start;
}

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

.contact-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    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 2px rgba(37, 99, 235, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 40px 0;
}

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

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: var(--light-text);
    transition: var(--transition);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

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

    .about-content {
        flex-direction: column;
        text-align: center;
    }

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

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

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

    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: 18px;
        right: auto;
    }
}

@media (max-width: 768px) {
    nav {
        position: relative;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-bg);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        z-index: 1;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .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: 2.2rem;
    }

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

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

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

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

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
    }

    .img-placeholder {
        width: 200px;
        height: 200px;
    }

    .img-placeholder i {
        font-size: 6rem;
    }

    .skills-categories {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }
}