/*
 * Author: Jerry Li
 */

@font-face {
    font-family: 'Source Han Sans';
    font-weight: normal;
    font-style: normal;
    src: url(../fonts/SourceHanSansCN-Regular-min.woff2);
}

@font-face {
    font-family: 'Source Han Sans';
    font-weight: bold;
    font-style: normal;
    src: url(../fonts/SourceHanSansCN-Bold-min.woff2);
}

#simple-wrapper {
    width: 100%;
    height: 44px;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0, 1, 0, 1.05);
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#simple-wrapper.expanded {
    height: 70vh;
    background-color: black;
}

#simple-wrapper.expanded #simple-list {
    height: calc(70vh - 104px);
    padding: 20px;
}

#simple-list {
    height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-width: none;
    padding: 0px;
    color: white;
    transition: all 0.4s cubic-bezier(0, 1, 0, 1.05);
}

#simple-list::-webkit-scrollbar {
    width: 0;
}

#simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    transition: all 0.4s cubic-bezier(0, 1, 0, 1.05);
}

#simple-wrapper.expanded #simple {
    margin-left: 20px;
    margin-right: 20px;
}

#logo-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

#logo-wrapper:hover {
    background-color: black;
}

#logo-wrapper:hover #logo,
#simple-wrapper.expanded #logo {
    background-image: url(../images/logo-button-dark.svg);
}

#simple-wrapper.expanded #link-wrapper,
#simple-wrapper.expanded #newsflash {
    color: white;
}

#simple-wrapper.expanded #logo-wrapper:hover {
    background-color: white;
}

#simple-wrapper.expanded #logo-wrapper:hover #logo {
    background-image: url(../images/logo-button-light.svg);
}

#link-wrapper a {
    color: unset;
    margin-right: 10px;
    text-decoration: none;
}

#newsflash {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    transition: all 0.2s;
}

#newsflash span {
    font-size: 24px;
    font-weight: 300;
}

#newsflash:hover {
    background-color: black;
    color: white;
}

#simple-wrapper.expanded #newsflash:hover {
    background-color: white;
    color: black;
}

#logo {
    width: 26px;
    height: 26px;
    background-image: url(../images/logo-button-light.svg);
    background-size: cover;
}

.simple-list-title {
    font-weight: bold;
    opacity: 0.5;
}

.simple-list-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    column-gap: 10px;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

@media (max-width: 1024px) {
    .simple-list-list {
        grid-template-columns: 1fr 1fr;
    }

    .file-type {
        display: none;
    }

    .simple-list-list a li {
        grid-template-columns: 1fr 1.5em !important;
    }
}

.simple-list-list a,
#simple a {
    text-decoration: none;
    color: unset;
}

.simple-list-list a li {
    display: grid;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: bold;
    grid-template-columns: 1fr 7em 2em;
}

.simple-list-list .file-type {
    font-weight: normal;
}

.simple-list-list a li .material-symbols-outlined {
    font-size: 18px;
}

@media (prefers-color-scheme: dark) {
    #logo {
        background-image: url(../images/logo-button-dark.svg);
    }

    #newsflash:hover {
        background-color: white;
        color: black;
    }

    #logo-wrapper:hover {
        background-color: white;
    }

    #logo-wrapper:hover #logo {
        background-image: url(../images/logo-button-light.svg);
    }
}

#copyright-info {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0, 0.6, 0, 1.05);
}

#copyright-info.shifted {
    margin-left: 310px;
    filter: blur(0.5em);
}

#copyright-info a {
    text-decoration: none;
}

/* index.html */

#index-block-1 {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 10px;
    margin-top: 80px;
}

#index-block-1 h2 {
    font-size: 40px;
    margin-bottom: 0;
    text-align: center;
}

#index-block-1 .text-n {
    font-size: 16px;
    margin-top: 6px;
    margin-bottom: 0px;
}

#text-n-1 {
    text-align: center;
}

.i-subtitle {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 20px;
    font-weight: bold;
}

.i-b-container {
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 20px;
}

.i-b-container ul {
    margin-left: 0;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    row-gap: 10px;
}

.i-b-container li {
    font-size: 22px;
    list-style: none;
    border-radius: 10px;
    border: solid 1px #eee;
    padding: 10px;
    padding-bottom: 30px;
}

@media (prefers-color-scheme: dark) {
    .i-b-container li {
        border-color: #333;
    }
}

@media (max-width: 430px) {
    .i-b-container ul {
        grid-template-columns: 1fr;
    }
}

.empty-box {
    height: 500px;
}

#index-block-2 {
    padding: 20px;
    border-radius: 10px;
    margin-left: 20px;
    margin-right: 20px;
    background-image: radial-gradient(ellipse at top left, #f4f4f4 0%, rgba(0, 0, 0, 0) 20%);
    border: solid 1px #f4f4f4;
}

@media (prefers-color-scheme: dark) {
    #index-block-2 {
        background-image: radial-gradient(ellipse at top left, #242424 0%, rgba(0, 0, 0, 0) 20%) !important;
        border-color: #242424 !important;
    }
}

#index-block-2 {
    display: flex;
    flex-direction: column;
}

#index-block-2 .i-subtitle {
    font-weight: normal;
}

#index-block-2 .text-n {
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 0;
}

.heading {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.paging {
    margin-left: 46px;
    margin-right: 46px;
}

.paging .text-n {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    text-align: justify;
}

#content-unit .paging hr {
    opacity: 1;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* new styles added Aug 22 2025 */

#content-unit .text-n {
    font-size: 15px;
    margin-left: 20px;
    margin-right: 20px;
}

