/* ==========================================
   1. CSS RESET & VARIABLES
   ========================================== */
:root {
    --bg-main: #07090e;
    --bg-panel: #0f131c;
    --bg-card: #161b26;
    --border-tech: #232c3d;
    --border-accent: #e61580;
    --border-amber: #ffb700;
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    
    --portrait-pink: #e61580;
    --portrait-blue: #737de6;

    --accent-primary: var(--portrait-pink);
    --accent-cyan: var(--accent-primary);
    --accent-amber: #ffb700;

    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Consolas", "Courier New", Courier, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Optional Background Glow Effect */
body.with-glow::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 30%, rgba(230, 21, 128, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 50% 70%, rgba(115, 125, 230, 0.12) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}


/* ==========================================
   2. SHARED HEADER & FOOTER
   ========================================== */
header {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-tech);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}


.sub-header-wrapper {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.sub-nav-back {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.sub-nav-back:hover {
    color: var(--text-main);
    border-color: var(--portrait-blue);
    background: rgba(115, 125, 230, 0.1);
}

.sub-logo {
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-align: center;
    justify-self: center;
}

.sub-logo span {
    color: var(--portrait-blue);
}

.sub-header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.sub-social-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sub-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sub-social-btn:hover {
    color: var(--portrait-blue);
    transform: translateY(-1px);
}

.sub-social-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sub-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--portrait-pink);
    color: var(--portrait-pink);
    padding: 0.35rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.sub-contact-btn:hover {
    background: var(--portrait-pink);
    color: var(--bg-main);
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-contact-btn {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--portrait-pink);
    color: var(--portrait-pink);
    padding: 0.35rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.header-contact-btn:hover {
    background: var(--portrait-pink);
    color: var(--bg-main);
}

.nav-back-btn {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.nav-back-btn:hover {
    color: var(--text-main);
    border-color: var(--portrait-blue);
    background: rgba(115, 125, 230, 0.1);
}

.logo {
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-align: center;
}



.logo span {
    color: var(--portrait-blue);
}



.social-icons-group {
    display: flex;
    gap: 0.75rem;
    align-items: right;
}

.social-icon-btn img,
.sub-social-btn img,
.social-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;

}

.social-icon-btn:hover img,
.sub-social-btn:hover img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(48%) saturate(1450%) hue-rotate(205deg) brightness(97%) contrast(92%);
}

.social-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}


footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-tech);
    padding: 1.25rem 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* ==========================================
   3. HOMEPAGE UNIQUE STYLES (.home-page)
   ========================================== */
body.home-page {
    overflow-x: hidden;
    padding-top: 60px;
}

body.home-page .container {
    width: calc(100% - 30px);
    max-width: 1200px;
    margin: 0 auto;
}

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(11, 14, 21, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-tech);
    z-index: 1000;
    display: flex;
    align-items: center;
}

body.home-page .header-brand {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-main);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.home-page .status-dot {
    width: 8px;
    height: 8px;
    background: var(--portrait-pink);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--portrait-pink);
}

body.home-page .section-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--portrait-pink);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.home-page .section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-tech), transparent);
}

body.home-page .hero {
    padding: 3rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.home-page .diagram-stage {
    position: relative;
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    padding: 10px 0 20px 0;
}

body.home-page .wing-headers {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.75rem;
    z-index: 20;
}

body.home-page .wing-header-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    background: rgba(15, 19, 28, 0.95);
    border: 1px solid var(--border-tech);
    backdrop-filter: blur(4px);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

body.home-page .wing-header-badge.left {
    color: var(--portrait-pink);
    border-color: var(--portrait-pink);
    box-shadow: 0 0 15px rgba(230, 21, 128, 0.4);
}

body.home-page .wing-header-badge.right {
    color: var(--portrait-blue);
    border-color: var(--portrait-blue);
    box-shadow: 0 0 12px rgba(32, 49, 216, 0.4);
}

body.home-page .wing-header-badge .badge-icon {
    font-size: 1rem;
    line-height: 1;
}

body.home-page .diagram-body {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home-page .center-circle-plaque {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 3px solid var(--border-tech);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95),
                -20px 0 35px rgba(230, 21, 128, 0.35),
                 20px 0 35px rgba(32, 49, 216, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.home-page .center-circle-plaque::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px dashed var(--portrait-pink);
    opacity: 0.45;
    animation: spin 60s linear infinite;
}

body.home-page .portrait-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: #111622;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-tech);
    overflow: hidden;
    pointer-events: auto;
}

body.home-page .portrait-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.home-page .buttons-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 160px;
    z-index: 10;
}

