@charset "UTF-8";

/* CSS Variables for theme colors */
:root {
    --bg-color: #ffffff;
    --text-color: #615c5b;
    --text-secondary: #807e7e;
    --link-color: #4a90e2;
    --link-hover: orange;
    --highlight-color: lightskyblue;
    --quote-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --footer-bg: #f8f8f8;
    --nav-text: white;
    /* --font: "Amatic SC", cursive; */
    --font: "Cinzel", cursive;
    --nav-font-size: 2rem;
    --title-font-size: 3rem;
    --name-font-size: 6rem;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --link-color: #4a90e2;
    --link-hover: orange;
    --highlight-color: lightskyblue;
    --quote-bg: #2a2a2a;
    --border-color: #404040;
    --footer-bg: #2a2a2a;
    --nav-text: #e0e0e0;
    --font: "Monoton", cursive;
    --nav-font-size: 2rem;
    --title-font-size: 3rem;
    --name-font-size: 5rem;
}

/* Apply theme colors */
html, body {
    font-size: 80%;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/*--------------------------------- Navigation ---------------------------------*/
.nav-menu {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 90%;
    max-width: 800px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: var(--nav-font-size);
    font-family: var(--font);
    padding: 0.5rem 1.5rem;
    transition: color 0.3s, font-family 0.3s;
    flex: 1;
    text-align: center;
    transition: opacity 1s ease-in-out;
}

.nav-menu a:hover {
    color: orange;
}

/* 暗黑模式下nav-menu保持相似样式 */
[data-theme="dark"] .nav-menu a {
    color: #e0e0e0;  /* 稍微调整为灰白色 */
}

[data-theme="dark"] .nav-menu a:hover {
    color: orange;
}

/*--------------------------------- Hero wrapper with dual backgrounds ---------------------------------*/
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
}

.hero-bg.light {
    background-image: url('images/light1.jpg');
    opacity: 1;
}

.hero-bg.dark {
    background-image: url('images/dark2.jpg');
    opacity: 0;
}

[data-theme="dark"] .hero-bg.light {
    opacity: 0;
}

[data-theme="dark"] .hero-bg.dark {
    opacity: 1;
}

/* Hero name with re-animation */
.hero-name {
    position: relative;
    color: white;
    font-size: var(--name-font-size);
    font-weight: bold;
    font-family: var(--font);
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 0.5s forwards;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
    transition: font-family 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        /* transform: translateY(20px); */
    }
    to {
        opacity: 1;
        /* transform: translateY(0); */
    }
}

/*--------------------------------- Main content wrapper ---------------------------------*/
.main-content {
    max-width: 1000px;
    width: 90%;
    margin: 2rem auto;
    padding: 0 20px;
}

.title {
    font-size: var(--title-font-size);
    font-weight: 400;
    text-align: center;
    margin: 0rem 0 0rem 0;
    color: var(--text-color);
    font-family: var(--font);
}

.image-text-wrap {
    margin: 2rem 0;
    color: var(--text-color);
}

.image-text-wrap img {
    float: left;
    margin: 0.8rem 2rem 1.5rem 0;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-text-wrap p {
    text-align: justify;
    line-height: 1.;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0 0 0rem 0;
}

.image-text-wrap::after {
    content: "";
    display: table;
    clear: both;
}

/* Links styling */
.link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

.link:hover {
    color: var(--link-hover);
}

.highlight {
    color: var(--highlight-color);
}

/* Quote styling */
quote {
    color: var(--text-color);
    opacity: 0.9;
}

.plain-text {
    text-align: justify;
    line-height: 1.;
    font-size: 1.1rem;
    color: var(--text-color);
}

/*--------------------------------- News ---------------------------------*/
.news-wrapper {
    margin: 2rem 0;
    color: var(--text-color);
}

.news-item {
    display: table;
    max-width: 1000px;
    width: 100%;
    margin-bottom: 0rem;
}

.news-date {
    display: table-cell;
    width: 120px;
    padding-right: 0rem;
    font-family: "Caveat", cursive;
    font-size: 1.3rem;
    color: var(--text-secondary);
    text-align: left;
}

.news-content {
    display: table-cell;
    font-size: 1.1rem;
    line-height: 0.5;
    color: var(--text-color);
}

/*--------------------------------- Footer ---------------------------------*/
footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.5s ease;
    text-align: center;
}

/*--------------------------------- Theme toggle button ---------------------------------*/
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.356);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* On Mobiles */

@media (max-width: 430px) {
    .nav-menu {
        width: 70%;
        display: flex;        /* 或 grid */
        gap: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 1.5rem;  /* 从3rem减小 */
        margin: 0 0 0 0;
    }
    
    .hero-name {
        font-size: 4rem;  /* 从6rem减小 */
    }
    
    [data-theme="dark"] .nav-menu a {
        font-size: 1.3rem;
    }
    [data-theme="dark"] .nav-menu {
        width: 90%;
        max-width: none;
        gap: 0rem;
    }
    
    [data-theme="dark"] .hero-name {
        font-size: 2.5rem;
    }
    [data-theme="dark"] .title {
        font-size: 2.2rem;
    }
    .title {
        font-size: 2.5rem;
    }
    .hero-name {
        font-size: 3rem;
    }
    .news-item {
        margin-bottom: 1rem;
    }
    .news-content {
        font-size: 1rem;
        line-height: 1.2;
    }
}