:root {
    --bg-color: #2B252F; 
    --orange: #EE9A2E;
    --pink: #FF99C6;
    --yellow: #E5C07B; 
    --white: #ffffff;
    --text-grey: #cccccc;
    --border-line: rgba(255, 255, 255, 0.15);
    --btn-shadow: #b3b3b3;
    --card-bg: rgba(255, 255, 255, 0.05);
}

@font-face { font-family: 'Supreme'; src: url('font/Supreme-Light.otf') format('opentype'); font-weight: 300; }
@font-face { font-family: 'Supreme'; src: url('font/Supreme-Regular.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'Supreme'; src: url('font/Supreme-Medium.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'Supreme'; src: url('font/Supreme-Bold.otf') format('opentype'); font-weight: 700; }
@font-face { font-family: 'Supreme'; src: url('font/Supreme-Extrabold.otf') format('opentype'); font-weight: 800; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    font-family: 'Supreme', sans-serif;
    color: var(--white);
    overflow-x: hidden;
    padding-top: 80px; 
}
.real-project-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
}
a { text-decoration: none; color: inherit; }

.navbar {
    width: 100%; 
    border-bottom: 1px solid var(--border-line); 
    display: flex;
    justify-content: center; 
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
}

.nav-content-container {
    width: 100%;
    padding: 20px 50px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: 0.5px; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { color: var(--text-grey); font-size: 0.9rem; font-weight: 400; transition: color 0.3s; }
.nav-links a:hover { color: var(--orange); }

.btn-keycap {
    background-color: var(--white);
    color: var(--bg-color);
    font-family: 'Supreme', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--btn-shadow), 0 5px 10px rgba(0,0,0,0.2);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-keycap:hover, .btn-keycap:active { 
    transform: translateY(4px); 
    box-shadow: 0 0 0 var(--btn-shadow), inset 0 2px 5px rgba(0,0,0,0.1); 
}
.btn-keycap .bracket { color: var(--orange); margin: 0 3px; font-weight: 800; }
.small-btn { padding: 8px 16px; font-size: 0.8rem; }

.full-screen-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 80px);
}

.page-sidebar {
    width: 300px;
    background: #231E26;
    border-right: 1px solid var(--border-line);
    padding: 30px 0;
    position: fixed; 
    top: 80px; 
    left: 0;
    height: calc(100vh - 80px);
    overflow-y: auto; 
    z-index: 100;
}

.explorer-title {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 25px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    font-family: sans-serif; 
}
.explorer-title svg { color: var(--text-grey); }

.sidebar-list { list-style: none; display: flex; flex-direction: column; }

.dropdown-btn {
    width: 100%; text-align: left; background: none; border: none;
    color: var(--white);
    padding: 10px 25px 10px 15px; 
    cursor: pointer; 
    font-family: 'Supreme', sans-serif; 
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px; 
    transition: background 0.2s;
}

.dropdown-btn:hover { background: rgba(255,255,255,0.05); }

.chevron-icon {
    color: var(--text-grey);
    transition: transform 0.2s ease;
    margin-right: 2px;
}

.nav-group.open .chevron-icon { transform: rotate(90deg); }

