*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",sans-serif;
}

body{
    background:#f5f5f5;
    color:#222;
}

header{
    background:#6b0f1a;
    color:white;
    text-align:center;
    padding:25px;
}

header h1{
    margin-bottom:10px;
}

nav{
    margin-top:10px;
}

nav a{
    color:white;
    text-decoration:none;
    margin:0 15px;
    font-size:18px;
    transition:.3s;
}

nav a:hover{
    color:#ffd6d6;
}

.container{
    width:90%;
    max-width:1000px;
    margin:40px auto;
}

.card{
    background:white;
    padding:30px;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
}

.profile{
    display:flex;
    align-items:center;
    gap:40px;
}

.profile img{
    width:250px;
    height:250px;
    object-fit:cover;
    border-radius:20px;
    border:5px solid #6b0f1a;
}

.info h2{
    color:#6b0f1a;
    margin-bottom:15px;
}

.info p{
    line-height:1.8;
}

table{
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
}

table,th,td{
    border:1px solid #ddd;
}

th{
    background:#f5f5f5;
    color:#333;
    font-weight:bold;
}

th,td{
    padding:12px;
}

.gallery{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
}

.gallery img{
    width:100%;
    height:220px;
    object-fit:cover;
    border-radius:15px;
    border:3px solid #6b0f1a;
}

ul{
    margin-left:25px;
    margin-top:15px;
}

footer{
    background:#111;
    color:white;
    text-align:center;
    padding:15px;
    margin-top:40px;
}
.profile-box{
    display:flex;
    gap:40px;
    align-items:center;
    flex-wrap:wrap;
}

.slideshow{
    flex:1;
    min-width:280px;
    text-align:center;
}

.slide{
    width:100%;
    max-width:320px;
    height:400px;
    object-fit:cover;
    border-radius:20px;
    border:5px solid #6b0f1a;
    display:none;
    box-shadow:0 5px 15px rgba(0,0,0,.2);
}

.table-box{
    flex:2;
}

.table-box h2{
    margin-bottom:20px;
    color:#6b0f1a;
}

table{
    width:100%;
    border-collapse:collapse;
}

table,th,td{
    border:1px solid #ddd;
}

th{
    background:#f3f3f3;
    color:#333;
    font-size:18px;
}

td,th{
    padding:15px;
}

tr:nth-child(even){
    background:#fafafa;
}

tr:hover{
    background:#eeeeee;
}
/* ===== ประวัติการศึกษา ===== */

.education{
    margin-top:40px;
}

.education h2{
    text-align:center;
    color:#6b0f1a;
    margin-bottom:30px;
    font-size:30px;
}

.edu-item{
    display:flex;
    align-items:center;
    gap:25px;
    background:#fff;
    border-radius:20px;
    padding:20px;
    margin-bottom:25px;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
    transition:0.3s;
}

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

.edu-item img{
    width:170px;
    height:170px;
    object-fit:cover;
    border-radius:15px;
    border:4px solid #6b0f1a;
}

.edu-text h3{
    color:#6b0f1a;
    margin-bottom:10px;
}

.edu-text p{
    line-height:1.8;
    color:#444;
}

@media(max-width:768px){

.edu-item{
    flex-direction:column;
    text-align:center;
}

.edu-item img{
    width:220px;
    height:220px;
}

}
.education{
    margin-top:20px;
}

.education h2{
    text-align:center;
    color:#6b0f1a;
    margin-bottom:30px;
    font-size:30px;
}

.edu-item{
    display:flex;
    align-items:center;
    gap:25px;
    background:#ffffff;
    padding:20px;
    margin-bottom:25px;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
    transition:.3s;
}

.edu-item:hover{
    transform:translateY(-5px);
}

.edu-item img{
    width:180px;
    height:180px;
    object-fit:cover;
    border-radius:15px;
    border:4px solid #6b0f1a;
}

.edu-text h3{
    color:#6b0f1a;
    margin-bottom:10px;
}

.edu-text p{
    line-height:1.8;
}

@media(max-width:768px){

.edu-item{
    flex-direction:column;
    text-align:center;
}

.edu-item img{
    width:220px;
    height:220px;
}

}
.hobby-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-top:30px;
}

.hobby-item{
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
    text-align:center;
    transition:.3s;
}

.hobby-item:hover{
    transform:translateY(-8px);
}

.hobby-item img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.hobby-item h3{
    color:#6b0f1a;
    margin:15px 0;
}

.hobby-item p{
    padding:0 15px 20px;
}
/* ---------- หน้าแรก ---------- */

.card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#ffffff,#fff7f8);
    box-shadow:0 12px 30px rgba(0,0,0,.15);
    transition:.3s;
}

.card:hover{
    transform:translateY(-5px);
}

.profile img{
    transition:.4s;
}

.profile img:hover{
    transform:scale(1.05);
}

.info h2{
    font-size:38px;
    color:#6b0f1a;
    margin-bottom:20px;
}

.info p{
    font-size:20px;
    margin:12px 0;
}

/* มุมซ้ายบน */
.emoji-left{
    position:absolute;
    left:18px;
    top:18px;
    font-size:34px;
}

/* มุมขวาล่าง */
.emoji-right{
    position:absolute;
    right:25px;
    bottom:20px;
    font-size:40px;
}