body.home-page .button-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

body.home-page .button-column.left::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 0;
    width: 3px;
    height: calc(100% + 10px);
    background: linear-gradient(180deg, var(--portrait-pink), transparent 90%);
    box-shadow: 0 0 12px var(--portrait-pink);
    z-index: 20;
    pointer-events: none;
}

body.home-page .button-column.right::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 0;
    width: 3px;
    height: calc(100% + 10px);
    background: linear-gradient(180deg, var(--portrait-blue), transparent 90%);
    box-shadow: 0 0 12px var(--portrait-blue);
    z-index: 20;
    pointer-events: none;
}

body.home-page .img-button {
    position: relative;
    height: 100px;
    margin-bottom: -20px;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background-size: cover;
    background-position: center;
    transition: filter 0.25s ease, z-index 0s;
    filter: brightness(0.7) grayscale(0.2);
    border-bottom: none;
}

body.home-page .img-button:last-child {
    margin-bottom: 0;
}

body.home-page .img-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 9, 14, 0.9) 0%, rgba(15, 19, 28, 0.55) 100%);
    transition: background 0.25s ease;
    z-index: 1;
}

body.home-page .img-button:hover {
    filter: none;
    z-index: 50;
}

body.home-page .img-button:hover::before {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
}

body.home-page .button-column.left .btn-1 { clip-path: polygon(0% 0%, 65% 0%, 100% 60%, 100% 60%, 100% 100%, 65% 100%, 0% 100%); z-index: 1; }
body.home-page .button-column.left .btn-2 { clip-path: polygon(0 0, 65% 0, 100% 35%, 100% 65%, 85% 100%, 0 100%); z-index: 2; }
body.home-page .button-column.left .btn-3 { clip-path: polygon(0% 0%, 65% 0%, 100% 30%, 100% 70%, 65% 100%, 0% 100%); z-index: 3; }
body.home-page .button-column.left .btn-4 { clip-path: polygon(0 0, 85% 0, 100% 35%, 100% 65%, 65% 100%, 0 100%); z-index: 2; }
body.home-page .button-column.left .btn-5 { clip-path: polygon(0% 100%, 65% 100%, 100% 40%, 100% 40%, 100% 0%, 65% 0%, 0% 0%); z-index: 1; }

body.home-page .button-column.right .btn-1 { clip-path: polygon(100% 0%, 35% 0%, 0% 60%, 0% 60%, 0% 100%, 35% 100%, 100% 100%); z-index: 1; }
body.home-page .button-column.right .btn-2 { clip-path: polygon(25% 0, 100% 0, 100% 100%, 15% 100%, 0 72%, 0 28%); z-index: 2; }
body.home-page .button-column.right .btn-3 { clip-path: polygon(100% 0%, 35% 0%, 0% 30%, 0% 70%, 35% 100%, 100% 100%); z-index: 3; }
body.home-page .button-column.right .btn-4 { clip-path: polygon(15% 0, 100% 0, 100% 100%, 25% 100%, 0 72%, 0 28%); z-index: 2; }
body.home-page .button-column.right .btn-5 { clip-path: polygon(100% 100%, 35% 100%, 0% 40%, 0% 40%, 0% 0%, 35% 0%, 100% 0%); z-index: 1; }

body.home-page .button-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

body.home-page .button-column.right .button-content {
    margin-left: auto;
    text-align: right;
}

body.home-page .button-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 2px 6px rgba(0, 0, 0, 0.95);
}

