/* ===========================
   GENERAL STYLES
   =========================== */

* {
    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: #333;
    background-color: #f8f9fa;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

section {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

section:nth-child(2) {
    animation-delay: 0.1s;
}

section:nth-child(3) {
    animation-delay: 0.2s;
}

section:nth-child(4) {
    animation-delay: 0.3s;
}

section:nth-child(5) {
    animation-delay: 0.4s;
}

section:nth-child(6) {
    animation-delay: 0.5s;
}

section:nth-child(7) {
    animation-delay: 0.6s;
}

section:nth-child(8) {
    animation-delay: 0.7s;
}

/* ===========================
   NAVBAR STYLES
   =========================== */

nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 101;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    opacity: 0.8;
    border-bottom-color: white;
}

nav a.active {
    border-bottom-color: white;
    font-weight: bold;
}

/* ===========================
   MOBILE NAVBAR
   =========================== */

@media (max-width: 768px) {
    nav .container {
        padding: 0 1rem;
    }

    nav .logo {
        font-size: 1.2rem;
    }

    .hamburger {
        display: flex;
    }

    nav ul {
        position: fixed;
        left: 0;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        gap: 0;
        padding: 2rem;
        display: none;
        animation: slideDown 0.4s ease-out forwards;
    }

    nav ul.active {
        display: flex;
    }

    nav ul.closing {
        animation: slideUp 0.4s ease-out forwards;
    }

    nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding: 1rem 0;
    }

    nav ul li:first-child {
        padding-top: 0;
    }

    nav a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        display: block;
    }

    nav a:hover {
        padding-left: 10px;
    }
}

/* ===========================
   CONTAINER
   =========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 200px;
    height: 250px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    border: 5px solid white;
}

.hero-text {
    flex: 1;
    min-width: 250px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero .contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.contact-info a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 25px;
    transition: all 0.3s;
}

.contact-info a:hover {
    background-color: white;
    color: #667eea;
}

/* ===========================
   ABOUT SECTION
   =========================== */

.about {
    padding: 4rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.about h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.about p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===========================
   SKILLS SECTION
   =========================== */

.skills {
    padding: 4rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.skills h2 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    color: #764ba2;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* ===========================
   EXPERIENCE TIMELINE
   =========================== */

.experience {
    padding: 4rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.experience h2 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-item {
    margin-bottom: 2rem;
    margin-left: 80px;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
}

.timeline-item h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.timeline-item .company {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.timeline-item .date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-item ul {
    list-style: none;
    padding-left: 0;
}

.timeline-item li {
    color: #666;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-item li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
}

/* ===========================
   PROJECTS SECTION
   =========================== */

.projects {
    padding: 4rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.projects h2 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:nth-child(5) {
    animation-delay: 0.5s;
}

.project-card:nth-child(6) {
    animation-delay: 0.6s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.project-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.project-card .type {
    color: #764ba2;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
}

.project-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.project-card .date {
    color: #999;
    font-size: 0.85rem;
}

/* ===========================
   EDUCATION SECTION
   =========================== */

.education {
    padding: 4rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.education h2 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.education-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.education-item h3 {
    color: #333;
    margin-bottom: 0.3rem;
}

.education-item .school {
    color: #764ba2;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.education-item .date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.education-item ul {
    list-style: none;
    padding-left: 0;
}

.education-item li {
    color: #666;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.education-item li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #764ba2;
}

/* ===========================
   FOOTER
   =========================== */

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-image img {
        width: 150px;
        height: 190px;
    }

    .hero-content {
        gap: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .contact-info {
        gap: 0.5rem;
    }

    .contact-info a {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .about,
    .skills,
    .experience,
    .projects,
    .education {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    .about h2,
    .skills h2,
    .experience h2,
    .projects h2,
    .education h2 {
        font-size: 1.5rem;
    }

    .skill-categories {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        margin-left: 50px;
    }

    .timeline-item::before {
        left: -35px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .hero-text {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    nav .logo {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-image img {
        width: 120px;
        height: 150px;
    }

    .contact-info a {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }

    .about h2,
    .skills h2,
    .experience h2,
    .projects h2,
    .education h2 {
        font-size: 1.2rem;
    }

    .about p {
        font-size: 0.9rem;
    }

    .timeline-item h3 {
        font-size: 1rem;
    }

    .timeline-item li {
        font-size: 0.85rem;
    }
}