/* 1. Light Theme is now the default */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --link-color: #0055ff; 
    --secondary-text: #444444; 
    --border-color: #cccccc;   
    --base-weight: 400; 
}

/* 2. Dark Theme is now the override */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #66b3ff;
    --secondary-text: #a0a0a0;
    --border-color: #333333;
    --base-weight: 300; 
}
/* --- Base Styles --- */
body {
    font-family: 'Intel One Mono', monospace;
    font-weight: 400;
    max-width: 680px;
    margin-top: 60px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 00px;
    padding: 0 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease; 
}

a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 50px;
}

h1 { font-size: 2.0em; font-weight: 300; margin: 0; }
h1 a { color: var(--text-color); }
h1 a:hover { text-decoration: none; }

nav { display: flex; gap: 20px; align-items: baseline; }
nav a { color: var(--secondary-text); }
nav a:hover { color: var(--text-color); }

button {
    background: none; border: none; padding: 0;
    color: var(--secondary-text); font-family: inherit;
    font-size: 1em; cursor: pointer;
}
button:hover { color: var(--text-color); text-decoration: underline; }

h3 {
    font-size: 1.1em; font-weight: 300; margin-top: 40px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* --- Project List Styles --- */
ul { list-style-type: none; padding: 0; }
li { margin-bottom: 20px; display: flex; flex-wrap: wrap; }

.date { width: 130px; color: var(--secondary-text); font-size: 0.9em; }
.project-details { flex-grow: 1; max-width: 500px; }
.tech-stack { font-size: 0.85em; color: var(--secondary-text); margin-left: 8px; }

.view-all { display: block; margin-top: 20px; font-size: 0.9em; }

/* --- Floating Theme Button --- */
.theme-float-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    /* background: 
        linear-gradient(90deg, #333 50%, transparent 0) repeat-x,
        linear-gradient(90deg, #333 50%, transparent 0) repeat-x,
        linear-gradient(0deg, #333 50%, transparent 0) repeat-y,
        linear-gradient(0deg, #333 50%, transparent 0) repeat-y;
    background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px;
    background-position: 0 0, 0 100%, 0 0, 100% 0; */
    color: var(--secondary-text);
    border: 1px dashed var(--border-color);
    animation: linearGradientMove .5s infinite linear;
    padding: 8px 14px;
    border-radius: 4px;
    z-index: 1000;
    transition: all 0.3s ease;

}

@keyframes linearGradientMove {
    100% {
        background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px;
    }
}

.theme-float-btn:hover {
    color: var(--text-color);
    border-color: var(--text-color);
    /* background: 
        linear-gradient(90deg, #e0e0e0, transparent 0) repeat-x,
        linear-gradient(90deg, #e0e0e0, transparent 0) repeat-x,
        linear-gradient(0deg, #e0e0e0, transparent 0) repeat-y,
        linear-gradient(0deg, --text-color, transparent 0) repeat-y; */
    text-decoration: none;
}

/* --- Tighter Spacing for Skills Section --- */
#skills li {
    margin-bottom: 6px; /* Reduces the gap specifically for skills */
}

/* --- Footer Styles --- */
footer {
    margin-top: 80px;
    padding-top: 30px;
    padding-bottom: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
}

.socials-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--secondary-text);
}

.socials-container a {
    color: var(--secondary-text);
}

.socials-container a:hover {
    color: var(--text-color);
}

.copy-discord {
    cursor: pointer;
    color: var(--secondary-text);
}

.copy-discord:hover {
    color: var(--text-color);
    text-decoration: underline;
}



/* --- Individual Project Page Styles --- */
#project-header h2 {
    font-size: 1.8em;
    font-weight: 300;
    margin-bottom: 5px;
    color: var(--text-color);
}

.short-desc {
    color: var(--secondary-text);
    font-size: 1.05em;
    margin-bottom: 30px;
}

/* 2x2 Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 40px 0;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.image-grid img:hover {
    opacity: 0.8;
}

/* Project Meta (Stack & Links) */
#project-meta {
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.meta-block {
    margin-top: 20px;
}

.meta-block h3 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: none;
    font-size: 1em;
}

.meta-block ul li {
    margin-bottom: 5px;
}

/* --- Image Lightbox Modal --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent black */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    /* Retain original aspect ratio when expanded */
    object-fit: contain; 
}

/* Mobile App Screenshot Grid (4 columns) */
.mobile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 40px 0;
}

.mobile-grid img {
    width: 100%;
    /* 9:16 aspect ratio forces a standard phone shape */
    aspect-ratio: 9 / 16; 
    object-fit: cover;
    border-radius: 8px; /* Slightly rounder to look like a phone */
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.mobile-grid img:hover {
    opacity: 0.8;
}

/* Vertical Image Grid (3 columns, 9:16 aspect ratio) */
.mobile-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 40px 0;
}

.mobile-grid-three img {
    width: 100%;
    aspect-ratio: 9 / 16; 
    object-fit: cover;
    border-radius: 8px; 
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.mobile-grid-three img:hover {
    opacity: 0.8;
}

--- Custom Scrollbar ---
/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
}

/* For Chrome, Edge, and Safari */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* --- Mobile Responsiveness --- */
/* These rules ONLY apply when the screen is 600px wide or smaller */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: center;   /* Centers the H1 and Nav block horizontally */
        text-align: center;    /* Ensures the text itself is perfectly centered */
        gap: 15px;
    }
    
    nav {
        justify-content: center; /* Ensures the links below your name are centered */
    }
    
    nav ul {
        justify-content: center;
    }

    li {
        flex-direction: column;
    }

    .date {
        width: 100%;
        margin-bottom: 4px;
        font-size: 0.85em;
    }

    .tech-stack {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }

    .theme-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 6px 10px;
        font-size: 0.85em;
        width: max-content;
        height: max-content;
        white-space: nowrap; 
    }

    /* Drop the mobile app grid down to 2 columns on small screens */
    .mobile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Drop the 3-column grid to 1 column on small phone screens */
    .mobile-grid-three {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}