/* Base Styles */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a47a3;
    --text-color: #2c2c54;
    --light-color: #f8f7ff;
    --dark-color: #2c2c54;
    --accent-color: #ff6b6b;
    --section-padding: 30px 0;
    --container-padding: 0 15px;
}

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

body {
    font-family: "Sarabun", sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.4;
    font-size: 0.95rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

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

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

ul {
    list-style-position: inside;
    margin-left: 20px;
}

/* Font Classes */
.sarabun-thin {
    font-family: "Sarabun", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.sarabun-extralight {
    font-family: "Sarabun", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.sarabun-light {
    font-family: "Sarabun", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.sarabun-regular {
    font-family: "Sarabun", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.sarabun-medium {
    font-family: "Sarabun", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.sarabun-semibold {
    font-family: "Sarabun", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.sarabun-bold {
    font-family: "Sarabun", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.sarabun-extrabold {
    font-family: "Sarabun", sans-serif;
    font-weight: 800;
    font-style: normal;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 3px;
    color: white;
}

.profile-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: white;
}

.profile-info .title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
    font-size: 0.9rem;
}

.contact-item i {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
    background-color: rgba(255, 255, 255, 0.3);
}

.contact-item a {
    color: white;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Section Styles */
.section {
    padding: var(--section-padding);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section:nth-child(odd) {
    background-color: white;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-icon {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.section-title:hover .section-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.category-icon {
    margin-right: 8px;
    color: var(--secondary-color);
}

h3:hover .category-icon {
    transform: rotate(10deg);
    transition: transform 0.3s ease;
}

/* Experience Section */
.experience-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-item h3 {
    font-size: 1.2rem;
    margin-bottom: 3px;
    color: var(--dark-color);
}

.experience-item .company {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.experience-item ul {
    margin-top: 5px;
    line-height: 1.4;
}

.experience-item ul ul {
    margin-top: 3px;
    margin-left: 15px;
}

/* Skills Section */
.skills-category {
    margin-bottom: 15px;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.skill-item {
    background-color: rgba(108, 99, 255, 0.1);
    padding: 8px 12px;
    border-radius: 5px;
    transition: transform 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    color: var(--primary-color);
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.skill-item:hover .skill-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.skill-name {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* Portfolio Section */
.portfolio-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.portfolio-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.portfolio-item p {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Education Section */
.education-item {
    margin-bottom: 20px;
}

.education-item h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
    color: var(--dark-color);
}

.education-item .institution {
    font-size: 1rem;
    margin-bottom: 3px;
    color: var(--secondary-color);
}

/* Languages Section */
.languages-container {
    display: flex;
    gap: 20px;
}

.language-item {
    background-color: rgba(108, 99, 255, 0.1);
    padding: 8px 15px;
    border-radius: 5px;
    min-width: 120px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.language-icon {
    color: var(--primary-color);
    margin-right: 8px;
}

.language-item:hover .language-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.language-name {
    color: var(--secondary-color);
    margin-right: 8px;
}

/* Achievements Section */
.achievement-item {
    margin-bottom: 15px;
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.achievement-item ul {
    margin-top: 3px;
    line-height: 1.4;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
}

.pdf-instructions {
    margin-top: 10px;
}

.pdf-instructions a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

.pdf-instructions a:hover {
    color: white;
}

/* Icon Animations */
.section-title:hover .section-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

h3:hover .category-icon {
    transform: rotate(10deg);
    transition: transform 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.language-item:hover .language-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        text-align: center;
    }

    .profile-info .title {
        margin-bottom: 15px;
    }

    .contact-info {
        justify-content: center;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .languages-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .portfolio-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 40px 0;
    }

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

    .profile-info h1 {
        font-size: 2rem;
    }

    .profile-info h2 {
        font-size: 1.5rem;
    }

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