#copyright-info {
    text-align: center;
}

body {
    margin: 0;
}

#link-wrapper a:nth-child(3) {
    font-weight: bold;
}

#content-unit {
    margin-top: 54px;
}

/* index.html */

#pdf-preview {
    height: 70vh;
}

/* news.html */

.text-n {
    font-family: 'Manrope', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#live-grid {
    width: 90%;
    margin-left: 5%;
    margin-top: 54px;
}

.news-entries {
    width: 100%;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
}

#news-live {
    width: 100%;
    transition: all 0.2s;
}

.news-entry {
    padding: 10px;
    overflow: hidden;
    transition: background-color 0.2s;
    margin-bottom: 10px;
    position: relative;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.news-entry::after {
    content: "";
    position: absolute;
    left: 10px;
    bottom: 0;
    height: 1px;
    width: calc(100% - 20px);
    background-color: hsl(30, 100%, 78%);
}

.news-entry:hover {
    background-color: hsl(30, 100%, 78%);

}

.news-heading {
    font-family: 'Libre Baskerville', 'Noto Serif SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 22px;
    padding-top: 10px;
    padding-bottom: 20px;
    display: block;
}

.news-details {
    overflow: hidden;
    transition: all 0.3s;
    border-radius: 10px;
    border: solid 1px #fff9f3;
    margin-bottom: 30px;
    padding: 10px;
}

.news-date,
.pinned {
    font-family: 'Libre Baskerville', 'Noto Serif SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    opacity: 0.5;
    font-size: 14px;
}

.news-date {
    font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    position: absolute;
    bottom: 6px;
}

.pinned {
    display: flex;
    align-items: center;
}

@media (prefers-color-scheme: dark) {
    .news-entry:hover {
        background-color: hsl(30, 100%, 18%);
    }

    .news-marquee {
        background-color: #333 !important;
    }

    .news-marquee::before {
        background: linear-gradient(to right, #333, transparent) !important;
    }

    .news-marquee::after {
        background: linear-gradient(to right, transparent, #333) !important;
    }
}

#digital-clock {
    font-family: 'Digital', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    font-size: 42vh;
}

#second,
#second-colon {
    color: #adadad;
}

#today,
#month {
    font-family: 'Digital', 'Source Han Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 50px;
}

@media (max-width: 430px) {
    #live-grid {
        flex-direction: column;
    }

    .news-entries,
    #news-live {
        width: 100%;
    }

    .news-entries {
        grid-template-columns: 1fr;
    }

    #digital-clock {
        font-size: 20vw;
    }

    #hour,
    #minute,
    #second {
        font-size: 20vw;
    }
}

.news-entry a {
    text-decoration: none;
    color: hsl(30, 100%, 58%);
}

#content-unit .separator,
.news-flash-msg {
    font-size: 20px;
    opacity: 0.5;
    text-align: left !important;
    margin-left: 10px !important;
    margin-bottom: 0px;
    padding-bottom: 4px;
}

.news-flash-msg {
    margin: 0;
    padding-top: 4px;
    padding-bottom: 4px;
}

.news-marquee {
    --speed: 18s;
    /* lower = faster */
    --gap: 2rem;
    /* space between repeats */
    --height: 2.25rem;
    /* line height / container height */

    position: relative;
    overflow: hidden;
    height: var(--height);
    line-height: var(--height);
    background: #f6f6f6;
    border-radius: .75rem;
    padding-inline: .5rem;
    margin-top: 10px;
    margin-bottom: 10px;
    font-family: 'Libre Baskerville', 'Noto Serif SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* optional soft fade edges */
.news-marquee::before,
.news-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 2rem;
    height: 100%;
    pointer-events: none;
}

.news-marquee::before {
    left: 0;
    background: linear-gradient(to right, #f6f6f6, transparent);
}

.news-marquee::after {
    right: 0;
    background: linear-gradient(to left, #f6f6f6, transparent);
}

.news-marquee__track {
    display: inline-flex;
    gap: var(--gap);
    white-space: nowrap;
    will-change: transform;
    animation: marquee var(--speed) linear infinite;
}

/* duplicate content for seamless loop */
.news-marquee__item {
    display: inline-block;
    padding-inline: .25rem;
}

/* pause on hover/focus */
.news-marquee:hover .news-marquee__track,
.news-marquee:focus-within .news-marquee__track {
    animation-play-state: paused;
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .news-marquee__track {
        animation: none;
    }
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

    /* because we duplicated content */
}

#splash-img {
    width: 100%;
    aspect-ratio: 16/9;
    background-image: url(../images/IMG_3740.png);
    background-size: contain;
    border-radius: 10px;
}

#live-apple-event {
    width: calc(100% - 60px);
    height: 200px;
    background-image: url("https://www.apple.com/newsroom/images/2025/09/september-2025-keynote/Apple-Fall-event-250909.jpg.branding-large_2x.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    margin-left: 10px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#content-unit #live-countdown {
    width: calc(100% - 60px);
    font-size: 20px;
    background-color: black;
    color: white;
    padding: 20px;
    margin-left: 10px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#live-countdown .text-n {
    font-size: 20px;
    margin: 0;
}

#pdf-preview {
    width: calc(100% - 20px);
    margin-left: 10px;
    border-radius: 20px;
}

.separator-hr {
    width: calc(100% - 60px);
    height: 1px;
    border: none;
    background-color: #eee;
    margin: 30px;
}