/* HOME */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(200px, auto); 
    gap: 6px; 
    width: 100%;
    max-width: 100%;
    padding: 0;
    background-color: transparent;
    grid-template-areas: 
        "target target target target zen      zen      project project project project project project"
        "target target target target intel    intel    intel   intel   intel   space   space   space"
        "inno   inno   inno   resol  resol  resol  resol   maker   maker   space   space   space";
}

.block-target        { grid-area: target; }
.block-zen           { grid-area: zen; }
.block-projects      { grid-area: project; }
.block-intel         { grid-area: intel; }
.block-innovative    { grid-area: inno; }
.block-resolution    { grid-area: resol; }
.block-maker         { grid-area: maker; }
.block-space-feature { grid-area: space; }

.space-card {
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    position: relative;
    perspective: 1000px; 
    border: none; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* เพิ่ม transition ให้แสงเรืองสมูท */
}

.space-card:hover {
    z-index: 10; 
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.35), inset 0 0 15px rgba(255, 255, 255, 0.1); 
}

.layout-split {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.layout-split .card-image-wrapper { 
    width: 50%; 
    height: 100%; 
    position: relative;
    overflow: hidden; 
    transform-origin: left center;
}

.layout-split .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    position: absolute;
    top: 0;
    left: 0;
}

.layout-split .card-content { 
    width: 50%; 
    padding: 15px; 
    text-align: center; 
}

.layout-split.reversed { flex-direction: row-reverse; }
.layout-split.reversed .card-image-wrapper { transform-origin: right center; }

.layout-text-only {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.layout-text-only .card-content { text-align: center; width: 100%; }

.layout-image-only {
    display: flex;
    width: 100%;
    height: 100%;
}
.layout-image-only .card-image-wrapper.full-size { width: 100%; height: 100%; }
.layout-image-only .card-image-wrapper { transform-origin: center center; width: 100%; height: 100%; }
.layout-image-only .card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.card-image-wrapper {
    transform-style: preserve-3d; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-image-wrapper img {
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.layout-split:hover .card-image-wrapper {
    transform: rotateY(20deg); 
    box-shadow: 8px 0 15px rgba(0, 0, 0, 0.5);
}

.layout-split.reversed:hover .card-image-wrapper {
    transform: rotateY(-20deg);
    box-shadow: -8px 0 15px rgba(0, 0, 0, 0.5);
}

.layout-image-only:hover .card-image-wrapper {
    transform: rotateY(-12deg) rotateX(4deg);
}

.card-content {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    z-index: 2;
}
.space-card:hover .card-content {
    transform: scale(0.85); 
}

.space-card h2 {
    font-family: 'Share Tech', sans-serif;
    font-size: 1.9rem;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 20px rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.sub-author {
    font-family: 'Share Tech', sans-serif;
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-top: 5px;
}

.shimmer-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer-run 1.5s infinite linear;
    z-index: 5;
    pointer-events: none;
    display: none;
}
body.loading .shimmer-overlay { display: block; }

@keyframes shimmer-run {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.glitter-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.glitter-star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@media screen and (max-width: 991px) {
    .grid-container {
        grid-template-columns: 1fr; 
        grid-template-areas: none !important; 
        grid-auto-rows: auto;
        gap: 15px; 
        padding: 15px;
    }

    .block-target, 
    .block-zen, 
    .block-projects, 
    .block-intel, 
    .block-innovative, 
    .block-resolution, 
    .block-maker, 
    .block-space-feature { 
        grid-area: auto !important; 
        width: 100%;
        min-height: 200px; 
    }

    .space-card h2 {
        font-size: 1.6rem;
        white-space: normal; 
    }
    
    .layout-split {
        flex-direction: column !important; 
    }
    .layout-split .card-image-wrapper,
    .layout-split .card-content {
        width: 100% !important;
        height: 160px;
    }
    .layout-split .card-content {
        padding: 20px 10px;
    }
}

/* GO BEYOND */
.about-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.about-split-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    margin-bottom: 40px;
}

.partition-left-brand {
    width: 40%;
    position: sticky;
    top: 10px;
}

.huge-text-container {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 40px 30px;
    border-left: 3px solid #e65c00;
}

.huge-text-container h1 {
    font-family: 'Share Tech', sans-serif;
    font-size: 5.2rem;
    line-height: 0.85;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: -2px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.huge-sub-caption {
    font-family: 'Share Tech', sans-serif;
    font-size: 1.1rem;
    color: #ff7700;
    margin-top: 25px;
    letter-spacing: 2px;
}

.partition-right-content {
    width: 55%;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 45px;
    border-radius: 4px;
}

.featured-image-box {
    position: relative;
    width: 100%;
    margin-bottom: 35px;
}

.featured-image-box::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid #e65c00; 
    pointer-events: none; 
    z-index: 3; 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
}

.featured-image-box img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.featured-image-box:hover::before {
    transform: scale(0.97);
    border-color: #ffffff; 
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.essay-block {
    color: #cccccc;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 35px;
}

.essay-block p {
    margin-bottom: 18px;
    text-indent: 30px;
    text-align: justify;
}

.author-avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    gap: 12px;
}

.author-avatar-box img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.avatar-title {
    font-family: 'Share Tech', sans-serif;
    font-size: 0.9rem;
    color: #ff7700;
    letter-spacing: 1px;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-areas: none !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: minmax(220px, auto);
    }
    .layout-split { flex-direction: column !important; }
    .layout-split .card-image-wrapper, .layout-split .card-content { width: 100% !important; height: 50% !important; }
    .layout-split .card-image-wrapper { position: relative; height: 110px !important; }
}

@media (max-width: 992px) {
    .about-split-section {
        flex-direction: column;
        gap: 30px;
    }
    .partition-left-brand, .partition-right-content {
        width: 100%;
    }
    .partition-left-brand {
        position: static;
    }
    .huge-text-container h1 {
        font-size: 4.5rem;
        line-height: 0.9;
    }
    .partition-right-content {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 240px;  
        padding-bottom: 90px; 
    }

    .header-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        background-color: rgba(26, 26, 26, 0.98) !important; 
        padding-top: 15px; 
        margin-bottom: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }
    
    .brand-wrapper { 
        flex-direction: column; 
        gap: 10px; 
    }
    
    .main-logo { 
        padding-right: 0; 
        margin-bottom: 5px; 
        width: 80px; 
        height: 80px; 
    }
    
    .top-right-text { 
        position: fixed !important; 
        top: 10px;
        right: 15px;
        z-index: 2001;
    }
    
    .main-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        background-color: rgba(26, 26, 26, 0.98) !important;
        padding: 15px 10px;
        font-size: 0.85rem; 
    }

    .grid-container {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto;
    }
    .space-card { min-height: 240px; }
    .layout-split .card-image-wrapper { height: 120px !important; }
    .layout-split .card-content { height: 120px !important; }
    .space-card h2 { font-size: 1.8rem; }
    
    .partition-right-content { padding: 15px; }
    .featured-image-box::before { top: 10px; left: 10px; right: 10px; bottom: 10px; }
}