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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --light-bg: #f7f7f7;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: bold;
    width: 100%;
    flex-basis: 100%;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    width: 100%;
    justify-content: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
}

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

.profile-pic {
    width: 230px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

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

.tagline {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.85;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

/* Bio Section */
.bio-container {
    max-width: 1000px;
    margin: 0 auto;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.bio-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.highlight h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.highlight p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Category Section */
.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.category-desc {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Projects Container */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.project-card img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    background-color: #f9f9f9;
    padding: 10px;
}

.project-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-card p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-card .year {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.85rem;
}

.project-links {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-small {
    flex: 1;
    display: inline-block;
    padding: 0.5rem 0.8rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 0.8rem;
    text-align: center;
    font-weight: bold;
}

.btn-small:hover {
    background-color: var(--secondary-color);
}

/* Articles Container */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.article-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.publication {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.article-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.article-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    align-self: flex-start;
}

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

/* Resume Section */
.resume-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.resume-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.resume-section:last-child {
    border-bottom: none;
}

.resume-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.resume-item {
    margin-bottom: 1.5rem;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.resume-header h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 0;
}

.date {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.company {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.resume-list {
    list-style-position: inside;
    color: #666;
    line-height: 1.8;
    margin: 0.8rem 0;
}

.resume-list li {
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.skill {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-left: 4px solid var(--primary-color);
    padding: 0.8rem 1rem;
    border-radius: 5px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Contact Section */
.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-container {
        padding: 0 1rem;
        gap: 0.5rem;
        flex-direction: column !important;
        align-items: center !important;
    }

    .logo {
        font-size: 1.4rem;
        text-align: center;
        width: 100%;
        white-space: nowrap;
        margin: 0;
        order: 1;
    }

    .nav-links {
        gap: 0.8rem;
        justify-content: center;
        width: 100%;
        order: 2;
        flex-wrap: wrap;
        margin-top: 0.5rem;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .tagline {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .profile-pic {
        width: 180px;
        height: 180px;
        margin-bottom: 1rem;
    }

    .section {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .category-title {
        font-size: 1.4rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .resume-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

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

    .tagline {
        font-size: 0.85rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .profile-pic {
        width: 150px;
        height: 150px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .section h2 {
        font-size: 1.4rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    .project-card h3 {
        font-size: 1rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .btn-small {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }

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