body.home-page .button-column.left .button-title { color: #ff5ebc; }
body.home-page .button-column.right .button-title { color: #737de6; }

body.home-page .button-desc {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 600;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 2px 6px rgba(0, 0, 0, 0.95);
}

body.home-page .hero-bio {
    text-align: center;
    max-width: 800px;
}

body.home-page .hero-bio h1 {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

body.home-page .hero-bio .handle {
    color: var(--portrait-pink);
    font-size: 1.15rem;
    font-family: var(--font-mono);
    margin-bottom: 0.8rem;
}

body.home-page .hero-bio p {
    color: var(--text-muted);
    font-size: 1.08rem;
}

body.home-page .mini-portfolio { padding: 2.5rem 0; }

body.home-page .creation-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    clip-path: polygon(0 0, 98% 0, 100% 2%, 100% 100%, 2% 100%, 0 98%);
}

body.home-page .creation-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.home-page .creation-info h3 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

body.home-page .creation-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

body.home-page .creation-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--portrait-pink);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    transition: gap 0.2s;
}

body.home-page .creation-link:hover { gap: 0.8rem; }

body.home-page .gif-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

body.home-page .gif-box {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
}

body.home-page .gif-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.home-page .lab-grid-section { padding: 3rem 0; }

body.home-page .grid-4x3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

body.home-page .lab-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

body.home-page .lab-card:hover {
    border-color: var(--border-amber);
    transform: translateY(-3px);
}

body.home-page .lab-gif-holder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: 2px;
    overflow: hidden;
}

body.home-page .lab-gif-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.home-page .lab-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

body.home-page .sci-fi-panel {
    background: var(--bg-panel);
    border-top: 2px solid var(--border-tech);
    border-bottom: 2px solid var(--border-tech);
    padding: 2.5rem 0;
    margin-top: 4rem;
}

body.home-page .panel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

body.home-page .scroll-top-btn {
    background: transparent;
    border: 1px solid var(--portrait-pink);
    color: var(--portrait-pink);
    font-family: var(--font-mono);
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    transition: all 0.2s;
}

body.home-page .scroll-top-btn:hover {
    background: var(--portrait-pink);
    color: var(--bg-main);
}


/* ==========================================
   4. CATEGORY & SUB-PAGE LAYOUTS (Art, Games, Audio, etc.)
   ========================================== */
.page-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.page-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-tech);
    padding-bottom: 1rem;
}

.page-title {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title::before {
    content: "//";
    color: var(--accent-primary);
}


/* ==========================================
   5. FILTER TABS & PORTFOLIO GRIDS
   ========================================== */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.tab-btn:hover {
    color: var(--text-main);
    border-color: var(--accent-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: var(--bg-main);
    border-color: var(--accent-primary);
    font-weight: bold;
}

.games-layout,
.portfolio-layout {
    display: grid;
    grid-template-columns:  1fr 300px; /* 1fr 240px; /* or */
    gap: 2.5rem;
    align-items: start; /* CRITICAL: Without this, sticky will NOT scroll down the screen */
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-content: start;
}

.art-card {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, z-index 0.2s;
    display: flex;
    flex-direction: column;
    z-index: 1;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.art-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(230, 21, 128, 0.25);
    z-index: 10;
}

.art-card.hidden {
    display: none;
}

.art-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #000;
    overflow: hidden;
}

.art-thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.art-card:hover .art-thumb-wrapper img {
    transform: scale(1.05);
}

.art-card-info {
    padding: 0.75rem 0.85rem;
    background: var(--bg-panel);
    border-top: 1px solid var(--border-tech);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.art-card-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-main);
}

/* Sidebar Profile Panel */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.sidebar-avatar-wrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    padding: 3px;
    border: 1px dashed var(--accent-primary);
}

.sidebar-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
}

.sidebar-title {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.sidebar-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}

.sidebar-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border-tech);
    padding-top: 1rem;
}


/* ==========================================
   6. GAMES, HARDWARE, & LIST LAYOUTS
   ========================================== */
.games-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2.5rem;
    align-items: start;
}


.game-entry-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 1.5rem;
    scroll-margin-top: 100px;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    transition: border-color 0.3s ease;
}

.game-card.active-focus {
    border-color: var(--portrait-blue);
}

.tools-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}

.tool-card{
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 1.5rem;
    scroll-margin-top: 100px;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    transition: border-color 0.3s ease;

}

.tool-logo-box {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    transition: border-color 0.2s ease;
}

.tool-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* <--- Change from cover to contain */
    display: block;
}

