@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
    --font-base: "Bai Jamjuree";
    --border-radius: 1.2rem;
    --border-radius-lg: 2.4rem;

    --color-bg: rgb(23, 61, 23);
    --color-bg2: rgb(47, 98, 47);
    --color-brand: rgb(255, 208, 103);
    --color-brand2: rgb(255, 168, 70);
    --sidebar-rgb: 0, 26, 0;
    --color-body: rgb(168, 209, 168);
    --color-heading: rgb(211, 235, 211);
}

*,*::after,*::before{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html{
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body{
    font-size: 1.6rem;
    background-color: var(--color-bg);
    color: var(--color-body);
    line-height: 1.5;
    font-family: var(--font-base), sans-serif;
}

h1,h2,h3,h4,h5,h6{
    margin-bottom: 0.8rem;
    line-height: 1.2;
    color: var(--color-heading);
    text-transform: uppercase;
}

.heading-1{
    font-size: clamp(4.4rem, 6vw, 6.4rem);
}

.heading-2{
    font-size: clamp(3.2rem, 4vw, 4.2rem);
}

.heading-3{
    font-size: 1.8rem;
}

.text-brand{
    color: var(--color-brand);
}

ul{
    list-style: none;
    padding: 0;
}

a{
    text-decoration: none;
    font-weight: 500;
    color: var(--color-brand);
    transition: all 0.5s ease;
}

a:hover{
    color:var(--color-brand2)
}

img{
    max-width: 100%;
    width: 100%;
    display: inline-block;
}

p{
    margin-bottom: 1.6rem;
}

.container{
    max-width: 114rem;
    padding: 0 4.4rem;
}

@media screen and (max-width:768px){
    .container{
        padding: 0 1.4rem;
    }
}

section.full-height{
    min-height: 100vh;
    display: grid;
    align-content: center;
    padding: 8rem 0;
}

.section-title{
    margin-top: 70px;
    text-align: center;
}

.section-title .section-icon{
    color: var(--color-brand);
}

.section-line {
    width: 500px;
    height: 5px; /* Adjust the thickness of the line */
    background-color: #FFD700; /* Dark yellow color */
    margin: auto; /* Space above and below the line */
    margin-bottom: 20px;
}

.section-subtitle{
    margin: auto;
    text-align: center;
    max-width: 750px;
}

.btn{
    padding: 1.2rem 2.4rem;
    background-color: var(--color-brand);
    color: var(--color-bg2);
    text-transform: uppercase;
    font-weight: 800;
    border-radius: var(--border-radius);
}

.btn:hover{
    /* color: white; */
    background-color: var(--color-brand2);
    color: var(--color-bg2);
}

/* Social Icons in Home Page */
.social-links {
    display: flex;
    gap: 0.8rem;
    position: relative; /* Ensure the parent has positioning context */
}

.social-links a {
    width: 4.4rem;
    height: 4.4rem;
    display: grid;
    align-content: center;
    background-color: var(--color-bg2);
    color: var(--color-body);
    text-align: center;
    border-radius: var(--border-radius);
    font-size: 2.5rem;
    position: relative; /* Ensure the tooltip is positioned relative to this element */
}

.social-links a:hover {
    background-color: var(--social-color);
    color: white;
}

/* Tool Tips for Links */
.social-links a::before {
    content: attr(data-social);
    position: absolute;
    background-color: var(--social-color);
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    padding: 0.1rem 1rem;
    border-radius: var(--border-radius);
    bottom: 50%; /* Position the tooltip above the link */
    left: 50%; /* Align the tooltip to the center of the link */
    transform: translateX(-50%) rotate(25deg); /* Center the tooltip horizontally */
    white-space: nowrap; /* Prevent text from wrapping */
    opacity: 0; /* Hide tooltip initially */
    pointer-events: none; /* Disable pointer events for the tooltip */
    transition:  200ms cubic-bezier(.58,-0.01,.26,1.72);
}

.social-links a::after{
    content: '';
    position: absolute;
    height: 0;
    width: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--social-color);
    bottom: 50%;
    left: 50%; 
    transform: translateX(-50%) rotate(25deg);
    opacity: 0;
    transition:  200ms cubic-bezier(.58,-0.01,.26,1.72);
}

/* Show tooltip on hover */
.social-links a:hover::before {
    bottom: 120%; /* Position the tooltip above the link */
    left: 50%; /* Align the tooltip to the center of the link */
    transform: translateX(-50%) rotate(0);
    opacity: 1; /* Show the tooltip on hover */
}

.social-links a:hover::after{
    bottom: 100%;
    left: 50%; 
    transform: translateX(-50%);
    opacity: 1;
}

/* Sidebar------------------------------------------------------------------------------------------------------------------------------------------ */
#sidebar {
    min-height: 100vh;
    width: 24rem;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(var(--sidebar-rgb), 0.4),rgba(var(--sidebar-rgb), 0.8)), url('./img/sidebar.png');
    background-size: cover;
    background-position: center; 
    background-repeat: no-repeat;
    display: grid; 
    align-content: center;
    text-align: center;
    padding: 2.5rem;
    z-index: 999;
    transition: all 1.5s ease;
}

