@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Special+Gothic+Expanded+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Word Carousel Animation */
.word-carousel {
    display: inline-block;
    color: var(--highlight-color);
    font-weight: 700;
    position: relative;
    overflow: hidden;
    height: 1.5em;
    vertical-align: middle;
    /* Changed to middle for better alignment with text */
    min-width: 180px;
    /* Width for longer words like 'AI Systems' */
    text-align: left;
    margin-left: 8px;
    /* Space after 'designing' */
    cursor: pointer;
    /* Indicate it's clickable */
    line-height: 1.5;
    /* Match line height with parent */
    /* Removed underline styling */
}

.word-carousel span {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 1.5em;
    /* Match parent height */
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes slide-up {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    8% {
        transform: translateY(0);
        opacity: 1;
    }

    80% {
        transform: translateY(0);
        opacity: 1;
    }

    95% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Ensure h3 has proper line height and alignment */
#index h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.5;
}

:root {
    --background-color: #130b22;
    --text-color: #ffffff;
    --secondary-text-color: #a79abb;
    --highlight-color: #ffd454;
    --heading-font: 'Special Gothic Expanded One', serif;
    --body-font: 'Lato', sans-serif;
    --accent-color: #ffd454;
    --accent-color-hover: #ffe079;
    --accent-colors: #ffd454, #49e5d5, #ff8b8b, #8fe388;
    --accent-colors-hover: #ffe079, #74f7e8, #ffabab, #adf0aa;
    --surface-1: rgba(255, 255, 255, 0.07);
    --surface-2: rgba(255, 255, 255, 0.11);
    --edge-subtle: rgba(255, 255, 255, 0.14);
    --ambient-glow: rgba(255, 212, 84, 0.14);

    /* Grid variables */
    --grid-margin: 100px;
    --grid-gutter: 52px;
    --grid-columns: 5;

    /* Alignment variables */
    --vertical-alignment: 150px;
    --project-vertical-alignment: 80px;
    --about-actions-gap: 1rem;
    --scroll-offset: 100px;
}

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

body {
    font-family: var(--body-font);
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(255, 212, 84, 0.16), transparent 55%),
        radial-gradient(700px 400px at 90% 0%, rgba(73, 229, 213, 0.12), transparent 58%),
        linear-gradient(145deg, #12091f 0%, #171029 45%, #0f071d 100%);
    background-color: var(--background-color);
    color: var(--text-color);
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.28;
}

/* Typography */
h1,
h2,
.large-text {
    font-family: var(--heading-font);
    font-weight: 500;
    letter-spacing: 0.02em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    font-family: var(--body-font);
}

.large-text {
    font-size: 2.2rem;
    line-height: 1.3;
}

p,
a,
li,
span {
    font-family: var(--body-font);
}

/* Grid Overlay for Development */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.1;
    display: none;
    /* Set to flex to see the grid */
}

.grid-container {
    display: flex;
    width: calc(100% - (var(--grid-margin) * 2));
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    gap: var(--grid-gutter);
}

.grid-column {
    flex: 1;
    background-color: rgba(255, 0, 0, 0.5);
    height: 100%;
}

/* Main Layout */
.container {
    display: flex;
    min-height: 100vh;
    width: 80%;
    /* Reduced from 100% minus margins to a fixed percentage */
    max-width: 1200px;
    /* Adjusted max-width for better centering */
    margin: 0 auto;
    /* This centers the container horizontally */
    position: relative;
    justify-content: center;
    /* Center children horizontally */
    align-items: flex-start;
    /* Center children vertically */
    gap: 4rem;
    /* Add spacing between sidebar and content */
    overflow: visible;
    /* Ensure sticky works */
}

/* Ensure no parent clips the sticky header */
html,
body,
.main-content {
    overflow: visible;
}

/* Sidebar Styles */
.sidebar {
    width: 200px;
    /* Reduced from 250px */
    padding: 1.5rem;
    /* Reduced from 2rem */
    padding-top: var(--vertical-alignment);
    position: -webkit-sticky;
    position: sticky;
    /* Adjusted position closer to center */
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: right;
    /* Right-align text content */
}

