@import "./styles.css";


:root{
    --bs-blue: #1f5f5b;
    --bs-primary: #1f5f5b;
    --bs-primary-rgb: 31, 95, 91;
    --bs-link-color: #1f5f5b;
    --bs-link-hover-color: #8a5a18;
    --h-title-color:#1f5f5b;
    --accent-color: #9a6418;
    --top-section-overlay: 0.58;
    --skeleton-base: #e4e7eb;
    --skeleton-highlight: #f5f7fa;
}

body {
    background: #ffffff;
}

.header {
    border-bottom: solid 2px var(--accent-color);
    z-index: 10000;
}

#mainNav .navbar-brand:hover,
#mainNav .navbar-brand:active {
    color: var(--accent-color);
}

#mainNav .navbar-nav .nav-item .nav-link {
    font-size: 0.86rem;
}

#mainNav .navbar-nav .nav-item .nav-link:hover {
    color: var(--accent-color);
}

#mainNav .navbar-nav .nav-item .nav-link.active {
    color: var(--bs-primary);
}

.page-skeleton {
    position: fixed;
    top: 25rem;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 8000;
    overflow: auto;
    background: #ffffff;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    padding-top: 2.4rem;
    transition: opacity 280ms ease, visibility 280ms ease;
}

.site-ready .page-skeleton {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skeleton-block {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    border-radius: 4px;
    background: var(--skeleton-base);
}

.skeleton-block::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
    animation: skeleton-shimmer 1450ms ease-in-out infinite;
}

.skeleton-section {
    padding: 4rem 0;
}

.skeleton-section-light {
    background: linear-gradient(45deg, #fcfcfc, #ffffff);
}

.skeleton-section-gray {
    background: linear-gradient(45deg, #f0f0f0, #f1f1f1);
}

.skeleton-section-title {
    width: 42%;
    height: 2rem;
    margin-bottom: 2rem;
}

.skeleton-line {
    height: 1.1rem;
    margin-bottom: 1rem;
}

.skeleton-line-long {
    width: 100%;
}

.skeleton-line:not(.skeleton-line-long):not(.skeleton-line-short) {
    width: 88%;
}

.skeleton-line-short {
    width: 68%;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.bg-bottom {
    background-color: var(--h-title-color);
}

.top-section {
    position: relative;
    padding: 10rem 0;
    height: 25rem;
    overflow: hidden;
    background-color: #18202a;
}

.site-loading .top-section {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(231, 235, 240, 0.16)),
        linear-gradient(135deg, #edf0f3, #f8f9fb);
}

.top-section h2 {
    font-weight: 400;
}

.top-section-subtitle {
    max-width: 42rem;
    margin: 1rem 0 0;
    font-size: 1.35rem;
    line-height: 1.85rem;
    opacity: 0.88;
}

.top-section .top-section-content {
    position: relative;
    z-index: 2;
}

.top-section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1200ms ease, transform 7000ms ease;
}

.top-section-bg-active {
    opacity: 1;
    transform: scale(1);
}

.top-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, calc(var(--top-section-overlay) + 0.12)), rgba(0, 0, 0, var(--top-section-overlay))),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36));
}

.site-loading .top-section:before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(222, 227, 234, 0.2)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(222, 227, 234, 0.16));
}

.site-loading .top-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: skeleton-shimmer 1450ms ease-in-out infinite;
}

section header h2{
    font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 4rem;
}

section .main-body{
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1.85rem;
}

.publication-abstract {
    margin: 1.1rem 0;
}

.publication-abstract summary {
    cursor: pointer;
    color: var(--bs-body-color);
}

.publication-abstract summary:hover {
    color: var(--accent-color);
}

.publication-abstract p {
    margin: 0.85rem 0 0 1.2rem;
}

.hobby-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 1rem;
    margin: 1rem 0 2.1rem;
}

.hobby-gallery-one {
    grid-template-columns: minmax(0, 32rem);
}

.hobby-gallery-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hobby-gallery-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hobby-gallery figure {
    margin: 0;
}

.hobby-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0.45rem 1.4rem rgba(18, 32, 36, 0.14);
}

.hobby-gallery img.hobby-photo-top {
    object-position: center top;
}

.hobby-gallery figcaption {
    margin-top: 0.45rem;
    color: #5f6868;
    font-size: 0.95rem;
    line-height: 1.35rem;
}

.hobby-gallery-one img {
    aspect-ratio: 3 / 4;
}

.hobby-gallery-portrait img {
    aspect-ratio: 3 / 4;
}

@media screen and (max-width: 767px) {
    .hobby-gallery-two,
    .hobby-gallery-three {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 575px) {
    .hobby-gallery {
        gap: 0.75rem;
    }
}


.bg-gradient-primary-to-secondary-light {
    background: linear-gradient(45deg, #fcfcfb, #ffffff) !important;
}

.bg-gradient-primary-to-secondary-gray {
    background: linear-gradient(45deg, #f3f4f1, #f7f6f1) !important;
}



.on-top {
    position: relative;
    z-index: 10000;
}

.top-bg {
    background-position: center;
    background-size: cover;
    width: 100%;
    height: 100%;
}

.top-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.home-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.home-profile-copy {
    min-width: 0;
}

.home-profile-photo {
    display: flex;
    justify-content: flex-end;
}

#avatar {
    position: relative;
    max-width: 300px;
    margin: 0;
    float: none;
    z-index: 9000;
}

#avatar img {
    width: clamp(190px, 22vw, 300px);
    height: auto;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
}

#avatar figcaption {
    width: clamp(190px, 22vw, 300px);
    margin-top: 0.35rem;
    color: #5f6868;
    font-size: 0.78rem;
    line-height: 1.05rem;
    text-align: center;
}

@media screen and (max-width: 991px) {
    .home-profile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .home-profile-photo {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-section-bg {
        transition: none;
        transform: none;
    }

    .page-skeleton {
        transition: none;
    }

    .skeleton-block::after {
        animation: none;
    }
}
