@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --bg: #0b0c10;
    --ink: #eff0ed;
    --muted: #8e9099;
    --line: #292b32;
    --accent: #b5f17b
}

* {
    box-sizing: border-box
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.65
}

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

button {
    font: inherit;
    cursor: pointer;
    color: inherit
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px
}

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

.skip:focus {
    top: 10px;
    left: 10px;
    padding: 10px;
    background: var(--bg);
    z-index: 100
}

header {
    height: 100px;
    margin: 0 5%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    gap: 50px
}

.brand {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -2px
}

.brand span {
    font-size: 14px;
    vertical-align: top;
    margin-left: 5px;
    letter-spacing: 0
}

nav {
    display: flex;
    gap: 30px;
    font-size: 14px
}

nav a {
    color: var(--muted);
    transition: color .2s
}

nav a:hover,
nav .active {
    color: var(--ink)
}

nav span {
    padding-left: 5px
}

.location {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
    font-family: monospace
}

.location span {
    padding-left: 16px;
    color: var(--ink)
}

main {
    max-width: 1450px;
    margin: auto;
    padding: 0 5%
}

.intro {
    padding: 74px 0 0
}

.eyebrow {
    font-size: 13px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted)
}

.line {
    height: 1px;
    width: 30px;
    background: var(--accent)
}

h1 {
    font-size: clamp(42px, 6vw, 88px);
    font-weight: 500;
    letter-spacing: -3px;
    line-height: 1.25;
    margin: 32px 0
}

.serif {
    font-family: Georgia, serif;
    color: var(--accent);
    font-weight: 400
}

.intro-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 10px 0 62px
}

.intro-bottom p {
    color: #b0b1b9;
    margin: 0;
    line-height: 1.9
}

.text-link {
    font-size: 14px;
    border-bottom: 1px solid #666;
    padding-bottom: 9px
}

.text-link span {
    margin-left: 45px;
    color: var(--accent)
}

.index-note {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    font: 12px monospace;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    letter-spacing: 1px
}

.work {
    padding: 50px 0 90px
}

.section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px
}

h2 {
    font-size: 26px;
    font-weight: 500;
    margin: 0
}

.section-top h2 span {
    color: var(--muted);
    font-size: 14px;
    margin-left: 10px;
    font-family: monospace
}

.filters {
    display: flex;
    gap: 6px
}

.filters button {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 7px 15px;
    border-radius: 30px;
    font-size: 14px
}

.filters button:hover {
    color: var(--ink)
}

.filters .selected {
    background: var(--ink);
    color: var(--bg)
}

.projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px 26px
}

.project[hidden] {
    display: none
}

.project-open {
    background: none;
    border: 0;
    text-align: left;
    padding: 0;
    width: 100%;
    display: block
}

.preview {
    height: 310px;
    overflow: hidden;
    border: 1px solid #ffffff12;
    border-radius: 8px;
    position: relative;
    transition: transform .35s, border-color .35s
}

.project:hover .preview {
    transform: translateY(-4px);
    border-color: #ffffff40
}

.orbit {
    background: #171d19;
    padding: 26px 25px
}

.mini-top {
    display: flex;
    align-items: center;
    font-size: 12px;
    gap: 35px;
    border-bottom: 1px solid #ffffff0c;
    padding-bottom: 14px
}

.mini-logo {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent)
}

.mini-dim {
    color: #7b847d
}

.avatar {
    margin-left: auto;
    border-radius: 50%;
    background: #3d4639;
    width: 22px;
    height: 22px;
    text-align: center;
    color: var(--accent);
    font-size: 12px
}

.orbit-body {
    display: flex;
    gap: 22px;
    padding-top: 19px
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 12px;
    color: #7f8981;
    width: 70px;
    flex-shrink: 0
}

.side-active {
    color: var(--accent)
}

.dashboard {
    flex: 1;
    min-width: 0
}

.dash-title {
    font-size: 14px;
    display: flex;
    justify-content: space-between
}

.dash-title span {
    font-size: 12px;
    color: #7f8981
}

.metrics {
    display: flex;
    justify-content: space-between;
    margin: 18px 0
}

.metrics small {
    display: block;
    font-size: 12px;
    color: #88958b
}

.metrics strong {
    font-size: 23px;
    display: block;
    line-height: 1.5
}

.metrics strong span {
    font-size: 12px;
    margin-left: 3px
}

.metrics em {
    font-style: normal;
    font-size: 12px;
    color: var(--accent)
}

.chart-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9ea99f
}

.chart-label span {
    color: #6f7d73
}

