
:root {
    --bg-main: #646363;
    --bg-dark-box: #611934fb;
    --bg-light-box: #17da9f;
    --text-light: #ffffff;
    --text-dark: #000000c9;
    --link-dark-box: #00ffff;
    --link-light-box: #000000;
}

body:has(#theme-black-white:checked) {
    --bg-main: #646363;
    --bg-dark-box: #000000;
    --bg-light-box: #ffffff9c;
    --text-light: #ffffff;
    --text-dark: #000000;
    --link-dark-box: #00ffff;
    --link-light-box: #000000;
}

body:has(#theme-red-white:checked) {
    --bg-main: #646363;
    --bg-dark-box: #611934fb;
    --bg-light-box: #ffffff9c;
    --text-light: #ffffff;
    --text-dark: #000000;
    --link-dark-box: #00ffff;
    --link-light-box: #000000;
}

body {
    background-color: var(--bg-main);
    font-family: sans-serif;
}

/* Modifies only the projects page navigation container shape */
.topnav-circle {
    border-radius: 50rem !important; /* Overrides the border radius into a pill circle */
    padding: 0.5rem;
}

.topnav {
    background-color: var(--bg-light-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.9375rem;
    width: fit-content;
}

.topnav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: bold;
    margin: 0 0.625rem;
}

.header {
    color: var(--text-light);
    text-align: center;
    background-color: var(--bg-dark-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.9375rem;
    width: fit-content;
}

.gen {
    background-color: var(--bg-light-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.9375rem;
    width: fit-content;
    text-align: center;
}

.project-arrow {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-right: 0.3125rem;
}

.news {
    color: #ffffff;
    background-color: var(--bg-dark-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.9375rem;
    text-align: center;
    width: fit-content;
}

h2 {
    text-decoration: underline;
}

.notes {
    color: var(--text-dark);
    background-color: var(--bg-light-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.625rem;
    text-align: center;
    width: fit-content;
    border-radius: 0.9375rem;
}

.header a {
    font-size: 0.85rem; 
}

.header a, .news a, .ql a {
    color: var(--link-dark-box);
    text-decoration: none;
    font-weight: bold;
}

.gen a {
    color: var(--link-light-box);             
    text-decoration: none;
    font-weight: bold;
}

.topnav a:hover, .gen a:hover, .notes a:hover, .header a:hover, .news a:hover, .ql a:hover, .theme-switcher label:hover {
    color: #ffd700;
    text-decoration: underline;
    cursor: pointer;
}

.gen ul {
    list-style: none;           
    padding: 0;                 
    margin: 0.625rem 0;
}

.gen li {
    margin: 0.5rem 0;              
    text-align: left;           
}

.gen img {
    vertical-align: middle;     
    margin-right: 0.5rem;          
}

.ql {
    color: var(--text-light);
    background-color: var(--bg-dark-box);
    padding: 0.5rem;
    margin: 0.3125rem auto;
    border-radius: 0.9375rem;
    text-align: center;
    width: fit-content;
}

.rainbow-text:hover {
  background: linear-gradient(to right, #FF1493, purple, #28c930, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; 
}

/* ==========================================
   4. THEMING CONTROLS UI STYLING
   ========================================== */
.theme-switcher {
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    padding: 0.625rem 0.9375rem;
    border-radius: 0.5rem;
    margin: 0.625rem auto;
    width: fit-content;
    font-family: sans-serif;
    font-size: 0.9rem;
}

.theme-switcher input {
    margin-left: 0.9375rem;
    cursor: pointer;
}

.theme-switcher label {
    font-weight: bold;
    margin-left: 0.1875rem;
}



/* ==========================================
   PROJECTS PAGE CLASS STYLES (UPDATED WITH CLOSE)
   ========================================== */
.gallery-container {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.9375rem;
}

.recipe-card {
    max-width: 12.5rem;
}

.recipe-card summary {
    cursor: pointer;
    list-style: none;
}

/* Removes standard toggle triangles across browsers */
.recipe-card summary::-webkit-details-marker,
.close-trigger summary::-webkit-details-marker {
    display: none;
}

.thumb-img {
    width: 12.5rem;
    height: auto;
    border: 0.0625rem solid #7c7c7c;
    border-radius: 0.3125rem;
}

.click-text {
    font-size: 0.875rem;
    margin: 0.3125rem 0;
    text-align: center;
}

/* Fixed overlay backdrop stops images from overlapping lower sections */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.full-img {
    position: relative;
    z-index: 1005;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 0.1875rem solid #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 1.5625rem rgba(0,0,0,0.5);
}

/* Position the close button in the top right corner */
.close-trigger {
    position: absolute;
    top: 1.25rem;
    right: 1.875rem;
    z-index: 1010;
}

/* Style the close button text appearance */
.close-trigger summary {
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.close-trigger summary:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #ffd700;
}