/* Portfolio | Chinese-inspired cyber theme | consolidated stylesheet */

:root {
    color-scheme: dark;
    --bg: #080e14;
    --panel: #101b24;
    --line: #263c49;
    --text: #e9efed;
    --muted: #a6b8b8;
    --accent: #65d6ac;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font: 16px/1.65 system-ui, -apple-system, Segoe UI, sans-serif;
}

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

button, input {
    font: inherit;
}

button, a, input {
    outline-offset: 5px;
}

button {
    cursor: pointer;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 10px 15px;
}

button:hover, a:hover {
    color: var(--accent);
}

.wrap {
    width: min(1120px, 90%);
    margin: auto;
}

.mono, .eyebrow, small, .tag {
    font-family: ui-monospace, Consolas, monospace;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 600;
}

.green, .brand span, em, b {
    color: var(--accent);
}

em {
    font-style: normal;
}

.skip {
    position: absolute;
    top: -100px;
}

.skip:focus {
    top: 0;
    z-index: 100;
    background: var(--panel);
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--line);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 75px;
    gap: 20px;
}

.brand {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -2px;
}

.brand small {
    font-size: 10px;
    letter-spacing: 1px;
    margin-left: 12px;
    color: var(--muted);
}

#navlinks {
    display: flex;
    gap: 18px;
    font-size: 14px;
    align-items: center;
}

#menu {
    display: none;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(48px, 6.6vw, 88px);
    white-space: normal;
    line-height: 1.04;
    letter-spacing: -.06em;
    margin-bottom: 25px;
}

h2 {
    font-size: clamp(36px, 5vw, 63px);
    line-height: 1.08;
    letter-spacing: -.045em;
    margin-bottom: 20px;
}