#sidebar .profile{
    margin-bottom: 2.5rem;
}

#sidebar .profile_name{
    background-color: var(--color-bg);
    padding: 5px;
    border-radius: 5px;
}

#sidebar .profile img{
    border-radius: var(--border-radius-lg);
    width: 17rem;
    margin-bottom: 1.5rem;
}

#sidebar ul{
    text-transform: uppercase;
    display: grid;
    gap: 1.2rem;
}

#sidebar ul li a{
    color: var(--color-heading);
    transition: all 1s ease;
}

#sidebar ul li a.is-active,
#sidebar ul li a:hover{
    font-weight: 600;
    color: var(--color-brand);
}

ul .divider {
    display: block;
    width: 100%; /* Full width divider */
    height: 2px; /* Height of the line */
    background-color: var(--color-brand); /* White line */
    margin: 20px 0; /* Space around the divider */
}

#sidebar .made-by-text{
    color: var(--color-brand);
    font-size: 10px;
}

.made-by-text .heart{
    color: red;
}

.burger{
    width: 6.4rem;
    height: 6.4rem;
    background-color: var(--color-brand);
    border-radius: 10rem;
    position: fixed;
    right: 2.4rem;
    top: 2.4rem;
    cursor: pointer;
    display: grid;
    align-content: center;
    display: none;
}

.burger span{
    width: 4rem;
    height: 0.4rem;
    display: block;
    background-color: var(--color-bg);
    margin: 0.5rem auto;
    transition: all 0.5s ease;
}

.burger.is-active span:nth-child(1){
    transform: translateY(1.2rem) rotate(-45deg);
}

.burger.is-active  span:nth-child(2){
    transform: scale(0)
}

.burger.is-active span:nth-child(3){
    transform: translateY(-1.5rem) rotate(45deg);
}

/* Main Content*/
#content-wrapper{
    padding-left: 24rem;
    transition: all 1.5s ease;
}

/* Mobile Screen Setttings CSS */
@media screen and (max-width:992px) {
    #sidebar{
        left: -24rem;
    }

    #sidebar.is-active{
        left: 0;
    }

    .burger{
        display: grid;
    }

    #content-wrapper{
        padding-left: 0;
    }

    .section-line {
        width: 250px;
        height: 5px; /* Adjust the thickness of the line */
        background-color: #FFD700; /* Dark yellow color */
        margin: auto; /* Space above and below the line */
        margin-bottom: 20px;
    }
}

/* Home */
#home .social-btn{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.6rem;
}

#home p{
    max-width: 90rem;
    margin-top: 1.8rem;
    margin-bottom: 3.4rem;
}

