/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --bg-card: #f9fafb;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --accent: #111827;
    --border: #e5e7eb;
    --serif: 'Noto Serif SC', 'Songti SC', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --content-width: 72rem;
    --content-narrow: 48rem;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.font-serif-cn {
    font-family: var(--serif);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}


@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1.0s; }

/* Section scroll animation */
.section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--content-width);
}

.hero-brand {
    margin-bottom: 4rem;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--text-muted);
}

.hero-tagline {
    text-align: center;
    line-height: 2.2;
    letter-spacing: 0.1em;
}

.hero-tagline p {
    font-size: 2.4rem;
    color: var(--accent);
}

.hero-sub {
    margin-top: 3.5rem;
    text-align: center;
}

.sub-title {
    font-size: 1.35rem;
    color: var(--accent);
}

.coming-soon {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-video {
    margin-top: 0.5rem;
    max-width: 24rem;
    width: 100%;
}

.video-wrapper {
    overflow: hidden;
    border-radius: 4px;
}

.video-player {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    opacity: 0.75;
}

.hero-gif {
    filter: brightness(1.12);
}


.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
}

.scroll-line {
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(to bottom, var(--text-dim), transparent);
}

/* ===== Sections ===== */
.section {
    padding: 5rem 2rem;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: 3rem;
    text-align: center;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--accent);
}

/* ===== Brand Video Section ===== */
.brand-video-section {
    text-align: center;
}

.brand-video-heading {
    margin-bottom: 2.5rem;
}

