body {
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #000428, #004e92); /* Dark blue gradient */
    color: #ffffff;
    overflow-x: hidden;
    animation: fade-in 5s ease;
    
}

header, footer {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background */
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.project {
    box-shadow: 0 4px 8px rgba(0, 0, 255, 0.5); /* Blue glow for galaxy effect */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    background-color: rgba(0, 0, 0, 0.8); /* Dark cards */
}

.project img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.project:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 0, 255, 0.75); /* Stronger blue glow on hover */
}

@media (max-width: 600px) {
    .projects {
        grid-template-columns: 1fr;
    }
}


#typing h1 {
    border-right: 2px solid white;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(30, end), blink-caret .75s step-end infinite;
}

/* Typing effect */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* Cursor animations */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white }
}

/* styles.css */
/* styles.css */
.card {
    margin-bottom: 20px; /* ระยะห่างระหว่าง cards */
    transition: transform 0.3s ease; /* เพิ่มเอฟเฟ็กต์เมื่อมีการเคลื่อนไหว */
}

.card:hover {
    transform: translateY(-5px); /* ย้าย card ขึ้นไปข้างบนเล็กน้อยเมื่อ hover */
}

.card-img-top {
    width: 100%; /* กำหนดความกว้างภาพ */
    height: 200px; /* กำหนดความสูงภาพ */
    object-fit: cover; /* ให้ภาพปรับขนาดพอดีกับพื้นที่ */
}

.card-body {
    padding: 15px; /* การแพดดิ้งใน card */
}

.card-title {
    margin-bottom: 15px; /* ระยะห่างระหว่างหัวข้อกับเนื้อหา */
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project {
    animation: fade-in 1s ease forwards;
}
