/* --- การตั้งค่าทั่วไป --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

body {
    font-family: 'Tahoma', sans-serif;
    line-height: 1.6;
    background-color: #f7f7f7; 
    color: #333;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

/* --- ส่วนหัว (Header) และเมนู --- */
header {
    background: #0077b6; /* สีน้ำเงินเข้ม */
    color: #fff;
    padding: 1.2em 0;
    position: sticky; 
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    display: inline;
    font-size: 1.8em;
}

nav {
    float: right;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-left: 25px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffd700; /* สีเหลืองทองเมื่อโฮเวอร์ */
}

/* --- การจัดรูปแบบส่วนเนื้อหา (Sections) --- */
.section-padding {
    padding: 60px 0;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    margin-bottom: 20px;
    padding-left: 30px;
    padding-right: 30px;
}

.section-padding h2 {
    color: #0077b6;
    margin-bottom: 30px;
    border-bottom: 3px solid #00b4d8; /* สีฟ้า */
    display: inline-block;
    padding-bottom: 5px;
}

/* --- รูปโปรไฟล์ --- */
.profile-pic {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    float: right;
    margin-left: 20px;
    object-fit: cover;
    border: 4px solid #00b4d8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    object-position: 50% 10%;
}

/* --- ประสบการณ์และการศึกษา --- */
.job-entry, .education-entry {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid #00b4d8;
}

.job-entry h3, .education-entry h3 {
    color: #03045e;
    margin-bottom: 5px;
}

.duration {
    font-style: italic;
    color: #777;
    margin-bottom: 15px;
    display: block;
}

.job-entry ul {
    margin-left: 20px;
    list-style-type: disc;
}

/* --- ทักษะ (Skills) --- */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: #48cae4; /* สีเขียวอมฟ้า */
    color: #000;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

/* --- ติดต่อ (Contact) --- */
#contact a {
    color: #0077b6;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* --- ส่วนท้าย (Footer) --- */
footer {
    background: #333;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
}

/* --- การตอบสนองต่ออุปกรณ์มือถือ (Media Query) --- */
@media (max-width: 768px) {
    header h1 {
        float: none;
        text-align: center;
        display: block;
        margin-bottom: 10px;
    }
    nav {
        float: none;
        text-align: center;
    }
    nav ul li {
        margin: 0 10px;
        font-size: 0.9em;
    }
    .profile-pic {
        float: none;
        margin: 0 auto 20px auto;
        display: block;
    }
    .section-padding {
        padding: 30px 20px;
    }
    .skills-list {
        justify-content: center;
    }
}