.sub-menu {
    display: none; 
    flex-direction: column; 
    list-style: none; 
    margin-left: 35px; 
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-group.open .sub-menu { display: flex; }

.sub-menu .sidebar-btn {
    width: 100%; text-align: left; background: none; border: none;
    padding: 8px 15px 8px 20px; 
    font-size: 0.9rem;
    color: var(--text-grey);
    cursor: pointer;
    font-family: 'Supreme', sans-serif; 
    transition: all 0.2s;
    position: relative;
}

.sub-menu .sidebar-btn:hover { background: rgba(255,255,255,0.05); color: var(--white); }

.sub-menu .sidebar-btn.active {
    background: rgba(238, 154, 46, 0.08); 
    color: var(--orange); 
    font-weight: 500;
}

.file-icon { font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; width: 18px; }
.file-icon.html { color: var(--orange); letter-spacing: -1px; font-family: monospace;}
.file-icon.js { color: var(--yellow); }
.file-icon.css { color: #5B95E8; font-size: 1.1rem; }

.file-icon img { width: 16px; height: auto; display: block; filter: grayscale(1); opacity: 0.7; transition: 0.3s; }
.nav-group.open .file-icon img, .dropdown-btn:hover .file-icon img { filter: grayscale(0); opacity: 1; }

.member-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.member-name { line-height: 1; font-weight: 500;}

.page-main-content {
    margin-left: 300px; 
    width: calc(100% - 300px);
    padding: 0;
    background-color: var(--bg-color);
    min-height: calc(100vh - 80px);
}

.page-header {
    padding: 50px 70px 20px 70px;
}

.curly-header { font-size: 3rem; font-weight: 400; color: var(--white); }
.curly-header .curly { color: var(--orange); }
.section-subtext { color: var(--text-grey); font-size: 1rem; line-height: 1.6; font-weight: 300; }

.category-divider {
    color: var(--white);
    font-family: 'Supreme', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    
    text-align: left;
    border-bottom: 1px solid var(--border-line);
    padding: 20px 70px 20px 70px; /* Swapped top margin for padding so bg color covers it */
    background: var(--bg-color);
    
    /* NEW STICKY TITLE CODE */
    position: sticky;
    top: 80px; /* Pins it right below the 80px navbar */
    z-index: 50; /* Ensures it stays visually on top of scrolling content below it */
}

.category-divider .bracket { color: var(--orange); }

.project-split-view {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.split-row {
    display: flex;
    width: 100%;
}

.split-left {
    width: 50%;
    background-color: #211C24;
    padding: 50px 50px 100px 70px;
    border-right: 1px solid var(--border-line);
}

.split-right {
    width: 50%;
    background-color: var(--bg-color);
    padding: 50px 70px 100px 50px;
}

.sticky-image {
    position: sticky;
    top: 170px; /* Pushed further down to make room for the new sticky header above it */
}

.placeholder-img-box {
    width: 100%;
    height: 450px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-grey);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
}

.split-right h4 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: 'Supreme', sans-serif;
    font-weight: 400;
}

.split-right p {
    color: var(--text-grey);
    line-height: 1.8;
    font-weight: 300;
    font-size: 1.05rem;
}

.project-tab-content { display: none; }
.project-tab-content.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* --- Tech Stack Icons within Text Overview --- */
.tech-stack-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-stack-icons img {
    height: 32px; 
    opacity: 0.9; 
    transition: all 0.3s ease; 
}

.tech-stack-icons img:hover {
    filter: grayscale(0%); 
    opacity: 1; 
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .page-sidebar { width: 250px; }
    .page-main-content { margin-left: 250px; width: calc(100% - 250px); }
}

@media (max-width: 900px) {
    .split-row { flex-direction: column; }
    .split-left, .split-right { width: 100%; padding: 30px; }
    .split-left { border-right: none; border-bottom: 1px solid var(--border-line); }
    .sticky-image { position: relative; top: 0; }
    .scroll-spacer { height: 50px; }
}

@media (max-width: 768px) {
    .full-screen-container { flex-direction: column; }
    .page-sidebar { 
        width: 100%; height: auto; position: relative; top: 0; 
        border-right: none; border-bottom: 1px solid var(--border-line); padding: 15px 0;
    }
    .page-main-content { margin-left: 0; width: 100%; }
    .category-divider { padding: 20px 30px 20px 30px; } /* Updated to reflect the new padding logic */
    .page-header { padding: 30px 30px 20px 30px; }
}
.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--orange);
    max-width: 0;
    animation: typing 1.5s steps(20, end) forwards, blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { max-width: 0; }
    to { max-width: 300px; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--orange); }
}
/* --- Graphic Design Bento Layout & Interactivity --- */
.graphic-header {
    padding: 50px 70px 30px 70px;
    background-color: var(--bg-color);
}