/* Navigation Styles */
.navigation {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex-grow: 1;
    justify-content: flex-start;
    /* Change from space-between to flex-start */
    align-items: flex-end;
    /* Right-align navigation items */
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
    /* Right-align items in nav sections */
}

/* Contact section - horizontal alignment */
.nav-section.contact-section {
    flex-direction: row;
    /* Make icons align horizontally */
    justify-content: flex-end;
    /* Right-align the icons */
    gap: 1rem;
    margin-top: 2rem;
    /* Add space between nav buttons and contact icons */
    margin-bottom: auto;
    /* Push away from bottom */
}

/* Profile section - right align */
.profile {
    text-align: right;
    /* Override the center alignment */
    margin-bottom: 2rem;
    margin-top: 0;
}

.profile-squares {
    margin: 0 auto 2rem;
}

/* Navigation items - right align */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
    /* Align items to the right */
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Right-align content within nav items */
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.nav-item i {
    margin-right: 0;
    /* Remove right margin */
    margin-left: 0.8rem;
    /* Add left margin instead */
    width: 20px;
    text-align: center;
    order: 2;
    /* Move icon to the right of text */
}

/* Contact section - right align */
.contact-section {
    display: flex;
    gap: 1rem;
    margin-top: 100;
    justify-content: flex-end;
    /* Align icons to the right */
}

/* Main Content Styles */
/* Main Content Styles - Consolidate with later definition */

/* Responsive Styles - adjust as needed */
@media screen and (max-width: 1200px) {
    .container {
        width: 80%;
    }

    .sidebar {
        left: 70px;
        /* Fixed position on medium screens */
    }

    .main-content {
        margin-left: 230px;
        /* Adjust based on new sidebar width + padding */
    }
}

@media screen and (max-width: 800px) {
    .container {
        width: 100%;
    }

    .sidebar {
        transform: translateX(-100%);
        /* Hide off-screen when inactive */
        margin-left: 0;
        left: 0;
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem var(--grid-margin);
        border-left: none;
    }
}

.profile {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0;
    /* Use the variable for top margin */
}

/* Index section adjustment */
#index {
    padding-top: var(--vertical-alignment);
}

#main-content-area.project-view {
    padding-top: var(--project-vertical-alignment);
}

#main-content-area.about-view {
    padding-top: var(--vertical-alignment);
}

