/*
Theme Name: Portfolio
Theme URI: http://tseshingfungstaford.com
Author: Stanford Tse
Description: A custom portfolio theme
Version: 1.0.1
Text Domain: portfolio
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
    --color-primary: #ffde59;
    --color-secondary: #000000;
    --font-primary: "Playpen Sans", "猫啃什锦黑", sans-serif;
    --font-secondary: "Damion", sans-serif;
}

@font-face {
    font-family: '猫啃什锦黑';
    src: url('./assets/fonts/猫啃什锦黑.ttf') format('ttf');
    font-weight: normal;
    font-style: normal;
}
  
/* Apply the font */

/** WordPress Classes */
h1.wp-block-heading {
    font-size: 40px;
    font-weight: 700;
}

h2.wp-block-heading {
    display: inline-block; /* Expands with text */
    background-image: url('./assets/components/brushstroke-fliped.png');
    background-size: 100% 100%; /* Ensures background fully covers the text */
    background-repeat: no-repeat;
    background-position: center; /* Keeps the background aligned */
    font-size: 25px;
    color: #FFFFFF;
    padding: 15px 100px 15px 30px; /* Ensures text does not touch edges */
    line-height: 1.2; /* Improves readability for multiline text */
    max-width: 100%; /* Prevents overflow */
    text-align: left;
    margin: 40px 0 10px 0;
}

h3.wp-block-heading {
    font-size: 25px;
    margin: 25px 0 5px 0;
}

.wp-block-separator {
    margin-top: 30px;
}

.wp-block-list {
    list-style-type: initial;
    padding-left: 20px;
}

.wp-block-content p, .wp-block-content li, .wp-block-content textarea {
    margin-bottom: 20px;
    font-size: 15px;
}

p, textarea {
    line-height: 1.5;
}

.wp-block-content p.white-bg { /** Turn the p tag into a white background */
    background-color: #FFFFFF;
    color: #000000;
    padding: 20px;
    width: 90%;
    margin: 20px auto;
    border-radius: 10px;
    border: 4px solid #000000;
}

/** WordPress Button */
.wp-block-button .wp-block-button__link { /** Custom the WordPress button*/
    background-color: #000000;
    font-weight: 700;
}

.wp-block-button .wp-block-button__link:hover {
    color: var(--color-primary);
    transition: transform 0.3s ease, background-color 0.4s ease !important;
    transform: scale(1.05) !important;
}

/** WordPress Media Block */
.wp-block-media-text__media img {
    position: absolute;
    top: 22px;
    right: 0;
    left: 0;
    width: 85%;
    height: 78%;
    margin: 0 auto;
    transform: rotate(-3deg);
    object-fit: cover;
}

.wp-block-media-text .wp-block-media-text__media {
    transform: rotate(0deg);
    height: 210px !important;
    background-image: url('./assets/components/noteboard.png') !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-position: left bottom !important;
    margin-bottom: 15px;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
    transform: rotate(7deg) !important;
    background-position: right bottom !important;
}

/** WordPress Image **/
.wp-block-content {
    position: relative;
    /* overflow: hidden; */
}

/* Default styles for mobile (no text wrapping) */
.wp-block-image.size-large.alignleft,
.wp-block-image.size-large.alignright {
    position: relative;
    max-width: 100%;
    float: none;
    margin: 1rem 0;
}

.wp-block-image.size-large img {
    width: 100%;
    height: auto;
    display: block;
}

.wp-block-content p {
    overflow: visible;
    margin-bottom: 1rem;
    text-align: justify;
}

/* Text wrapping styles for non-mobile screens */
@media (min-width: 768px) {
    .wp-block-image .size-large.alignleft {
        position: relative;
        max-width: 50%;
        float: left;
        margin: 0 2rem 1rem 0;
        shape-outside: margin-box;
    }

    .wp-block-image .size-large.alignright {
        position: relative;
        max-width: 50%;
        float: right;
        margin: 0 0 1rem 2rem;
    }
}

/** Custom Classes */
.bg-container img {
    width: 100%;
    position: absolute;
    left: 0;
    object-fit: cover;
}

.avatar-container {
    width: 160px;
    height: 220px;
    background-image: url('./assets/components/noteboard.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transform: rotate(7deg);
}

.education-card {
    background-image: url('./assets/components/noteboard.png');
    background-size: 360px 100%;
    background-repeat: no-repeat;
    transform: rotate(7deg);
    background-position: right bottom;
}

.institute-image-container {
    position: absolute;
    left: 0;
    bottom: -20px;
    height: 95px;
    width: 83px; 
    background-image: url('./assets/components/circle-container.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

@media (min-width: 576px) {
    .education-card {
        background-size: 420px 100%;
    }

    .institute-image-container {
        width: 95px; 
        left: -53px; 
    }
}

@media (min-width: 768px) {    
    .education-card {
        background-size: 480px 100%;
    }

    .institute-image-container {
        width: 100px; 
        left: -110px; 
    }
}

@media (min-width: 1024px) {
    .avatar-container {
        width: 230px;
        height: 330px;
    }
}

/* Slider */
.slider-container {
    height: 300px;
    background-image: url('./assets/components/noteboard.png');
    background-size: 90% 90%;
    background-repeat: no-repeat;
    /* transform: rotate(4deg); */
    background-position: bottom;
}

/* Navbar */
/* Nav Header */
#nav-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateY(-100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

#nav-menu.open {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 1024px) {
    #nav-menu {
        box-shadow: none;
        transform: translateY(0);
        transition: none;
        opacity: 1;
    }
}

/* Scroll Bar */
::-webkit-scrollbar {
    display: none;
}

/* Blog */
.thumbnail-image {
    height: 200px;
    width: 320px;
    background-image: url('./assets/components/noteboard.png');
    background-size: 320px 200px;
    background-repeat: no-repeat;
}

.thumbnail-image.fliped {
    transform: rotate(8deg);
}

.blog-card-title-container {
    height: 80px;
    width: 300px;
    background-image: url('./assets/components/brushstroke.png');
    background-size: 300px 80px;
    background-repeat: no-repeat;
}

.blog-card-title-container.fliped {
    background-image: url('./assets/components/brushstroke-fliped.png');
    transform: rotate(16deg);
}

.blog-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    line-clamp: 2;
    height: 60px;
    -webkit-box-orient: vertical;
}

@media (min-width: 640px) {
    .blog-card-title-container {
    height: 100px;
    width: 260px;
    background-size: 260px 100px;
    }

    .blog-card-title-container.fliped {
    transform: rotate(12deg);
    }
}

@media (min-width: 1024px) {
    .thumbnail-image {
    height: 240px;
    width: 380px;
    background-image: url('./assets/components/noteboard.png');
    background-size: 380px 240px;
    background-repeat: no-repeat;
    }

    .blog-card-title-container {
    height: 120px;
    width: 320px;
    background-size: 320px 120px;
    }
}