h3 {
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.lead {
    font-size: 19px;
    color: var(--muted);
    max-width: 640px;
}

p {
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.primary, .secondary {
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-weight: 650;
    font-size: 14px;
}

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

.terminal {
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    animation: arrive 1.1s both;
    min-width: 0;
}

.terminal-top {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.terminal-body {
    padding: 25px;
    font-size: 14px;
}

.terminal-body p {
    margin: 0 0 12px;
}

.network {
    padding: 0 30px 20px;
    color: var(--accent);
}

.network svg {
    width: 100%;
    height: 100px;
    filter: drop-shadow(0 0 7px #65d6ac77);
}

.cursor {
    animation: blink 1s step-end infinite;
}

.facts {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
    gap: 15px;
}

.facts small, .timeline small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.section {
    padding: 85px 0;
    border-bottom: 1px solid var(--line);
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.active {
    border-color: var(--accent);
    color: var(--accent);
}

.projectgrid, .skillgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.project, .skillcard {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    padding: 24px;
}

.project {
    display: flex;
    flex-direction: column;
}

.project:hover {
    border-color: #628c7b;
}

.visual {
    height: 110px;
    background: #0b1417;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent);
    font: 12px ui-monospace, monospace;
    margin-bottom: 20px;
}

.node {
    padding: 9px;
    border: 1px solid #44695a;
    border-radius: 4px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    margin: 3px;
}

.project button {
    align-self: flex-start;
    margin-top: auto;
}

.project p {
    margin-bottom: 15px;
}

.project .tags {
    margin-bottom: 20px;
}

.identity {
    display: grid;
    place-content: center;
    min-height: 220px;
    text-align: center;
    border: 1px solid #d4af7055;
    border-radius: 6px;

    background:
        radial-gradient(
            circle at center,
            #861d3055,
            transparent 75%
        ),
        repeating-linear-gradient(
            45deg,
            transparent 0 24px,
            #d4af700a 24px 25px
        ),
        #160c12;

    box-shadow:
        inset 0 0 50px #d9364415,
        0 0 25px #d9364410;
}
.identity span {
    font-family: "Microsoft YaHei", serif;
    font-size: 110px;
    font-weight: 500;
    letter-spacing: 0;
    color: #d4af70;

    text-shadow:
        0 0 15px #d4af7055,
        0 0 35px #d9364455,
        0 0 60px #d9364433;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.timeline article {
    border-top: 2px solid var(--accent);
    padding-top: 20px;
}

.timeline h3 {
    margin: 10px 0;
}

label {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

input {
    width: min(450px, 100%);
    background: var(--panel);
    color: var(--text);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    margin: 8px 0 24px;
}

.contact p {
    max-width: 620px;
}

.contact {
    padding-bottom: 100px;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 28px 0;
    font-size: 12px;
    color: var(--muted);
}

dialog {
    width: min(680px, 90vw);
    max-height: 85vh;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 10px;
    padding: 35px;
}

dialog::backdrop {
    background: #000b;
}

#close {
    float: right;
    font-size: 22px;
    padding: 0 12px;
}

#intro {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: var(--bg);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
}

#intro[hidden] {
    display: none;
}

.mark {
    font-size: 76px;
    font-weight: 900;
    letter-spacing: -8px;
}

.mark span {
    color: var(--accent);
}

.intro-inner h1 {
    font-size: clamp(36px, 6vw, 65px);
}

.intro-inner button {
    border-color: var(--accent);
}

i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 6px;
}

.hero-atmosphere {
    position: absolute;
    inset: 75px 0 auto;
    height: 690px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero {
    position: relative;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    padding: 65px 0 25px;
}

.hero h1 em {
    background-clip: text;
    color: transparent;
    font-size: clamp(26px, 3.35vw, 51px);
}

.hero h1 {
    animation: arrive .85s both;
    font-size: clamp(36px, 4.5vw, 68px);
}

.hero .lead, .hero .actions {
    animation: arrive 1s both;
}

.terminal::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(transparent 48%, #65d6ac0b 50%, transparent 52%);
    background-size: 100% 200%;
    animation: sweep 6s linear infinite;
}

.network-label {
    font: 10px ui-monospace, monospace;
    letter-spacing: 1.5px;
    color: var(--muted);
}

.network svg circle {
    animation: pulse 2s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.github-nav {
    border: 1px solid #477e6b;
    border-radius: 6px;
    padding: 5px 12px;
    white-space: nowrap;
}

.project, .skillcard, .interest {
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.project:hover, .interest:hover {
    transform: translateY(-5px);
    border-color: #70bbad;
    box-shadow: 0 15px 40px #0004;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.interest {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(145deg, #172b35, var(--panel) 70%);
    min-height: 205px;
}

.interest-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.interest-top small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.interest-icon {
    font-size: 32px;
    color: var(--accent);
    line-height: 1;
}

.interest h3 {
    margin-bottom: 8px;
}

.interest p {
    margin: 0;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.languages span {
    padding: 7px 11px;
    background: #0a141c;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
}

.languages b {
    margin-right: 5px;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 25;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #65d6ac, #d4af70);
    transform: scaleX(0);
    transform-origin: left;
}

.reveal-ready .section:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-ready .section {
    transition: opacity .65s, transform .65s;
}

.reveal-ready .section:focus-within {
    opacity: 1;
    transform: none;
}

.aboutgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    background: var(--panel);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 32px 0;
}

.soc-dashboard {
    border: 1px solid #293d48;
    border-radius: 20px;
    padding: 15px;
    margin: 20px auto;
    color: #e8f0f5;
    max-width: 1100px;
    line-height: 1.4;
}

.soc-dashboard p {
    color: #9aafbd;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.soc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 10px;
}

.soc-header h2 {
    font-size: 24px;
    margin: 5px 0;
}

.soc-label {
    color: #80e7b5;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 2px;
}

.soc-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #80e7b5;
    font-size: 12px;
    white-space: nowrap;
    padding: 10px 14px;
    background: rgba(128, 231, 181, 0.06);
    border: 1px solid rgba(128, 231, 181, 0.2);
    border-radius: 30px;
}

.soc-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: socPulse 2s infinite;
}

.soc-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.soc-stat {
    padding: 10px;
    background: #0c151e;
    border: 1px solid #293d48;
    border-radius: 12px;
    transition: transform 0.3s, border-color 0.3s;
}

.soc-stat:hover {
    transform: translateY(-4px);
    border-color: #80e7b5;
}

.soc-stat span {
    font-size: 13px;
    color: #9aafbd;
}

.soc-stat h3 {
    font-family: monospace;
    font-size: 24px;
    margin: 12px 0 0;
    margin-top: 5px;
}

.soc-red {
    color: #ff6b6b;
}

.soc-orange {
    color: #ffad66;
}

.soc-green {
    color: #80e7b5;
}

.soc-panel {
    background: #0a121a;
    border: 1px solid #293d48;
    border-radius: 12px;
    padding: 10px;
    min-width: 0;
    margin-bottom: 8px;
}

.soc-panel h3 {
    font-size: 15px;
    margin-bottom: 5px;
}

.soc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.soc-network {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px 0;
    background-image: linear-gradient(#ffffff04 1px, transparent 1px),
        linear-gradient(90deg, #ffffff04 1px, transparent 1px);
    background-size: 25px 25px;
    justify-content: center;
    gap: 0;
}

.soc-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid #427266;
    border-radius: 10px;
    padding: 5px 8px;
    width: 120px;
    max-width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
    line-height: 1.2;
}

.soc-node span {
    font-size: 16px;
}

.soc-node strong {
    font-size: 12px;
}

.soc-node small {
    color: #9aafbd;
    font-size: 9px;
    text-align: center;
}

.soc-node:hover {
    border-color: #80e7b5;
    box-shadow: 0 0 20px #80e7b522;
}

.soc-node.soc-under-attack {
    border-color: #ff6b6b;
    animation: socAttack 0.7s alternate 4;
}

.soc-connection {
    width: 30px;
    height: 2px;
    background-size: 200% 100%;
    animation: socTraffic 2s linear infinite;
    flex-shrink: 0;
}

.soc-branches {
    display: flex;
    justify-content: center;
    gap: 4px;
    width: auto;
    position: relative;
    padding-top: 0;
    flex-direction: column;
    align-items: center;
    padding-left: 20px;
}

.soc-branches::before {
    content: "";
    position: absolute;
    top: 16.66%;
    left: 0;
    right: auto;
    height: auto;
    background: #427266;
    bottom: 16.66%;
    width: 1px;
}

.soc-branches .soc-node {
    position: relative;
    width: 140px;
    max-width: 140px;
}

.soc-branches .soc-node::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -20px;
    height: 1px;
    width: 20px;
    background: #427266;
}

.soc-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.soc-logs {
    height: 170px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #427266 #0a121a;
}

.soc-log {
    display: grid;
    grid-template-columns: 60px 66px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    width: 100%;
    padding: 8px 5px;
    border: none;
    border-bottom: 1px solid #20303c;
    background: transparent;
    color: #e8f0f5;
    text-align: left;
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    animation: socLogEntry 0.4s ease;
}

.soc-log:hover, .soc-log.soc-selected {
    background: #172a35;
}

.soc-log-time {
    color: #8296a5;
}

.soc-severity {
    display: inline-block;
    font-family: monospace;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    border-radius: 4px;
    color: #9aafbd;
    background: #182630;
}

.soc-severity.info {
    color: #80e7b5;
    background: #80e7b514;
}

.soc-severity.medium {
    color: #facc15;
    background: #facc1514;
}

.soc-severity.high {
    color: #fb923c;
    background: #fb923c14;
}

.soc-severity.critical {
    color: #ff6b6b;
    background: #ff6b6b14;
}

#soc-alert-title {
    margin-top: 15px;
}

#soc-alert-description {
    margin-top: 15px;
}

.soc-alert-details {
    background: #101d27;
    border-radius: 8px;
    padding: 6px 10px;
    margin: 8px 0;
}

.soc-alert-details div {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
    font-size: 12px;
}

.soc-alert-details span {
    color: #9aafbd;
}

.soc-alert-details strong {
    font-family: monospace;
    color: #e8f0f5;
}

.soc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.soc-actions button, #soc-pause {
    background: #14252f;
    color: #e8f0f5;
    border: 1px solid #344d59;
    border-radius: 7px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s, border-color 0.2s;
}

