/* ==========================================
    1. GLOBAL STYLES & RESET
========================================== */
html, body {
    height: 100%; /* Keeps the document at full viewport height to ensure centering works */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Dark Vignette Background matching the deep bronze/black tone behind your logo */
    background: radial-gradient(circle, #25231a 0%, #0d0c0a 100%);
    
    color: #e1e1e6;
    line-height: 1.6;
    display: flex;          
    flex-direction: column;
}

/* ==========================================
    2. HEADER & NAVIGATION
========================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: rgba(18, 17, 14, 0.85); /* Deep dark iron tint */
    backdrop-filter: blur(8px);
    border-bottom: 2px solid #363227; /* Burnished bronze border trim */
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #c5b382; /* Logo Champagne Gold */
    text-transform: uppercase;
}

nav a {
    color: #a8a8b3;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover, nav a.active {
    color: #dfdfe5; /* Silver highlight */
    text-shadow: 0 0 10px rgba(223, 223, 229, 0.4);
}

/* ==========================================
    3. HERO / LANDING PORTFOLIO CARD
========================================== */
.hero { 
    display: flex; 
    justify-content: center; /* Centers the card horizontally */
    align-items: center;     /* Centers the card vertically */
    padding: 20px;   
    flex-grow: 1;            /* Forces the hero zone to stretch and fill all remaining space */
    min-height: 100vh;       /* Fallback execution to lock full viewport height visibility */
}

/* Centralized container card matching your logo's aesthetics */
.portfolio-card {
    background: rgba(22, 21, 18, 0.75); /* Dark metallic iron canvas */
    backdrop-filter: blur(12px);
    border: 2px solid #574e3b; /* Weathered bronze frame */
    
    /* Asymmetrical curved/sharp borders matching the shuriken star tips */
    border-radius: 24px 4px 24px 4px; 
    padding: 40px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 
                0 0 20px rgba(197, 179, 130, 0.15); /* Soft gold back-glow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: #c5b382; /* Lights up gold on hover */
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 
                0 0 30px rgba(197, 179, 130, 0.3);
}

.brand-logo {
    width: 160px; /* Slightly larger scale to capture the fine font detailing */
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.portfolio-card h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #ffffff;
    text-transform: uppercase;
}

.subtitle {
    font-size: 0.95rem;
    color: #a49e91; /* Warm silver-grey */
    margin-bottom: 30px;
}

/* ==========================================
    4. INTERACTIVE BUTTONS & NAVIGATION GROUP
========================================== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-primary, .btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #dfdfe5; /* Silver Text */
    background: #1c1a17; /* Dark iron core */
    border: 1px solid #474134; /* Bronze border outline */
    
    /* Slanted, asymmetrical weapon-blade shape */
    border-radius: 4px 12px 4px 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.btn-primary:hover, .btn:hover {
    background: #c5b382; /* Transforms to Solid Metallic Gold */
    border-color: #dfdfe5; /* Silver border flash */
    color: #0d0c0a; /* High contrast dark text on hover */
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(197, 179, 130, 0.5);
}

.btn-primary:active, .btn:active {
    transform: scale(0.98);
}

/* ==========================================
    5. GAMES GRID LIBRARY (games.html) - TRUE MASONRY
========================================== */
.games-page {
    padding: 60px 8%;
}

.games-header {
    text-align: center;
    margin-bottom: 50px;
}

.games-header h1 {
    font-size: 3rem;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.games-header p {
    color: #a49e91;
    font-size: 1.1rem;
}

/* Pinterest Style Masonry Grid Configuration */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: 10px; /* Micro-tracks allow JavaScript to snap items tightly */
    gap: 25px;            /* Clear spatial gaps horizontally and vertically */
    align-items: end;
    width: 100%;
}

.portfolio-grid .game-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: rgba(22, 21, 18, 0.75);
    border: 2px solid #474134;
    border-radius: 16px 4px 16px 4px;
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portfolio-grid .game-card:hover {
    transform: translateY(-5px);
    border-color: #c5b382;
    box-shadow: 0 12px 30px rgba(197, 179, 130, 0.25);
}

