:root {
    --primary-color: #d90f23; /* A deep red for impact */
    --secondary-color: #333333;
    --background-color: #f7f9fc;
    --card-background: #ffffff;
    --text-color: #4a4a4a;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
}

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

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%); /* Dramatic shape */
}

.profile-image-container {
    margin-bottom: 20px;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.hero .subtitle {
    font-size: 1.2em;
    font-weight: 300;
    margin-bottom: 20px;
    color: #cccccc;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.contact-info span i {
    color: var(--primary-color);
    margin-right: 5px;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #a80c1a;
    transform: translateY(-2px);
}

/* --- General Section Styling --- */
section {
    padding: 40px 0;
    border-bottom: 1px solid #e0e0e0;
    opacity: 0; /* Hidden initially for fade-in effect */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 2.2em;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
    margin-left: 50%;
    transform: translateX(-50%);
}

h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* --- Summary Card --- */
.summary-card {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto 40px;
}
.summary-card p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

/* --- Core Competencies --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.3s;
}

/* --- Professional Experience Summary --- */
.experience-list {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.experience-list ul {
    list-style: none;
    padding: 0;
}

.experience-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 1.05em;
}

.experience-list li:last-child {
    border-bottom: none;
}

.experience-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

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

.project-card {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.tech-tags {
    font-size: 0.8em;
    color: var(--primary-color);
    margin: 15px 0;
    font-weight: 600;
}

.project-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s;
}

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

.publications-title {
    text-align: center;
    margin: 40px 0 20px;
    color: var(--secondary-color);
    font-size: 1.5em;
}

.publications-list {
    text-align: center;
}

.publications-list a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
}
.publications-list a:hover {
    text-decoration: underline;
}

/* --- Tech & Education --- */
.flex-container {
    display: flex;
    gap: 40px;
}

.col-left, .col-right {
    flex: 1;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.col-left h2, .col-right h2 {
    text-align: left;
    transform: none;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.col-left ul {
    list-style: none;
    padding-left: 0;
}

.col-left li {
    margin-bottom: 10px;
}

.tech-icons i {
    font-size: 3em;
    margin: 10px 15px;
    color: var(--secondary-color);
    transition: color 0.3s;
}
.tech-icons i:hover {
    color: var(--primary-color);
}

.tech-details {
    font-size: 0.9em;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}


/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
}

footer h2 {
    color: var(--primary-color);
    border-bottom-color: white;
    margin-bottom: 20px;
}

.social-links a {
    color: white;
    margin: 0 15px;
    font-size: 1.1em;
    text-decoration: none;
    transition: color 0.3s;
}

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

footer p {
    margin-top: 20px;
    font-size: 0.8em;
    color: #cccccc;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    .hero .subtitle {
        font-size: 1em;
    }
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .projects-grid, .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .flex-container {
        flex-direction: column;
    }

    .col-left h2, .col-right h2 {
        text-align: center;
        transform: none;
    }
    
    .publications-list a {
        display: block;
        margin: 10px 0;
    }
}