.brand-video-line1 {
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.brand-video-line2 {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.brand-video-wrapper {
    max-width: 24rem;
    width: 100%;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
}

.brand-video-player {
    width: 100%;
    display: block;
    border-radius: 6px;
}

/* ===== Team Section ===== */
.team-content {
    max-width: var(--content-narrow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.team-image-wrapper {
    display: flex;
    justify-content: center;
}

.team-image {
    max-width: 28rem;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.team-image:hover {
    opacity: 0.85;
}

.team-description {
    text-align: center;
    font-size: 1rem;
    line-height: 2;
    color: var(--text-muted);
}

.team-description p {
    margin-bottom: 0.5rem;
}

/* ===== Section Dividers ===== */
.section-divider {
    width: 4rem;
    height: 1px;
    background: var(--border);
    margin: 0 auto;
}

/* ===== Blog Switcher ===== */
.blog-switcher-section {
    overflow: visible;
}

.blog-switcher {
    max-width: var(--content-narrow);
    margin: 0 auto;
}

/* Image area: flex row with arrows on sides, image in center */
.switcher-image-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.switcher-image-slot {
    flex: 1;
    min-width: 0;
}

.switcher-img {
    /* controlled by JS: display block/none */
}

.switcher-img .blog-card-image-wrap {
    margin-bottom: 0; /* remove bottom margin since it's in the image area now */
}

/* Text area */
.switcher-text-area {
    position: relative;
}

.switcher-slide {
    display: none;
}

.switcher-slide.active {
    display: block;
}

/* Arrows */
.switcher-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0.375rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}

.switcher-arrow:hover {
    color: var(--accent);
}

.switcher-arrow.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.switcher-prev {
    left: -4rem;
}

.switcher-next {
    right: -4rem;
}

.switcher-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.switcher-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.switcher-dot.active {
    background: var(--accent);
}

/* ===== Blog Cards ===== */
.blog-card {
    max-width: var(--content-narrow);
    margin: 0 auto;
}

.blog-card-image-wrap {
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity 0.3s;
}

.blog-card-image:hover {
    opacity: 0.85;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.blog-card-content {
    font-size: 1rem;
    line-height: 2.2;
    color: var(--text-muted);
}

.blog-card-content p {
    margin-bottom: 1rem;
    text-indent: 2em;
}

.blog-card-content .highlight {
    color: var(--accent);
    font-weight: 500;
    text-indent: 0;
}

.blog-card-content .ending {
    color: var(--accent);
    font-weight: 500;
    text-indent: 0;
    margin-top: 2rem;
}

.blog-card-content .signature {
    text-align: right;
    text-indent: 0;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* ===== Blog Grid ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: var(--content-width);
    margin: 0 auto;
}

.blog-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    display: block;
}

.blog-grid-card:hover {
    border-color: var(--text-dim);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.blog-grid-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.blog-grid-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.blog-grid-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.blog-grid-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== Contact Section ===== */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 47.04rem;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}

.contact-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.375rem;
}

.contact-card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 2rem;
}

.contact-value {
    font-size: 0.8125rem;
    color: var(--text);
    transition: color 0.2s;
}

.contact-value:hover {
    color: var(--accent);
}

/* ===== Footer ===== */
.site-footer {
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ========================================
   PC Large screens (>= 1024px)
   ======================================== */
@media (min-width: 1024px) {
    .hero-section {
        padding: 6rem 4rem;
    }

    .brand-text {
        font-size: 3.19rem;
    }

    .hero-tagline p {
        font-size: 5.25rem;
    }

    .sub-title {
        font-size: 2.44rem;
    }

    .coming-soon {
        font-size: 1.125rem;
    }

    .hero-video {
        max-width: 42rem;
    }

    .section {
        padding: 6rem 4rem;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3.5rem;
    }

    /* Brand video wider on PC to match blog width */
    .brand-video-line1 {
        font-size: 2.5rem;
    }

    .brand-video-line2 {
        font-size: 1.25rem;
    }

    .brand-video-wrapper {
        max-width: 38rem;
    }

    /* Team: image + text as one unit, same width */
    .team-content {
        max-width: 47.04rem;
        align-items: stretch;
    }

    .team-image {
        max-width: 100%;
    }

    .team-description {
        font-size: 1.225rem;
        max-width: 100%;
        text-align: left;
    }

    /* Blog switcher same width as team section */
    .blog-switcher {
        max-width: 47.04rem;
        padding: 0;
    }

    .switcher-arrow svg {
        width: 128px;
        height: 128px;
    }

    .switcher-prev {
        left: -10rem;
    }

    .switcher-next {
        right: -10rem;
    }

    .switcher-image-area {
        /* ensure arrows stay outside image on PC */
    }

    .blog-card {
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .switcher-text-area {
        width: 100%;
    }

    .blog-card-title {
        font-size: 1.375rem;
    }

    .blog-card-content {
        font-size: 1.225rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-card-title {
        font-size: 1rem;
    }
}

/* ========================================
   Extra large screens (>= 1440px)
   ======================================== */
@media (min-width: 1440px) {
    .hero-tagline p {
        font-size: 3rem;
    }

    .brand-text {
        font-size: 1.625rem;
    }

    .section {
        padding: 7rem 6rem;
    }
}

/* ========================================
   Tablet (768px ~ 1023px)
   ======================================== */
@media (max-width: 1023px) and (min-width: 641px) {
    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-cards > .contact-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        justify-self: center;
    }
}

/* ========================================
   Mobile (<= 640px)
   ======================================== */
@media (max-width: 640px) {
    .hero-section {
        padding: 4rem 1.5rem;
        min-height: 100dvh;
    }

    .hero-brand {
        margin-bottom: 3rem;
    }

    .brand-text {
        font-size: 1.125rem;
        letter-spacing: 0.25em;
    }

    .hero-tagline p {
        font-size: 1.65rem;
    }

    .hero-sub {
        margin-top: 2.5rem;
    }

    .sub-title {
        font-size: 1.125rem;
    }

    .hero-video {
        max-width: 16rem;
        margin-top: 2rem;
    }

    .section {
        padding: 3rem 1.25rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    .team-image {
        max-width: 100%;
    }

    .team-description {
        font-size: 0.875rem;
    }

    .hero-video {
        max-width: 80vw;
        margin-top: 2rem;
    }

    .brand-video-wrapper {
        max-width: 100%;
    }

    .brand-video-section {
        text-align: center;
    }

    .switcher-arrow svg {
        width: 48px;
        height: 48px;
    }

    .switcher-prev {
        left: -2.5rem;
    }

    .switcher-next {
        right: -2.5rem;
    }

    .blog-card-title {
        font-size: 1rem;
    }

    .blog-card-content {
        font-size: 0.875rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-card-title {
        font-size: 1rem;
    }

    .contact-card-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }

    .site-footer {
        padding: 2rem 1.25rem;
        font-size: 0.75rem;
    }

    .lightbox {
        padding: 1rem;
    }
}

/* ========================================
   Small mobile (<= 380px)
   ======================================== */
@media (max-width: 380px) {
    .hero-tagline p {
        font-size: 1.35rem;
    }

    .brand-text {
        font-size: 0.975rem;
    }

    .hero-video {
        max-width: 14rem;
    }

    .blog-card-content {
        font-size: 0.8125rem;
    }
}

/* ===== Blog List Page ===== */
.page-header {
    padding: 3rem 2rem 1rem;
    text-align: center;
}

.page-header a {
    font-size: 0.8125rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    transition: color 0.2s;
}

.page-header a:hover {
    color: var(--text);
}

/* ===== Blog Detail ===== */
.article-header {
    max-width: var(--content-narrow);
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.article-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--accent);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-meta {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.article-cover {
    max-width: var(--content-narrow);
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.article-cover img {
    width: 100%;
    border-radius: 4px;
}

.article-body {
    max-width: var(--content-narrow);
    margin: 0 auto;
    padding: 0 2rem 4rem;
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 2.2;
    color: var(--text-muted);
}

.article-body p {
    margin-bottom: 1rem;
    text-indent: 2em;
}

.article-body h2 {
    font-size: 1.25rem;
    color: var(--accent);
    margin: 2rem 0 1rem;
    text-indent: 0;
}

.article-body h3 {
    font-size: 1.0625rem;
    color: var(--accent);
    margin: 1.5rem 0 0.75rem;
    text-indent: 0;
}

.article-body img {
    max-width: 100%;
    margin: 1.5rem auto;
    border-radius: 4px;
}

.article-body blockquote {
    border-left: 2px solid var(--border);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-dim);
    text-indent: 0;
}

.back-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-top: 2rem;
    transition: color 0.2s;
}

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

@media (max-width: 640px) {
    .article-header {
        padding: 3rem 1.25rem 1.5rem;
    }

    .article-title {
        font-size: 1.25rem;
    }

    .article-cover {
        padding: 0 1.25rem;
    }

    .article-body {
        padding: 0 1.25rem 3rem;
        font-size: 0.9375rem;
    }

    .page-header {
        padding: 2rem 1.25rem 0.75rem;
    }
}

/* ===== Admin Styles ===== */
.admin-container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-header h1 {
    font-size: 1.25rem;
    color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}

.btn:hover {
    border-color: var(--text-dim);
    background: var(--border);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--text);
}

.btn-danger {
    border-color: #fecaca;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--text-dim);
}

textarea.form-input {
    min-height: 20rem;
    resize: vertical;
    font-family: var(--sans);
    line-height: 1.6;
}

.admin-post-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.admin-post-info h3 {
    font-size: 0.9375rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.admin-post-info span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 99px;
    margin-left: 0.5rem;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.login-container {
    max-width: 22rem;
    margin: 10rem auto;
    padding: 2rem;
}

.login-container h1 {
    font-size: 1.125rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 2rem;
}

.login-error {
    font-size: 0.8125rem;
    color: #dc2626;
    text-align: center;
    margin-bottom: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent);
}

.checkbox-group label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .admin-container {
        padding: 1rem;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .admin-post-item {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}
