*, *::before, *::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

body, h1, h2, h3, h4, p, article, header, footer, main, div, nav, ul, li {
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #82255E;
    --primary-dark: #6a1e4c;
    --secondary-color: #B83B6A;
    --accent-color: #D1C39D;
    --dark-color: #2A101B;
    --light-color: #D9D0CA;
    --white: #FFFFFF;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --font-family: "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --border-radius: 10px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
    --focus-outline: 3px solid var(--accent-color);
    --focus-outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #c4458d;
        --primary-dark: #a83778;
        --secondary-color: #d1628e;
        --accent-color: #e6d9b8;
        --dark-color: #1a0d13;
        --light-color: #e8e2dd;
        --gray-light: #2d2d2d;
        --gray-medium: #404040;
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.4);
    }
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: #333;
    background-color: var(--gray-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    text-decoration: none;
    z-index: 1000;
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    transition: var(--transition);
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

header {
    background-color: var(--primary-color);
    color: var(--accent-color);
    text-align: center;
    padding: 1.5rem 1rem 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
    overflow: hidden;
    -webkit-box-shadow: var(--shadow);
    -moz-box-shadow: var(--shadow);
    box-shadow: var(--shadow);
}

header h1 {
    position: relative;
    z-index: 1;
    margin: 0;
}

.logo {
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo-description {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-nav {
    margin-top: 1.5rem;
    background-color: var(--primary-dark);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.nav-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--light-color);
    text-decoration: none;
    border-radius: 20px;
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link:focus {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    outline: none;
}

.nav-link:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

@supports selector(:focus-visible) {
    .nav-link:focus {
        outline: none;
    }
    .nav-link:focus-visible {
        outline: var(--focus-outline);
        outline-offset: var(--focus-outline-offset);
    }
}

main {
    background-color: var(--secondary-color);
    padding: 1.5rem 1rem;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

.tech-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    justify-items: center;
    align-items: stretch;
}

.tech-card {
    background-color: var(--accent-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    transition: var(--transition);
    -webkit-box-shadow: var(--shadow);
    -moz-box-shadow: var(--shadow);
    box-shadow: var(--shadow);
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
}

.tech-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    -webkit-transform: scaleX(0);
    -moz-transform: scaleX(0);
    -ms-transform: scaleX(0);
    -o-transform: scaleX(0);
    transform: scaleX(0);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    -moz-transition: transform 0.3s ease, -moz-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease, -moz-transform 0.3s ease;
}

.tech-card:hover::before,
.tech-card:focus-within::before {
    -webkit-transform: scaleX(1);
    -moz-transform: scaleX(1);
    -ms-transform: scaleX(1);
    -o-transform: scaleX(1);
    transform: scaleX(1);
}

.tech-card:hover,
.tech-card:focus-within {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: var(--shadow-hover);
    -moz-box-shadow: var(--shadow-hover);
    box-shadow: var(--shadow-hover);
}

.tech-card a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    padding: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

.tech-card a:focus {
    outline: none;
}

.tech-card a:focus {
    border-radius: var(--border-radius);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tech-card:focus-within {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 0 0 3px var(--primary-color), var(--shadow-hover);
    -moz-box-shadow: 0 0 0 3px var(--primary-color), var(--shadow-hover);
    box-shadow: 0 0 0 3px var(--primary-color), var(--shadow-hover);
    position: relative;
    z-index: 10;
}

@supports selector(:focus-visible) {
    .tech-card a:focus {
        outline: none;
    }
    .tech-card a:focus-visible {
        border-radius: var(--border-radius);
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

.tech-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    font-style: italic;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
    width: 100%;
    padding-bottom: 0.5rem;
}

.tech-card p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.7;
    font-size: 0.95rem;
}

.tech-card .description {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.read-more-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 1rem;
}

.tech-card .read-more {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-weight: bold;
    color: var(--dark-color);
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    transition: var(--transition);
    gap: 0.25rem;
    font-size: 0.9rem;
}

.tech-card:hover .read-more,
.tech-card:focus-within .read-more {
    -webkit-transform: translateX(5px);
    -moz-transform: translateX(5px);
    -ms-transform: translateX(5px);
    -o-transform: translateX(5px);
    transform: translateX(5px);
    color: var(--primary-dark);
}

.arrow {
    font-weight: bold;
    margin-left: 0.25rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    -webkit-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

footer a {
    color: var(--light-color);
    text-decoration: none;
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    transition: var(--transition);
}

footer a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

@media (prefers-contrast: more) {
    :root {
        --primary-color: #000000;
        --primary-dark: #000000;
        --secondary-color: #333333;
        --accent-color: #ffffff;
        --dark-color: #000000;
        --light-color: #ffffff;
        --gray-light: #ffffff;
        --gray-medium: #cccccc;
        --focus-outline: 3px solid var(--accent-color);
    }
    .nav-link {
        border: 1px solid var(--light-color);
    }
    .tech-card {
        border: 2px solid #000;
    }
    .tech-card:focus-within {
        -webkit-box-shadow: 0 0 0 4px var(--accent-color), 0 4px 8px rgba(0, 0, 0, 0.3);
        -moz-box-shadow: 0 0 0 4px var(--accent-color), 0 4px 8px rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 0 4px var(--accent-color), 0 4px 8px rgba(0, 0, 0, 0.3);
        border: 2px solid var(--accent-color);
    }
}

@media (max-width: 399px) {
    .container {
        padding: 0 10px;
    }
    header {
        padding: 1.25rem 0.5rem 0;
    }
    .logo {
        max-width: 220px;
    }
    .tech-card a {
        padding: 1rem;
    }
    .tech-card h4 {
        font-size: 1.3rem;
    }
    .nav-list {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    .nav-item {
        width: 100%;
        max-width: 220px;
    }
    .nav-link {
        text-align: center;
        border-radius: var(--border-radius);
        padding: 0.75rem 1rem;
    }
    .tech-card:focus-within {
        -webkit-transform: translateY(-3px);
        -moz-transform: translateY(-3px);
        -ms-transform: translateY(-3px);
        -o-transform: translateY(-3px);
        transform: translateY(-3px);
        -webkit-box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-hover);
        -moz-box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-hover);
        box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-hover);
    }
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    header {
        padding: 1.75rem 1rem 0;
    }
    .logo {
        max-width: 280px;
    }
    main {
        padding: 1.75rem 1rem;
    }
    .tech-cards {
        gap: 1.25rem;
    }
    .tech-card a {
        padding: 1.5rem;
    }
    .tech-card h4 {
        font-size: 1.5rem;
    }
    footer {
        padding: 1.5rem 1rem;
    }
    .nav-link {
        padding: 0.5rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    header {
        padding: 2rem 1rem 0;
    }
    .logo {
        max-width: 300px;
    }
    main {
        padding: 2rem 1rem;
    }
    .tech-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .tech-card {
        max-width: none;
    }
    .tech-card h4 {
        font-size: 1.5rem;
    }
    .tech-card p {
        font-size: 1rem;
    }
    .nav-list {
        padding: 1rem 0;
    }
    .nav-link {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 991px) and (min-width: 400px) {
    .nav-list {
        max-width: 100%;
    }
    .nav-item {
        width: calc(33.333% - 0.5rem);
        margin: 0.25rem;
    }
    .nav-link {
        text-align: center;
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }
    header {
        padding: 2.5rem 1rem 0;
    }
    .logo {
        max-width: 320px;
    }
    main {
        padding: 2.5rem 1rem;
    }
    .tech-cards {
        gap: 1.75rem;
    }
    .tech-card a {
        padding: 1.75rem;
    }
    .nav-list {
        padding: 1.25rem 0;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    .logo {
        max-width: 340px;
    }
    .tech-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .tech-card a {
        padding: 2rem;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    header {
        padding: 3rem 1rem 0;
    }
    .logo {
        max-width: 360px;
    }
    .tech-cards {
        gap: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .tech-card:hover,
    .tech-card:focus-within {
        -webkit-transform: none;
        -moz-transform: none;
        -ms-transform: none;
        -o-transform: none;
        transform: none;
    }
    .tech-card:focus-within {
        -webkit-box-shadow: 0 0 0 4px var(--primary-color), 0 2px 4px rgba(0, 0, 0, 0.2);
        -moz-box-shadow: 0 0 0 4px var(--primary-color), 0 2px 4px rgba(0, 0, 0, 0.2);
        box-shadow: 0 0 0 4px var(--primary-color), 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    .skip-link {
        -webkit-transition: none;
        -moz-transition: none;
        transition: none;
    }
    .tech-card:hover .read-more,
    .tech-card:focus-within .read-more {
        -webkit-transform: none;
        -moz-transform: none;
        -ms-transform: none;
        -o-transform: none;
        transform: none;
    }
}

@media print {
    * {
        background: transparent !important;
        color: black !important;
        -webkit-box-shadow: none !important;
        -moz-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    .tech-card {
        border: 1px solid #000;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    .tech-card:focus-within {
        border: 2px solid #000;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
    }
    a[href]:after {
        content: " (" attr(href) ")";
    }
    header,
    footer {
        background: white !important;
        color: black !important;
    }
    .read-more-container {
        display: none;
    }
    .main-nav {
        display: none;
    }
    .skip-link {
        display: none;
    }
}

.tech-cards {
    content-visibility: auto;
}

::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--white);
}