/* --- Dark Theme Variables --- */
:root {
    --primary-color: #3498db;
    --background-color: #1a1d24;
    --card-background-color: #252a34;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --border-color: #434c5a;
}

/* --- Basic Reset & Fonts --- */
body {
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* --- Header & Navigation --- */
header {
    background: var(--card-background-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 25px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

/* --- General Section Styling --- */
section {
    padding: 80px 0;
    width: 85%;
    margin: auto;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
section:last-of-type {
    border-bottom: none;
}

section h2 {
    margin-bottom: 50px;
    font-size: 2.8rem;
    color: var(--heading-color);
}

/* --- Hero Section --- */
#hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: none;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: 25px;
    box-shadow: 0 0 25px rgba(52, 152, 219, 0.3);
}

#hero h1 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}
#hero p {
    font-size: 1.4rem;
    color: var(--text-color);
    max-width: 600px;
}
.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* --- About Section --- */
#about {
    background-color: var(--background-color);
}

.about-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.point-card {
    background: var(--card-background-color);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.point-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.point-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--heading-color);
    font-size: 1.6rem;
}

.point-card p {
    color: var(--text-color);
    line-height: 1.8;
}


/* --- Skills Section --- */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.skills-category h3 {
    color: var(--heading-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.skill-item {
    background: var(--card-background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.skill-item:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    text-align: left;
}
.project-card {
    background: var(--card-background-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.project-card iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

.project-card h3, .project-card p, .project-card .project-tags, .project-card .project-links {
    padding: 0 25px;
}
.project-card h3 {
    margin-top: 20px;
    color: var(--heading-color);
    font-size: 1.4rem;
}
.project-card p {
    flex-grow: 1;
}
.project-tags {
    margin: 15px 0;
}
.project-tags span {
    background-color: #3e4451;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 8px;
    display: inline-block;
    margin-bottom: 5px;
}
.project-links {
    margin-bottom: 25px;
    margin-top: 15px;
}
.project-links a {
    margin-right: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
}
.project-links a:hover {
    text-decoration: underline;
}

/* --- Contact Section --- */
.contact-info p {
    font-size: 1.2rem;
}
.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}
.contact-info a:hover {
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px;
    background: #111318;
    color: #aaa;
}