/* ==================================
   Base & Variables (Inspired by eddie.eco)
   ================================== */
:root {
    /* Colors */
    --black: #000000;
    --white: #ffffff;
    --bg-main: #f5f5f5; /* Light gray background */
    --lime: #d1ef54; /* Bright green/yellow */
    --purple: #b9a2ff; /* Light purple */
    --light-purple: #e0d4ff; /* Softer purple for cards */
    --light-green: #e4f796; /* Softer lime for cards */
    --light-gray: #f0f0f0;
    --text-main: #111111;
    --text-muted: #555555;
    
    /* Typography */
    --font-inter: 'Inter', sans-serif;
    
    /* Layout */
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 40px;
    --radius-xl: 60px;
    --radius-pill: 999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font-inter);
    color: var(--text-main);
    background-color: var(--white);
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================================
   Layout Utility Classes
   ================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-section { margin-top: 8rem; }
.p-lg { padding: 60px; }
.inline-block { display: inline-block; }

/* Background & Radius Helpers */
.bg-lime { background-color: var(--lime); }
.bg-light-purple { background-color: var(--light-purple); color: var(--black); }
.bg-light-green { background-color: var(--light-green); color: var(--black); }
.bg-light-gray { background-color: var(--light-gray); color: var(--black); }
.bg-white { background-color: var(--white); }
.bg-purple { background-color: var(--purple); }
.bg-blue { background-color: #6fb2ff; }

.rounded-box { border-radius: var(--radius-lg); }
.rounded-image { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.border-box { border: 1px solid #e0e0e0; }

/* ==================================
   Typography
   ================================== */
h1 { font-size: 4.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 1rem; }
h2 { font-size: 3rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }

.role { font-size: 2rem; font-weight: 600; color: var(--text-muted); margin-bottom: 1.5rem; }
.desc { font-size: 1.125rem; line-height: 1.6; font-weight: 400; color: var(--text-main); }
.huge-text { font-size: 4rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.giant-text { font-size: 6rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }

/* ==================================
   Components
   ================================== */

/* Buttons & Pills */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    cursor: pointer;
    border: none;
}
.btn-black { background-color: var(--black); color: var(--white); }
.btn-black:hover { opacity: 0.9; transform: scale(0.98); }

.btn-menu {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-pill);
    border: 1px solid #e0e0e0;
    background: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 24px;
    background: var(--white);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 0 8px;
}

.skill-pill {
    display: inline-block;
    padding: 8px 16px;
    background: var(--light-gray);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 4px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--white);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

/* Header Navbar */
.navbar {
    padding: 24px 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}
.logo-pill {
    display: flex;
    align-items: center;
    background: var(--purple);
    padding: 8px 20px 8px 8px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}
.logo-icon {
    background: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}
.nav-right { display: flex; align-items: center; }

/* ==================================
   Sections
   ================================== */

/* Hero */
.hero { min-height: 80vh; align-items: stretch; margin-top: 2rem; }
.hero-image-wrapper { background: var(--light-gray); border-radius: var(--radius-lg); padding: 20px; }
.hero-content { display: flex; flex-direction: column; justify-content: center; padding: 60px; }
.contact-item { font-size: 1.125rem; margin-bottom: 8px; }

/* Experience List */
.task-list { list-style-position: inside; color: var(--text-main); line-height: 1.6; }
.task-list li { margin-bottom: 12px; }
.company-name { font-size: 2.5rem; letter-spacing: -0.02em; }
.role-date { font-size: 1.125rem; margin-top: 8px; }

.exp-content { display: flex; flex-direction: column; justify-content: center; }
.exp-image { background: var(--white); border-radius: var(--radius-md); padding: 20px; height: 100%; min-height: 300px;}

/* Skills & Education */
.skills-box, .edu-box { display: flex; flex-direction: column; }
.cert-list { font-size: 1.125rem; }

/* Footer */
.footer { background: var(--white); border-top: 1px solid #e0e0e0; padding-top: 80px; position: relative; overflow: hidden; }
.grid-footer { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr; gap: 40px; }
.footer h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 24px; color: var(--text-muted); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 16px; font-size: 1rem; font-weight: 600; display: flex; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 12px; }

.social-icons { display: flex; gap: 12px; }
.social-icon { width: 48px; height: 48px; border: 1px solid #e0e0e0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; cursor: pointer; }

.qr-box { display: inline-flex; align-items: center; background: var(--white); padding: 12px; border-radius: var(--radius-md); box-shadow: 0 4px 20px rgba(0,0,0,0.08); font-weight: 600; font-size: 0.875rem; }
.qr-image { width: 80px; height: 80px; border-radius: 8px; margin-right: 16px; }

.lang-switch { display: flex; background: var(--black); color: var(--white); border-radius: var(--radius-pill); padding: 4px; }
.lang-switch span { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.lang-switch .active { background: var(--white); color: var(--black); }

.giant-footer-logo { font-size: 15vw; font-weight: 800; line-height: 0.8; letter-spacing: -0.05em; margin-top: 60px; color: var(--black); }

/* ==================================
   Responsive (Mobile Adaptations)
   ================================== */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; gap: 24px; }
    h1 { font-size: 3rem; }
    .huge-text { font-size: 2.5rem; }
    .giant-text { font-size: 3.5rem; }
    .p-lg { padding: 40px; }
    .grid-footer { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-text-right { grid-column: span 2; }
    .hero-image-wrapper { min-height: 300px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .grid-footer { grid-template-columns: 1fr; }
    .footer-text-right { grid-column: span 1; }
    .filter-pills { display: flex; flex-direction: column; gap: 12px; align-items: center; }
    .pill { margin: 0; }
    .p-lg { padding: 24px; }
    .btn-black { padding: 12px 20px; font-size: 0.875rem; }
}


/* ==================================
   Slider Component Styles
   ================================== */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%; /* หรือปรับความสูงตามความเหมาะสม */
    min-height: 300px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    outline: none; /* สำหรับตอน focus */
}

.slider-container:focus-visible {
    box-shadow: 0 0 0 3px var(--purple);
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

/* ปุ่มเลื่อน (อิงสไตล์ปุ่มวงกลมจาก React) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.slider-btn:focus-visible {
    outline: 2px solid white;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* จุด Navigation ด้านล่าง */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.dot.active {
    background-color: var(--black); /* สีตอนที่ถูกเลือก */
    width: 16px;
    height: 16px;
    transform: translateY(2px); /* ปรับตำแหน่งนิดหน่อยให้บาลานซ์กับจุดเล็ก */
}


/* ==================================
   Mobile App Showcase & Slider
   ================================== */
.items-center { align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.m-0 { margin: 0; }
.mr-4 { margin-right: 1.5rem; }
.text-muted { color: var(--text-muted); }

/* App Title Area */
.app-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
    border-radius: 16px; /* มุมมนแบบ Apple Icon */
}
.app-title { font-size: 2.5rem; letter-spacing: -0.02em; }

/* Feature List */
.feature-list {
    list-style: none; /* เอาจุดกลมๆ ออกถ้าต้องการดีไซน์คลีนๆ แบบในรูป */
    padding-left: 0;
}
.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 16px;
    font-size: 1.125rem;
    color: var(--text-main);
}
.feature-list li::before {
    content: "•"; /* ใช้จุดเล็กๆ สีเทาหรือดำแทน */
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Download Button */
.btn-icon-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1.125rem;
    border-radius: var(--radius-pill);
}
.icon-apple { font-size: 1.5rem; line-height: 1; }

/* Slider Refinements (ปรับแก้จากของเดิมให้เนียนขึ้น) */
.slider-container {
    background: transparent; /* เอาพื้นหลังขาวออก เพื่อให้โชว์รูปมือถือเด่นๆ */
    padding: 0;
    min-height: 600px; /* เพิ่มความสูงให้พอกับมือถือ */
    box-shadow: none;
}

.slide-image {
    max-height: 550px;
    width: auto; /* รักษาอัตราส่วนรูปภาพ */
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15)); /* ใส่เงาให้รูปมือถือดูลอยขึ้นมา */
    border-radius: 40px; /* ถ้าเป็นรูปหน้าจอเฉยๆ เติมขอบมนให้ดูเป็นมือถือ */
}

/* ปรับสไตล์ปุ่มเลื่อนให้เหมือนรูปอ้างอิง (พื้นขาว ขอบเทา ลูกศรดำ) */
.slider-btn {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border: 1px solid #e5e7eb;
    color: var(--text-main);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.slider-btn:hover {
    background-color: #f9fafb;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}