/* === MOBILE RESPONSIVE STYLES (Breakpoint at 768px) === */
@media (max-width: 768px) {
    /* ซ่อนเมนูบน Mobile เพื่อไม่ให้เกะกะ */
    .side-nav {
        display: none;
    }
    .step {
        min-height: auto; 
        padding: 4rem 15px; 
    }

    .text-content h2 { font-size: 2rem; }
    .text-content p { font-size: 1rem; }
    .contact-section h2 { font-size: 2.5rem; }
    .contact-section a { font-size: 1.2rem; }
}

:root {
    --dark-bg: #101010fb;
    --light-text: #f5f5f7;
    --dim-text: #a1a1a6;
    --accent-blue: #0071e3;
}

body {
    
    background-color: var(--dark-bg);
    color: var(--light-text);
    font-family: 'Inter', sans-serif;
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", Roboto, Helvetica, Arial, sans-serif; */
    margin: 0;
}

/* --- SCENE 1: The Hero (RESTORED TO ORIGINAL STYLE) --- */
.hero-section {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.wip-notice {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dim-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    padding: 5px 15px;
    border: 1px solid var(--dim-text);
    border-radius: 20px;
}

.hero-section h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    margin: 0;
}

.hero-section p {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--dim-text);
    max-width: 800px;
}

/* --- SCENE 2: The Project Story (NEW CONCEPT) --- */
.story-container {
    width: 100%;
    overflow: hidden;
}

.step {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5rem 20px;
    box-sizing: border-box;
}

.story-container .step:first-child {
    padding-top: 0;
}

.visual-wrapper {
    width: 90%;
    max-width: 1000px;
    /* aspect-ratio: 16 / 9; */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visual-wrapper img {
    display: block; /* ป้องกันช่องว่างแปลกๆ ใต้ภาพ */
    width: 100%;
    height: auto; 
    /* object-fit: cover; */
}

.text-content {
    text-align: center;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

.text-content h2 {
    font-size: 2.5rem;
}

.text-content p {
    font-size: 1.2rem;
    color: var(--dim-text);
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.step.is-active .visual-wrapper,
.step.is-active .text-content {
    opacity: 1;
    transform: none;
}

/* --- SCENE 3: The Contact Footer (RESTORED TO ORIGINAL STYLE) --- */
.contact-section {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.contact-section h2 { 
    font-size: 3.5rem; 
}
.contact-section a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 1.5rem;
    margin: 0 15px;
}

#last-updated-timestamp {
    font-size: 0.8rem;
    font-weight: 400; 
    color: var(--dim-text); 
    margin-top: -1rem; 
    margin-bottom: 2rem; 
}

/* 1. เพิ่ม Smooth Scroll ให้ทั้งหน้าเว็บ */
html {
    scroll-behavior: smooth;
}

/* 2. จัดตำแหน่งเมนูไว้ด้านขวาแบบ Fixed */
.side-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

/* 3. สไตล์ของรายการเมนู */
.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 1px solid var(--dim-text); /* เส้นไกด์แนวตั้ง */
    padding-right: 20px;
}

.side-nav li {
    margin: 15px 0;
}

/* 4. สไตล์ของ Link (ก่อน Active) */
.side-nav a {
    color: var(--dim-text);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    display: block;
    text-align: right;
    font-weight: 400;
}

/* 5. เอฟเฟกต์เมื่อ Hover */
.side-nav a:hover {
    color: var(--light-text);
    transform: translateX(-5px); /* เลื่อนซ้ายนิดๆ ให้ดูมีมิติ */
}

/* Container สำหรับกลุ่ม Icon */
.tech-stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
    max-width: 600px;
}


/* ขนาดรูป Icon */
.tech-icon img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* จัดการกล่องใหญ่ให้เป็นแนวตั้งเพื่อวางหัวข้อไว้บนสุด */
.tech-type-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    width: auto;
    height: auto;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* จัดให้ทุกอย่างในนี้อยู่กลาง */
    width: 100%;
    margin-bottom: 3rem; /* ระยะห่างจากกลุ่มถัดไป */
}

/* สไตล์หัวข้อ */
.category-title p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--accent-blue); /* เพิ่มเส้นใต้ให้ดูเด่น */
    padding-bottom: 5px;
}

/* กลุ่ม Icon จัดเรียงแนวนอน */
.icon-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* ใช้สไตล์ .tech-icon เดิมของคุณได้เลย */
.tech-icon {
    /* background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08); */
    border-radius: 16px;
    padding: 10px;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* สไตล์หัวข้อ */
.category-title p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--accent-blue); /* เพิ่มเส้นใต้ให้ดูเด่น */
    padding-bottom: 5px;
}


