@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
}

body {
    max-width: 800px;
    padding: 10px;
    margin: 0 auto;
    font-family: 'Press Start 2P', monospace;
    image-rendering: pixelated;
    padding-top: 30px;
    background: #fff;
    color: #111;
    min-height: 100vh;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes marquee {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

@keyframes marqueeskill {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-150%); }
}

@keyframes rainbowMove {
    0%   { background-position: 0%; }
    100% { background-position: 400%; }
}

@keyframes invert-flash {
    0%, 100% { filter: none; }
    50% { filter: invert(1); }
}

.header {
    border-style: solid;
    border-width: 8px;
    border-color: #111;
    text-align: center;
    transition: all 0.3s ease;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header:hover {
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowMove 3s linear infinite;
}

.logo {
    font-size: clamp(12px, 1.8vw, 20px);
    letter-spacing: 2px;
}

.cursor {
    display: inline-block;
    width: 12px;
    height: 18px;
    background: #111;
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
    margin-left: 4px;
}

.status {
    font-size: 7px;
    color: #999;
    text-align: right;
    line-height: 2.2;
}

nav {
    display: flex;
    gap: 0;
    border-left: 8px solid #111;
    border-right: 8px solid #111;
    border-bottom: 4px solid #111;
}

nav a {
    color: #999;
    text-decoration: none;
    font-size: 8px;
    padding: 12px 16px;
    border-right: 1px solid #ddd;
    transition: all 0.1s steps(1);
}

nav a:last-child { border-right: none; }

nav a:hover,
nav a.active {
    background: #111;
    color: #fff;
}

.ticker {
    overflow: hidden;
    background: #111;
    color: #fff;
    padding: 7px 0;
    font-size: 7px;
    white-space: nowrap;
    margin-bottom: 48px;
}

.ticker-inner {
    display: inline-block;
    animation: marquee 22s linear infinite;
}

#skills {
    animation: marqueeskill 22s linear infinite;
}

main {
    padding: 0 4px;
}

.hero {
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 10px;
    color: #bbb;
    margin-bottom: 20px;
}

.hero p {
    font-size: 9px;
    color: #555;
    line-height: 2.6;
}