.game-thumb {
    width: 100%;
    height: 180px;
    border-radius: 8px 2px 8px 2px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.game-info {
    display: flex;
    flex-direction: column;
}

.game-card h3 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.3rem;
}

.game-info p {
    color: #a8a8b3;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Master Bottom Container holding store entries and keyword tags */
.game-action-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 5px;
}

/* Store Button Layout Configuration */
.store-buttons {
    display: flex;
    gap: 10px;
}

/* Sleek Icon Platform Buttons */
.btn-store {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #dfdfe5;
    background: #1c1a17;
    border: 1px solid #474134;
    border-radius: 2px 6px 2px 6px;
    transition: all 0.2s ease;
}

/* Integrated Custom SVG Vectors matching platforms */
.btn-store::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.btn-store.itch::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dfdfe5'%3E%3Cpath d='M3.064 3.4c-.456.012-.865.281-1.018.71-.163.46-.01 1.011.373 1.303L6.096 8.13 2.126 19.348c-.144.408-.013.864.316 1.134l8.835 7.227c.42.344.1.344.843 0l8.834-7.227c.33-.27.46-.726.317-1.134L17.3 8.13l3.677-2.717c.383-.292.536-.843.373-1.303-.153-.43-.562-.7-1.018-.71H3.064zm5.822 5.86c.645 0 1.168.523 1.168 1.168 0 .645-.523 1.168-1.168 1.168s-1.168-.523-1.168-1.168c0-.645.523-1.168 1.168-1.168zm6.228 0c.645 0 1.168.523 1.168 1.168 0 .645-.523 1.168-1.168 1.168s-1.168-.523-1.168-1.168c0-.645.523-1.168 1.168-1.168z'/%3E%3C/svg%3E");
}

.btn-store.steam::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dfdfe5'%3E%3Cpath d='M12 0C5.38 0 0 5.38 0 12s5.38 12 12 12c5.96 0 10.9-4.36 11.83-10.06l-4.14-1.7c-.24.58-.7.1-1.32.1h-.08c-.7-.34-1.2-.95-1.4-1.72l-4.22-6.13c-.04-.05-.08-.05-.12-.02l-2.4 1.18c-.05.03-.05.08-.02.13l1.83 4.14c-.6.44-1.03 1.12-1.16 1.9h-.03l-3.3 1.48c-.4-.14-.85-.17-1.27-.05l-2.13-2.12c.1-.4.07-.85-.1-1.25-.4-.95-1.46-1.4-2.42-1-.95.4-1.4 1.46-1 2.42.32.77 1.08 1.23 1.88 1.2h.04l2.12 2.13c-.15.48-.13 1 .07 1.48.4.95 1.47 1.4 2.42 1 .72-.3 1.16-.95 1.24-1.66l3.33-1.48c.2.22.46.4.74.52l1.6 4c.03.06.1.08.15.05l2.43-1.2c.05-.02.06-.08.03-.13l-1.65-3.8c.67-.5 1.12-1.26 1.2-2.12h.04l4.37 1.8c-.02.24 0 .48 0 .72 0 6.62-5.38 12-12 12zm-7.6 13.88c-.43.18-.92-.02-1.1-.45-.18-.43.02-.92.45-1.1.43-.18.92.02 1.1.45.18.43-.02.92-.45 1.1z'/%3E%3C/svg%3E");
}

.btn-store:hover {
    background: #c5b382;
    border-color: #dfdfe5;
    color: #0d0c0a;
}

.btn-store:hover::before {
    filter: brightness(0) saturate(100%) invert(4%) sepia(13%) saturate(1352%) hue-rotate(356deg) brightness(94%) contrast(95%);
}

.tag-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 6px;
}

