/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 20px 0;
}

/* --- Themes --- */
:root {
    /* Light Theme (Default) */
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #333;
    --header-text: #fff;
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --card-bg: #fff;
    --card-border: #ddd;
    --button-bg: #007bff;
    --button-text: #fff;
    --button-hover-bg: #0056b3;
    --skill-tag-bg: #e0e0e0;
    --skill-tag-text: #333;
    --icon-color: #555;
}

body.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #0d0d0d;
    --header-text: #e0e0e0;
    --link-color: #6cb6ff;
    --link-hover-color: #3a9dff;
    --card-bg: #2c2c2c;
    --card-border: #444;
    --button-bg: #6cb6ff;
    --button-text: #1a1a1a;
    --button-hover-bg: #3a9dff;
    --skill-tag-bg: #444;
    --skill-tag-text: #e0e0e0;
    --icon-color: #bbb;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Header */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    text-align: center;
    border-bottom: 3px solid var(--link-color);
}

header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-switcher button,
.language-switcher select {
    padding: 8px 12px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.theme-switcher button:hover,
.language-switcher select:hover {
    background-color: var(--button-hover-bg);
}
.theme-switcher button i {
    margin-right: 5px;
}

.resume-updated {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 10px;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Sections */
section {
    padding: 25px 0;
    border-bottom: 1px solid var(--card-border);
}
section:last-of-type {
    border-bottom: none;
}

h2 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.8rem;
}

/* Contact List */
.contact-list {
    list-style: none;
    padding: 0;
}
.contact-list li {
    margin-bottom: 8px;
    font-size: 1rem;
}
.contact-list i {
    margin-right: 10px;
    color: var(--icon-color);
    width: 20px; /* Align icons */
    text-align: center;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.skill-tag {
    background-color: var(--skill-tag-bg);
    color: var(--skill-tag-text);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* IT Specialties */
.specialties-list {
    list-style: disc;
    padding-left: 20px;
}
.specialties-list li {
    margin-bottom: 10px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: cover; /* Or 'contain' if you prefer */
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: var(--skill-tag-bg); /* Placeholder bg */
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--text-color);
}

.project-card p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    flex-grow: 1; /* Makes description take available space */
}
.project-card .tech-stack {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
    flex-grow: 0;
}
.project-card .project-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.2s;
    margin-top: auto; /* Pushes button to bottom if card heights vary */
}
.project-card .project-link:hover {
    background-color: var(--button-hover-bg);
    text-decoration: none;
}

/* CV Download */
.cv-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.cv-button {
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--button-text) !important; /* Override link color */
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s;
    display: inline-block;
    text-align: center;
}
.cv-button:hover {
    background-color: var(--button-hover-bg);
    text-decoration: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    background: var(--header-bg);
    color: var(--header-text);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .header-content {
        flex-direction: column;
        align-items: center;
    }
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    .controls {
        margin-top: 10px;
    }
    .projects-grid {
        grid-template-columns: 1fr; /* Stack project cards on smaller screens */
    }
    .cv-links {
        flex-direction: column;
    }
    .cv-button {
        width: 100%; /* Full width buttons on mobile */
    }
}