.soc-actions button:hover, #soc-pause:hover {
    border-color: #80e7b5;
    background: #1d383c;
}

.soc-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.soc-feedback {
    font-family: monospace;
    font-size: 11px;
    color: #9aafbd;
    line-height: 1.4;
    padding: 8px;
    background: #101d27;
    border-radius: 7px;
    margin-top: 8px;
    border-left: 3px solid #427266;
}

.soc-feedback.soc-correct {
    color: #80e7b5;
    border-left-color: #80e7b5;
}

.soc-feedback.soc-incorrect {
    color: #ffad66;
    border-left-color: #ffad66;
}

.soc-footer {
    color: #8296a5;
    font-size: 11px;
    font-family: monospace;
    text-align: center;
}

.soc-count-pop {
    animation: socCountPop 0.35s ease;
}

.soc-network > .soc-node {
    width: 110px;
    flex-shrink: 0;
}

#soc-alert-title, #soc-alert-description {
    margin-top: 8px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes arrive {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

@keyframes pulse {
    50% {
        transform: scale(1.35);
        opacity: .55;
    }
}

@keyframes sweep {
    from {
        background-position: 0 100%;
    }

    to {
        background-position: 0 -100%;
    }
}

@keyframes socPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(128, 231, 181, 0.5);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(128, 231, 181, 0);
    }
}

