details > summary {
  list-style: none; /* Firefox / Chrome */
}

details > summary::-webkit-details-marker {
  display: none; /* Safari */
}

details > summary {
  display: block; /* Overrides default 'list-item' */
  cursor: pointer;
}
:root {
    /* --- 1. THE PALETTE (Gruvbox Dark Definitions) --- */
    --gruv-bg:       #282828;  /* Dark0 (Main Body) */
    --gruv-bg-hard:  #1d2021;  /* Dark0_hard (Terminal Black) */
    --gruv-bg-soft:  #32302f;  /* Dark0_soft (Panels/Menus) */
    
    --gruv-fg:       #ebdbb2;  /* Light1 (Main Text) */
    --gruv-fg-dim:   #a89984;  /* Gray (Muted Text/Comments) */
    
    --gruv-red:      #fb4934;
    --gruv-red-dim:  #CC241D;
    --gruv-green:    #b8bb26;
    --gruv-green-dim:#98971A;
    --gruv-yellow:   #fabd2f;
    --gruv-yellow-dim:#D79921;
    --gruv-blue:     #83a598;
    --gruv-blue-dim: #458588;
    --gruv-purple:   #d3869b;
    --gruv-aqua:     #8ec07c;  
    --gruv-orange:   #fe8019;
    --gruv-gray:     #928374;

    /* --- 2. SEMANTIC MAP (How we use them) --- */
    /* Backgrounds */
    --bg-color:         var(--gruv-bg);
    --terminal-bg:      var(--gruv-bg-hard);
    --panel-bg:         var(--gruv-bg-soft);
    
    /* UI Elements */
    --border-color:     #504945;  /* Gruvbox Dark2 */
    --border-dim:       #3c3836;  /* Gruvbox Dark1 */
    --text-main:        var(--gruv-fg);
    --text-muted:       var(--gruv-gray);
    
    /* Accents */
    --accent:           var(--gruv-green-dim);    /* Main Brand Color */
    --accent-dim:       var(--gruv-green);              /* Darker Green */
    --link-color:       var(--gruv-blue-dim);
    --link-hover:       var(--gruv-orange);
    
    /* File Types */
    --file-dir:         var(--gruv-blue-dim);     /* Directories = Blue */
    --file-exec:        var(--gruv-green);    /* Executables = Green */
    --file-text:        var(--gruv-fg);       /* Text Files = White */

    /* Fonts */
    --font-main: 'JetBrains Mono', monospace;
    --font-mono: 'JetBrains Mono', 'NerdFont', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
}
.dir-path {
    color: var(--file-dir);
    font-weight: bold;
}
.prompt-text {
    color: var(--file-text);
    font-weight: bold;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent);
}

nav a {
    color: var(--file-dir);
    text-decoration: none;
    margin-left: 1.5rem;
    font-family: var(--font-mono);
    transition: color 0.3s;
}

nav a:hover {
    color: var(--gruv-blue);
}

/* Grid Layout */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
}

.profile-pic {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    border: 2px solid var(--accent-dim);
    display: block;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent-dim);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: var(--font-mono);
    margin-top: 1rem;
}

.btn:hover {
    background: var(--accent);
}

/* TERMINAL WINDOW UI */
.terminal-window {
    background: var(--terminal-bg);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    font-family: var(--font-mono);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.terminal-bar {
    background: var(--panel-bg);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-dim);
}

.dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* NOW USING GLOBAL VARIABLES */
.dot.red    { background: var(--gruv-red-dim); }
.dot.yellow { background: var(--gruv-yellow-dim); }
.dot.green  { background: var(--gruv-green); }

.terminal-bar .title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 auto;
    padding-right: 50px;
}

/* The actual play area */
.terminal-body {
    padding: 1rem;
    min-height: 400px;
    color: var(--accent);
    font-size: 1rem;
    position: relative;
}

/* CheerpJ creates a canvas we need to style */
#console-display canvas {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
}

.site-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .terminal-bar .title {
        display: none;
    }
}

/* --- NEW: Directory List (projects.html) --- */
.file-browser {
    padding: 0;
}

.file-list {
    display: flex;
    flex-direction: column;
}

.file-row {
    display: grid;
    grid-template-columns: 100px 80px 80px 80px 1fr;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-dim);
    cursor: pointer;
    color: var(--text-muted); /* Default text color for rows */
}

.file-row:hover {
    background-color: var(--panel-bg);
}

.header {
    color: var(--text-muted);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
    cursor: default;
}

/* Colors for file types - NOW USING VARIABLES */
.name.executable { color: var(--file-exec); font-weight: bold; } 
.name.text-file  { color: var(--file-text); } 
.name.directory  { color: var(--file-dir);  font-weight: bold; } 

/* The hidden details section */
.file-details {
    background: var(--terminal-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dim);
    font-family: var(--font-main);
}

