/* Import a custom font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Playfair+Display:wght@700&display=swap');

/* Define CSS Variables for a consistent color palette */
:root {
    --primary-color: #34495e;   /* Dark blue for headings */
    --secondary-color: #2c3e50; /* A slightly darker blue */
    --accent-color: #3498db;    /* A vibrant blue for accents */
    --text-color: #555;         /* Dark gray for body text */
    --background-color: #ecf0f1;/* Light gray background */
    --card-background: #ffffff; /* White for content cards */
}

/* Basic Reset and Global Styles */
body, h1, h2, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* A more robust reset */
}

body {
    background-image: linear-gradient(to right, #e0eafc, #cfdef3); /* A soft blue gradient */;
    color: var(--text-color);
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    background: var(--card-background);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
}

/* Header Section */
.header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--background-color);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3em;
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.tagline {
    font-size: 1.2em;
    color: #7f8c8d;
    font-style: italic;
}

/* Main Sections */
.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 2em;
    color: var(--secondary-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
    margin-bottom: 20px;
}

/* Grid Layout for Skills and Contact */
.contact-list, .skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    list-style: none;
}

.contact-list li, .skills-list li {
    background: var(--background-color);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95em;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-list li:hover, .skills-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* Experience & Education */
.job, .education-entry {
    margin-bottom: 25px;
}

.job h3, .education-entry h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.job-details, .education-entry p {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.job ul {
    list-style-type: disc;
    margin-left: 20px;
    line-height: 1.8;
}

/* Visitor Counter */
.counter {
    text-align: center;
    font-size: 1.2em;
    margin-top: 25px;
    color: var(--primary-color);
    font-weight: bold;
}

#visitor-count {
    color: var(--accent-color);
    font-weight: bold;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 2.5em;
    }

    .section h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2em;
    }
    
    .contact-list, .skills-list {
        grid-template-columns: 1fr;
    }
}