.chart {
    width: 100%;
    height: 72px;
    margin-top: 8px
}

.chart-days {
    display: flex;
    justify-content: space-between;
    font: 10px monospace;
    color: #66726a
}

.project-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 23px
}

.project-number {
    font: 12px monospace;
    color: var(--muted);
    letter-spacing: 1px
}

h3 {
    font-size: 26px;
    margin: 8px 0 7px;
    letter-spacing: -.5px;
    font-weight: 500
}

h3 span {
    font-size: 16px;
    margin-left: 10px;
    color: #b6b8bf
}

.project-info p {
    font-size: 14px;
    margin: 0;
    color: var(--muted)
}

.open-symbol {
    margin-top: 26px;
    border: 1px solid #41434b;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
    transition: .25s
}

.project:hover .open-symbol {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: rotate(90deg)
}

.tags {
    display: flex;
    gap: 8px;
    margin-top: 19px;
    align-items: center
}

.tags>span:not(.year) {
    padding: 3px 9px;
    border: 1px solid #2d2f36;
    border-radius: 4px;
    color: #a5a7ae;
    font-size: 12px
}

.year {
    margin-left: auto;
    font: 12px monospace;
    color: var(--muted)
}

.relay {
    background: #12121c;
    padding: 25px
}

.terminal-top {
    display: flex;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid #ffffff12;
    padding-bottom: 17px
}

.terminal-top i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4e4d61
}

.terminal-top span {
    margin-left: auto;
    font: 12px monospace;
    color: #7a7990
}

.terminal {
    font: clamp(10px, 1.1vw, 13px)/1.8 monospace;
    padding: 12px 0
}

.terminal p {
    margin: 9px 0;
    color: #c2c0d3
}

.terminal b {
    font-weight: 400;
    color: #b6a7f5
}

.green {
    color: var(--accent) !important
}

.muted {
    color: var(--muted) !important
}

.terminal-status {
    margin-top: 23px !important
}

.field {
    background: #101b22
}

.field canvas {
    width: 100%;
    height: 100%;
    display: block
}

.field-label {
    position: absolute;
    bottom: 20px;
    left: 24px;
    font: 12px monospace;
    letter-spacing: 2px;
    color: #a4c9d5;
    pointer-events: none
}

.field-label span {
    display: block;
    font: 12px 'DM Sans';
    letter-spacing: 0;
    margin-top: 6px;
    color: #7c959f
}

.index {
    background: #d6d4ca;
    color: #282d29;
    padding: 22px 30px
}

.index-nav {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 22px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #292d2924;
    padding-bottom: 9px
}

.index-nav span {
    font: 12px 'DM Sans';
    color: #686d65;
    padding-top: 8px
}

.index-content {
    padding: 17px 15px
}

.index-content>small {
    font: 10px monospace;
    letter-spacing: 2px;
    color: #6d7169
}

.index-content h4 {
    font-size: 29px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -1px;
    margin: 10px 0 17px
}

.index-content h4 em {
    font-style: normal;
    color: #5b7054
}

.bookmark {
    display: flex;
    align-items: center;
    gap: 13px;
    border-top: 1px solid #292d2924;
    padding: 8px 0;
    font: 12px 'DM Sans'
}

.bookmark>span {
    color: #7f8579
}

.bookmark>span:last-child {
    margin-left: auto
}

.bookmark small {
    display: block;
    font-size: 10px;
    color: #777c72;
    margin-top: 3px
}

.demo-note {
    font-size: 12px;
    color: #747680;
    margin: 30px 0 0
}

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    border-top: 1px solid var(--line);
    padding: 75px 0 90px
}

.about h2 {
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1.5;
    letter-spacing: -1px;
    margin-top: 24px
}

.about-copy>p {
    margin: 0 0 23px;
    color: #c3c4ca;
    line-height: 1.95
}

.skill-list {
    margin-top: 35px
}

.skill-list>div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    font-size: 14px
}

.skill-list p {
    margin: 0;
    color: var(--muted);
    text-align: right
}

.closing {
    padding: 65px 0 70px;
    border-top: 1px solid var(--line)
}

.closing h2 {
    font-size: clamp(27px, 4vw, 54px);
    margin: 20px 0 30px;
    letter-spacing: -1px
}