.graphic-header h4 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-family: 'Supreme', sans-serif;
    font-weight: 400;
}

.graphic-header p {
    color: var(--text-grey);
    line-height: 1.8;
    font-weight: 300;
    font-size: 1.05rem;
    max-width: 900px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 20px;
    padding: 0 70px 100px 70px;
}

.bento-grid.widescreen {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    grid-auto-rows: 220px;
}

.bento-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-line);
    background: var(--card-bg);
    position: relative; /* Crucial for overlay positioning */
    cursor: pointer;
}

/* Base image styling */
.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Added transition for the blur effect */
    transition: transform 0.6s ease, filter 0.6s ease;
}

/* NEW: The dark overlay that appears on hover */
.bento-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark background */
    display: flex; justify-content: center; align-items: center;
    opacity: 0; /* Hidden initially */
    transition: opacity 0.5s ease;
    z-index: 2;
}

/* NEW: The "Click to View" text */
.bento-overlay span {
    color: var(--orange); /* Uses your brand orange */
    font-family: 'Supreme', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transform: translateY(10px); /* Small animation pop */
    transition: transform 0.5s ease;
}

/* Hover Interactivity */
.bento-item:hover img {
    transform: scale(1.05); /* Premium zoom still applied */
    filter: blur(8px) brightness(0.7); /* NEW: Image blurs and darkens */
}

.bento-item:hover .bento-overlay {
    opacity: 1; /* Shows the dark background */
}

.bento-item:hover .bento-overlay span {
    transform: translateY(0); /* Text slides up smoothly */
}

/* Utility classes to make specific items larger */
.bento-span-2 { grid-column: span 2; }
.bento-row-2 { grid-row: span 2; }

/* -------------------------------------------------
   NEW: Lightbox/Modal Pop-up CSS
   (This is added dynamically via JS later, but needs styles here)
   -------------------------------------------------
*/
.lightbox-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 8, 11, 0.95); /* Deep dark background */
    z-index: 10000; /* Stays above everything */
    display: flex; justify-content: center; align-items: center;
    opacity: 0; /* Starts hidden for fade animation */
    pointer-events: none; /* Can't click through when hidden */
    transition: opacity 0.4s ease;
    padding: 20px;
    cursor: zoom-out; /* Indicates click to close */
}

/* Active class added by JS */
.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Keeps the body from scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* The actual image inside the pop-up */
.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    border: 1px solid var(--border-line);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: block;
    object-fit: contain; /* Shows full design proportionaly */
    cursor: default; /* Stops image itself from closing on click */
    
    /* Pop-in animation */
    transform: scale(0.9);
    transition: transform 0.4s ease-out;
}

/* Scale pop-in when active */
.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

/* Close Button (top right) */
.lightbox-close {
    position: absolute;
    top: 30px; right: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-line);
    width: 45px; height: 45px;
    border-radius: 50%;
    color: var(--orange);
    font-size: 1.5rem;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--white);
    color: var(--bg-color);
    transform: rotate(90deg); /* Playful rotate effect */
}

/* Mobile Responsiveness for Grid & Lightbox */
@media (max-width: 900px) {
    .graphic-header { padding: 40px 30px 20px 30px; }
    
    .bento-grid, .bento-grid.widescreen { 
        padding: 0 30px 80px 30px; 
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .bento-item img {
        height: auto; 
        aspect-ratio: 1 / 1; 
    }
    
    .bento-grid.widescreen .bento-item img {
        aspect-ratio: 16 / 9; 
    }
    
    .bento-span-2 { grid-column: span 1; }
    .bento-row-2 { grid-row: span 1; }
    
    /* Mobile Modal adjustments */
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    .lightbox-close {
        top: 20px; right: 20px;
        width: 38px; height: 38px;
        font-size: 1.2rem;
    }
}
/* --- JS Lazy Loading Fade Effect --- */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.6s ease, filter 0.6s ease !important;
}

img.loaded {
    opacity: 1 !important;
}