.hero p span {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.main-row {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
}

.pc-gif {
    image-rendering: pixelated;
    transform: scale(0.4);
}

.page-title {
    font-size: 10px;
    color: #bbb;
    margin-bottom: 32px;
}

.back {
    display: inline-block;
    font-size: 8px;
    color: #bbb;
    text-decoration: none;
    margin-bottom: 32px;
    padding: 8px 12px;
    border: 2px solid #eee;
    transition: all 0.1s steps(1);
}

.back:hover {
    border-color: #111;
    color: #111;
}

.library-stats {
    display: flex;
    gap: 24px;
    font-size: 7px;
    color: #999;
    margin-bottom: 24px;
    padding: 10px 14px;
    border: 2px solid #eee;
    width: fit-content;
}

.library {
    display: flex;
    flex-direction: column;
    border: 4px solid #111;
    width: 100%;
    max-width: 640px;
    margin-bottom: 48px;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 2px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: all 0.1s steps(1);
}

.game-card:last-child { border-bottom: none; }

.game-card:hover {
    background: #111;
    color: #fff;
}

.game-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #fff;
    letter-spacing: 0;
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-title {
    font-size: 8px;
}

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

.game-tags span {
    font-size: 6px;
    color: #aaa;
    border: 1px solid #ddd;
    padding: 2px 5px;
}

.game-card:hover .game-tags span {
    color: #ccc;
    border-color: #444;
}

.game-bar {
    height: 4px;
    background: #eee;
    width: 100%;
    max-width: 200px;
}

.game-card:hover .game-bar {
    background: #333;
}

.game-bar-fill {
    height: 100%;
    background: #111;
}

.game-card:hover .game-bar-fill {
    background: #fff;
}

.game-status {
    font-size: 6px;
    padding: 4px 8px;
    border: 2px solid #eee;
    color: #aaa;
    white-space: nowrap;
    flex-shrink: 0;
}

.game-status.playing {
    border-color: #111;
    color: #111;
}

.game-card:hover .game-status {
    border-color: #fff;
    color: #fff;
}

.entries {
    display: flex;
    flex-direction: column;
    border: 4px solid #111;
    width: 100%;
    max-width: 640px;
    margin-bottom: 48px;
}

.entry {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 2px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: all 0.1s steps(1);
}

.entry:last-child { border-bottom: none; }

.entry:hover {
    background: #111;
    color: #fff;
}

.entry-meta {
    font-size: 7px;
    color: #bbb;
    display: flex;
    gap: 16px;
}

.entry:hover .entry-meta { color: #aaa; }

.entry-title { font-size: 9px; }

.entry-desc {
    font-size: 7px;
    color: #888;
    line-height: 2;
}

.entry:hover .entry-desc { color: #ccc; }

.links-section { margin-bottom: 48px; }

.links-section h2 {
    font-size: 8px;
    color: #bbb;
    margin-bottom: 16px;
}

.links-list {
    display: flex;
    flex-direction: column;
    border: 4px solid #111;
    width: fit-content;
    min-width: 300px;
}

.links-list a {
    font-size: 8px;
    padding: 10px 16px;
    text-decoration: none;
    color: #555;
    border-bottom: 1px solid #eee;
    transition: all 0.1s steps(1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-list a:last-child { border-bottom: none; }

.links-list a::before {
    content: '>';
    color: #bbb;
}

.links-list a:hover {
    background: #111;
    color: #fff;
    padding-left: 24px;
}

.links-list a:hover::before { color: #fff; }

footer {
    padding: 16px 4px;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 7px;
    color: #ccc;
    margin-top: 20px;
}

.mini-ticker-img {
    width: 10%;
}

.img-ticker {
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 16px;
}

.spin {
  animation: rotate 4s linear infinite;
}

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

#linux {
    gap: 80px;
}

.spin:hover {
    animation: rotate 1s linear infinite;
}.projects {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 640px;
    margin-bottom: 48px;
}

.project {
    border: 4px solid #111;
    margin-bottom: -4px;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.1s steps(1);
    user-select: none;
}

.project-header:hover,
.project.open .project-header {
    background: #111;
    color: #fff;
}

.project-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-meta {
    font-size: 7px;
    color: #bbb;
    display: flex;
    gap: 14px;
    align-items: center;
}

.project.open .project-meta,
.project-header:hover .project-meta { color: #aaa; }

.project-tag {
    font-size: 6px;
    color: #aaa;
    border: 1px solid #ddd;
    padding: 2px 5px;
}

.project.open .project-tag,
.project-header:hover .project-tag {
    color: #ccc;
    border-color: #444;
}

.project-name { font-size: 9px; }

.project-toggle {
    font-size: 8px;
    color: #bbb;
}

.project.open .project-toggle,
.project-header:hover .project-toggle { color: #fff; }

.project-body {
    display: none;
    border-top: 4px solid #111;
}

.project.open .project-body { display: flex; }

.project-detail {
    flex: 1;
    padding: 24px 20px;
    border-right: 4px solid #111;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.tl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.tl-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 14px;
    flex-shrink: 0;
}

.tl-dot {
    width: 10px;
    height: 10px;
    border: 2px solid #ccc;
    background: #fff;
    flex-shrink: 0;
}

.tl-dot.done {
    background: #111;
    border-color: #111;
}

.tl-dot.active {
    background: #4cff72;
    border-color: #111;
    width: 14px;
    height: 14px;
}

.tl-seg {
    width: 2px;
    height: 22px;
    background: #ddd;
}

.tl-seg.done { background: #111; }
.tl-seg.half {
    background: linear-gradient(to bottom, #111 50%, #ddd 50%);
}

.tl-label {
    font-size: 7px;
    color: #888;
    line-height: 1.8;
}

.tl-label.active {
    color: #111;
    font-size: 8px;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.p-title { font-size: 11px; }

.p-desc {
    font-size: 7px;
    color: #666;
    line-height: 2.4;
}

.p-github {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 7px;
    text-decoration: none;
    color: #fff;
    background: #111;
    padding: 8px 12px;
    border: 2px solid #111;
    width: fit-content;
    transition: all 0.1s steps(1);
}

.p-github:hover {
    background: #fff;
    color: #111;
}

.project-commentary {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.commentary-head {
    padding: 14px 14px 10px;
    border-bottom: 2px solid #eee;
}

.commentary-head .c-title {
    font-size: 8px;
    color: #111;
    margin-bottom: 4px;
}

.commentary-head .c-sub {
    font-size: 6px;
    color: #bbb;
}

.commentary-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 260px;
}

.c-entry {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #f7f7f7;
    transition: all 0.1s steps(1);
}

.c-entry:last-child { border-bottom: none; }

.c-entry:hover { background: #efefef; }

.c-time {
    font-size: 6px;
    color: #bbb;
}

.c-text {
    font-size: 7px;
    color: #444;
    line-height: 1.8;
}

@media (max-width: 520px) {
    .project-commentary { display: none; }
    .project-detail { border-right: none; }
}

.music-player {
    margin-bottom: 35px;
}