:root {
    --c-paper: #FAFAF8;
    --c-ink: #1a1a1a;
    --c-ink-light: #555555;
    --c-red: #a42d2f;
    --c-line: #d0d0d0;
    --f-voice: "Songti SC", "SimSun", "Times New Roman", serif;
    --f-data: "Roboto Mono", "Menlo", "Courier New", monospace;
    --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --w-max: 1440px;
    --s-pad: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--c-paper);
    color: var(--c-ink);
    font-family: var(--f-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--f-voice);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

p {
    margin-bottom: 1em;
}

.brand-est,
.bulletin-label,
.section-label,
.card-meta,
.n-label,
.related-placeholder,
.legal-meta,
.lang-select {
    font-family: var(--f-data);
}

.hero-manifesto,
.card-title,
.n-value-native {
    font-family: var(--f-voice);
}

.hero-desc,
.bulletin-text,
.card-desc,
.n-value,
.n-value-en,
.legal-notice {
    font-family: var(--f-ui);
}

.wrapper {
    max-width: var(--w-max);
    margin: 0 auto;
    border-left: 1px solid var(--c-line);
    border-right: 1px solid var(--c-line);
    background: #fff;
    min-height: 100vh;
}

.hero-split {
    display: grid;
    grid-template-columns: 40% 60%;
    border-bottom: 1px solid var(--c-line);
}


.hero-voice {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--c-line);
    background: #FAFAF8;
    position: relative;
}

.hero-voice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--c-red);
}

.brand-block {
    margin-bottom: 60px;
}

.brand-est {
    font-size: 0.75rem;
    color: var(--c-red);
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
    font-weight: 600;
}

.brand-title {
    font-size: 2.3rem;
    line-height: 1.2;
    color: var(--c-ink);
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-family: var(--f-voice);
    font-size: 1.1rem;
    color: var(--c-ink-light);
    margin: 0;
}

.hero-manifesto .brand-subtitle {
    padding-top: 30px;
    max-width: 420px;
    position: relative;
    display: block;
}

.hero-manifesto .brand-subtitle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--c-ink);
}

