/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #333;
    --light-text: #f8fafc;
    --bg-color: #ffffff;
    --light-bg: #f1f5f9;
    --dark-bg: #0f172a;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --box-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(--bg-color);
}

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

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

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

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

a:hover {
    color: var(--secondary-color);
}

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

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

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

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

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

img {
    max-width: 100%;
    height: auto;
}

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

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

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

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

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

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

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

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

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

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

.hero-content {
    max-width: 800px;
}

.name-photo-container {
    display: flex;
    color: var(--primary-color);
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-text);
    animation: fadeInRight 1s ease;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0;
    animation: fadeInDown 1s ease;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.cta-buttons {
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.cta-buttons .btn {
    margin: 0 10px;
}

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

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.skill-category h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

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

.skill-item {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
}

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

.skill-item h4 {
    margin-bottom: 10px;
}

.skill-level {
    height: 8px;
    background-color: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
}

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

/* Education & Experience Sections */
.education, .experience {
    background-color: var(--light-bg);
}

.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%;
    transform: translateX(-50%);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.project-header {
    padding: 30px 30px 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

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

.project-content {
    padding: 0 30px 20px 30px;
}

.project-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.tech-tag {
    background-color: var(--light-bg);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.project-footer {
    padding: 20px 30px 30px 30px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

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

.project-link i {
    font-size: 1.1rem;
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    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);
}

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

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

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

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

.footer-links a {
    color: var(--light-text);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social .social-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
}

.footer-social .social-link:hover {
    background-color: var(--primary-color);
}

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

/* 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);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

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

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

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

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

@media screen and (max-width: 768px) {
    nav {
        padding: 15px 5%;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: var(--bg-color);
        width: 100%;
        flex-direction: column;
        align-items: center;
        transform: translateY(-150%);
        transition: transform 0.5s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

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

    .nav-links li {
        margin: 15px 0;
    }

    .burger {
        display: block;
    }

    .burger.active .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.active .line2 {
        opacity: 0;
    }

    .burger.active .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .name-photo-container {
        gap: 15px;
    }

    .profile-photo {
        width: 80px;
        height: 80px;
    }

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

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

@media screen and (max-width: 576px) {
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .name-photo-container {
        flex-direction: column;
        gap: 10px;
    }

    .profile-photo {
        width: 70px;
        height: 70px;
        order: -1; /* Places the photo above the name */
    }

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

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

    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .about-content, 
    .contact-content {
        flex-direction: column;
    }

    .timeline-content {
        padding: 15px;
    }
}