.tag {
    display: inline-block;
    background-color: #1c1a17;
    border: 1px solid #363227;
    color: #c5b382;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
    6. FOOTER
========================================== */
footer {
    text-align: center;
    padding: 40px;
    color: #737380;
    font-size: 0.9rem;
    border-top: 1px solid #363227;
    margin-top: 60px;
}

/* Locate Section 3 in your css/style.css and update this rule */
.portfolio-card {
    background: rgba(22, 21, 18, 0.75); /* Your dark metallic iron canvas */
    backdrop-filter: blur(12px);
    border: 2px solid #574e3b; /* Weathered bronze frame */
    border-radius: 24px 4px 24px 4px;
    
    /* CHANGE THIS LINE: Add extra padding to the bottom so buttons don't hit the edge */
    padding: 40px 40px 50px 40px; 
    
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(197, 179, 130, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Also ensure your button group has a safe gap from the bottom if needed */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 5px; /* Keeps a tiny safety margin */
}

/* Locate Section 4 in your css/style.css and update these rules */
.button-group {
    display: flex;
    flex-direction: row; /* CHANGE THIS: Stacks them horizontally instead of vertically */
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 5px; /* Keeps your padding safety margin intact */
}

.btn-primary,
.btn {
    display: block;
    flex: 1; /* ADD THIS: Forces buttons to share the width equally side-by-side */
    padding: 14px 10px; /* Adjusted horizontal padding slightly for better fit */
    font-size: 0.95rem; 
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #dfdfe5;
    background: #1c1a17;
    border: 1px solid #474134;
    border-radius: 4px 12px 4px 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap; /* ADD THIS: Prevents button text from breaking into two lines */
}

@media (max-width: 480px) {
    .button-group {
        flex-direction: column; /* Switches back to vertical on small phones */
    }
}

/* ==========================================
    7. PROJECT SCREENSHOT BACKGROUNDS
========================================== */
.image-avarice { 
    background-image: url('../images/games/avarice.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-wordhunt { 
    background-image: url('../images/games/wordhunt.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-minutediner { 
    background-image: url('../images/games/minutediner.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-zeven { 
    background-image: url('../images/games/zeven.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-freedom { 
    background-image: url('../images/games/freedom.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-eld { 
    background-image: url('../images/games/eld.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-blastdash { 
    background-image: url('../images/games/blastdash.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-nooneelse { 
    background-image: url('../images/games/nooneelse.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-balantro { 
    background-image: url('../images/games/balantro.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ==========================================
    5. GAMES GRID LIBRARY - FIXED SVG ICONS
========================================== */

/* Integrated Custom SVG Vectors matching platforms */
.btn-store::before {    
    content: '';    
    display: inline-block;    
    width: 16px;    
    height: 16px;
    background-size: contain;    
    background-repeat: no-repeat;    
    background-position: center; 
} 

/* Itch.io Icon Setup via Data URI Vector Graphic */ 
.btn-store.itch::before {    
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dfdfe5'%3E%3Cpath d='M3.064 3.4c-.456.012-.865.281-1.018.71-.163.46-.01 1.011.373 1.303L6.096 8.13 2.126 19.348c-.144.408-.013.864.316 1.134l8.835 7.227c.42.344.1.344.843 0l8.834-7.227c.33-.27.46-.726.317-1.134L17.3 8.13l3.677-2.717c.383-.292.536-.843.373-1.303-.153-.43-.562-.7-1.018-.71H3.064zm5.822 5.86c.645 0 1.168.523 1.168 1.168 0 .645-.523 1.168-1.168 1.168s-1.168-.523-1.168-1.168c0-.645.523-1.168 1.168-1.168zm6.228 0c.645 0 1.168.523 1.168 1.168 0 .645-.523 1.168-1.168 1.168s-1.168-.523-1.168-1.168c0-.645.523-1.168 1.168-1.168z'/%3E%3C/svg%3E");
}

/* Steam Icon Setup via Data URI Vector Graphic */ 
.btn-store.steam::before {    
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dfdfe5'%3E%3Cpath d='M12 0C5.38 0 0 5.38 0 12s5.38 12 12 12c5.96 0 10.9-4.36 11.83-10.06l-4.14-1.7c-.24.58-.7.1-1.32.1h-.08c-.7-.34-1.2-.95-1.4-1.72l-4.22-6.13c-.04-.05-.08-.05-.12-.02l-2.4 1.18c-.05.03-.05.08-.02.13l1.83 4.14c-.6.44-1.03 1.12-1.16 1.9h-.03l-3.3 1.48c-.4-.14-.85-.17-1.27-.05l-2.13-2.12c.1-.4.07-.85-.1-1.25-.4-.95-1.46-1.4-2.42-1-.95.4-1.4 1.46-1 2.42.32.77 1.08 1.23 1.88 1.2h.04l2.12 2.13c-.15.48-.13 1 .07 1.48.4.95 1.47 1.4 2.42 1 .72-.3 1.16-.95 1.24-1.66l3.33-1.48c.2.22.46.4.74.52l1.6 4c.03.06.1.08.15.05l2.43-1.2c.05-.02.06-.08.03-.13l-1.65-3.8c.67-.5 1.12-1.26 1.2-2.12h.04l4.37 1.8c-.02.24 0 .48 0 .72 0 6.62-5.38 12-12 12zm-7.6 13.88c-.43.18-.92-.02-1.1-.45-.18-.43.02-.92.45-1.1.43-.18.92.02 1.1.45.18.43-.02.92-.45 1.1z'/%3E%3C/svg%3E");
}

/* Hover Adjustments: Inverts Vector Color Fills alongside typography transitions */ 
.btn-store:hover {    
    background: #c5b382;    
    border-color: #dfdfe5;    
    color: #0d0c0a;
} 
.btn-store:hover::before {    
    filter: brightness(0) saturate(100%) invert(4%) sepia(13%) saturate(1352%) hue-rotate(356deg) brightness(94%) contrast(95%); 
}


/* ==========================================  
    2. HEADER & NAVIGATION 
========================================== */ 
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 8%; 
    background-color: rgba(18, 17, 14, 0.85); /* Deep dark iron tint */  
    backdrop-filter: blur(8px); 
    border-bottom: 2px solid #363227; /* Burnished bronze border trim */

    /* --- ADD THESE INITIAL LINES TO LOCK IT IN PLACE --- */
    position: fixed;   /* Locks the bar relative to the viewport window */
    top: 0;            /* Pins it exactly to the very top edge */
    left: 0;           /* Pins it to the left edge */
    width: 100%;       /* Forces it to stretch completely wide */
    box-sizing: border-box; /* Ensures padding doesn't push width out of bounds */
    z-index: 9999;     /* Pushes it to the top layer so game cards slide underneath it */
}

/* ==========================================
    FIXED LAYOUT & CENTERING FOR CONTACT PAGE
========================================== */

/* 1. Fixes the main content container body wrapper */
.contact-page {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers everything horizontally */
    justify-content: center;
    width: 100%;
    max-width: 1200px; /* Keeps layout from stretching too wide on desktop screens */
    margin: 0 auto;    /* Pushes left and right outer spaces into equal alignment */
    padding: 140px 20px 60px 20px !important; /* Pushes content completely clear under your fixed navigation panel */
    box-sizing: border-box;
}

/* 2. Fixes the inner grid wrapping the cards */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 30px auto 0 auto; /* Pulls container clean center */
    padding: 0;
    box-sizing: border-box;
}

/* 3. Ensures individual cards align content inside cleanly */
.contact-card {
    background: rgba(22, 21, 18, 0.75);
    backdrop-filter: blur(12px);
    border: 2px solid #574e3b;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

/* 4. Fixes Back to Home link alignment position */
.btn-back {
    display: inline-block;
    margin: 15px auto 0 auto; /* Centers the button layout track */
    text-align: center;
}