:root {
    --bg: #1A1A1A;
    --panel: #252525;
    --muted: #B0B0B0;
    --accent1: #D72323;
    --accent2: #FFD700;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-2: rgba(255, 255, 255, 0.02);
    --white: #F0F0F0;
    --border: #4A4A4A;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color-scheme: dark;
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0
}

body {
    background: var(--bg);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.canvas {
    width: 100%;
    max-width: 1150px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 420px 1fr;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: auto;
    min-height: 620px;
}

.sheet {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid var(--border);
    position: relative
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background: var(--accent1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--white);
    font-size: 40px;
    box-shadow: 0 0 20px rgba(215, 35, 35, 0.4);
}

.player-header {
    display: flex;
    gap: 18px;
    align-items: center
}

.player-name {
    font-size: 20px;
    font-weight: 700
}

.player-role {
    color: var(--muted);
    font-size: 13px
}

.stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.stat {
    background: var(--bg);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    min-width: 120px;
}

.stat .title {
    font-size: 12px;
    color: var(--muted)
}

.stat .value {
    font-size: 16px;
    font-weight: 700
}

.expbar {
    height: 12px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border)
}

.expbar .fill {
    height: 100%;
    width: 72%;
    background: var(--accent1);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px
}

.skill-chip {
    padding: 8px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 13px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px
}

.menu button {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 12px;
    border-radius: 10px;
    color: var(--white);
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer
}

.menu button:hover,
.menu button[aria-pressed="true"] {
    background: rgba(215, 35, 35, 0.1);
    border-color: var(--accent1);
    color: var(--accent1);
}

.menu .kbd {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted)
}

.content {
    padding: 28px;
    position: relative
}

.content .panel {
    position: absolute;
    margin-top: 10rem;
    inset: 28px;
    border-radius: 10px;
    padding: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: auto
}

.home {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.home .title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent1)
}

.home .subtitle {
    color: var(--white)
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.card-small {
    background: var(--bg);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.card-small strong {
    color: var(--accent1)
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}

.project-card {
    padding: 12px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.project-card h4 {
    margin: 0 0 6px 0;
    color: var(--accent1)
}

.tags {
    font-size: 12px;
    color: var(--muted)
}

@media(max-width:980px) {
    body {
        padding: 0;
    }

    .canvas {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(320px, auto);
        height: auto;
        min-height: inherit;
        border-radius: 0;
    }

    .sheet {
        border-right: none;
        padding-bottom: 0;
        padding-top: 80px;
    }

    .content {
        padding: 20px 20px 100px 20px;
        height: 720px;
    }

    .content .panel {
        position: static;
        inset: auto;
        height: auto;
        margin-top: 0;
        margin-bottom: 60px;
        border-radius: 0;
        border: none;
        background: none;
        padding: 0;
        overflow: visible;
        box-shadow: none;
    }

    .project-card {
        font-size: 14px
    }

    .projects-grid {
        grid-template-columns: 1fr
    }

    .menu {
        display: none;
    }

    .sheet::after {
        content: '';
        display: block;
        height: 1px;
        background: var(--border);
        margin: 18px 0;
    }

    .footer-small {
        display: none;
    }
}

.muted {
    color: var(--muted)
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

.panel {
    opacity: 0;
    transform: translateY(8px);
    transition: all .36s cubic-bezier(.2, .9, .2, 1)
}

.panel.show {
    opacity: 1;
    transform: none
}

.footer-small {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 12px;
    color: var(--muted)
}

.bottom-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    backdrop-filter: blur(6px);
    z-index: 10;
    overflow-x: auto;
}

.bottom-nav button,
.bottom-nav a {
    flex-shrink: 0;
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.bottom-nav button:hover,
.bottom-nav a:hover,
.bottom-nav button[aria-pressed="true"] {
    background: rgba(215, 35, 35, 0.15);
    border-color: var(--accent1);
    color: var(--accent1);
}

@media (max-width: 980px) {
    .bottom-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        padding: 8px 10px;

        display: flex;
        flex-wrap: nowrap;
        gap: 6px;

        background: var(--panel);
        border-bottom: 1px solid var(--border);
        z-index: 999;

        overflow-x: hidden;
    }

    .bottom-nav button,
    .bottom-nav a {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        border-width: 1px;
        white-space: normal;
        text-align: center;
    }

    .content {
        padding-top: 80px;
    }
}

.content {
    padding-top: 35px;
    padding-bottom: 90px;
}

.mobile-fixed-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding: 10px 20px;
    z-index: 20;
    gap: 10px;
    justify-content: space-between;
}

.mobile-fixed-nav a {
    flex-grow: 1;
    text-align: center;
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--white);
    font-size: 13px;
    text-decoration: none;
}

.mobile-fixed-nav a:hover {
    background: rgba(215, 35, 35, 0.15);
    border-color: var(--accent1);
    color: var(--accent1);
}

@media (max-width: 980px) {
    .mobile-fixed-nav {
        display: flex;
    }
}

@media (max-width: 980px) {
    .sheet .cv-links {
        display: none !important;
    }
}

.cv-links .pill {
    background: var(--accent1);
    color: var(--white);
    border-color: var(--accent1);
    font-weight: 600;
}

h2,
h3,
h4 {
    color: var(--white);
}

.player-name {
    color: var(--white);
    text-shadow: 1px 1px 0px var(--accent1),
        -1px -1px 0px var(--accent1),
        1px -1px 0px var(--accent1),
        -1px 1px 0px var(--accent1);
    letter-spacing: 0.5px;
}

.speech-bubble {
    background: var(--panel);
    border: 1px solid var(--accent1);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 150px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--accent1) transparent transparent transparent;
}