@keyframes socAttack {
    from {
        box-shadow: 0 0 5px #ff6b6b33;
    }

    to {
        box-shadow: 0 0 25px #ff6b6b88;
    }
}

@keyframes socTraffic {
    to {
        background-position: 200% 0;
    }
}

@keyframes socLogEntry {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

@keyframes socCountPop {
    50% {
        transform: scale(1.15);
    }
}

@media (max-width: 900px) {
    .brand small {
        display: none;
    }

    #navlinks {
        gap: 12px;
    }
}

@media (max-width: 760px) {
    .hero {
        padding-top: 55px;
        gap: 28px;
        min-height: 0;
        grid-template-columns: 1fr;
        padding: 45px 0 20px;
    }

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

    .section {
        padding: 55px 0;
    }

    #menu {
        display: block;
    }

    #navlinks {
        display: none;
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background: var(--panel);
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
    }

    #navlinks.open {
        display: flex;
    }

    .brand small {
        display: none;
    }

    footer {
        flex-wrap: wrap;
    }

    .visual {
        font-size: 10px;
    }

    .node {
        padding: 6px;
    }

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

    .hero-atmosphere {
        height: 950px;
    }

    .interest {
        padding: 18px;
    }

    .hero, .aboutgrid, .projectgrid, .skillgrid, .timeline {
        grid-template-columns: 1fr;
    }

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

    .soc-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .soc-dashboard {
        padding: 15px;
    }

    .soc-header {
        flex-direction: column;
    }

    .soc-panel {
        padding: 12px;
    }

    .soc-stat {
        padding: 12px;
    }

    .soc-stat h3 {
        font-size: 24px;
    }

    .soc-branches {
        flex-direction: row;
        width: 100%;
        padding: 12px 0 0;
        gap: 5px;
        align-items: stretch;
    }

    .soc-node {
        padding: 10px 5px;
    }

    .soc-node strong {
        font-size: 11px;
    }

    .soc-node small {
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .soc-log {
        grid-template-columns: 54px 60px minmax(0, 1fr);
        font-size: 10px;
        gap: 4px;
    }

    .soc-network {
        flex-direction: column;
    }

    .soc-connection {
        width: 2px;
        height: 14px;
    }

    .soc-branches::before {
        top: 0;
        bottom: auto;
        left: 16.66%;
        right: 16.66%;
        width: auto;
        height: 1px;
    }

    .soc-branches .soc-node {
        width: calc((100% - 10px) / 3);
        min-width: 0;
        padding: 5px 2px;
    }

    .soc-branches .soc-node::before {
        top: -13px;
        left: 50%;
        width: 1px;
        height: 12px;
    }
}

@media (max-width: 440px) {
    .interest-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
    }

    .reveal-ready .section {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .project, .interest {
        transition: none;
    }

    .soc-dashboard *, .soc-dashboard *::before, .soc-dashboard *::after {
        animation: none !important;
        transition: none !important;
    }
}

#detail.case-study-dialog {
    width: min(820px, 94vw);
    max-height: 92vh;
    max-height: 92dvh;
    padding: clamp(20px, 4vw, 44px);
    border: 1px solid #34515e;
    border-radius: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #477e6b #101b24;
}

.case-study-dialog #close {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #172b35;
}

.case-study-dialog h2 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    margin: 14px 0;
    overflow-wrap: anywhere;
}

.case-study-dialog .eyebrow {
    padding-right: 48px;
    font-size: 11px;
    letter-spacing: 2px;
}

.case-study-dialog .case-lead {
    font-size: 16px;
    line-height: 1.7;
}

.case-study-dialog .case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 18px 0 24px;
}

.case-study-dialog .case-tags .tag {
    border: 1px solid #34515e;
    border-radius: 4px;
    padding: 5px 9px;
    font-family: monospace;
    font-size: 11px;
}

.case-study-dialog section {
    border-top: 1px solid #263c49;
    padding: 22px 0;
}

.case-study-dialog section h3 {
    font-size: 23px;
    margin: 0 0 12px;
}

.case-study-dialog section p {
    margin: 0;
    line-height: 1.7;
}

.case-study-dialog ul {
    padding-left: 20px;
    margin: 0;
    color: var(--muted, #a6b8b8);
}

.case-study-dialog li {
    margin: 5px 0;
    line-height: 1.7;
}

.case-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 12px;
}

