:root{
/* Border: */
    --border-radius-size: 0px;
    --border-color: #2d3748;
    
/* Background colors: */
    --bg-body: #0b0f19;
    --bg-main: #1e222b;
    --bg-card: #141820;

/* Text Colors: */
    --primary-color: #1678f9;
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --text-body: #cbd5e1;
}

/* ==========================================================================
   01. GLOBAL RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('images/Space.png');
    background-size: cover;    
    background-position: center;  
    background-repeat: no-repeat; 
    background-attachment: fixed;  
    color: var(--text-body);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}


/* ==========================================================================
   02. MAIN CONTAINER (Dark Theme, Full Width)
   ========================================================================== */

.portfolio-container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    background: var(--bg-main);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}


/* ==========================================================================
   03. TOP HEADER & NAVIGATION
   ========================================================================== */

.top-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-main);
    z-index: 1000;
    border-bottom: 2px solid var(--border-color);
    padding-top: 10px; 
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-name {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-name:hover {
    color: var(--primary-color);
}

.brand-icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--border-radius-size);;
    border: 1px solid #4a5568;
}

.table-of-contents {
    display: flex;
    gap: 30px;
    align-items: center;
}

.table-of-contents a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   04. ABOUT ME SECTION (2-Column Layout)
   ========================================================================== */

.about-me-box {
    background-color: transparent;
}

.about-me-box h2, 
.projects-box h2,
.contact-box h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main 2-column layout */
.about-grid { 
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: start;
}

/* Left column: stacks profile card above skills/games card */
.about-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--border-radius-size);
    padding: 12px;
}

.profile-card img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: var(--border-radius-size);;
    display: block;
}

.favorite-games-card {
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--border-radius-size);
    padding: 20px;
}

.favorite-games-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.favorite-games-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Right column: Single large card containing all text */
.about-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.about-block {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-size);
    padding: 25px;
    height: 100%;
}

.about-block ul {
    margin-top: 4px;
    padding-left: 20px; 
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-block li {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.35;
}

.tech-list .primary {
    color: var(--text-heading);
    font-weight: 500;
}

.tech-list .secondary {
    color: var(--text-body);
    opacity: 0.65;
}

.about-right p {
    line-height: 1.7;
    color: var(--text-body);
    font-size: 1.05rem;
}

.about-right strong {
    font-weight: 700;
    color: var(--text-main);
}


/* ==========================================================================
   05. PROJECTS SECTION & CARDS
   ========================================================================== */

.projects-box {
    background-color: transparent;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

a.project-card {
    border: 2px solid var(--border-color);
    padding: 20px;
    background: var(--bg-card); 
    border-radius: var(--border-radius-size);
    display: flex;
    flex-direction: column;
    text-decoration: none; 
    color: inherit; 
    transition: border-color 0.2s ease;
}

a.project-card:hover {
    border-color: var(--primary-color);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--border-radius-size);
    margin-bottom: 12px;
    background-color: var(--bg-body);
    padding: 2px;
    border: 2px solid var(--border-color);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ==========================================================================
   06. CONTACT SECTION
   ========================================================================== */

.contact-box {
    background-color: transparent;
    text-align: center;
    padding-top: 20px;
}

.contact-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-size);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.contact-content p {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.6;
}

.contact-content a.email-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.contact-content a.email-link:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-top: 10px;
}

.social-icon-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon-link img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0.8);
    transition: filter 0.2s ease;
}

.social-icon-link:hover {
    transform: translateY(-3px);
}

.social-icon-link:hover img {
    filter: brightness(1.2);
}


/* ==========================================================================
   07. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portfolio-container {
        padding: 20px;
    }

    .top-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .table-of-contents {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .project-grid {
        grid-template-columns: 1fr; 
    }
}

/* ==========================================================================
   VERTICAL STORYLINE LAYOUT STYLES
   ========================================================================== */

.project-story-section {
    display: flex;
    flex-direction: column;
    gap: 35px; /* Creates clean, consistent spacing between each block */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.story-header {
    text-align: center;
    margin-bottom: 10px;
}

.story-header h2 {
    font-size: 2rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Media Blocks (Images / Videos) */
.story-media-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-size);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-media-box img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius-size);
    display: block;
}

/* Text Story Cards */
.story-text-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-size);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.story-text-card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    display: inline-block;
    align-self: flex-start;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 4px;
    margin-bottom: 5px;
}

.story-text-card h4 {
    font-size: 1.25rem;
    color: var(--text-main);
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    margin-bottom: 5px;
}

.story-text-card p {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.7;
}

.story-text-card ul {
    margin-top: 4px;
    padding-left: 20px; 
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-text-card li {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.35;
}

/* Collapsible Dropdown Button */
.contribution-dropdown {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-size);
    margin-top: 10px;
    margin-bottom: 15px; /* Space before the next category heading */
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.contribution-dropdown:hover {
    border-color: var(--primary-color);
}

/* The clickable button bar */
.contribution-dropdown summary {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 10px 14px;
    cursor: pointer;
    list-style: none; /* Removes default browser triangle */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Custom +/- toggle indicator on the right */
.contribution-dropdown summary::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 400;
}

.contribution-dropdown[open] summary::after {
    content: "-";
}

/* The content container revealed when opened */
.dropdown-content {
    padding: 12px 14px 16px 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-content p {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.5;
}

/* Media/Image container inside dropdowns */
.dropdown-media {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dropdown-media img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--border-radius-size);
    border: 1px solid var(--border-color);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Creates a 16:9 aspect ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-size);
}

.divider {
    border: none;
    border-top: 4px solid var(--border-color);
    margin: 15px 0;
}

/* Make portfolio images look clickable */
.dropdown-media img, .story-media-box img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.dropdown-media img:hover, .story-media-box img:hover {
    opacity: 0.85;
}

/* Modal Background Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Stays on top of everything */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(11, 15, 25, 0.9); /* Dark background matching your theme */
}

/* The Expanded Image inside the Modal */
.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-size);
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Close Button ('X') */
.close-modal {
    position: absolute;
    top: 25px;
    right: 40px;
    color: var(--text-main);
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--primary-color);
}