.file-details p {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.file-details img {
    max-width: 100%;       /* Never wider than the container */
    max-height: 300px;     /* Cap the height (Adjust this number!) */
    width: auto;           /* Keep aspect ratio */
    height: auto;          /* Keep aspect ratio */

    display: block;        /* Fixes weird spacing below inline images */
    margin-top: 1rem;      /* Adds space between text and image */
    margin-bottom: 1rem;

    border: 1px solid var(--border-color);
    border-radius: 4px;
}

details[open] summary {
    background-color: var(--panel-bg);
}
.force-color {
    filter: none !important; /* "none" turns off grayscale and contrast shifts */
}

/* --- NESTED DIRECTORY STYLES --- */

/* The container for items inside a folder */
.nested-contents {
    margin-left: 1.5rem; /* Indent the children */
    padding-left: 0.5rem; /* Space from the tree line */
    border-left: 1px dashed var(--border-color); /* The visual tree line */
}

.directory-entry > summary:hover {
    background-color: var(--panel-bg);
}

/* Ensure the directory name color uses your Variable */
.name.directory {
    color: var(--file-dir); /* Aqua */
    font-weight: bold;
}

/* --- NEW: Game Page Layout (games.html) --- */
.game-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.game-menu {
    background: var(--panel-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.game-menu ul {
    list-style: none;
    padding: 0;
}

.game-link {
    display: block;
    padding: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    transition: 0.2s;
}

.game-link:hover, .game-link.active-game {
    color: var(--link-hover);
    background: var(--bg-color);
    padding-left: 1rem;
}

.status-text {
    padding: 2rem;
    font-family: var(--font-mono);
    color: var(--accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

/* Mobile Responsive */
@media (max-width: 800px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    .file-row {
        grid-template-columns: 1fr;
    }
    .perm, .user, .size, .date {
        display: none;
    }
}

/* --- MAN PAGE STYLES --- */

.man-pages {
    margin-top: 4rem;
    border-top: 2px dashed var(--border-color);
    padding-top: 2rem;
}

.doc-header h2 {
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: inline-block;
}

.man-entry {
    margin-bottom: 4rem;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.man-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    color: var(--gruv-yellow-dim); /* Classic Man Page Header Color */
}

.man-section {
    margin-bottom: 1.5rem;
    padding-left: 3rem;
}

.man-section h3 {
    margin-left: -3rem;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.man-list {
    list-style: none;
    padding: 0;
}

.man-list li {
    margin-bottom: 0.5rem;
}

.arg {
    font-weight: bold;
    color: var(--gruv-red-dim); /* Arguments in Red for contrast */
}

/* --- IMAGE GALLERY STYLES --- */
.man-gallery {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.terminal-figure {
    margin: 0;
    border: 1px solid var(--border-color);
    padding: 5px;
    background: var(--terminal-bg);
    max-width: 45%;
}

.img-content {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(80%);
    transition: filter 0.3s;
}

.terminal-figure:hover .img-content {
    filter: grayscale(0%);
}

.img-placeholder {
    width: 200px;
    height: 150px;
    background: var(--terminal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border: 1px dashed var(--border-color);
}

figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .man-section {
        padding-left: 0;
    }
    .man-section h3 {
        margin-left: 0;
    }
    .terminal-figure {
        max-width: 100%;
    }
}

/* --- SYSTEM ROWS (Zig-Zag Layout) --- */

.sys-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    padding: 2rem 0;
}

.sys-row.reverse {
    flex-direction: row-reverse;
}

.sys-text {
    flex: 1;
}

.sys-media {
    flex: 1;
    position: relative;
}

/* --- TERMINAL WINDOW FRAMES FOR IMAGES --- */
.window-frame {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
    overflow: hidden;
}

.window-bar {
    background: var(--border-dim); /* Slightly lighter than panel */
    padding: 5px 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.window-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.window-content img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(30%) contrast(110%);
    transition: filter 0.3s;
}

.window-frame:hover .window-content img {
    filter: grayscale(0%) contrast(100%);
}

/* --- TYPOGRAPHY FOR SECTIONS --- */
.sys-header {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    font-size: 1.5rem;
}

.sys-tag {
    display: inline-block;
    background: var(--border-dim);
    color: var(--text-main);
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: 3px;
    margin-right: 5px;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .sys-row, .sys-row.reverse {
        flex-direction: column;
        gap: 2rem;
    }
}
/* --- COWSAY / ASCII ART STYLES --- */

/* The container for the text */
.terminal-text {
    background-color: var(--terminal-bg); /* Uses your deep black variable */
    padding: 1.5rem;
    font-family: var(--font-mono);
    color: var(--text-main);
    overflow-x: auto; /* Adds scrollbar if the cow is too big for mobile */
}

/* The command prompt line */
.command-line {
    margin-bottom: 1rem;
    color: var(--text-main); /* Green text for the command */
    font-weight: bold;
}

.prompt {
    color: var(--text-main);
    margin-right: 0.5rem;
}

/* The ASCII Art itself */
.ascii-art {
    margin: 0;
    line-height: 1.2;
    font-weight: bold;
    color: var(--gruv-yellow-dim); /* Yellow cow! (Or use --accent for green) */

    /* Crucial for ASCII art alignment: */
    white-space: pre;
}

/* Hover Effect: Wake up the cow */
.window-frame:hover .ascii-art {
    color: var(--gruv-yellow); /* Changes color when you hover the window */
    transition: color 0.3s ease;
}
/* --- SOCIAL FOOTER (Home Page) --- */
.social-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px dashed var(--border-color);
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 1rem;
    border: 1px solid transparent; /* Invisible border to prevent jump on hover */
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 100px; /* Fixed width for uniformity */
}

.social-icon {
    font-size: 2.5rem;
    color: var(--text-muted); /* Start dimmed */
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.social-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* HOVER EFFECTS */
.social-item:hover {
    background-color: var(--panel-bg);
    border-color: var(--border-color);
    transform: translateY(-5px); /* Lift up slightly */
}

.social-item:hover .social-icon,
.social-item:hover .social-text {
    color: var(--accent); /* Light up Green (or your accent) */
}

