/* Define color variables for easy theming */
:root {
    --color-bg-dark: #121212;
    --color-bg-darker: #161616;
    --color-bg-alt-dark: #1a1a1a;
    --color-text-light: #e0e0e0;
    --color-text-white: #ffffff;
    --color-text-muted: #b0b0b0;
    --color-border:rgba(255, 255, 255, 0.2);
    --color-accent: #d22b2b; /* bright red */
    --color-accent-hover: #a21e1e; /* deeper red */
    --color-link-hover: #ffffff; /* keep white on hover */
    --color-shadow-dark: rgba(0, 0, 0, 0.5);
    --color-shadow-light: rgba(0, 0, 0, 0.3);
    --color-shadow-accent-light: rgba(210, 43, 43, 0.3); /* red glow light */
    --color-shadow-accent-hover: rgba(162, 30, 30, 0.4); /* red glow hover */
    --color-shadow-accent-glow: rgba(210, 43, 43, 0.5); /* stronger red glow */
    --color-shadow-dark-strong: rgba(0, 0, 0, 0.4);
}
 

/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* border:  1px solid;
    border-color: #e0e0e0; */
}

body {
    font-family: 'Inter', sans-serif; /* Using Inter font */
    background-color: var(--color-bg-dark); /* Dark background */
    color: var(--color-text-light); /* Light text color */
    line-height: 1.6;
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

/* ...Language... */
.lang-switch {
    display: flex;
    gap: 8px;
    
}
.lang-switch .button.active {
    background-color: var(--color-accent-hover);
    border: 1px solid var(--color-border);
}
/* ...Language... */

/* Particle Settings*/
.section-padding.position-relative {
  position: relative;
  overflow: hidden;
}

#particles-js,
#particles-unity-assets {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Behind the content */
}

.section-padding .container {
  position: relative;
  z-index: 1;
}
/* Particle Settings*/

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-white); /* White headings */
    margin-bottom: 0.8em;
    font-weight: 600;
}

h2.section-title {
    font-size: 2.5em;
    text-align: center;
    /* margin-bottom: 20px; */
    margin: 0 auto 20px auto;
    position: relative;
    padding: 10px;
    backdrop-filter: blur(5px);
    width: fit-content;
    border-radius: 1rem;
}

h2.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-accent); /* Accent color for underline */
    border-radius: 2px;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--color-accent); /* Accent color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-link-hover); /* Darker accent on hover */
}

/* Layout & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
}

.section-padding {
    padding: 100px 0; /* Consistent padding for sections */
}

.bg-dark-alt {
    background-color: var(--color-bg-alt-dark); /* Slightly lighter dark for alternating sections */
    
}

/* Header & Navigation */
.header {
    background-color: var(--color-bg-darker); /* Even darker header */
    padding: 20px 0;
    box-shadow: 0 2px 10px var(--color-shadow-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-text-white);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--color-text-light);
    font-weight: 400;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--color-accent);
    color: var(--color-text-white);
    text-align: center;
    border-radius: 8px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 10px var(--color-shadow-accent-light); /* Subtle shadow */
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 15px var(--color-shadow-accent-hover);
}
.card.full-width-layout {
  align-items: stretch;
  text-align: left;
}

/* Card Style for items */
.card {
    background-color: rgba(41, 41, 41, 0.2);
   
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 15px var(--color-shadow-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Distribute space */
    border: 1px solid;
    border-color: var(--color-border);
    backdrop-filter: blur(1px);
    transition: all 0.3s ease;

    
}

.grid-item:hover {
    transform: translateY(-5px);
    background-color: rgba(150, 150, 150, 0.1); /* You can convert this to variable if you want */
    box-shadow: 0 10px 25px var(--color-shadow-dark-strong);
    backdrop-filter: blur(10px);
    transform: scale(1.04);
    
}
/* otherOption */
/* .card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(0, 174, 255, 0.4);
} */

/* About Me Section */
#about .section-title {
    text-align: center;
}

/* Developer Reel Section */
#developer-reel .section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Video Container */
.video-container {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(114, 114, 114, 0.1);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(5px);
    padding: 20px;
    box-shadow: 0 6px 15px var(--color-shadow-light);
    transition: all 0.3s ease;
}

.video-container:hover {
    background: rgba(114, 114, 114, 0.15);
    box-shadow: 0 10px 25px var(--color-shadow-dark-strong);
    transform: translateY(-2px);
}

.video-wrapper {
    position: relative;
    padding: 56.25% 0 0 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--color-shadow-dark);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

#about .about-content {
    display: flex;
    flex-direction: row; /* Desktop: side by side */
    align-items: flex-start;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

/* Profile Section */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-width: 280px;
    max-width: 350px;
    flex-shrink: 0;
    
    /* Card styling to match other sections */
    /* background: rgba(114, 114, 114, 0.1);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(5px);
    padding: 0px 10px;
    height: fit-content;
    align-self: stretch; */
}

.profile-pic {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%; /* Circular profile picture */
    border: 4px solid var(--color-accent);
    box-shadow: 0 0 30px var(--color-shadow-accent-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--color-shadow-accent-glow);
}