.tool-card.active-focus {
    border-color: var(--portrait-blue);
}

.tool-header-section {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.game-header-section {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.game-logo-link {
    display: block;
    text-decoration: none;
}

.game-logo-box {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    aspect-ratio: 16 / 9; /* <--- Changed from 1 / 1 to 16 / 9 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    transition: border-color 0.2s ease;
}

.game-logo-link:hover .game-logo-box {
    border-color: var(--accent-primary);
}

.game-logo-box img,
.game-logo-box video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* <--- Fills the frame and crops excess */
    object-position: center;
    display: block;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.game-title {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.game-title-link:hover .game-title {
    color: var(--accent-primary);
}

.game-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--portrait-blue);
    margin-bottom: 0.5rem;
}

.game-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Storefront Buttons */
.storefront-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    color: var(--text-main);
    padding: 0.4rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.store-btn svg,
.store-btn img,
.store-btn-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: inline-block;
    transition: filter 0.2s ease;
}

/* Hover: Turn white/bright when hovering the button */
.store-btn:hover img,
.store-btn:hover .store-btn-icon {
    filter: brightness(0) invert(1);
}

.store-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
/* ==========================================
   DYNAMIC 3-WIDE CAROUSEL (SCROLL SNAP)
   ========================================== */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-tech);
}

/* Scrollable track: hides scrollbar, enables smooth snap */
.carousel-track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE/Edge */
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none;                 /* Chrome/Safari */
}

/* Exactly 3 items visible at once */
.carousel-track .gallery-item {
    flex: 0 0 calc((100% - 1.5rem) / 3);
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    overflow: hidden;
    scroll-snap-align: start;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.carousel-track .gallery-item img,
.carousel-track .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Arrow Navigation Buttons */
.carousel-container .arrow {
    position: absolute;
    top: calc(50% + 0.625rem);
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(15, 19, 28, 0.85);
    border: 1px solid var(--border-tech);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    transition: all 0.2s ease;
    clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.carousel-container .arrow:hover {
    background: var(--accent-primary);
    color: var(--bg-main);
    border-color: var(--accent-primary);
}

.carousel-container .arrow.prev { left: 6px; }
.carousel-container .arrow.next { right: 6px; }

/* Show correct controls per radio state */
.carousel-container input[type="radio"][id$="-1"]:checked ~ .carousel-arrows .to-slide-3.prev,
.carousel-container input[type="radio"][id$="-1"]:checked ~ .carousel-arrows .to-slide-2.next {
    display: block;
}

.carousel-container input[type="radio"][id$="-2"]:checked ~ .carousel-arrows .to-slide-1.prev,
.carousel-container input[type="radio"][id$="-2"]:checked ~ .carousel-arrows .to-slide-3.next {
    display: block;
}

.carousel-container input[type="radio"][id$="-3"]:checked ~ .carousel-arrows .to-slide-2.prev,
.carousel-container input[type="radio"][id$="-3"]:checked ~ .carousel-arrows .to-slide-1.next {
    display: block;
}

/* Gallery Grids inside Game Cards */
.game-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    border-top: 1px solid var(--border-tech);
    padding: 1.25rem 3rem 0 3rem; /* 3rem padding on left and right squeezes the thumbnails */
    margin-top: 1.25rem;
}

.game-gallery-grid .gallery-item:nth-child(n+5) {
    display: none;
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    aspect-ratio: 16 / 9; /* <--- Changed from 1 / 1 to 16 / 9 */
    overflow: hidden;
    position: relative;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* <--- Fills the frame and crops excess */
    object-position: center;
    display: block;
}


/* ==========================================
   7. SCROLLSPY SIDEBAR NAVIGATION
   ========================================== */
.scrollspy-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;                       /* Distance from top header */
    height: calc(100vh - 110px);     /* Explicit height forces internal scrollbar */
    max-height: calc(100vh - 110px);
    overflow-y: auto !important;     /* Guarantees inner scrolling */
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    border-left: 2px solid var(--border-tech);
    padding: 0.85rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    z-index: 10;
}

