@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@100..700&display=swap');
* {
    font-family: "Anuphan", sans-serif;
    font-weight: 700px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
    margin: 10px 0;
    font-size: 1.2em;
    grid-row: span 1;
}

/* Project list specific styling */
.project-list {
    list-style: none;
    padding-left: 0;
    display: flex;              /* ✅ เปลี่ยนเป็น flex */
    flex-wrap: wrap;            /* ✅ ให้ขึ้นบรรทัดใหม่ */
    gap: 12px 16px;             /* row-gap column-gap */
    margin: 0 auto;             /* ✅ จัดกึ่งกลาง */
    justify-content: center;    /* ✅ จัดกึ่งกลาง */
    max-width: 800px;           /* จำกัดความกว้าง */
}

.project-list li {
    background: rgba(255,255,255,0.03);
    padding: 10px 14px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.12s ease;
    flex: 0 1 220px;            /* ✅ ยืดหยุ่นแต่ไม่ต่ำกว่า 220px */
    box-sizing: border-box;     /* ป้องกันบาน */
}

.project-list li:hover {
    background: rgba(255,77,77,0.12);
    transform: translateY(-3px);
}

.project-list a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    width: 100%;
}

/* Responsive: on narrow screens stack into a single column */
@media (max-width: 520px) {
    .project-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .project-list li {
        width: 100%;
    }
}

body {
    font-family: 'Arial', sans-serif;
    background: #181818;
    color: white;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

nav {
    display: flex;
    gap: 20px;
    justify-content: center;
    position: absolute;
    top: 40px;
    width: 100%;
    transition: all 0.6s ease;
    z-index: 10;
}

nav.fixed {
    position: fixed;
    top: 0;
    background-color: #000;
    padding: 15px 0;
    justify-content: flex-end;
    padding-right: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ff4d4d;
}

nav a.active {
    color: crimson;
    border-bottom: 2px solid crimson;
}

.section-hero {
    height: 100vh;
    width: 100vw;
    background: crimson;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    transition: opacity 1s ease;
}

.section-hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.section-hero p {
    font-size: 1.2em;
}

.arrow-btn {
    font-size: 40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-top: 30px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.section-content {
    min-height: 100vh;
    width: 100vw;
    background: #222;
    padding: 100px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-content:nth-of-type(odd) {
    background: #2a2a2a;
}

.section-content h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.container-text {
    width: 80%;
    max-width: 800px;
    min-height: 200px;
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 40px;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
}

.container-text-one {
    width: 80%;
    max-width: 800px;
    min-height: 200px;
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 40px;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
}

.container-text-one img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
}

.container-text img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
}

.text-content-one p {
    margin: 30px;
    line-height: 0.5;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.text-content {
    flex-grow: 1;
}

.text-content-one {
    flex-grow: 1;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .container-text {
        flex-direction: column;
        align-items: center;
    }
    .container-text img {
        margin-bottom: 20px;
    }
    .text-content {
        text-align: center;
    }
}
