/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --accent-color: #f5a623;
    --background-color: #f9f9f9;
    --text-color: #333;
    --light-text-color: #777;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: default;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-link, .nav-resume {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-link:hover, .nav-link.active, .nav-resume:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-resume {
    background-color: var(--accent-color);
    color: white;
    font-weight: 700;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 8px rgba(245,166,35,0.4);
}

.nav-resume:hover {
    background-color: #d48806;
    box-shadow: 0 6px 12px rgba(212,136,6,0.6);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 200px;
        height: calc(100% - 60px);
        background-color: white;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }
}

/* Hero Section */
.hero-section {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    flex: 1 1 400px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: 2px;
}

.text-accent {
    color: var(--accent-color);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 8px rgba(245,166,35,0.4);
}

.btn-primary:hover {
    background-color: #d48806;
    box-shadow: 0 6px 12px rgba(212,136,6,0.6);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.social-links a {
    color: white;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--accent-color);
}

.hero-image {
    flex:auto;
    height:auto;
    width:200px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sections */
.section {
    padding: 60px 0;
    background-color: white;
    color: var(--text-color);
}

.section-alt {
    background-color: #f0f4f8;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    margin: 0 auto;
    max-width: 700px;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}

.timeline-content h3 {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timeline-content p {
    margin: 0.25rem 0;
    color: var(--light-text-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed);
    opacity: 0;
    transform: translateY(20px);
}

.project-card.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-content {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--primary-color);
}

.project-description {
    flex-grow: 1;
    color: var(--light-text-color);
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

/* GitHub icon link */
.project-github {
    color: var(--primary-color);
    font-size: 1.5rem;
    align-self: flex-start;
    transition: color var(--transition-speed);
}

.project-github:hover {
    color: var(--accent-color);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-category.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.skill-category h3 {
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Experience Grid */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.experience-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.experience-card.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.experience-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.experience-card .company {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.experience-card .duration {
    font-size: 0.875rem;
    color: var(--light-text-color);
    margin-bottom: 0.75rem;
}

.experience-list {
    padding-left: 1.25rem;
    margin: 0;
    list-style-type: disc;
    color: var(--text-color);
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-info {
    flex: 1 1 300px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    color: var(--text-color);
}

.contact-info h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--light-text-color);
}

.contact-item span {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.contact-social {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
    margin-top: 1rem;
}

.contact-social a {
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

.contact-social a:hover {
    color: var(--accent-color);
}

.contact-form {
    flex: 1 1 350px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    transition: border-color var(--transition-speed);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-full {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    font-weight: 600;
    font-size: 1rem;
}

/* Animations */
.fade-in-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        width: 100%;
        height: calc(100% - 60px);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        flex-direction: column;
    }
}
