/* Reset และ Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

body.dark {
    background-color: #121212;
    color: #e0e0e0;
}

/* Header และ Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s;
}

body.dark .header {
    background: rgba(18, 18, 18, 0.95);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
}

/* Sections ทั่วไป */
section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* About */
.skills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border-radius: 20px;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

body.dark .project-card {
    background: #1e1e1e;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-link {
    color: #007bff;
    text-decoration: none;
}

/* Contact */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form input, .contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

body.dark .contact-form input, body.dark .contact-form textarea {
    background: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

.contact-form button {
    padding: 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
}

body.dark footer {
    background: #0d0d0d;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* สามารถเพิ่ม hamburger menu ทีหลัง */
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}