/* Services sub section------------------------------------------------------------------------------------------------------------------------------------------ */
.intro{
    margin-bottom: 3.2rem;
}

.grid{
    display: grid;
    gap: 2.5rem;
}

.three-col-grid{
    grid-template-columns: 1fr 1fr 1fr;
}

.two-col-grid{
    grid-template-columns: 1fr 1fr;
}

@media screen and (max-width: 768px) {
    .three-col-grid{        
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 576px) {
    .three-col-grid{
        grid-template-columns: 1fr;
    }

    .two-col-grid{
        grid-template-columns: 1fr;
    }
}

.card{
    margin-top: 50px;
    transition: all 0.5s ease;
    border-radius: var(--border-radius-lg);
    background-color: var(--color-bg2);
}

.card-padding{
    padding: 4.4rem 3.2rem;
}

.card img{
    border-top-right-radius: var(--border-radius-lg);
    border-top-left-radius: var(--border-radius-lg);
}

.icon{
    width: 6.4rem;
    height:6.4rem;
    font-size: 5rem;
    color: var(--color-bg);
    border-radius: var(--border-radius);
    background-color: var(--color-brand);
    display: grid;
    align-content: center;
    text-align: center;
    margin-bottom: 1.8rem;
}

#services .card p{
    margin-bottom: 0;
}

.card:hover{
    box-shadow: 0 0 0 0.3rem var(--color-brand);
    transform: translateY(-0.5rem);
}

/* Work Experience CSS------------------------------------------------------------------------------------------------------------------------------------------ */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 100px auto;
}

/* The vertical line inside the timeline */
.timeline-line {
    position: absolute;
    width: 6px;
    height: 0; /* Start with height 0 */
    background: #fff;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    transition: height 1s ease-in-out; /* Animate height */
}

/* Class to trigger the animation */
.timeline.animate-line .timeline-line {
    height: 100%; /* Final height when animation is triggered */
}

/* When animation class is added */
.timeline.animate-line .timeline-line {
    height: 100%; /* The final state when the animation is triggered */
}

.container-work{
    padding: 10px 50px;
    position: relative;
    width: 50%;
}

.container-work .work-text-box{
    padding: 20px 30px;
    background: #ececec;
    position: relative;
    border-radius: var(--border-radius);
}

.container-work .work-place{
    font-size: 30px;
    color: var(--color-bg);
    margin-bottom: 0;
}

.container-work .work-position{
    color: var(--color-bg2);
    font-weight: 600;
    margin-bottom: 5px;
}

.container-work small{
    display: inline-block;
    color: var(--color-bg);
}

.work-details {
    list-style: none; /* Remove default list styling */
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin */
}

.work-details .primary-subtitle {
    font-weight: bold; /* Bold text for primary subtitle */
    font-size: 18px; /* Larger font size for emphasis */
    margin-bottom: 10px; /* Space below primary subtitle */
    color: #333; /* Primary subtitle color */
    position: relative;
    padding-left: 0px; /* Space for bullets */
}

.work-details .primary-subtitle::before {
    content: ""; /* No bullet for primary subtitle */
}

.secondary-details {
    text-decoration: none;
    list-style: none; /* Remove default list styling */
    padding-left: 0px; /* Indent secondary items */
    margin: 0; /* Remove default margin */
}

.secondary-details li {
    position: relative;
    padding-left: 20px; /* Space for bullets */
    margin-bottom: 5px; /* Space between secondary items */
    font-size: 12px; /* Adjust font size for readability */
    line-height: 1.5; /* Improve readability */
    text-decoration: none;
}

.secondary-details li::before {
    content: "• "; /* Bullet symbol */
    color: var(--color-brand); /* Bullet color */
    font-weight: bold; /* Bullet weight */
    position: absolute;
    left: 0; /* Align bullet to the left */
    top: 0; /* Align bullet with the text */
}

.left-container{
    left: 0;
}

.right-container{
    left: 50%;
}