.speech-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .pixel-companion {
        margin-bottom: 16px;
        transform: scale(0.8);
        transform-origin: bottom right;
    }
}

.pixel-companion {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.companion-sprite {
    position: absolute;
    left: 80%;
    bottom: 0;
    transform: translateX(-50%) scale(10);
    width: 40px;
    height: 40px;

    background-image: url('_Idle.png');
    background-repeat: no-repeat;
    background-size: contain;
    image-rendering: pixelated;
    cursor: pointer;

    pointer-events: none; 
}

@media (max-width: 980px) {
    .companion-sprite {
        left: 100%;
    }
}

.companion-hitbox {
    width: 45px; 
    height: 45px;
    position: relative;
    pointer-events: auto;
}

.speech-bubble {
    background: var(--bg);
    border: 2px solid var(--white);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 0px;
    font-size: 12px;
    font-weight: bold;
    font-family: monospace;
    margin-bottom: 44px;
    margin-right: 8px;
    opacity: 0;
    transform: skew(-10deg) translateY(10px);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 150px;
    text-align: center;
    position: relative;
    box-shadow: 4px 4px 0px var(--accent1);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--white) transparent transparent transparent;
}

.speech-bubble.show {
    opacity: 1;
    transform: skew(-10deg) translateY(0);
}

@media (max-width: 980px) {
    .pixel-companion {
        bottom: 85px;
        right: 0px;
        transform: scale(0.8); 
        transform-origin: bottom right;
    }
}

.cv-QR img {
    max-width: 140px; 
    width: 100%;    
    height: auto;   
    
    display: block; 
    margin-left: auto;
    margin-right: auto;
}

@media(max-width:980px){
  .content .panel{
      position: absolute;
      inset: 0;
      padding: 20px;         
      background: var(--bg);
      border: 1px solid var(--border);
      overflow-y: auto;
      pointer-events: none;
      visibility: hidden;
      opacity: 0;
      transform: translateY(8px);
  }

  .content .panel.show{
      pointer-events: auto;
      visibility: visible;
      opacity: 1;
      transform: none;
  }

  .content {
      padding-top: 90px;
      padding-bottom: 90px;
      position: relative;
  }
}

@media(max-width:980px){

  #bottomNav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 70px;
      z-index: 999;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
  }

  .content {
      position: relative;
      padding-top: 90px;
      padding-bottom: 20px;
  }

  .content .panel{
      position: absolute;
      inset: 0;
      padding: 20px;
      padding-top: 10px;
      background: var(--bg);
      border: 1px solid var(--border);
      overflow-y: auto;
      pointer-events: none;
      visibility: hidden;
      opacity: 0;
      transform: translateY(8px);
  }

  .content .panel.show{
      pointer-events: auto;
      visibility: visible;
      opacity: 1;
      transform: none;
  }
}