/* Custom subtle scrollbar so it fits the dark tech theme */
.scrollspy-sidebar::-webkit-scrollbar {
    width: 4px;
}
.scrollspy-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.scrollspy-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-tech);
    border-radius: 2px;
}
.scrollspy-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.scrollspy-category {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;                    /* Reduced gap between header and links */
}

.category-header {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: bold;
    color: var(--portrait-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.4rem;
    user-select: none;
    pointer-events: none;
    border-bottom: 1px solid rgba(35, 44, 61, 0.4);
    margin-bottom: 0.2rem;
}

.scrollspy-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;                     /* Very compact spacing between game links */
}

.scrollspy-link {
    font-family: var(--font-mono);
    font-size: 0.74rem;              /* Slightly more compact font size */
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.2rem 0.45rem;         /* Compact line height */
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.scrollspy-link:hover {
    color: var(--text-main);
    background: rgba(115, 125, 230, 0.08);
}

.scrollspy-link.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    background: rgba(230, 21, 128, 0.1);
    font-weight: bold;
    padding-left: 0.65rem;
}


/* ==========================================
   8. AUDIO PAGE COMPONENTS
   ========================================== */
.audio-list-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-card-full .game-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.audio-card-full .game-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.85rem;
}

.sfx-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.audio-card-compact {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.audio-card-compact .game-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.audio-card-compact .game-description {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.3;
    flex: 1;
}

.audio-player-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.play-btn {
    background: transparent;
    border: 1px solid var(--portrait-pink);
    color: var(--portrait-pink);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.play-btn:hover {
    background: var(--portrait-pink);
    color: var(--bg-main);
}

.play-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 65px;
    text-align: center;
}

.seeker-bar {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border-tech);
    outline: none;
    cursor: pointer;
}

.seeker-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--portrait-pink);
    cursor: pointer;
}

.audio-card-compact .audio-player-wrapper {
    padding: 0.4rem 0.5rem;
    gap: 0.5rem;
}

.audio-card-compact .time-display {
    display: none;
}


/* ==========================================
   9. ART DETAIL & LIGHTBOX
   ========================================== */
.art-page-layout {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    flex: 1;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-image-block, .art-figure {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.hero-image-block img, .art-figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hero-image-block img:hover, .art-figure img:hover {
    opacity: 0.95;
}

.secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.art-caption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0.6rem 0.4rem 0.2rem 0.4rem;
    border-top: 1px solid var(--border-tech);
    margin-top: 0.5rem;
}

.art-caption:empty {
    display: none;
    padding: 0;
    border-top: none;
    margin-top: 0;
}

.info-sidebar {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 80px;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.project-header {
    border-bottom: 1px solid var(--border-tech);
    padding-bottom: 1rem;
}

.project-title {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--portrait-blue);
    letter-spacing: 0.05em;
}

.project-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==========================================
   SECTION SUBTITLE / HUD HEADER
   ========================================== */
.section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--portrait-blue);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(90deg, rgba(115, 125, 230, 0.1) 0%, rgba(15, 19, 28, 0) 100%);
    border-left: 3px solid var(--portrait-blue);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.section-subtitle::before {
    content: "■";
    font-size: 0.65rem;
    color: var(--accent-primary);
}

.section-subtitle::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-tech), transparent 80%);
}

.tools-section {
    border-top: 1px solid var(--border-tech);
    padding-top: 1.2rem;
}

.tools-heading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--portrait-blue);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.tools-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 10px;
    user-select: none;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: calc(100vh - 70px);
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 70px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--border-tech);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    pointer-events: none;
}

.lightbox-nav-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    z-index: 1005;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    user-select: none;
}

.lightbox-nav-zone.prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 1rem;
    cursor: w-resize;
}

.lightbox-nav-zone.next {
    right: 0;
    justify-content: flex-end;
    padding-right: 1rem;
    cursor: e-resize;
}

.lightbox-nav-zone:hover {
    opacity: 1;
}

.nav-arrow-icon {
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-main);
    margin-top: 0.5rem;
    text-align: center;
    max-width: 90vw;
}

.lightbox-caption:empty {
    display: none;
}

.lightbox-close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1010;
    background: var(--bg-panel);
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.lightbox-close-btn:hover {
    color: var(--portrait-pink);
    border-color: var(--portrait-pink);
    background: rgba(230, 21, 128, 0.2);
}