.closing>div {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.closing p {
    color: var(--muted);
    font-size: 14px;
    margin: 0
}

.github-link {
    background: var(--accent);
    color: #16200d;
    padding: 13px 24px;
    border-radius: 4px;
    font-size: 14px
}

.github-link span {
    margin-left: 24px
}

footer {
    margin: 0 5%;
    padding: 25px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
    color: var(--muted)
}

dialog {
    background: #14161d;
    color: var(--ink);
    border: 1px solid #41454e;
    border-radius: 12px;
    width: min(680px, calc(100% - 32px));
    padding: 30px;
    max-height: 85vh
}

dialog::backdrop {
    background: #03050bd9;
    backdrop-filter: blur(8px)
}

.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: 12px monospace;
    letter-spacing: 1px;
    color: var(--accent)
}

.dialog-head button {
    border: 1px solid #444;
    background: transparent;
    border-radius: 50%;
    height: 38px;
    width: 38px
}

dialog h2 {
    font-size: 36px;
    margin: 25px 0 15px
}

dialog>p {
    color: #b7bac5
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px
}

.detail-grid h3 {
    font-size: 16px
}

.detail-grid p {
    font-size: 14px;
    color: var(--muted)
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px
}

.detail-tags span {
    font-size: 12px;
    padding: 5px 10px;
    background: #242831;
    border-radius: 4px
}

.dialog-foot {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 18px;
    font-size: 12px;
    color: var(--muted)
}

@media(min-width:1450px) {

    header,
    footer {
        max-width: 1305px;
        margin: auto
    }
}

@media(max-width:900px) {
    header {
        gap: 30px
    }

    .location {
        display: none
    }

    .preview {
        height: 265px
    }

    .orbit {
        padding: 18px 14px
    }

    .sidebar {
        display: none
    }

    .terminal {
        font-size: 11px
    }

    .about {
        gap: 35px
    }

    .skill-list>div {
        display: block
    }

    .skill-list p {
        text-align: left;
        margin-top: 5px
    }

    .index {
        padding: 18px
    }

    .index-content {
        padding: 12px 5px
    }

    .index-content h4 {
        font-size: 27px
    }
}

@media(max-width:620px) {
    header {
        height: 80px;
        justify-content: space-between;
        gap: 16px
    }

    .brand {
        font-size: 26px
    }

    nav {
        gap: 20px
    }

    .intro {
        padding-top: 45px
    }

    h1 {
        letter-spacing: -2px;
        margin-top: 26px
    }

    .intro-bottom {
        align-items: start;
        gap: 20px;
        padding-bottom: 40px
    }

    .intro-bottom p {
        font-size: 14px
    }

    .text-link {
        white-space: nowrap;
        margin-top: 5px
    }

    .text-link span {
        margin-left: 10px
    }

    .index-note {
        font-size: 10px
    }

    .work {
        padding: 25px 0 60px
    }

    .section-top {
        align-items: start;
        flex-direction: column;
        gap: 20px
    }

    .section-top h2 {
        font-size: 23px
    }

    .filters {
        width: 100%;
        justify-content: space-between
    }

    .filters button {
        padding: 6px 12px;
        font-size: 13px
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 36px
    }

    .preview {
        height: 290px
    }

    .orbit {
        padding: 23px 20px
    }

    .terminal {
        font-size: 12px
    }

    .about {
        grid-template-columns: 1fr;
        padding: 45px 0;
        gap: 28px
    }

    .about h2 {
        margin-top: 15px
    }

    .skill-list>div {
        display: flex
    }

    .skill-list p {
        margin: 0;
        text-align: right
    }

    .closing {
        padding: 40px 0
    }

    .closing>div {
        align-items: start;
        gap: 20px
    }

    .github-link {
        padding: 10px 15px;
        white-space: nowrap
    }

    .github-link span {
        margin-left: 10px
    }

    footer {
        flex-wrap: wrap
    }

    footer>span:nth-child(2) {
        display: none
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px
    }

    dialog {
        padding: 23px
    }

    dialog h2 {
        font-size: 29px
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important
    }
}

.field canvas {
    display: block;
    width: 100%;
    height: 100%
}

/* English typography adjustments */
h1 {
    font-size: clamp(42px, 5.8vw, 84px)
}

.sidebar {
    width: 88px
}

.project-info p {
    max-width: 95%
}

.about h2 {
    font-size: clamp(30px, 3.2vw, 46px)
}

.field-label span {
    font-size: 12px
}

@media(max-width:620px) {
    .intro-bottom {
        flex-wrap: wrap
    }

    .intro-bottom p {
        font-size: 14px
    }

    h3 span {
        display: block;
        margin: 0;
        font-size: 15px
    }

    .closing>div {
        flex-wrap: wrap
    }

    .closing h2 {
        font-size: 32px
    }

    .skill-list>div {
        flex-wrap: wrap
    }
}