/* การตั้งค่าเริ่มต้น */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0f172a; /* โทนเข้มสไตล์โมเดิร์น */
    color: #f8fafc;
    line-height: 1.6;
}

/* แถบเมนู (Navbar) */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 8%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo span {
    color: #38bdf8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 300;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #38bdf8;
}

/* การจัดโครงสร้างหน้าเว็บ */
.page {
    min-height: 100vh;
    padding: 120px 8% 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1000px;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title span {
    color: #38bdf8;
}

/* Glassmorphism Effect (เอฟเฟกต์กระจกใส) */
.glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* หน้าที่ 1: Hero Section */
.hero-content {
    text-align: center;
    max-width: 700px;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.highlight {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    
    -webkit-text-fill-color: transparent;
}

.btn-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    transition: 0.3s;
}

.btn-primary {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* หน้าที่ 2: About Section */
.about-card {
    display: flex;
    padding: 2.5rem;
    gap: 2rem;
    align-items: center;
}

.profile-img img {
    border-radius: 50%;
    border: 3px solid #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.profile-text h3 {
    margin-bottom: 1rem;
    color: #38bdf8;
}

.profile-text ul {
    list-style: none;
}

.profile-text li {
    margin-bottom: 0.8rem;
    color: #cbd5e1;
}

.profile-text strong {
    color: #fff;
}

/* หน้าที่ 3: Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 2rem;
    text-align: center;
    transition: 0.3s;
}

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

.skill-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.skill-card h3 {
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

/* หน้าที่ 4: Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    transition: 0.3s;
}

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

.project-img {
    height: 160px;
    background: linear-gradient(135deg, #1e293b, #334155);
}

.project-info {
    padding: 1.5rem;
}

.project-info p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem;
}

.project-link {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
}

/* หน้าที่ 5: Contact Section */
.contact-card {
    padding: 3rem;
    text-align: center;
}

.contact-sub {
    color: #94a3b8;
    margin-bottom: 2rem;
}

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

.contact-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.c-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-item h4 {
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 768px) {
    .nav-links { display: none; } /* สามารถปรับเพิ่มเมนู Toggle บนมือถือภายหลังได้ */
    .hero h1 { font-size: 2.2rem; }
    .about-card { flex-direction: column; text-align: center; }
}