/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --text-light: #666;
    --background: #ffffff;
    --background-alt: #f8f9fa;
    --border-color: #e1e4e8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header */
.header {
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-text {
    flex: 1;
    min-width: 0;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    word-wrap: break-word;
}

.subtitle {
    font-size: 1.2em;
    color: var(--text-light);
    font-weight: 400;
}

/* Sections */
.section {
    margin-bottom: 60px;
}

.section h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.section p {
    margin-bottom: 15px;
    line-height: 1.8;
    text-align: justify;
}

/* Projects */
.projects {
    display: grid;
    gap: 25px;
}

.project-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.project-card h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--background-alt);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--border-color);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    padding: 15px;
    background-color: var(--background-alt);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.skill-category h4 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-category p {
    color: var(--text-light);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 0;
}

/* CV Link */
.cv-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cv-link:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Footer */
.footer {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links a {
    font-size: 1em;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
}

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

.copyright {
    color: var(--text-light);
    font-size: 0.9em;
}

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

    .header {
        gap: 20px;
    }

    .profile-image {
        width: 90px;
        height: 90px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .section h2 {
        font-size: 1.5em;
    }

    .project-card h3 {
        font-size: 1.2em;
    }

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

    .cv-link {
        padding: 10px 25px;
        font-size: 0.95em;
    }
}

@media (max-width: 650px) {
    .social-links {
        max-width: 480px;
        gap: 18px 25px;
    }
}

@media (max-width: 550px) {
    .social-links {
        max-width: 370px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }

    .header {
        gap: 15px;
    }

    .profile-image {
        width: 70px;
        height: 70px;
        border: 2px solid var(--border-color);
    }

    .header h1 {
        font-size: 1.4em;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.85em;
        line-height: 1.3;
    }

    .section {
        margin-bottom: 40px;
    }

    .section h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .project-card {
        padding: 15px;
    }

    .project-card h3 {
        font-size: 1.1em;
    }

    .tags {
        gap: 6px;
    }

    .tag {
        font-size: 0.8em;
        padding: 3px 10px;
    }

    .skill-category {
        padding: 12px;
    }

    .skill-category h4 {
        font-size: 1em;
    }

    .skill-category p {
        font-size: 0.9em;
    }

    .copyright {
        font-size: 0.85em;
    }
}

@media (max-width: 420px) {
    .social-links {
        max-width: 260px;
        gap: 15px 20px;
    }
}

@media (max-width: 360px) {
    .header {
        gap: 12px;
    }

    .profile-image {
        width: 60px;
        height: 60px;
    }

    .header h1 {
        font-size: 1.2em;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.8em;
        line-height: 1.3;
    }

    .social-links {
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 20px 12px;
    }

    .header {
        gap: 10px;
    }

    .profile-image {
        width: 50px;
        height: 50px;
    }

    .header h1 {
        font-size: 1.1em;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.75em;
        line-height: 1.3;
    }
}