/* ==========================================
   10. CONTACT PAGE CONTAINER
   ========================================== */
.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 2rem 1rem;
}

.contact-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-panel);
    border: 2px solid var(--border-accent);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), 0 20px 50px rgba(0, 0, 0, 0.9);
    clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    position: relative;
}

.back-nav {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.back-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateX(-3px);
    background: rgba(0, 240, 255, 0.05);
}

.card-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--portrait-pink);
    box-shadow: 0 0 25px rgba(230, 21, 128, 0.35);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-name {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: #ffffff;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.card-handle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 0.35rem;
}

.card-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.card-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-link-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    color: var(--text-main);
    padding: 0.75rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    position: relative;
}

.card-link-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateX(4px);
    background: rgba(0, 240, 255, 0.05);
}

.card-link-btn .icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

.card-link-btn .icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.copy-badge {
    margin-left: auto;
    font-size: 0.65rem;
    background: var(--border-tech);
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

.card-link-btn.copied .copy-badge {
    background: var(--accent-cyan);
    color: var(--bg-main);
    font-weight: bold;
}


/* ==========================================
   11. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1200px) {
    .sfx-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {

    .games-layout {
        grid-template-columns: 1fr;
    }

    .scrollspy-sidebar {
        display: none !important;
    }

    /* 1. FIX HEADER CLIPPING ON TABLET & MOBILE */
    .top-header {
        height: auto;
        min-height: 60px;
        padding: 0.6rem 0;
    }

    body.home-page {
        padding-top: 85px; /* Adjust body offset for the auto-height header */
    }

    .top-header .header-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    /* 2. REORDER ELEMENTS: PORTRAIT -> BIO -> PORTFOLIO -> EXPERIMENTAL */
    body.home-page .hero {
        display: flex;
        flex-direction: column;
    }

    body.home-page .diagram-stage {
        display: contents; /* Allows child elements to participate in the hero flex container */
    }

    /* Hide the top badge wrapper bar on tablet/mobile */
    body.home-page .wing-headers {
        display: none;
    }

    /* Step A: Portrait stays at the very top */
    body.home-page .center-circle-plaque {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        order: 1;
        margin-bottom: 1.5rem;
    }

    /* Step B: Bio moves right below the portrait */
    body.home-page .hero-bio {
        order: 2;
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }

    /* Step C: Buttons container below bio */
    body.home-page .diagram-body {
        display: contents;
    }

    body.home-page .buttons-container {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
        order: 3;
    }

    /* Step D: Inject "PORTFOLIO" badge right above 3D Art */
    body.home-page .button-column.left {
        display: flex;
        flex-direction: column;
        order: 1;
    }

    body.home-page .button-column.left::before {
        content: "▼ PORTFOLIO";
        position: static;
        display: block;
        align-self: center;
        width: auto;
        height: auto;
        background: rgba(15, 19, 28, 0.95);
        border: 1px solid var(--portrait-pink);
        color: var(--portrait-pink);
        font-family: var(--font-mono);
        font-size: 0.85rem;
        font-weight: bold;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0.4rem 1.25rem;
        margin-bottom: 1rem;
        clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
        box-shadow: 0 0 15px rgba(230, 21, 128, 0.4);
    }

    /* Step E: Inject "EXPERIMENTAL FUN STUFF" badge right above Hardware */
    body.home-page .button-column.right {
        display: flex;
        flex-direction: column;
        order: 2;
    }

    body.home-page .button-column.right::after {
        content: "EXPERIMENTAL FUN STUFF ▼";
        position: static;
        order: -1; /* Placed at the top of the right column */
        display: block;
        align-self: center;
        width: auto;
        height: auto;
        background: rgba(15, 19, 28, 0.95);
        border: 1px solid var(--portrait-blue);
        color: var(--portrait-blue);
        font-family: var(--font-mono);
        font-size: 0.85rem;
        font-weight: bold;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0.4rem 1.25rem;
        margin-bottom: 1rem;
        clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
        box-shadow: 0 0 12px rgba(32, 49, 216, 0.4);
    }


}


