/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    color: #4A5568;
    overflow-x: hidden;
}

/* ========== SPLASH SCREEN ========== */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.splash-logo {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1A365D, #2B6CB0, #3182CE);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.splash-sub {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 10px;
    letter-spacing: 3px;
    font-weight: 400;
}

.splash-loader {
    width: 280px;
    height: 2px;
    background: #E2E8F0;
    margin: 30px auto 15px;
    border-radius: 10px;
    overflow: hidden;
}

.loader-line {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1A365D, #3182CE, #1A365D);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.splash-percent {
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    color: #3182CE;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== HEADER ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #E2E8F0;
    transition: all 0.3s;
    box-shadow: 0 2px 20px rgba(0,0,0,0.02);
}

.logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1A365D;
    letter-spacing: -0.5px;
}

.logo span {
    color: #3182CE;
    font-weight: 400;
}

nav a {
    color: #4A5568;
    margin: 0 22px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

nav a:hover, nav a.active {
    color: #3182CE;
    border-bottom: 2px solid #3182CE;
    padding-bottom: 5px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1A365D;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 120px 60px 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFFFFF 0%, #F7FAFC 100%);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#E2E8F0 0.5px, transparent 0.5px),
        linear-gradient(90deg, #E2E8F0 0.5px, transparent 0.5px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-left {
    flex: 1;
    min-width: 300px;
}

.hero-badge {
    color: #3182CE;
    letter-spacing: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border-left: 3px solid #3182CE;
    padding-left: 15px;
    margin-bottom: 20px;
    display: inline-block;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.8rem;
    font-weight: 700;
    margin: 20px 0 15px;
    line-height: 1.2;
    color: #1A365D;
    letter-spacing: -1px;
}

.blue-text {
    color: #3182CE;
    position: relative;
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #3182CE, transparent);
    margin: 25px 0;
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: #4A5568;
    max-width: 500px;
    margin-bottom: 35px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 38px;
    border: 2px solid #3182CE;
    border-radius: 40px;
    color: #3182CE;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.85rem;
    background: transparent;
    transition: 0.4s;
}

.cta-btn:hover {
    background: #3182CE;
    color: #FFFFFF;
    box-shadow: 0 0 30px rgba(49, 130, 206, 0.3);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.stat-item {
    text-align: left;
}

.stat-num {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A365D;
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: #718096;
    letter-spacing: 1px;
}

.hero-right {
    flex: 1;
    min-width: 350px;
    position: relative;
}

.hero-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    background: #1A365D;
}

.robotic-arm {
    width: 100%;
    height: auto;
    display: block;
}

.thai-pattern {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,50 L50,20 L80,50 L50,80 Z" fill="none" stroke="%23D4AF37" stroke-width="1.5" opacity="0.6"/><path d="M30,50 L50,30 L70,50 L50,70 Z" fill="none" stroke="%23D4AF37" stroke-width="1" opacity="0.4"/></svg>') center/cover no-repeat;
    pointer-events: none;
}

.contract-overlay {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 200px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

/* ========== PAGE SECTION GENERAL ========== */
.page-section {
    padding: 100px 60px;
    position: relative;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    color: #3182CE;
    letter-spacing: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.section-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #1A365D;
    margin: 10px 0;
}

.section-divider {
    width: 80px;
    height: 2px;
    background: #3182CE;
    margin: 20px auto;
}

/* ========== ABOUT PAGE ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #1A365D;
    margin-bottom: 20px;
}

.about-text p {
    color: #4A5568;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.about-image {
    background: linear-gradient(135deg, #E2E8F0, #F7FAFC);
    border-radius: 24px;
    height: 400px;
    border: 1px solid #CBD5E0;
}

/* ========== TECHNOLOGY PAGE ========== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.tech-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 35px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: #3182CE;
    box-shadow: 0 20px 25px -12px rgba(49, 130, 206, 0.15);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tech-card h3 {
    font-size: 1.3rem;
    color: #1A365D;
    margin-bottom: 15px;
}

.tech-card p {
    color: #718096;
    line-height: 1.6;
}

/* ========== COLLABORATION PAGE ========== */
.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.collab-card {
    background: #F7FAFC;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 1px solid #E2E8F0;
    transition: 0.3s;
}

.collab-card:hover {
    border-color: #3182CE;
}

.collab-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.collab-card h3 {
    color: #1A365D;
    margin-bottom: 15px;
}

/* ========== PROJECTS PAGE ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
}

.project-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -15px rgba(0,0,0,0.1);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, #1A365D, #2B6CB0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: #1A365D;
    margin-bottom: 10px;
}

.project-category {
    color: #3182CE;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}

/* ========== CONTACT PAGE ========== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: #F7FAFC;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #E2E8F0;
}

.info-icon {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.info-card h4 {
    color: #1A365D;
    margin-bottom: 10px;
}

.contact-form-wrapper {
    background: #F7FAFC;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #E2E8F0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1px solid #CBD5E0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182CE;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #1A365D;
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    background: #3182CE;
}

.success-msg {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid #48BB78;
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    color: #276749;
}

.error-msg {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid #F56565;
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    color: #C53030;
}

/* ========== FOOTER ========== */
footer {
    background: #1A365D;
    padding: 60px 60px 25px;
    color: #CBD5E0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
    max-width: 1300px;
    margin: 0 auto;
}

.footer-section h3, .footer-section h4 {
    color: #FFFFFF;
    margin-bottom: 20px;
}

.footer-section a {
    color: #CBD5E0;
    text-decoration: none;
    display: block;
    margin: 10px 0;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-section a:hover {
    color: #63B3ED;
}

#newsletterForm {
    display: flex;
    gap: 10px;
}

#newsletterForm input {
    flex: 1;
    padding: 12px;
    background: #2D3748;
    border: 1px solid #4A5568;
    border-radius: 8px;
    color: white;
}

#newsletterForm button {
    padding: 12px 20px;
    background: #3182CE;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #2D3748;
    font-size: 0.75rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    header {
        padding: 18px 30px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero {
        padding: 100px 30px 60px;
    }

    .about-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 25px;
    }

    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        text-align: center;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }

    nav a {
        display: block;
        margin: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 25px;
    }

    .page-section {
        padding: 80px 25px 60px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .tech-grid, .projects-grid, .collab-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #newsletterForm {
        flex-direction: column;
    }
}