.case-flow span {
    border: 1px solid #477e6b;
    padding: 12px;
    border-radius: 5px;
    transition: 0.3s;
}

.case-flow span:hover {
    border-color: #65d6ac;
    box-shadow: 0 0 15px #65d6ac22;
    transform: translateY(-3px);
}

.case-result {
    margin-top: 20px;
    padding: 18px;
    border-left: 3px solid #65d6ac;
    border-radius: 0 6px 6px 0;
}

.case-result strong {
    font-size: 15px;
}

.case-study-dialog .case-result p {
    margin-top: 8px;
    font-size: 14px;
}

.case-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid #263c49;
}

.case-actions button {
    font-family: monospace;
    font-size: 12px;
    padding: 12px 16px;
    border: 1px solid #34515e;
    border-radius: 5px;
    color: #e8f0f5;
    cursor: pointer;
    transition: 0.3s;
}

.case-copy-status {
    color: #65d6ac;
    font-size: 12px;
    align-self: center;
}

@media (max-width: 600px) {
    #detail.case-study-dialog {
        padding: 20px;
    }

    .case-study-dialog section {
        padding: 16px 0;
    }

    .case-study-dialog section h3 {
        font-size: 20px;
    }

    .case-flow {
        gap: 6px;
    }

    .case-flow span {
        padding: 8px;
        font-size: 10px;
    }
}

:root {
    --bg: #09090d;
    --panel: #161318;
    --line: #453039;
    --text: #f1e9dd;
    --muted: #b9ada7;
    --accent: #d4af70;
    --imperial-red: #d93644;
    --deep-red: #861d30;
    --gold: #d4af70;
    --jade: #65d6ac;
}

body {
    color: var(--text);
    background: radial-gradient(
            ellipse at 85% 10%,
            #861d3038,
            transparent 40%
        ),
        radial-gradient(
            ellipse at 10% 60%,
            #d4af700a,
            transparent 35%
        ),
        #09090d;
}

.hero-atmosphere {
    background: linear-gradient(
            transparent 60%,
            var(--bg)
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 59px,
            #d4af7009 59px 60px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 59px,
            #d4af7009 59px 60px
        );
}

header {
    background: #0c090dee;
    border-bottom: 1px solid #d4af7040;
    backdrop-filter: blur(15px);
}

.brand {
    color: var(--gold);
}

.brand span {
    color: var(--gold);
}

#navlinks a:hover {
    color: var(--imperial-red);
}

.github-nav {
    color: var(--gold);
    border-color: #d4af7060;
}

.hero {
    position: relative;
    isolation: isolate;
}

.hero h1 {
    color: var(--text);
}

