/* === General & Root Styles === */
:root {
    --primary-color: #4a6da7; /* Silpakorn's Blue */
    --secondary-color: #f4f4f4; /* Light grey for sections */
    --dark-color: #333;
    --light-color: #fff;
    --text-color: #555;
    --shadow: 0 4px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Noto Sans SC', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3 {
    font-family: 'Montserrat', 'Sarabun', sans-serif;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #335d92;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--secondary-color);
}

.text-center {
    text-align: center;
}

.button-more {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 10px 25px;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.button-more:hover {
    background: #335d92;
    color: var(--light-color);
}


/* === Navbar === */
.navbar {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    flex-direction: column; /* Mobile: Stack brand and links */
    align-items: center;
    text-align: center;
}

.navbar .nav-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    flex-direction: column; /* Mobile: Stack links */
    margin-top: 1rem;
}

.navbar .nav-links li {
    margin: 0.5rem 0;
}

.navbar .nav-links a {
    color: var(--text-color);
    font-weight: bold;
}
.lang-switcher a {
    font-weight: normal !important;
    color: #c22f2f !important;
}


/* === Hero Section === */
.hero {
    background: var(--secondary-color);
    padding: 60px 0;
    text-align: center;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--light-color);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.5rem auto;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    margin: 0 10px;
    font-size: 1.1rem;
}

/* === About Section === */
.about-grid {
    display: flex;
    flex-direction: column; /* Mobile: Stack cards */
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.card ul {
    list-style: none;
    padding-left: 0;
}

.card ul li {
    padding: 0.5rem 0;
}

/* === Research Interests === */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.interest-tags span {
    background: var(--primary-color);
    color: var(--light-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* === Publications & Awards Lists === */
.publication-list, .awards-list {
    list-style: none;
    padding: 0;
}

.publication-list li, .awards-list li {
    background: var(--light-color);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 5px 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.awards-list li strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* === Footer === */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
}

/* === Scroll to Top Button === */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: var(--shadow);
}

#scrollToTopBtn:hover {
    background-color: #335d92;
}

/* === Full List Pages (CV, Publications) === */
.full-list-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}
.full-list-container .button, .full-list-container .button-more {
    background: var(--dark-color);
}
.full-list-container .button:hover, .full-list-container .button-more:hover {
    background: #555;
}

.apa-list { list-style: none; padding-left: 0; }
.apa-list li { 
    padding-left: 2.5em; 
    text-indent: -2.5em; 
    margin-bottom: 1.2em; 
    line-height: 1.8;
}
.apa-list i { font-style: italic; }


/* --- TABLET --- */
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    
    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .navbar .nav-links {
        flex-direction: row; /* Tablet: Horizontal links */
        margin-top: 0;
    }

    .navbar .nav-links li {
        margin: 0 1rem;
    }

    .about-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns for cards */
        gap: 2rem;
    }
}


/* --- DESKTOP --- */
@media (min-width: 1024px) {
    body {
        font-size: 17px;
    }
    .section {
        padding: 80px 0;
    }
}