/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #050505; /* Fallback for texture */
    --text-color: #ffffff;
    --primary-color: #3B82F6; /* Blue for 'Available for Hire' btn etc */
    --role-color: #3B82F6;
    --nav-home: #0000FF;
    --nav-about: #FF0000;
    --nav-work: #FFFF00;
    --nav-contact: #00FF00;
    --card-bg: #EAEAEA; /* White/Light gray for cards based on 'My Works' and 'About' */
}

body {
    font-family: 'Kanit', sans-serif;
    color: var(--text-color);
    background-color: #050505;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("./bgupdate1.png") no-repeat center center;
    background-size: 100% 100%;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography elements */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Kanit', sans-serif;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #888;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-family: 'Kanit', sans-serif;
    font-weight: none;
    font-size: 1.2rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    font-family: 'Merienda One', cursive;
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.primary { background-color: var(--nav-home); }
.dot.danger { background-color: var(--nav-about); }
.dot.warning { background-color: var(--nav-work); }
.dot.success { background-color: var(--nav-contact); }

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 0;
    min-height: 60vh;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #00FF00;
    border-radius: 50%;
    display: inline-block;
}

.hero-text {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 30px;
}

.role-highlight {
    color: var(--role-color);
    font-weight: none;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.social-profiles {
    margin-top: 60px;
}

.section-subtitle {
    font-family: 'Merienda One', cursive; /* Applied Merienda One font as requested */
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-style: italic;
}

.social-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.social-btn:hover {
    background-color: #2563EB;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-img {
    max-width: 100%;
    width: 350px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

.character-placeholder {
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* About Section */
.about {
    padding: 60px 0;
}

.about-card {
    background-color: #ffffff;
    color: #111;
    border-radius: 12px;
    padding: 40px;
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cv-icon {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.2);
}

.about-text-content {
    flex: 2;
    font-size: 0.95rem;
    line-height: 1.8;
}

.about-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.about-character-img {
    width: 150px;
    border-radius: 8px;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.2);
}

.about-placeholder {
    width: 150px;
    height: 150px;
    background: #ccc;
    border-radius: 8px;
}

/* Skills Section */
.skills {
    padding: 60px 0;
}

.skills-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.skill-icon img {
    height: 60px;
    width: auto;
}

.skill-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.figma { color: #f24e1e; }
.adobe { color: #ff0000; }
.html { color: #e34f26; }
.css { color: #1572b6; }
.js { color: #f7df1e; }
.react { color: #61dafb; }

/* My Works Section */
.work {
    padding: 60px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    color: #111;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease;
}

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

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #ddd;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.project-card h3 {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

/* ---- HOME PAGE NAVBAR LOGIC ---- */
.hero-nav {
    margin-top: 50px;
    margin-bottom: 20px;
}

@media (min-width: 601px) {
    body.home-page #main-nav {
        display: none !important;
    }
}

/* Footer Section */
footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
}

.footer-info h4 {
    font-size: 1rem;
    font-weight: 500;
}

.footer-info p {
    font-size: 0.8rem;
    color: #bbb;
}

.footer-email {
    margin-left: 20px;
    font-size: 0.9rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 30px;
    margin-top: 50px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.9rem;
}

.footer-col a {
    transition: color 0.3s;
    text-transform: uppercase;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-contact-form .form-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    color: #111;
}

.footer-contact-form h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-form input,
.footer-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
}

.btn-dark {
    background-color: #000;
    color: #fff;
    border-radius: 6px;
    padding: 12px;
    align-self: center;
    width: auto;
    min-width: 120px;
}

.btn-dark:hover {
    background-color: #333;
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    font-size: 0.8rem;
    color: #888;
}

/* Project Detail Page Styles (project_detail.html) */
.project-detail {
    padding: 40px 0;
}

.project-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.project-header .project-title {
    font-family: 'Merienda One', cursive; /* As per design spec */
    font-size: 2rem;
    font-style: italic;
    font-weight: 400;
}

.objective-container {
    display: flex;
    gap: 50px;
    align-items: center;
}

.objective-text {
    flex: 2;
    font-size: 1rem;
    line-height: 1.8;
}

.objective-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.project-screenshots-section {
    margin-top: 60px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.screenshot-item {
    background: #d8d8d8;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-placeholder {
    background: #d8d8d8;
    aspect-ratio: 16/9;
    border-radius: 8px;
}

.project-tools-section {
    margin-top: 60px;
}

.tools-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.tool-item, .tool-placeholder {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-item img {
    max-width: 80%;
    max-height: 80%;
}

.project-showcased-section {
    margin-top: 60px;
}

.showcased-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.showcased-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.showcased-icon, .showcased-placeholder-icon {
    width: 50px;
    height: 50px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.showcased-link {
    font-weight: 500;
}


/* Responsive Design */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .social-buttons {
        justify-content: center;
    }

    .about-card {
        flex-direction: column-reverse;
    }

    .about-img {
        justify-content: center;
    }
    
    .cv-icon {
        display: none;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-contact-form {
        grid-column: 1 / -1;
    }
    
    .objective-container {
        flex-direction: column-reverse;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hero-nav {
        display: none !important;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
        position: relative;
    }

    .mobile-toggle {
        display: block;
    }

    nav {
        width: 100%;
        display: none;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-contact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-email {
        margin-left: 0;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}