@media (max-width: 1024px) {

    /* Reset angled polygon cutouts to regular rectangles */
    body.home-page .button-column.left .img-button,
    body.home-page .button-column.right .img-button,
    body.home-page .button-column .btn-1,
    body.home-page .button-column .btn-2,
    body.home-page .button-column .btn-3,
    body.home-page .button-column .btn-4,
    body.home-page .button-column .btn-5 {
        clip-path: none !important;
        margin-bottom: 0 !important;
        border-radius: 4px;
        border: 1px solid var(--border-tech);
    }

    /* Give the buttons clean spacing in a vertical stack */
    body.home-page .button-column {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Ensure text alignment in the right column looks clean on mobile */
    body.home-page .button-column.right .button-content {
        margin-left: 0;
        text-align: left;
    }

    body.home-page .center-circle-plaque {
        width: 220px;
        height: 220px;
        margin-bottom: 1.25rem;
    }

    /* Scale down the inner circular image frame */
    body.home-page .portrait-img {
        width: 195px;
        height: 195px;
    }
}

@media (max-width: 900px) {
    .secondary-grid {
        grid-template-columns: 1fr;
    }
    body.home-page .creation-item { grid-template-columns: 1fr; }
    body.home-page .grid-4x3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .game-header-section {
        grid-template-columns: 1fr;
    }

    .game-logo-box {
        max-width: 220px;
    }

    .game-gallery-grid {
        display: none;
    }

    .artwork-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .sfx-grid, .game-gallery-grid, .artwork-grid {
        grid-template-columns: 1fr;
    }
    body.home-page .grid-4x3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .artwork-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    /* Compact scale for small mobile phones */
    body.home-page .center-circle-plaque {
        width: 180px;
        height: 180px;
    }

    body.home-page .portrait-img {
        width: 160px;
        height: 160px;
    }
}

/* Tablet & Smaller Laptops */
@media (max-width: 1024px) {
    /* 1. Collapse the 2-column layout into 1 column */
    .portfolio-layout,
    .art-page-layout,
    .tools-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* 2. Push sidebar below the artwork */
    .portfolio-layout .artwork-grid {
        order: 1;
    }

    .portfolio-layout .sidebar {
        order: 2;
        width: 100%;
        max-width: 600px;
        margin: 1.5rem auto 0 auto;
    }

    .sidebar-panel {
        position: static; /* Unstick from viewport on small screens */
    }
}

/* Tablets & Mobile */
@media (max-width: 768px) {
    /* Reduce large desktop padding so images have room to breathe */
    .page-container {
        padding: 1.25rem 1rem;
        width: 100%;
    }

    /* Subpage header alignment */
    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    /* 2 columns for tablet view */
    .artwork-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
}

/* Mobile Phones (iPhone / Android) */
@media (max-width: 600px) {
    .page-container {
        padding: 1rem 0.75rem;
    }

    /* 1 full-width column: images will be large, clear, and visible */
    .artwork-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .art-card-info {
        padding: 0.65rem 0.75rem;
    }

    .art-card-title {
        font-size: 0.95rem;
    }

    /* Sub-header on mobile */
    .header-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.25rem 0;
    }

    .logo {
        font-size: 0.95rem;
    }
}

/* Prevent accidental page-level sideways scroll */
html, body {
    
    max-width: 100vw;
}

/* Tablet & Mobile (<= 1024px) */
@media (max-width: 1024px) {
    /* Collapse tools layout into 1 column */
    .tools-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

/* Small Tablets & Phones (<= 768px) */
@media (max-width: 768px) {
    /* Allow the tool header (logo box + text) to stack vertically */
    .tool-header-section {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    /* Keep the logo nicely proportioned without overflowing */
    .tool-logo-box {
        max-width: 100%;
        width: 100%;
    }

    /* Tweak carousel items on phones: show 1 or 2 items instead of crushing 3 */
    .carousel-track .gallery-item {
        flex: 0 0 calc((100% - 0.75rem) / 2); /* 2 items visible */
    }
}

/* Phones (<= 480px) */
@media (max-width: 480px) {
    /* Show 1 full item at a time on tiny screens */
    .carousel-track .gallery-item {
        flex: 0 0 100%;
    }
}