.portal-text-container .brand-subtitle {
    font-weight: 400;
    letter-spacing: 1px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-desc {
    font-size: 0.95rem;
    margin-top: 15px;
    line-height: 1.6;
}

.hero-viz {
    position: relative;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.beacon-container {
    position: relative;
}

.logo-center {
    width: 180px;
    height: 180px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.cls-1 {
    fill: var(--c-red);
}

.cls-2 {
    fill: #48271e;
}

.piece {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: gatherIn 2.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.p1 {
    --tx: 40px;
    --ty: -40px;
    --rot: 15deg;
    animation-delay: 0.0s;
}

.p2 {
    --tx: -60px;
    --ty: 0px;
    --rot: -20deg;
    animation-delay: 0.1s;
}

.p3 {
    --tx: 60px;
    --ty: 20px;
    --rot: 10deg;
    animation-delay: 0.2s;
}

.p4 {
    --tx: 0px;
    --ty: -60px;
    --rot: -5deg;
    animation-delay: 0.3s;
}

.p5 {
    --tx: -30px;
    --ty: 50px;
    --rot: 20deg;
    animation-delay: 0.15s;
}

@keyframes gatherIn {
    0% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.8);
    }

    25%,
    75% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.bulletin-board {
    background: #fff;
    padding: 20px var(--s-pad);
    border-bottom: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulletin-label {
    font-size: 0.75rem;
    color: var(--c-red);
    white-space: nowrap;
    letter-spacing: 1px;
    font-weight: 500;
}

.bulletin-text {
    font-size: 0.9rem;
    color: var(--c-ink-light);
    line-height: 1.5;
}

.section-label {
    padding: 30px var(--s-pad);
    background: #FAFAF8;
    border-bottom: 1px solid var(--c-line);
    color: var(--c-ink-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.std-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border-bottom: 1px solid var(--c-line);
}

.std-card,
.net-card,
.related-item {
    position: relative;
    background: #fff;
    border-right: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    transition: background-color 0.3s ease;
    z-index: 1;
}

.std-card:hover,
.net-card:hover,
.related-item:hover {
    background: #fafafa;
}

.std-card,
.net-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.std-card {
    padding: 25px 20px;
    overflow: hidden;
}

.std-card:nth-child(4n) {
    border-right: none;
}

.card-meta {
    color: var(--c-ink-light);
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.card-title {

    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--c-ink);
    z-index: 2;
}

.card-desc {

    font-size: 0.9rem;
    color: var(--c-ink-light);
    line-height: 1.6;
    margin: 0;
    z-index: 2;
}

.std-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--c-red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
}

.std-card:hover::before {
    transform: scaleY(1);
}

.std-card {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.std-card:nth-child(1) {
    animation-delay: 0.1s;
}

.std-card:nth-child(2) {
    animation-delay: 0.15s;
}

.std-card:nth-child(3) {
    animation-delay: 0.2s;
}

.std-card:nth-child(4) {
    animation-delay: 0.25s;
}

.std-card:nth-child(5) {
    animation-delay: 0.3s;
}

.std-card:nth-child(6) {
    animation-delay: 0.35s;
}

.std-card:nth-child(7) {
    animation-delay: 0.4s;
}

.std-card:nth-child(8) {
    animation-delay: 0.45s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.net-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
}

.net-card {
    padding: 20px;
}

.net-card:nth-child(2n) {
    border-right: none;
}


.n-group {
    margin-bottom: 25px;
}

.n-group:last-child {
    margin-bottom: 0;
}

.n-label {

    font-size: 0.7rem;
    color: var(--c-red);
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 500;
}

.n-value-native {

    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c-ink);
    margin-bottom: 4px;
    line-height: 1.4;
}

.n-value-en {

    font-size: 0.8rem;
    color: var(--c-ink-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.n-value {

    font-size: 0.9rem;
    color: var(--c-ink-light);
    line-height: 1.5;
}


.related-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    text-decoration: none;
}

.related-item:nth-child(4n) {
    border-right: none;
}

.related-placeholder {

    color: var(--c-ink-light);
    font-size: 0.9rem;
    letter-spacing: 1px;
}


.fine-print {
    padding: 30px var(--s-pad);
    background: var(--c-paper);
    color: #888;
    font-size: 0.8rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.legal-notice {

    line-height: 1.6;
}

.legal-meta {
    text-align: right;

}

.mobile-logo-container {
    display: none;
    width: 60px;
    height: 60px;
    margin-left: 15px;
}

.beian-link {
    color: inherit;
    text-decoration: none;
    margin-right: 10px;
}

.beian-link:last-of-type {
    margin-right: 0;
}

.partner-logo {
    max-height: 60px;
    max-width: 80%;
}

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.lang-container {
    position: fixed;
    top: 30px;
    right: max(30px, calc(50vw - var(--w-max)/2 + 30px));
    z-index: 9999;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--c-line);
    border-radius: 0;
    font-family: var(--f-data);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-ink);
    cursor: pointer;
    padding: 12px 36px 12px 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.lang-select:hover {
    border-color: var(--c-red);
    color: var(--c-red);
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a42d2f' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    box-shadow: 0 4px 12px rgba(164, 45, 47, 0.1);
}

.lang-select option {
    color: var(--c-ink);
    background: #fff;
}

.contact-section {
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    padding: 40px var(--s-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    transition: background-color 0.3s ease;
}

.contact-section:hover {
    background: #fafafa;
}

.contact-text {
    font-family: var(--f-ui);
    color: var(--c-ink-light);
    max-width: 500px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.contact-email {
    font-family: var(--f-data);
    font-size: 1.3rem;
    color: var(--c-ink);
    border-bottom: 2px solid var(--c-line);
    padding-bottom: 8px;
    transition: all 0.3s ease;
}

.contact-email:hover {
    color: var(--c-red);
    border-bottom-color: var(--c-red);
}

#philosophy-grid .std-card::after,
#entities-grid .net-card::after {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url("/favicon.svg");
    background-repeat: no-repeat;
    background-size: 200%;
    filter: grayscale(100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.layout-centered-viewport {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.portal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    padding: 40px;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.portal-logo {
    width: 160px;
    height: 160px;
    margin-bottom: 60px;
    animation: breathe 6s ease-in-out infinite;
}

.portal-logo svg,
.logo-center svg,
.mobile-logo-container svg {
    width: 100%;
    height: 100%;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }

    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
    }
}

.portal-text-container {
    text-align: center;
    margin-bottom: 80px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.brand-subtitle.fade-out,
.brand-title.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.portal-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    padding-top: 50px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--c-ink-light);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 15px 10px;
    border-radius: 4px;
}

.portal-link:hover {
    background: #fff;
    color: var(--c-red);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.portal-lang-code {
    font-family: var(--f-data);
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

.portal-lang-name {
    font-size: 0.8rem;
    opacity: 0.8;
    white-space: nowrap;
}

.portal-footer {
    position: fixed;
    bottom: 30px;
    font-family: var(--f-data);
    font-size: 0.7rem;
    color: #bbb;
    letter-spacing: 1px;
    text-align: center;
}

@media (max-width: 900px) {
    .lang-container {
        top: auto;
        bottom: 25px;
        right: 20px;
        width: 44px;
        height: 44px;
        background-color: rgba(255, 255, 255, 0.95);
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'%3e%3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e%3cline x1='2' y1='12' x2='22' y2='12'%3e%3c/line%3e%3cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3e%3c/path%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 24px;
        border: 1px solid var(--c-line);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: flex;
    }

    .lang-select {
        opacity: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        border: none;
        position: absolute;
        left: 0;
        top: 0;
        appearance: none;
    }

    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-viz {
        display: none;
    }

    .hero-voice {
        padding: 30px 20px;
        justify-content: flex-start;
        gap: 0;
    }

    .hero-voice::before {
        display: none;
    }

    .brand-block {
        margin-bottom: 10px;
    }

    .brand-row {
        position: relative;
        display: block;
    }

    .lang-container {
        display: block;
    }

    .lang-select {
        font-size: 1rem;
    }

    .mobile-logo-container {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        height: 60px;
    }

    .brand-row .brand-title {
        font-size: 1.6rem;
        padding-right: 70px;
    }

    .std-grid {
        grid-template-columns: 1fr 1fr;
    }

    .net-grid {
        grid-template-columns: 1fr;
    }

    .std-card:nth-child(2n),
    .net-card,
    .related-item,
    .related-item:nth-child(4n) {
        border-right: none;
    }

    .related-item:nth-child(2n) {
        border-right: 1px solid var(--c-line);
    }

    .net-card {
        padding: 30px 20px;
    }


    .fine-print {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .legal-meta {
        text-align: left;
        margin-top: 20px;
    }

    #philosophy-grid .std-card {
        overflow: hidden;
    }

    #philosophy-grid .std-card .card-title,
    #philosophy-grid .std-card .card-desc,
    #philosophy-grid .std-card .card-meta {
        position: relative;
        z-index: 2;
    }



    .portal-nav {
        grid-template-columns: 1fr;
        gap: 0;
        border-top: none;
        max-width: 340px;
        padding-top: 30px;
    }

    .portal-lang-code {
        margin-bottom: 0;
    }

    .portal-link {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid var(--c-line);
        border-radius: 0;
    }

    .portal-link:first-child {
        border-top: 1px solid var(--c-line);
    }

    .portal-link:hover {
        transform: none;
        background: #fff;
        padding-left: 20px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .portal-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 40px;
    }

    .portal-text-container {
        margin-bottom: 40px;
    }

    .portal-wrapper {
        padding: 20px;
    }

    .layout-centered-viewport {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        flex-direction: column;
        justify-content: space-between;
    }

    .portal-footer {
        position: relative;
        margin-top: 40px;
        padding-bottom: 30px;
        bottom: auto;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 600px) {

    .std-grid,
    .net-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Restore borders for 2-column layout */
    .std-card,
    .net-card,
    .related-item {
        border-right: 1px solid var(--c-line);
    }

    /* Remove borders for every 2nd item (end of row) */
    .std-card:nth-child(2n),
    .net-card:nth-child(2n),
    .related-item:nth-child(2n) {
        border-right: none;
    }
}



@media (min-width: 901px) {
    #philosophy-grid .std-card {
        overflow: hidden;
    }

    #philosophy-grid .std-card .card-title,
    #philosophy-grid .std-card .card-desc,
    #philosophy-grid .std-card .card-meta {
        position: relative;
        z-index: 2;
    }

    #philosophy-grid .std-card:nth-child(2)::after,
    #philosophy-grid .std-card:nth-child(3)::after,
    #philosophy-grid .std-card:nth-child(6)::after,
    #philosophy-grid .std-card:nth-child(7)::after {
        content: "";
        opacity: 0.08;
    }

    #philosophy-grid .std-card:hover::after {
        opacity: 0.15;
    }

    #philosophy-grid .std-card:nth-child(2)::after {
        bottom: 0;
        right: 0;
        background-position: 0 0;
    }

    #philosophy-grid .std-card:nth-child(3)::after {
        bottom: 0;
        left: 0;
        background-position: 100% 0;
    }

    #philosophy-grid .std-card:nth-child(6)::after {
        top: 0;
        right: 0;
        background-position: 0 100%;
    }

    #philosophy-grid .std-card:nth-child(7)::after {
        top: 0;
        left: 0;
        background-position: 100% 100%;
    }

    #entities-grid .net-card {
        overflow: hidden;
        position: relative;
    }

    #entities-grid .n-group {
        position: relative;
        z-index: 2;
    }

    #entities-grid .net-card:nth-child(1)::after,
    #entities-grid .net-card:nth-child(2)::after,
    #entities-grid .net-card:nth-child(3)::after,
    #entities-grid .net-card:nth-child(4)::after {
        content: "";
        opacity: 0.08;
    }

    #entities-grid .net-card:hover::after {
        opacity: 0.15;
    }

    #entities-grid .net-card:nth-child(1)::after {
        bottom: 0;
        right: 0;
        background-position: 0 0;
    }

    #entities-grid .net-card:nth-child(2)::after {
        bottom: 0;
        left: 0;
        background-position: 100% 0;
    }

    #entities-grid .net-card:nth-child(3)::after {
        top: 0;
        right: 0;
        background-position: 0 100%;
    }

    #entities-grid .net-card:nth-child(4)::after {
        top: 0;
        left: 0;
        background-position: 100% 100%;
    }
}