.hero h1 em {
    background: linear-gradient(
        100deg,
        #ff5b65,
        #d93644,
        #d4af70
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .eyebrow {
    color: var(--gold);
}

.hero-emblem {
    position: absolute;
    top: 45%;
    right: 3%;
    width: 340px;
    aspect-ratio: 1;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
        circle,
        #d9364433,
        transparent 70%
    );
}

.emblem-symbol {
    position: relative;
    font-family: "Microsoft YaHei",
        "Noto Serif SC",
        serif;
    font-weight: 400;
    color: var(--gold);
    opacity: 0.3;
    text-shadow: 0 0 25px #d4af7044,
        0 0 60px #d9364433;
    animation: emblemGlow 5s ease-in-out infinite;
}

.emblem-ring {
    position: absolute;
    border-radius: 50%;
}

.ring-outer {
    inset: 0;
    border: 1px solid #d4af7055;
    box-shadow: 0 0 25px #d936441a,
        inset 0 0 25px #d936441a;
}

.ring-middle {
    inset: 15px;
    border: 2px dashed #d9364466;
    animation: emblemRotate 50s linear infinite;
}

.ring-inner {
    inset: 30px;
    border: 1px solid #d4af7033;
    border-top-color: var(--gold);
    border-bottom-color: var(--gold);
    animation: emblemRotate 30s linear infinite reverse;
}

@keyframes emblemRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes emblemGlow {
    0%, 100% {
        opacity: 0.25;
    }

    50% {
        opacity: 0.45;
    }
}

.primary {
    background: linear-gradient(
        135deg,
        #d93644,
        #861d30
    );
    color: #f1e9dd;
    border: 1px solid #d4af7066;
    box-shadow: 0 0 20px #d9364422;
}

.primary:hover {
    box-shadow: 0 0 30px #d9364455;
}

button:hover {
    border-color: var(--gold);
}

.project,
.terminal,
.interest,
.skillcard {
    background: linear-gradient(
        145deg,
        #1a151a,
        #100e12
    );
    border-color: #d4af7033;
    transition: border-color 0.3s,
        box-shadow 0.3s,
        transform 0.3s;
}

.project:hover,
.interest:hover,
.skillcard:hover {
    border-color: #d4af7088;
    box-shadow: 0 0 30px #d9364415;
}

.tag {
    color: var(--gold);
    border-color: #d4af7033;
    background: #d4af7008;
}

.eyebrow {
    color: var(--gold);
}

.terminal {
    border-color: #d4af7055;
    box-shadow: 0 0 40px #d9364412,
        inset 0 0 25px #d4af7005;
}

.terminal strong {
    color: var(--jade);
}

.soc-dashboard {
    background: linear-gradient(
        145deg,
        #191419,
        #0d0c10
    );
    border-color: #d4af7044;
    box-shadow: 0 0 30px #d9364410;
}

.soc-panel,
.soc-stat {
    background: #100e12;
    border-color: #d4af7026;
}

.soc-node {
    background: #19171a;
    border-color: #65d6ac66;
}

.soc-label,
.soc-status,
.soc-green {
    color: var(--jade);
}

.soc-pulse {
    background: var(--jade);
}

.soc-connection {
    background: linear-gradient(
        #65d6ac,
        #34534a,
        #65d6ac
    );
    background-size: 200% 200%;
}

.soc-alert-details,
.soc-feedback {
    background: #1b171c;
}

.soc-actions button,
#soc-pause {
    background: #21191f;
    border-color: #d4af7044;
}

#soc-investigate {
    color: var(--jade);
    border-color: #65d6ac66;
}

.soc-log:hover,
.soc-log.soc-selected {
    background: #d4af7012;
}

#detail.case-study-dialog {
    background: #161318;
    border-color: #d4af7055;
    color: var(--text);
    box-shadow: 0 0 60px #d936441a;
}

.case-study-dialog .eyebrow {
    color: var(--gold);
}

.case-study-dialog section {
    border-color: #d4af7026;
}

.case-study-dialog section h3 {
    color: var(--text);
}

.case-study-dialog .case-lead {
    color: var(--muted);
}

.case-flow span {
    background: #21191f;
    border-color: #d4af7055;
    color: var(--gold);
}

.case-flow b {
    color: var(--gold);
}

.case-result {
    background: #d4af700a;
    border-left-color: var(--gold);
}

.case-result strong {
    color: var(--gold);
}

.case-actions button {
    background: #21191f;
    border-color: #d4af7044;
}

.case-actions button:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: #d4af7010;
}

::selection {
    background: #861d30;
    color: #f1e9dd;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #09090d;
}

::-webkit-scrollbar-thumb {
    background: #62403c;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .hero-emblem {
        width: 240px;
        top: 20%;
        right: 0;
    }

    .emblem-symbol {
        font-size: 120px;
    }
}

@media (max-width: 600px) {
    .hero-emblem {
        width: 180px;
        opacity: 0.4;
    }

    .emblem-symbol {
        font-size: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .emblem-symbol,
    .emblem-ring {
        animation: none;
    }
}

.hero > div:not(.hero-emblem) {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.hero > .facts {
    grid-column: 1 / -1;
}

.hero-emblem {
    z-index: 2;
    top: 43%;
    right: 2%;
    width: min(290px, 30%);
    opacity: .48;
}

.emblem-symbol {
    font-size: clamp(75px, 13vw, 155px);
}

.terminal-body {
    position: relative;
    z-index: 3;
}

.terminal-body b, .terminal .green, .network {
    color: var(--jade);
}

.terminal {
    background: linear-gradient(145deg, #1a151a, #100e12);
}

.primary:hover {
    color: var(--text);
    background: #a51f32;
}

.brand {
    letter-spacing: 0;
}

@media (max-width: 760px) {
    .hero-emblem {
        top: 65%;
        right: 3%;
        width: 180px;
        opacity: .3;
    }

    .emblem-symbol {
        font-size: 90px;
    }
}

.brand span {
    font-family: "Microsoft YaHei", serif;
    font-size: 28px;
    font-weight: 600;
    color: #d4af70;
    letter-spacing: 0;
    text-shadow: 0 0 12px #d9364455;
}