/* Profile Stats */
.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Minimal Skills Section under profile */
.skills-section-minimal {
    width: 100%;
    margin-top: 20px;
    box-sizing: border-box;
}

.skills-grid-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 100%;
    align-items: flex-start;
}

.skill-item-minimal {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 8px;
    background-color: var(--color-accent);
    border-radius: 16px;
    border: none;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

.skill-item-minimal:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--color-shadow-accent-light);
}

.skill-icon-minimal {
    font-size: 1em;
    margin-right: 6px;
    margin-bottom: 0;
    color: var(--color-text-white);
}

.skill-logo-minimal {
    width: 0.9em;
    height: 0.9em;
    margin-right: 6px;
    margin-bottom: 0;
    filter: brightness(0) invert(1); /* Makes the logo white */
}

.skill-name-minimal {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--color-text-white);
    text-align: left;
    line-height: 1.2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: rgba(114, 114, 114, 0.1);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(114, 114, 114, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--color-shadow-dark);
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 5px;
}

/* About Text Content */
.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.intro-text {
    background: rgba(114, 114, 114, 0.1);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(5px);
    padding: 30px;
}

.intro-text p {
    margin-bottom: 1.2em;
    font-size: 1.1em;
    line-height: 1.7;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* Integrated Stats Section within intro-text */
.stats-section-integrated {
    
    
    
}

.stats-grid-integrated {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.stat-item-integrated {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(5px);
}


.stat-item-integrated:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.stat-number-integrated {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label-integrated {
    font-size: 0.85em;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.3;
    font-weight: 400;
}


/* Steam Games Section */
.game-showcase {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-height: 600px;
    align-items: flex-start;
    width: 100%; /* Ensure it fills available space */
}


.main-display {
    flex: 4 0 0; /* flex-grow flex-shrink flex-basis */
    position: relative; /* For aspect ratio padding hack */
    
     aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--color-shadow-dark);
    flex-shrink: 0; /* Prevent it from shrinking if space is tight */
}

.main-display iframe,
.main-display img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover; /* Ensures images/videos fill the space without distortion */
}
.game-image{
    aspect-ratio: 315/250;
}
.asset-image {
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--color-shadow-light);
    margin-bottom: 20px;
}
.thumbnail-list {
    flex: 1 0 0; /* flex-grow flex-shrink flex-basis */
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Make the thumbnail list scrollable if content exceeds its height */
    overflow-y: auto;
    /* Ensure it takes up the full height of its parent (.game-showcase) */
    max-height: 100%; 
    padding-right: 5px; /* Add some padding for the scrollbar to prevent content overlap */
}

.thumbnail {
    width: 100%;
    height:auto; /* Ensure height is determined by padding-top for aspect ratio */
    position: relative; /* For absolute positioning of the image inside */
    aspect-ratio: 16/9;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent individual thumbnails from shrinking */
    overflow: hidden; /* Hide content outside the aspect ratio box */
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the thumbnail area */
    border-radius: 8px; /* Apply border-radius to the image itself */
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--color-accent); /* Changed to accent color for consistency */
    opacity: 0.8;

}



/* New: Styling for the game details card below the showcase */
.game-details  {
    margin-top: 40px; /* Add margin to separate from the showcase */
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: var(--color-bg-alt-dark); /* Apply card background */
    border-radius: 12px;
    box-shadow: 0 6px 15px var(--color-shadow-light);
    width: 100%; /* Ensure it spans the full width */
    text-align: center;
}

.game-logo {
    width: 50%; /* Adjust as needed */
    max-width: 300px; /* Limit logo size */
    height: auto; /* Maintain aspect ratio */
    margin-top: -30px;
    margin-bottom: -30px;
    align-self: center;
}

.game-details .button {
    margin-top: 20px;
}


/* Grid Layout for Assets and Itch.io Games */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 40px;
}

.grid-item {
    padding: 25px;
}

.grid-item img {
    width: 100%;
    /* height: 200px; Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px var(--color-shadow-light);
}

.grid-item .button {
    margin-top: 20px;
}

/* Footer */
.footer {
    background-color: var(--color-bg-darker);
    color: var(--color-text-muted);
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    box-shadow: 0 -2px 10px var(--color-shadow-dark);
}

.footer .social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.footer .social-links a {
    color: var(--color-text-muted);
    font-size: 1.1em;
}

.footer .social-links a:hover {
    color: var(--color-accent);
}
/* This section is now handled above in the main particle settings */

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        gap: 20px;
    }

    h2.section-title {
        font-size: 2em;
    }

    /* Removed .media-wrapper specific rules as they are no longer needed with the new structure */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 992px) {
    .game-showcase {
        flex-direction: column; /* Stack vertically on smaller screens */
        gap: 0px;
        max-height: none; /* Remove max-height when stacking vertically */
    }
    .thumbnail-list {
    display: flex;
    flex-direction: row; /* Stack vertically by default */
    gap: 12px;
    width: 100%;
    max-width: 100%;
    flex: 1 0 auto;
    }
    .thumbnail {
        width: 150px; /* Fixed width for horizontal thumbnails */
        flex-shrink: 0;
        /* Calculate padding-top for 16:9 based on 150px width: (9/16) * 150px = 84.375px */
        padding-top: 84.375px; 
    }
    .main-display {
    width: 100%;
    aspect-ratio: 16 / 9;
    padding-top: 0;        /* Disable padding-top hack */
    position: relative;      /* Remove relative if unnecessary now */   
    }   
}