.container-work img{
    position: absolute;
    width: 70px;
    border-radius: 50%;
    right: -35px;
    top: 32px;
    z-index: 10;
}

.right-container img{
    left: -35px;
}

.left-container-arrow{
    height: 0;
    width: 0;
    position: absolute;
    top: 40px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #ececec;
    right: -15px;
}

.right-container-arrow{
    height: 0;
    width: 0;
    position: absolute;
    top: 40px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #ececec;
    left: -15px;
}

@media screen and (max-width: 600px) {
    .timeline {
        margin: 50px auto;
    }

    .timeline-line {
        left: 15%; /* Adjust this value as needed */
    }

    .container-work {
        width: 100%;
        padding-left: 80px;
        padding-right: 25px;
    }

    .work-text-box{
        font-size: 12px;
    }

    .work-text-box small{
        margin-bottom: 10px;
    }

    .right-container{
        left: 0;
    }

    .left-container img,
    .right-container img{
        left: 2px;
    }

    .left-container-arrow,
    .right-container-arrow{
        border-right:  15px solid #ececec;
        border-left: 0;
        left: -10px;
    }
}

/* Academic Qualification------------------------------------------------------------------------------------------------------------------------------------------ */
.education-container{
    display: grid;
    place-items: center;
    margin-inline: 1.5rem;
    padding-block: 5rem;
}

.card__container{
    display: grid;
    row-gap: 70px;
}

.card__article{
    position: relative;
    overflow: hidden;
}

.card__img{
    width: 328px;
    border-radius: var(--border-radius);
}

.card__data{
    width: 280px;
    background-color: #ececec;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, .15);
    border-radius: var(--border-radius);
    position: absolute;
    bottom: -20rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    transition: opacity 1s 1s;
}

.card__description{
    display: block;
    font-size: 14px;
    margin-bottom: .25rem;
    color: var(--color-bg2);
    font-weight: 500;
}

.card__title{
    font-size: 20px;
    font-weight: 500;
    color: var(--color-bg);
    margin-bottom: .75rem;
}

.card__button{
    background-color: var(--color-bg);
    padding: 3px 7px;
    border-radius: 5px;
    border: 2px solid transparent;
}

.card__button:hover{
    background-color: transparent;
    border: 2px solid var(--color-bg);
    color: var(--color-bg);
}

/* animate on hover */
.card__article:hover .card__data{
    animation: show-data 1s forwards;
    opacity: 1;
    transition: opacity .3s;
}

.card__article:hover{
    animation: remove-overflow 2s forwards;
}

.card__article:not(:hover){
    animation: show-overflow 2s forwards;
}

.card__article:not(:hover) .card__data{
    animation: remove-data 1s forwards;
}

@keyframes show-data{
    50%{
        transform: translateY(-20rem);
    }
    100%{
        transform: translateY(-15rem);
    }
}

@keyframes remove-overflow{
    to{
        overflow: initial;
    }
}

@keyframes remove-data{
    0%{
        transform: translateY(-20rem);
    }
    50%{
        transform: translateY(-25rem);
    }
    100%{
        transform: translateY(.5rem);
    }
}

@keyframes show-overflow{
    0%{
        overflow: initial;
        pointer-events: none;
    }
    50%{
        overflow: hidden;
    }
}

/* Responsive */
@media screen and (max-width: 340px){
    .education-container{
        margin-inline: 1rem;
    }

    .card__data{
        width: 250px;
        padding: 1rem;
    }
}

@media screen and (min-width: 768px) {
    .card__container{
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.5rem;
    }
}

@media screen and (min-width: 1120px) {
    .education-container{
        height: 80vh;
    }

    .card__container{
        grid-template-columns: repeat(4, 1fr);
    }

    .card__img{
        width: 348px;
    }

    .card__data{
        width: 316px;
        padding-inline: 2.5rem;
    }
}
/* Professional Qualification ---------------------------------------------------------------------------------------------------------------------------------------- */


