:root { color-scheme: dark; --text: #f5f5f7; --muted: #a5a5af; --line: #ffffff30; }
* { box-sizing: border-box; }
html { background: #050505; }
body { min-width: 320px; min-height: 100svh; margin: 0; color: var(--text); font: 12px/1.5 Poppins, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #9693ff; outline-offset: 3px; }

.backdrop, .backdrop::after { position: fixed; inset: 0; }
.backdrop { z-index: 0; overflow: hidden; background: #08080c; }
.backdrop video { width: 100%; height: 100%; object-fit: cover; }
.backdrop::after { content: ""; background: linear-gradient(180deg, #0002 0%, #0005 38%, #000b 100%); }

.stack { position: relative; z-index: 1; width: min(420px, calc(100% - 28px)); margin: 90px auto 54px; display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 20px; background: #08080bba; box-shadow: 0 12px 34px #0005; backdrop-filter: blur(10px); }
.profile-card { position: relative; min-height: 465px; padding: 37px 32px 0; display: flex; align-items: center; flex-direction: column; background: linear-gradient(#ffffff26, #08080bb8 36%, #08080bd9); }
.sound-toggle { position: absolute; top: 15px; right: 16px; padding: 5px 9px; border: 1px solid #ffffff4d; border-radius: 6px; color: #fff; background: #08080b8c; font: 10px Poppins, sans-serif; cursor: pointer; }
.sound-toggle:hover { background: #ffffff26; }
.sound-toggle:focus-visible { outline: 2px solid #9693ff; outline-offset: 3px; }
.avatar-wrap, .discord-avatar-wrap { position: relative; display: inline-flex; flex: none; }
.avatar { width: 78px; height: 78px; border: 2px solid #ffffffb0; border-radius: 50%; object-fit: cover; box-shadow: 0 5px 14px #0008; }
.status-dot { position: absolute; right: 1px; bottom: 3px; width: 15px; height: 15px; border: 2px solid #141418; border-radius: 50%; background: #f33b55; }
h1 { margin: 16px 0 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.handle { margin: 5px 0 0; color: #c5c5ca9c; font-size: 11px; }
.skill-icons { width: 100%; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 34px); justify-content: center; gap: 7px; list-style: none; }
.skill-icons li { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #ffffff18; border-radius: 7px; background: #ffffff0b; }
.skill-icons img { width: 25px; height: 25px; object-fit: contain; }
.profile-actions { width: 100%; margin-top: 30px; display: grid; gap: 6px; }
.action { height: 37px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #7660bd91; border-radius: 8px; background: #09080db0; font-size: 12px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.action:hover { border-color: #b5a0ff; background: #5e4b9c42; }
.profile-foot { width: 100%; margin: auto 0 0; padding-bottom: 20px; color: #ddd; font-size: 10px; font-weight: 500; text-align: center; }

.discord-card { min-height: 90px; padding: 8px 10px 10px; }
.discord-preview { width: 100%; height: auto; display: block; }
.discord-link { height: 25px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 4px; background: #5865f2; font-size: 11px; font-weight: 700; transition: background-color .15s; }
.discord-link:hover { background: #7580ff; }

.github-card { min-height: 198px; padding: 14px 16px 12px; display: flex; flex-direction: column; }
.github-fallback { width: calc(100% - 16px); height: auto; margin: 18px auto 0; display: block; filter: invert(1); }
.github-live[hidden], .github-fallback[hidden] { display: none; }
.github-heading { display: flex; align-items: center; gap: 8px; }
.github-heading img { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; }
.github-heading h2 { margin: 0; font-size: 12px; font-weight: 700; }
.months { min-height: 14px; margin: 11px 11px 3px 20px; display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); color: #777981; font-size: 8px; }
.contribution-grid { height: 88px; margin-inline: 20px 11px; display: grid; grid-auto-flow: column; grid-template-columns: repeat(28, minmax(0, 1fr)); grid-template-rows: repeat(7, 10px); gap: 3px; }
.contribution-grid span { border-radius: 2px; background: #242629; }
.contribution-grid .level-1, .legend i:nth-of-type(2) { background: #0e4429; }
.contribution-grid .level-2, .legend i:nth-of-type(3) { background: #006d32; }
.contribution-grid .level-3, .legend i:nth-of-type(4) { background: #26a641; }
.contribution-grid .level-4, .legend i:nth-of-type(5) { background: #39d353; }
.github-footer { margin: auto 10px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #a0a0a7; font-size: 9px; white-space: nowrap; }
.contribution-grid.is-error { display: flex; align-items: center; justify-content: center; color: #a0a0a7; }
.github-stats { display: flex; gap: 8px; }
.github-stats strong { color: #dedee1; }
.legend { display: flex; align-items: center; gap: 3px; color: #777981; }
.legend i { width: 9px; height: 9px; border-radius: 2px; background: #242629; }

@media (max-width: 480px) {
  .stack { margin-top: 24px; }
  .profile-card { padding-inline: 23px; }
  .github-footer { font-size: 8px; }
  .github-stats { gap: 5px; }
}
@media (max-width: 380px) {
  .github-footer { flex-wrap: wrap; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .action, .discord-link { transition: none; }
}