@media (max-width: 768px) {
    .navbar {
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    #about .about-content {
        flex-direction: column; /* Stack elements vertically */
        text-align: center;
        gap: 40px;
    }

    .profile-section {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }

    .skills-section-minimal {
        max-width: 100%;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }

    .profile-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 15px;
    }

    /* Minimal skills responsive */
    .skills-grid-minimal {
        gap: 6px;
    }

    .skill-item-minimal {
        padding: 5px 10px;
    }

    .skill-icon-minimal {
        font-size: 0.8em;
        margin-right: 5px;
    }

    .skill-name-minimal {
        font-size: 0.75em;
    }

    /* Integrated stats responsive */
    .stats-grid-integrated {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .stat-item-integrated {
        padding: 15px 10px;
    }

    .stat-number-integrated {
        font-size: 1.8em;
    }

    .stat-label-integrated {
        font-size: 0.8em;
    }

    .stat-item {
        flex: 1;
        padding: 12px 15px;
    }

    .stat-number {
        font-size: 1.6em;
    }

    .stat-label {
        font-size: 0.8em;
    }

    /* Video container responsive */
    .video-container {
        padding: 12px;
        border-radius: 10px;
    }

    /* Adjusted for the new game-showcase structure */
    .game-showcase {
        gap: 40px; /* Adjusted gap for vertical stacking */
    }

    /* Removed .media-wrapper specific rules as they are no longer needed with the new structure */

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust grid for smaller screens */
        gap: 30px;
    }

    .section-padding {
        padding: 60px 0;
    }

    h2.section-title {
        font-size: 1.8em;
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.7em;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9em;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }


    .profile-stats {
        flex-direction: column;
        gap: 12px;
    }

    /* Minimal skills mobile */
    .skills-grid-minimal {
        gap: 4px;
    }

    .skill-item-minimal {
        padding: 4px 8px;
    }

    .skill-icon-minimal {
        font-size: 0.75em;
        margin-right: 4px;
    }

    .skill-name-minimal {
        font-size: 0.7em;
    }

    /* Integrated stats mobile */
    .stats-grid-integrated {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-item-integrated {
        padding: 12px 8px;
    }

    .stat-number-integrated {
        font-size: 1.6em;
    }

    .stat-label-integrated {
        font-size: 0.75em;
    }

    .stat-item {
        padding: 10px 15px;
    }

    .stat-number {
        font-size: 1.4em;
    }

    .intro-text {
        padding: 20px;
    }

    .intro-text p {
        font-size: 1em;
    }

    .grid-container {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 25px;
    }

    .grid-item {
        padding: 20px;
    }
    
    /* Video container mobile */
    .video-container {
        padding: 8px;
        border-radius: 8px;
    }
    
    .game-details  {
    padding: 20px;
    }
    /* Removed .game-item specific rules as they are no longer needed with the new structure */

    /* Removed .media-wrapper specific rules as they are no longer needed with the new structure */
}

/* Hamburger menu styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1101;
    margin-left: 10px;
    position: absolute;
    top: 0px;
    right: 20px;
}
.menu-toggle .bar {
    width: 28px;
    height: 3px;
    background-color: var(--color-text-white);
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Slide-in panel nav styles */
@media (max-width: 900px) {
    .navbar {
        position: relative;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -260px;
        height: 100vh;
        width: 260px;
        background: var(--color-bg-darker);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 30px 30px 30px;
        gap: 30px;
        box-shadow: -4px 0 24px var(--color-shadow-dark);
        border-radius: 0 0 0 16px;
        display: flex;
        z-index: 1100;
        transition: right 0.35s cubic-bezier(.77,0,.18,1);
    }
    .nav-links.open {
        right: 0;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        font-size: 1.2em;
        width: 100%;
        display: block;
        padding: 12px 0;
    }
    .lang-switch {
        margin-top: 30px;
        margin-left: 0;

        justify-content: flex-start;
    }
    body.menu-open {
        overflow: hidden;
    }
}

/* Sticky language switcher for bottom right */
.lang-switch-sticky {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 2000;
    background: rgba(22,22,22,0.95);
    border-radius: 24px;
    box-shadow: 0 4px 24px var(--color-shadow-dark);
    padding: 10px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--color-border);
}
.lang-switch-sticky .button {
    min-width: 44px;
    padding: 8px 14px;
    font-size: 1em;
}
.lang-switch-sticky .button.active {
    background-color: var(--color-accent-hover);
    border: 2px solid var(--color-accent);
}