.profile-squares {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.profile-square {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.square-bottom {
    background-color: var(--highlight-color);
    transform: rotate(-15deg);
}

.square-top {
    background-color: #fff5e6;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(0deg);
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-family: var(--heading-font);
}

.progress-bar {
    background-color: #2a2a2a;
    height: 4px;
    border-radius: 2px;
    margin: 3rem 0;
    position: relative;
}

.progress {
    background-color: var(--highlight-color);
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lvl-label-bottom {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.5rem;
    font-family: 'Press Start 2P', cursive;
    color: var(--highlight-color);
    opacity: 0.6;
    text-transform: uppercase;
}

.lvl-label-bottom.level-up {
    animation: level-up-glow 0.5s ease-out;
}

@keyframes level-up-glow {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.5);
        filter: brightness(2);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.profile-squares.clicking {
    transform: scale(0.95);
}

.floating-xp {
    position: fixed;
    pointer-events: none;
    color: var(--highlight-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 9999;
    animation: float-up-fade 1s forwards cubic-bezier(0, 1, 0.5, 1);
}

@keyframes float-up-fade {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

.floating-punch {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    font-size: 2rem;
    animation: punch-pop 0.6s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%);
}

@keyframes punch-pop {
    0% {
        transform: translate(-50%, -50%) scaleX(var(--punch-scale-x, 1)) scale(0.5) rotate(calc(var(--punch-angle, 0deg) - 10deg));
        opacity: 0;
    }

    30% {
        transform: translate(-50%, -100%) scaleX(var(--punch-scale-x, 1)) scale(1.5) rotate(var(--punch-angle, 0deg));
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scaleX(var(--punch-scale-x, 1)) scale(1.2) rotate(calc(var(--punch-angle, 0deg) + 10deg));
        opacity: 0;
    }
}

/* Meltdown Effect */
.profile-squares.meltdown {
    animation: meltdown-shake 0.1s infinite;
    filter: drop-shadow(0 0 10px #ff4444) saturate(2);
}

.profile-squares.overheated {
    filter: grayscale(1) brightness(0.5);
    pointer-events: none;
    transition: filter 0.5s ease;
}

@keyframes meltdown-shake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2px, -2px) rotate(1deg);
    }

    50% {
        transform: translate(-2px, 2px) rotate(-1deg);
    }

    75% {
        transform: translate(2px, 2px) rotate(1deg);
    }

    100% {
        transform: translate(-2px, -2px) rotate(-1deg);
    }
}

.overheat-smoke {
    position: absolute;
    font-size: 2rem;
    animation: smoke-rise 2s forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes smoke-rise {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -70%) scale(1.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(2.5);
        opacity: 0;
    }
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: rgba(15, 15, 15, 0.95);
    border: 2px solid var(--highlight-color);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 10002;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    min-width: 250px;
}

.achievement-toast.show {
    bottom: 20px;
}

.ach-icon {
    font-size: 1.8rem;
}

.ach-title {
    font-size: 0.4rem;
    color: var(--highlight-color);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.ach-name {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.jiggle {
    animation: jiggle 0.5s ease-in-out;
}

@keyframes jiggle {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.98) rotate(-1deg);
    }

    50% {
        transform: scale(1.02) rotate(1deg);
    }

    75% {
        transform: scale(0.99) rotate(-0.5deg);
    }
}

/* Golden Drop Easter Egg */
.golden-coin {
    position: fixed;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10005;
    user-select: none;
    filter: drop-shadow(0 0 10px #ffd700);
    animation: coin-float 3s ease-in-out forwards, coin-pulse 1s infinite alternate;
}

@keyframes coin-float {
    0% {
        transform: translate(-50%, -50%) translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) translateY(-100px);
        opacity: 0;
    }
}

@keyframes coin-pulse {
    from {
        filter: drop-shadow(0 0 10px #ffd700) scale(1);
    }

    to {
        filter: drop-shadow(0 0 20px #ffea00) scale(1.1);
    }
}

.jackpot-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 215, 0, 0.2);
    pointer-events: none;
    z-index: 10006;
    animation: flash-out 0.5s forwards;
}

@keyframes flash-out {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.hidden-clue {
    display: block;
    font-size: 0.6rem;
    color: var(--text-color);
    opacity: 0.15;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
    transition: opacity 0.3s ease;
}

.hidden-clue:hover {
    opacity: 0.6;
}

.dev-mode .profile-square.square-top {
    border: 4px solid var(--highlight-color);
    box-shadow: 0 0 15px var(--highlight-color);
}

/* Navigation Styles */
.navigation {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex-grow: 1;
    justify-content: space-between;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: center;
}

.secret-hint {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: var(--highlight-color);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    cursor: default;
    user-select: none;
}

.secret-hint:hover {
    opacity: 0.3;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background-color 0.3s, border-color 0.3s;
    font-size: 1rem;
    font-weight: 700;
}

.nav-item:hover {
    background-color: var(--surface-1);
    border-color: var(--edge-subtle);
}

.nav-item.active {
    background-color: var(--highlight-color);
    color: #000;
}

.nav-item i {
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

.contact-section {
    display: flex;
    gap: 1rem;
    margin-top: 100;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: var(--surface-1);
    border: 1px solid var(--edge-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-icon:hover {
    background-color: var(--highlight-color);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 0 0 5px var(--ambient-glow);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 0;
    width: auto;
}

/* Section Styles */
.section {
    margin-bottom: 4rem;
    scroll-margin-top: var(--scroll-offset);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    font-family: var(--body-font);
    padding-left: 0.85rem;
}

.section-title::after {
    display: none;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--highlight-color);
}

.section-subtitle {
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gutter);
}

.project-card {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--edge-subtle);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 212, 84, 0.1);
}

.project-thumbnail {
    width: 100%;
    height: 200px;
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.project-logo {
    width: 60px;
    height: 60px;
    background-color: rgba(20, 10, 35, 0.85);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-text {
    flex: 1;
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 700;
    font-family: var(--body-font);
}

.project-excerpt {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Highlight Box */
.highlight-box {
    background-color: var(--highlight-color);
    color: #000;
    padding: 0.2rem 0.5rem;
    display: inline-block;
    font-family: inherit;
    /* This will inherit the font from the parent element */
    border-radius: 8px;
}

/* Love Text */
.love {
    color: var(--accent-color);
}

/* Menu Button for Mobile */
.menu-button {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--highlight-color);
    border: none;
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.audio-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--edge-subtle);
    border-radius: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.audio-toggle:hover {
    transform: translateY(-2px);
    background-color: var(--surface-2);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Responsive Styles */
@media screen and (max-width: 1200px) {
    :root {
        --grid-margin: 50px;
        --grid-gutter: 30px;
    }

    .container {
        width: 90%;
        /* Give more space on tablets */
    }

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

@media screen and (max-width: 768px) {
    :root {
        --grid-margin: 20px;
    }

    .menu-button {
        display: block;
    }

    .sidebar {
        position: fixed;
        /* Go back to fixed for mobile drawer */
        transform: translateX(-100%);
        left: 0;
        width: 280px;
        background-color: var(--background-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem var(--grid-margin);
    }

    .overlay.active {
        display: block;
    }
}

/* General link styling */
a {
    color: #ffd54f;
    /* Change this to your desired color */
    text-decoration: none;
    /* Removes underline */
    ;
}

/* Link styles for different states */
a:link {
    color: #ffd54f;
    /* Color for unvisited links */
}

a:visited {
    color: #ffd54f;
    /* Color for visited links */
}

a:hover {
    color: #ffd54f;
    /* Color when mouse hovers over the link */
    text-decoration: none;
    /* Adds underline on hover */
}

a:active {
    color: #ffd54f;
    /* Color when the link is clicked */
}

/* Project Detail Styles */
.project-header {
    display: flex;
    align-items: center;
    padding-bottom: 2rem;
    padding-bottom: 2rem;
    padding-top: 1rem;
    position: relative;
    /* Sticky removed */
}

.project-logo-large {
    width: 100px;
    height: 100px;
    background-color: #333;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.project-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title-container h1 {
    margin-bottom: 0.5rem;
}

.header-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-tag {
    background-color: var(--highlight-color);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-gallery img:hover {
    transform: scale(1.02);
}

.project-content {
    margin-bottom: 2rem;
}

.project-description {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.project-description p {
    margin-bottom: 1rem;
}

.project-description ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Back button styles removed as requested */

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--highlight-color);
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #e6c046;
    transform: translateY(-2px);
}

/* Store Buttons */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.store-button i {
    font-size: 1.15rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.store-button-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.store-button-kicker {
    font-size: 0.62rem;
    opacity: 0.74;
    letter-spacing: 0.02em;
}

.store-button-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.store-button:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.14);
}

.project-links .store-button:nth-child(odd):hover i {
    transform: translate(-2px, -2px) rotate(-2deg);
}

.project-links .store-button:nth-child(even):hover i {
    transform: translate(2px, -2px) rotate(2deg);
}

.store-button-appstore i {
    color: #d9d9d9;
}

.store-button-googleplay i {
    color: #93f58f;
}

.store-button-itchio i {
    color: #ff6b6b;
}

/* Project Detail 2-Column Layout */
.project-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Role Tags */
.role-tags-container {
    margin-bottom: 2rem;
}

.role-label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
    opacity: 0.8;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-tag {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--highlight-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* About Page Redesign */
.about-content-single {
    max-width: 800px;
}

.about-section {
    margin-bottom: 3.5rem;
}

.about-header-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--highlight-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.about-skill-tag {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-hud.inactive {
    opacity: 0.1;
}

/* Top Right HUD Cluster */
.game-hud-cluster {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    pointer-events: none;
}

.game-hud-cluster>* {
    pointer-events: auto;
}

/* HUD Scoreboard (Top Right) */
.stats-hud {
    position: static;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--edge-subtle);
    padding: 0.55rem 0.65rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
    transition: opacity 0.5s ease;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 88px;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.16);
}

.hud-label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.62);
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.42);
}

.hud-value {
    font-size: 1rem;
    color: var(--highlight-color);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

@media screen and (max-width: 768px) {
    .game-hud-cluster {
        top: 0.8rem;
        right: 0.8rem;
        gap: 0.45rem;
    }

    .audio-toggle {
        width: 36px;
        height: 36px;
    }

    .stats-hud {
        padding: 0.45rem;
        gap: 0.4rem;
    }

    .hud-item {
        min-width: 80px;
    }

    .hud-value {
        font-size: 0.9rem;
    }
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    border-left: 2px solid rgba(255, 215, 0, 0.2);
    padding-left: 1.5rem;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.work-duration {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.role-title {
    font-size: 1rem;
    color: var(--highlight-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.experience-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-details li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.experience-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--highlight-color);
}

.education-item {
    padding-left: 1.5rem;
    border-left: 2px solid rgba(255, 215, 0, 0.2);
}

.about-actions-row {
    display: flex;
    align-items: center;
    gap: var(--about-actions-gap);
    margin-top: 2rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.about-action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 40px;
    padding: 0 0.9rem;
    background-color: var(--highlight-color);
    color: #1e1033 !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.about-action-button i {
    font-size: 0.95rem;
    color: #1e1033;
}

.about-action-button:hover {
    transform: translateY(-3px);
}

.project-text-column {
    /* Sticky text so it stays while scrolling long galleries */
    position: sticky;
    top: 2rem;
}

.project-media-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Enable grid layout when requested (for >2 images) */
.project-media-column.use-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    /* Prevent stretching */
}

/* Ensure video always spans full width in grid mode */
.project-media-column.use-grid .media-item.video-item {
    grid-column: 1 / -1;
}

.media-item {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.media-item:hover {
    transform: scale(1.02);
}

.media-item img {
    width: 100%;
    height: auto;
    display: block;
}

.media-item iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    pointer-events: none;
    /* Disable interaction in preview to allow click-to-modal */
    border: none;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 40000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: transparent;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.lightbox-content iframe {
    width: 80vw;
    height: 45vw;
    /* 16:9 ratio approximately */
    max-width: 1200px;
    max-height: 80vh;
    display: block;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 40002;
    transition: transform 0.2s;
    display: grid;
    place-items: center;
    line-height: 1;
    width: 52px;
    height: 52px;
    font-size: 2.4rem;
    padding: 0;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: var(--highlight-color);
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
    font-family: var(--body-font);
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.lightbox-content:hover .lightbox-caption {
    transform: translateY(0);
}

/* Also show caption continuously on mobile/touch? pure hover is fine for now */
.lightbox-modal.active .lightbox-caption {
    /* We can force it visible or rely on hover. Let's make it always visible if present for better UX */
    transform: translateY(0);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.7rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 40002;
    user-select: none;
    border: none;
    line-height: 1;
    padding: 0;
}

.lightbox-nav:hover {
    background-color: var(--highlight-color);
    color: black;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Media Queries for New Layout */
@media screen and (max-width: 900px) {
    .project-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-text-column {
        position: static;
        order: 2;
        /* Text below images on mobile */
    }

    .project-media-column {
        order: 1;
        /* Images on top on mobile */
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .project-logo-large {
        margin-right: 0;
    }
}

/* More on Itch.io Button Refinement */
.section-footer {
    display: flex;
    justify-content: flex-start;
    /* Left aligned */
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.itch-more-button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    /* Smaller size */
    background-color: var(--highlight-color);
    color: #1e1033 !important;
    /* Forced dark purple text for contrast */
    border-radius: 12px;
    /* Match project card/media corners */
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    /* Smaller font */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.itch-more-button:hover {
    transform: translateY(-3px);
}

.itch-more-button:active {
    transform: translateY(-1px);
}

/* Playful Interaction Polish */
.project-card,
.nav-item,
.contact-icon,
.store-button,
.media-item,
.itch-more-button,
.audio-toggle,
.menu-button {
    will-change: transform;
}

.project-card:active,
.media-item:active {
    transform: translateY(-2px) scale(0.99);
}

.nav-item:active,
.contact-icon:active,
.store-button:active,
.itch-more-button:active,
.audio-toggle:active,
.menu-button:active {
    transform: translateY(0) scale(0.97);
}

.project-logo {
    transition: transform 0.3s ease;
}

.project-card:hover .project-logo {
    transform: rotate(-4deg) scale(1.04);
}

.highlight-box {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.highlight-box:hover {
    transform: rotate(-1.8deg) translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 212, 84, 0.25);
}

/* Accessibility: Focus Clarity */
a:focus-visible,
button:focus-visible,
.project-card:focus-visible,
.media-item:focus-visible,
.nav-item:focus-visible,
.store-button:focus-visible,
.contact-icon:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible {
    outline: 3px solid var(--accent-color-hover);
    outline-offset: 3px;
}

.project-card:focus-visible,
.media-item:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 224, 121, 0.2);
}

/* Sharp Corner System */
.project-card,
.project-thumbnail,
.project-logo,
.highlight-box,
.menu-button,
.audio-toggle,
.nav-item,
.contact-icon,
.about-skill-tag,
.btn,
.role-tag,
.store-button,
.media-item,
.lightbox-content,
.lightbox-nav,
.lightbox-close,
.itch-more-button,
.stats-hud,
.hud-item,
.progress-bar,
.progress {
    border-radius: 0 !important;
}

.project-card,
.nav-item,
.contact-icon,
.btn,
.role-tag,
.store-button,
.media-item,
.lightbox-nav,
.lightbox-close,
.itch-more-button,
.stats-hud,
.hud-item,
.audio-toggle {
    border: none !important;
}

.project-card:hover,
.nav-item:hover,
.contact-icon:hover,
.store-button:hover,
.media-item:hover,
.lightbox-nav:hover,
.itch-more-button:hover,
.audio-toggle:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

/* Accessibility: Motion Safety */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .word-carousel {
        overflow: visible;
    }
}

/* UX refresh overrides */
.hero-support {
    max-width: 720px;
    margin-top: 1rem;
    color: var(--secondary-text-color);
    font-size: 1.05rem;
    line-height: 1.7;
}

.section-featured {
    margin-bottom: 5rem;
}

.featured-grid {
    grid-template-columns: repeat(3, 1fr);
}

.project-card-featured {
    min-height: 100%;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.project-card-featured .project-thumbnail {
    height: 240px;
}

.project-text {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.project-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.1rem;
}

.project-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-text-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-summary {
    color: var(--text-color);
    font-size: 0.96rem;
    line-height: 1.55;
}

.project-role-line {
    color: var(--secondary-text-color);
    font-size: 0.85rem;
    line-height: 1.5;
}

.project-hero-summary {
    max-width: 720px;
    color: var(--secondary-text-color);
    font-size: 1.02rem;
    line-height: 1.7;
}

.detail-block + .detail-block {
    margin-top: 1.8rem;
}

.detail-block-title {
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--highlight-color);
    margin-bottom: 0.7rem;
}

.detail-block p,
.detail-block li {
    color: var(--text-color);
    line-height: 1.75;
}

.detail-block ul {
    margin-left: 1.2rem;
}

.media-empty-state {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: var(--secondary-text-color);
    text-align: center;
    line-height: 1.7;
}

.about-content-single {
    max-width: 860px;
}

.bio-section p + p {
    margin-top: 1rem;
}

.about-header-text {
    font-size: 0.9rem;
    color: var(--highlight-color);
}

.about-skill-tag {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-hud {
    opacity: 0.88;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.stats-hud.ambient {
    opacity: 0.48;
}

.stats-hud.ambient:hover {
    opacity: 0.82;
}

.achievement-toast {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--edge-subtle);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(4px);
}

.achievement-toast .ach-title {
    color: rgba(255, 255, 255, 0.68);
}

.achievement-toast .ach-name {
    color: var(--highlight-color);
}

@media screen and (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .hero-support {
        font-size: 0.98rem;
    }

    .project-card-featured .project-thumbnail {
        height: 210px;
    }
}

/* Refinement pass overrides */
.featured-grid {
    gap: 1.5rem;
}

.project-card-featured .project-info {
    padding: 1.15rem;
}

.project-card-featured .project-summary-featured {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.project-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}

.project-card-head .project-title {
    margin: 0;
}

.project-info {
    display: block;
}

.project-logo {
    width: 56px;
    height: 56px;
    margin-right: 0;
    flex-shrink: 0;
}

.project-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.project-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.project-role-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-text-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-role-line {
    display: none;
}

.project-card-featured .project-role-chip + .project-role-chip {
    display: none;
}

.project-header {
    align-items: center;
}

.project-logo-large {
    width: 132px;
    height: 132px;
    min-height: 132px;
    flex-shrink: 0;
}

.project-title-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
}

.project-title-container .project-meta-chips {
    order: 2;
    margin-bottom: 0;
}

.project-title-container .project-hero-summary {
    order: 3;
}

.project-title-container h1 {
    order: 1;
    margin-bottom: 0;
}

.store-badge-link {
    display: inline-flex;
    align-items: center;
}

.store-badge {
    display: block;
    height: 54px;
    width: auto;
}

.lightbox-caption {
    background: rgba(8, 8, 12, 0.96);
}

.lightbox-nav {
    width: 58px;
    height: 58px;
    border-radius: 0;
    background: rgba(14, 14, 20, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.lightbox-nav i {
    font-size: 1rem;
    line-height: 1;
}

.lightbox-nav:hover {
    background: var(--highlight-color);
}

.floating-xp {
    color: var(--highlight-color) !important;
    animation-duration: 1.7s;
}

@keyframes float-up-fade {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: translateY(-65px);
        opacity: 0;
    }
}

@media screen and (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

@media screen and (max-width: 900px) {
    .project-logo-large {
        width: 100px;
        height: 100px;
        min-height: 100px;
    }
}

/* Lightbox nav centering fix */
.lightbox-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lightbox-nav i {
    display: block;
    line-height: 1;
    transform: translateY(0);
}



/* Stronger profile click feedback */
.floating-xp-profile {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 3px 10px rgba(0, 0, 0, 0.55), 0 0 22px rgba(255, 212, 84, 0.22);
    transform: translate(-50%, -50%);
    animation: profile-float-up-fade 2.1s forwards cubic-bezier(0.12, 0.84, 0.32, 1);
    z-index: 10020;
}

@keyframes profile-float-up-fade {
    0% {
        transform: translate(-50%, -40%) scale(0.88);
        opacity: 0;
    }

    14% {
        transform: translate(-50%, -56%) scale(1.05);
        opacity: 1;
    }

    72% {
        transform: translate(-50%, -92%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -128%) scale(0.98);
        opacity: 0;
    }
}

/* Unified click feedback */
.floating-xp {
    color: var(--highlight-color) !important;
    animation-duration: 1.9s;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.55), 0 0 22px rgba(255, 212, 84, 0.18);
}

.floating-xp-profile {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    transform: translate(-50%, -50%);
    animation: profile-float-up-fade 1.9s forwards cubic-bezier(0.12, 0.84, 0.32, 1);
    z-index: 10020;
}

.floating-xp-jackpot {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    transform: translate(-50%, -50%);
    animation: jackpot-float-up-fade 2.1s forwards cubic-bezier(0.12, 0.84, 0.32, 1);
    z-index: 10025;
}

@keyframes jackpot-float-up-fade {
    0% {
        transform: translate(-50%, -42%) scale(0.9);
        opacity: 0;
    }

    14% {
        transform: translate(-50%, -58%) scale(1.08);
        opacity: 1;
    }

    72% {
        transform: translate(-50%, -108%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -148%) scale(0.98);
        opacity: 0;
    }
}


/* Sidebar-mounted score HUD */
.sidebar-hud-mount {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.9rem;
}

.audio-toggle-sidebar {
    width: 100%;
    height: 42px;
    justify-content: flex-end;
    padding: 0 1rem;
    box-shadow: none;
}

.audio-toggle-sidebar:hover {
    background-color: var(--surface-1);
}

.sidebar-hud-mount .stats-hud {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0;
    background: transparent;
    border: none !important;
    box-shadow: none;
    backdrop-filter: none;
}

.sidebar-hud-mount .hud-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.8rem 1rem;
    background-color: var(--surface-1);
    border: 1px solid transparent;
    color: var(--text-color);
}

.sidebar-hud-mount .hud-item:hover {
    background-color: var(--surface-1);
    border-color: var(--edge-subtle);
}

.sidebar-hud-mount .hud-label {
    font-family: var(--body-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: none;
}

.sidebar-hud-mount .hud-value {
    font-family: var(--body-font);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--highlight-color);
    text-shadow: none;
}

.sidebar-hud-mount .stats-hud.ambient {
    opacity: 0.72;
}

.sidebar-hud-mount .stats-hud.ambient:hover {
    opacity: 0.92;
}

@media screen and (max-width: 768px) {
    .sidebar-hud-mount {
        margin-top: 1.4rem;
    }

    .audio-toggle-sidebar {
        width: 100%;
        height: 40px;
    }
}

/* HUD layout refinement */
#audio-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
}

.sidebar-hud-mount {
    display: block;
}

.sidebar-hud-mount .stats-hud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: stretch;
}

.sidebar-hud-mount .hud-item {
    min-width: 0;
}

.floating-xp {
    animation: float-up-fade-strong 1.9s forwards cubic-bezier(0.14, 0.8, 0.3, 1) !important;
}

.floating-xp-profile {
    animation: profile-float-up-fade-strong 1.9s forwards cubic-bezier(0.14, 0.8, 0.3, 1) !important;
}

@keyframes float-up-fade-strong {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    14% {
        transform: translate(-50%, -10px);
        opacity: 1;
    }

    72% {
        transform: translate(-50%, -42px);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -70px);
        opacity: 0;
    }
}

@keyframes profile-float-up-fade-strong {
    0% {
        transform: translate(-50%, -40%) scale(0.88);
        opacity: 0;
    }

    14% {
        transform: translate(-50%, -58%) scale(1.05);
        opacity: 1;
    }

    72% {
        transform: translate(-50%, -108%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(0.98);
        opacity: 0;
    }
}

@media screen and (max-width: 768px) {
    #audio-toggle {
        top: 0.8rem;
        right: 0.8rem;
    }

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

/* Stronger visible XP travel */
.floating-xp-profile {
    will-change: transform, opacity;
    animation: profile-float-up-fade-stronger 2s forwards cubic-bezier(0.16, 0.84, 0.28, 1) !important;
}

.floating-xp-jackpot {
    will-change: transform, opacity;
    animation: jackpot-float-up-fade-stronger 2.15s forwards cubic-bezier(0.16, 0.84, 0.28, 1) !important;
}

@keyframes profile-float-up-fade-stronger {
    0% {
        transform: translate(-50%, -12%) scale(0.86);
        opacity: 0;
    }

    12% {
        transform: translate(-50%, -28%) scale(1.06);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -170%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -235%) scale(0.96);
        opacity: 0;
    }
}

@keyframes jackpot-float-up-fade-stronger {
    0% {
        transform: translate(-50%, -8%) scale(0.88);
        opacity: 0;
    }

    12% {
        transform: translate(-50%, -26%) scale(1.1);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -155%) scale(1.02);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -220%) scale(0.98);
        opacity: 0;
    }
}

.project-card-head-copy {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.project-card-head-copy .project-role-chips {
    margin-top: 0;
}

/* View transition states */
.section,
#main-content-area {
    transition: opacity 220ms ease, transform 220ms ease;
}

.section.view-enter,
#main-content-area.view-enter {
    opacity: 0;
    transform: translateY(10px);
}

.section.view-enter.view-enter-active,
#main-content-area.view-enter.view-enter-active {
    opacity: 1;
    transform: translateY(0);
}

.section.view-exit-active,
#main-content-area.view-exit-active {
    opacity: 0;
    transform: translateY(10px);
}
