/* CSS Variables - Light Mode (Default) */
:root {
    --primary-color: #e63946;
    --bg-color: #ffffff;
    --text-color: #1d3557;
    --card-bg: #f8f9fa;
    --border-color: #e9ecef;
    --secondary-text: #6c757d;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --secondary-text: #a0a0a0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

/* Header Styles */
header {
    text-align: left;
    padding: 25px 20px;
    margin-bottom: 25px;
}

.header-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.header-controls a {
    text-decoration: none;
}

.btn {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c92a37;
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.profile-info {
    flex: 1;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.title {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-text);
    font-size: 0.85rem;
}

.contact-item a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-item a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.contact-item i,
.contact-item img {
    color: var(--primary-color);
    width: 18px;
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

/* Section Styles */
section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Summary Section */
#summary p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    padding: 0 20px;
}

/* Skills Section - Compact Tags Layout */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.skill-card h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-list li {
    padding: 4px 10px;
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--text-color);
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

.skill-list li::before {
    content: none;
}

.skill-list li {
    padding-left: 10px;
}

/* Experience & Education Cards */
.card {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    background-color: white;
    padding: 3px;
}

.card-content {
    flex: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: var(--primary-color);
}

.card-company {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.card-date {
    color: var(--secondary-text);
    font-size: 0.85rem;
    white-space: nowrap;
}

.card ul {
    list-style: none;
    margin-top: 10px;
}

.card ul li {
    padding: 3px 0;
    color: var(--text-color);
    font-size: 0.85rem;
    position: relative;
    padding-left: 16px;
}

.card ul li::before {
    content: "▸";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.education-degree {
    font-style: italic;
    color: var(--secondary-text);
    margin-top: 10px;
}

/* Footer */
.cv-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .name {
        font-size: 1.6rem;
    }

    .title {
        font-size: 1rem;
    }

    .profile-section {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .contact-info {
        justify-content: center;
        gap: 12px;
    }

    .contact-item {
        font-size: 0.85rem;
    }

    .header-controls {
        flex-wrap: wrap;
    }

    .btn {
        padding: 7px 12px;
        font-size: 12px;
    }

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

    .card {
        padding: 15px;
    }

    .card-logo {
        width: 60px;
        height: 60px;
    }

    .card-header {
        flex-direction: column;
        gap: 5px;
    }

    .card-date {
        white-space: normal;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .name {
        font-size: 1.4rem;
    }

    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header-controls {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .name {
        color: #e63946;
    }

    .section-title,
    .skill-card h4,
    .card-company {
        color: #e63946;
    }

    .card,
    .skill-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: black;
    }

    .contact-item a {
        color: black;
    }
}
