@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&family=JetBrains+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,500&display=swap');

:root {
    --bg-app: #121212; --bg-panel: #1e1e1e; --bg-panel-light: #2a2a2a; 
    --border: #333333; --border-active: #555555;
    --text-main: #e0e0e0; --text-muted: #858585;
    --accent: #2979ff; --accent-hover: #5391ff; --rec: #ff3b30; --success: #00e676;
    --radius: 6px; --header-h: 70px;
    --timeline-h: 24px;
    --bottom-nav-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--bg-app);
    color: var(--text-main); font-family: 'Inter', sans-serif;
    font-size: 15px; line-height: 1.6; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}
a { text-decoration: none; color: inherit; transition: 0.2s ease; }
img, video, iframe { max-width: 100%; display: block; border-radius: var(--radius); }
h1, h2, h3, h4 { color: white; font-weight: 700; letter-spacing: -0.5px; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* --- LOADER --- */
#loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 20000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1); }
.loader-ui { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rec-dot { width: 12px; height: 12px; background: var(--rec); border-radius: 50%; display: inline-block; margin-right: 8px; animation: blink 1s infinite; }
.loader-timecode { font-family: 'JetBrains Mono', monospace; font-size: 3rem; color: white; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: 0; } }
body.loaded #loader { transform: translateY(-100%); }

/* --- HEADER & BRANDING --- */
header { height: var(--header-h); padding: 0 30px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; background: rgba(18, 18, 18, 0.95); backdrop-filter: blur(10px); }
.logo a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 32px; width: auto; opacity: 0.9; }
.logo-text { font-weight: 800; color: white; font-size: 1.1rem; letter-spacing: -0.5px; text-transform: uppercase; }
.logo-role { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); background: #222; padding: 3px 6px; border-radius: 4px; border: 1px solid #333; text-transform: uppercase; letter-spacing: 0.5px; }
nav.desktop-nav ul { display: flex; gap: 5px; list-style: none; background: #000; padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
nav.desktop-nav a { padding: 8px 16px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); border-radius: 4px; display: flex; align-items: center; gap: 8px; }
nav.desktop-nav a:hover { color: white; background: var(--bg-panel-light); }
nav.desktop-nav a.active { background: var(--bg-panel); color: white; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
nav.desktop-nav a i { font-size: 1.1rem; }

.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: var(--bottom-nav-h); background: rgba(18,18,18,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--border); z-index: 1000; justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #666; font-size: 0.65rem; font-weight: 600; width: 100%; height: 100%; }
.mobile-nav a i { font-size: 1.4rem; margin-bottom: 2px; }
.mobile-nav a.active { color: var(--accent); }
.mobile-nav a.active i { color: var(--accent); }

/* --- TIMELINE --- */
#timeline-container { position: fixed; top: var(--header-h); left: 0; width: 100%; height: var(--timeline-h); background: #1a1a1a; z-index: 100; border-bottom: 1px solid #333; overflow: hidden; user-select: none; }
#timeline-ruler { width: 100%; height: 100%; position: absolute; top: 0; left: 0; background-image: linear-gradient(90deg, #666 1px, transparent 1px), linear-gradient(90deg, #444 1px, transparent 1px); background-size: 100px 60%, 10px 30%; background-repeat: repeat-x; background-position: bottom; }
.tc-marker { position: absolute; top: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.55rem; color: #666; transform: translateX(-50%); pointer-events: none; }
#timeline-playhead { position: absolute; top: 0; left: 0; width: 1px; height: 100%; background: var(--accent); z-index: 102; box-shadow: 0 0 4px rgba(41, 121, 255, 0.6); transition: left 0.1s linear; }
#timeline-playhead::before { content: ''; position: absolute; top: 0; left: -5px; width: 11px; height: 12px; background: var(--accent); clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 50% 100%, 0% 50%); }

/* --- TRANSITIONS --- */
main { flex: 1; display: flex; flex-direction: column; padding-top: var(--timeline-h); opacity: 1; transform: translate(0) scale(1); filter: blur(0); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0, 0, 1), filter 0.5s ease; }
body.exiting-fade main { opacity: 0; }
body.exiting-slide main { opacity: 0; transform: translateY(-70px); }
body.exiting-scale main { opacity: 0; transform: scale(0.9); filter: blur(8px); }

.container { max-width: 1600px; margin: 0 auto; padding: 0 30px; width: 100%; }
.section { padding: 60px 0; }
.fade-in-up { opacity: 0; transform: translateY(15px); animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* --- CARDS --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 3rem; }
.filter-btn { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; text-transform: uppercase; font-weight: 600; font-family: 'Inter', sans-serif; transition: 0.2s; }
.filter-btn:hover { background: var(--bg-panel-light); color: white; border-color: var(--border-active); }
.filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.filter-count { font-size: 0.7rem; opacity: 0.6; margin-left: 4px; }

/* GRID FIX for Mobile/Tablet */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.grid.fixed-3 { grid-template-columns: repeat(3, 1fr); }

.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: 0.2s; position: relative; display: flex; flex-direction: column; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: 0%; background: var(--accent); transition: width 0.3s ease; }
.card:hover::after { width: 100%; }
.card-img { height: 220px; background: #1a1a1a; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; opacity: 0.8; }
.card:hover .card-img img { opacity: 1; }
.card-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: 0.3s; }
.card.has-video:hover .card-img img { opacity: 0; }
.card.has-video:hover .card-video { opacity: 1; }
.card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--border); }
.tags-wrapper { display:flex; gap:6px; flex-wrap:wrap; margin-bottom: 0.5rem; }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); background: #111; padding: 4px 8px; border-radius: 3px; border: 1px solid #333; font-weight: 700; letter-spacing: 0.5px; }
.card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.card-subtitle { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* --- PROJECT DETAIL --- */
.hero-project { height: 50vh; width: 100%; position: relative; overflow: hidden; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.hero-project img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; mask-image: linear-gradient(to bottom, black 20%, transparent 100%); }
.hero-text { position: absolute; bottom: 0; left: 0; width: 100%; padding: 0 30px 4rem; max-width: 1600px; margin: 0 auto; right: 0; }
.hero-text h1 { font-size: 4rem; margin: 10px 0 0; line-height: 1; }
.project-subtitle { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 1.2rem; margin-top: 10px; }
.project-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 40px; padding-bottom: 4rem; }
.project-sidebar { position: sticky; top: calc(var(--header-h) + var(--timeline-h) + 30px); height: fit-content; }
.info-box { background: var(--bg-panel); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.info-header { border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 15px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; display: flex; justify-content: space-between; }
.info-item { margin-bottom: 1.2rem; display: flex; justify-content: space-between; align-items: baseline; }
.info-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.info-val { font-size: 0.95rem; color: white; text-align: right; }
.btn-full { display:block; width:100%; background: var(--accent); color: white; text-align:center; padding:12px; border-radius:4px; font-weight:600; font-size:0.8rem; text-transform:uppercase; transition:0.2s; }
.btn-full:hover { background: var(--accent-hover); }
.btn-outline { display:block; width:100%; text-align:center; padding:10px; border:1px solid var(--border-active); border-radius:4px; color:var(--text-muted); font-size:0.8rem; text-transform:uppercase; margin-top:15px; }
.btn-outline:hover { color:white; border-color:white; }

/* CONTENT & SCROLLS */
.project-content { font-size: 1.1rem; color: #d0d0d0; max-width: 90ch; }
.project-content p { margin-bottom: 1.5rem; }
.project-content h1, .project-content h2, .project-content h3 { margin-top: 3rem; color:white; }
.project-content img { margin: 2rem 0; cursor: pointer; border: 1px solid var(--border); }
.project-content blockquote:not(.tiktok-embed):not(.twitter-tweet) { border-left: 4px solid var(--accent); background: linear-gradient(90deg, rgba(41,121,255,0.05) 0%, transparent 100%); padding: 25px; margin: 30px 0; font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #fff; font-style: italic; border-radius: 0 8px 8px 0; }
.project-content blockquote small { display: block; margin-top: 15px; font-family: 'Inter', sans-serif; font-size: 0.8rem; font-style: normal; font-weight: 700; color: var(--accent); text-transform: uppercase; }

.video-scroll, .gallery-carousel { display: flex; gap: 20px; overflow-x: auto; margin-bottom: 2rem; scroll-snap-type: x mandatory; mask-image: linear-gradient(to right, black 85%, transparent 100%); padding-right: 15%; padding-top: 20px; background-image: linear-gradient(90deg, rgba(100, 100, 100, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 60, 60, 0.2) 1px, transparent 1px); background-size: 100px 8px, 20px 5px; background-repeat: repeat-x; background-position: top left; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.video-scroll::-webkit-scrollbar, .gallery-carousel::-webkit-scrollbar { height: 6px; background: transparent; }
.video-scroll::-webkit-scrollbar-thumb, .gallery-carousel::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.video-scroll::-webkit-scrollbar-thumb:hover, .gallery-carousel::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.video-scroll .video-item { flex: 0 0 85%; margin-bottom: 0; scroll-snap-align: center; }
.video-item { background: black; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin-bottom: 2rem; position: relative; aspect-ratio: 16/9; }
.video-item video, .video-item iframe { width: 100%; height: 100%; }
.video-caption { position: absolute; top: 20px; left: 20px; padding: 6px 12px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(2px); color: white; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; border-radius: 4px; border-left: 2px solid var(--accent); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 20; text-transform: uppercase; letter-spacing: 0.5px; }
.video-item:hover .video-caption { opacity: 1; }
.video-item.is-playing .video-caption, .video-item.is-playing:hover .video-caption { opacity: 0 !important; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 3rem 0; width: 100%; }
.gallery-grid img { width: 100%!important; height: 250px!important; object-fit: cover; margin: 0!important; border:1px solid #333; display: block; transition: 0.2s; }
.gallery-grid img:hover { filter: brightness(1.2); border-color: var(--accent); }
.gallery-carousel img { flex: 0 0 300px!important; height: 400px!important; object-fit: cover; margin: 0!important; border:1px solid #333; scroll-snap-align: center; display: block; transition: 0.2s; }
.gallery-carousel img:hover { border-color: var(--accent); }

.bio-card { max-width: 900px; margin: 0 auto; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: 4rem; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.bio-card img { max-width: 300px; margin: 0 auto 2rem; border-radius: 8px; border: 1px solid #333; }
.bio-avatar-container { display: flex; justify-content: center; margin-bottom: 2rem; }
.bio-avatar { width: 150px; height: 150px; border-radius: 50% !important; object-fit: cover; aspect-ratio: 1 / 1; border: 3px solid var(--accent); box-shadow: 0 5px 20px rgba(0,0,0,0.5); display: block; }
.bio-header-name { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 0; line-height: 1.1; color: white; }
.bio-header-role { text-align: center; font-family: 'JetBrains Mono', monospace; color: var(--accent); margin-top: 5px; margin-bottom: 40px; font-size: 0.9rem; letter-spacing: 1px; }

.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; margin-bottom: 2rem; border-radius: var(--radius); border: 1px solid var(--border); background: black; }
.embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
blockquote.tiktok-embed { background-color: var(--bg-panel)!important; border: 1px solid var(--border)!important; border-radius: 8px!important; color: white!important; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: auto; font-size: 0.8rem; color: #666; background: #0a0a0a; }
.footer-content { display: flex; align-items: center; width: 100%; }
.footer-content > *:first-child { flex: 1; text-align: left; }
.footer-content > *:last-child { flex: 1; text-align: right; }
.status-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; background: #1a1a1a; padding: 6px 12px; border-radius: 4px; border: 1px solid #333; margin: 0 auto; width: fit-content; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.green { background-color: #00e676; box-shadow: 0 0 0 0 rgba(0, 230, 118, 1); animation: pulse-green 2s infinite; }
.status-dot.red { background-color: #ff3b30; }
@keyframes pulse-green { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); } }

.cookie-banner { position: fixed; bottom: -100%; left: 0; width: 100%; background: rgba(18,18,18,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--border); z-index: 9999; transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1); padding: 20px 0; }
.cookie-banner.show { bottom: 0; }
.cookie-content { max-width: 1600px; margin: 0 auto; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; }
.cookie-banner button { background: var(--accent); color: white; border: none; padding: 8px 20px; border-radius: 4px; font-weight: 700; font-size: 0.75rem; cursor: pointer; text-transform: uppercase; }

/* ADMIN & MODAL UI */
body.admin-body { flex-direction: row; background: #141414; overflow-x: hidden; }
.admin-sidebar { width: 250px; min-width: 250px; background: #1e1e1e; border-right: 1px solid #333; padding: 2rem 1.5rem; position: fixed; height: 100vh; overflow-y: auto; z-index: 10; }
.admin-menu { display: flex; flex-direction: column; gap: 6px; }
.admin-menu a { padding: 12px 16px; border-radius: 6px; color: #888; font-weight: 500; font-size: 0.85rem; display: flex; align-items: center; gap: 12px; transition: all 0.2s ease; border: 1px solid transparent; }
.admin-menu a:hover { background: #2a2a2a; color: white; }
.admin-menu a.active { background: rgba(41, 121, 255, 0.1); color: var(--accent); border-color: rgba(41, 121, 255, 0.2); border-left: 1px solid rgba(41, 121, 255, 0.2); }
.admin-menu a.active i { color: var(--accent); }
.admin-main { margin-left: 250px; width: calc(100% - 250px); padding: 40px; background: #141414; }
.admin-card { background: #1e1e1e; border: 1px solid #333; border-radius: 8px; padding: 30px; margin-bottom: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.admin-card h3 { border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 25px; font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-center-layout { max-width: 800px; margin: 0 auto; }
.form-input, .form-textarea, select { width: 100%; padding: 12px 15px; background: #111; border: 1px solid #333; color: white; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 0.9rem; transition: border 0.2s; }
.form-input:focus, .form-textarea:focus, select:focus { border-color: var(--accent); }
.form-label { display: block; margin-bottom: 8px; color: #aaa; font-size: 0.75rem; text-transform: uppercase; font-weight: 700; margin-top: 1.2rem; letter-spacing: 0.5px; }
.form-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.btn { background: var(--accent); color: white; border: none; padding: 12px 24px; border-radius: 6px; font-weight: 600; cursor: pointer; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(41,121,255,0.3); transition: 0.2s; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-sm { padding: 6px 12px; font-size: 0.7rem; background: #333; border:1px solid #444; margin-left: 5px; }
.btn-sm:hover { background: #444; border-color: #666; }
.btn-icon-tiny { background: #111; color: white; border: 1px solid #444; width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-left: -1px; }
.btn-icon-tiny:hover { background: #222; }
.media-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10000; display: none; justify-content: center; align-items: center; padding: 20px; }
.media-modal-overlay.active { display: flex; }
.media-modal { background: #1e1e1e; border: 1px solid #333; border-radius: 8px; width: 100%; max-width: 1400px; height: 85vh; max-height: 900px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.8); overflow: hidden; }
.media-modal-header { padding: 15px 20px; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; background: #252525; flex-shrink: 0; }
.media-toolbar { display: flex; gap: 15px; align-items: center; }
.media-toolbar select { padding: 6px 10px; background: #111; border: 1px solid #444; color: white; border-radius: 4px; font-size: 0.8rem; outline: none; }
.media-toolbar input[type="range"] { width: 120px; accent-color: var(--accent); cursor: pointer; }
.media-modal-grid { flex: 1; padding: 20px; overflow-y: auto; overflow-x: hidden; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--mm-size, 150px), 1fr)); gap: 15px; align-content: start; }
.media-modal-grid::-webkit-scrollbar { width: 10px; }
.media-modal-grid::-webkit-scrollbar-track { background: #151515; }
.media-modal-grid::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; border: 2px solid #151515; }
.media-modal-grid::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.media-item { cursor: pointer; border: 2px solid transparent; border-radius: 6px; overflow: hidden; position: relative; background: #000; aspect-ratio: 16/9; transition: transform 0.1s, border-color 0.2s; }
.media-item:hover { border-color: var(--accent); transform: scale(1.02); z-index: 5; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item-name { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: white; font-size: 0.65rem; padding: 8px 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px black; font-family: 'JetBrains Mono', monospace; }
.project-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project-list-item { background: #252525; border: 1px solid #333; border-radius: 8px; overflow: hidden; transition: 0.2s; position: relative; }
.project-list-item:hover { border-color: #555; transform: translateY(-2px); }
.pli-img { height: 160px; background-size: cover; background-position: center; border-bottom: 1px solid #333; position: relative; }
.pli-info { padding: 15px; }
.pli-info strong { display: block; font-size: 1rem; margin-bottom: 5px; color: white; }
.pli-actions { display: flex; gap: 15px; margin-top: 15px; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #1e1e1e; border: 1px solid #333; padding: 25px; border-radius: 8px; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.1); position: relative; overflow: hidden; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: white; line-height: 1; margin: 10px 0 0; }
.stat-label { color: #888; font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.fade-img { opacity: 0; transition: opacity 0.4s ease-out; will-change: opacity; }
.fade-img.loaded { opacity: 1; }
.search-bar { width: 100%; padding: 12px 15px; border: 1px solid #444; background: #111; color: white; border-radius: 6px; font-size: 0.9rem; margin-bottom: 20px; font-family: 'Inter'; }
.search-bar:focus { border-color: var(--accent); }
.disk-bar { width: 100%; height: 8px; background: #333; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.disk-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.tbl-clean { width: 100%; border-collapse: collapse; font-size: 0.85rem; color: #ccc; }
.tbl-clean th { text-align: left; padding: 10px; border-bottom: 1px solid #444; color: #888; font-size: 0.7rem; text-transform: uppercase; }
.tbl-clean td { padding: 10px; border-bottom: 1px solid #333; vertical-align: middle; }
.tbl-clean tr:last-child td { border: none; }
.admin-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: 0.3s; backdrop-filter: blur(5px); }
.admin-loader.active { visibility: visible; opacity: 1; }
.spinner { width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.1); border-top: 3px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.dash-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.dash-btn { background: #252525; padding: 20px; border-radius: 8px; border: 1px solid #333; text-align: center; color: white; font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: 0.2s; }
.dash-btn:hover { background: #333; transform: translateY(-3px); border-color: var(--accent); }
.dash-btn i { font-size: 2rem; color: var(--accent); }
.dash-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.tool-item { background: #111; border: 1px solid #333; padding: 15px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; transition: 0.2s; }
.tool-item:hover { border-color: #555; }
.tool-info { display: flex; flex-direction: column; }
.tool-info strong { font-size: 0.9rem; color: white; }
.tool-info small { font-size: 0.75rem; color: #888; margin-top: 2px; }
.login-card { width: 100%; max-width: 360px; padding: 3rem; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.priv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.priv-col { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; height: fit-content; }
.priv-item { display: flex; align-items: center; gap: 15px; padding: 12px; background: #121212; border-radius: 4px; border: 1px solid var(--border); transition: 0.2s; margin-bottom: 10px; }
.priv-item:hover { border-color: var(--accent); transform: translateX(4px); }
.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90%; max-height: 90vh; border-radius: 8px; box-shadow: 0 0 30px rgba(0,0,0,0.5); border: 1px solid #333; }
.lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 2rem; color: white; cursor: pointer; }
#toast { visibility: hidden; min-width: 250px; margin-left: -125px; background-color: var(--success); color: #000; text-align: center; border-radius: 4px; padding: 16px; position: fixed; z-index: 10000; left: 50%; bottom: 30px; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.3s, bottom 0.3s; }
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }
.handle { cursor: grab; color: #fff; background: rgba(0,0,0,0.6); padding: 5px; position: absolute; top: 10px; right: 10px; border-radius: 4px; }
.vid-row { background: #121212; padding: 15px; border: 1px solid #333; margin-bottom: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: end; border-radius: 6px; }
.social-embed-wrapper { display: flex; justify-content: center; margin: 2.5rem 0; width: 100%; }
.instagram-media, .twitter-tweet, .tiktok-embed { margin: 0 auto !important; }
.twitter-tweet { background-color: transparent !important; }
.tag.tag-color-0 { color: #fff; background: rgba(144, 119, 190, 0.2); border-color: #9077BE; }
.tag.tag-color-1 { color: #fff; background: rgba(96, 93, 142, 0.2); border-color: #605D8E; }
.tag.tag-color-2 { color: #fff; background: rgba(71, 159, 159, 0.2); border-color: #479F9F; }
.tag.tag-color-3 { color: #fff; background: rgba(199, 130, 158, 0.2); border-color: #C7829E; }
.tag.tag-color-4 { color: #fff; background: rgba(71, 150, 188, 0.2); border-color: #4796BC; }
.tag.tag-color-5 { color: #fff; background: rgba(75, 143, 83, 0.2); border-color: #4B8F53; }
.tag.tag-color-6 { color: #fff; background: rgba(183, 92, 95, 0.2); border-color: #B75C5F; }
.tag.tag-color-7 { color: #fff; background: rgba(212, 156, 64, 0.2); border-color: #D49C40; }
.reel-container { width: 90%; max-width: 1200px; aspect-ratio: 16/9; background: black; border-radius: 8px; overflow: hidden; box-shadow: 0 0 50px rgba(0,0,0,0.8); position: relative; z-index: 10001; }
.reel-container video { width: 100%; height: 100%; object-fit: contain; }

/* Visual Media Manager (Tools) */
.media-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; margin-top: 20px; }
.mm-item { background: #111; border: 1px solid #333; border-radius: 6px; overflow: hidden; transition: 0.2s; position: relative; }
.mm-item:hover { border-color: var(--accent); }
.mm-check { position: absolute; top: 10px; left: 10px; z-index: 10; transform: scale(1.3); cursor: pointer; }
.mm-preview { height: 100px; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #333; }
.mm-preview img { width: 100%; height: 100%; object-fit: cover; }
.mm-preview video { width: 100%; height: 100%; object-fit: cover; }
.mm-info { padding: 10px; }
.mm-name { font-size: 0.75rem; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; font-family: 'JetBrains Mono'; }
.mm-date { font-size: 0.65rem; color: #666; font-family: 'JetBrains Mono'; }

/* Sortable Video List (Project Edit) */
#video-sort-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.video-sort-item { display: flex; gap: 10px; background: #111; border: 1px solid #333; padding: 10px; border-radius: 4px; align-items: center; }
.vsi-handle { cursor: grab; color: #666; padding: 5px; display: flex; align-items: center; }
.vsi-handle:hover { color: white; }
.vsi-content { flex: 1; }

/* === RESPONSIVE TABLET (MAX 1024px) === */
@media(max-width: 1024px) { 
    .grid.fixed-3 { grid-template-columns: repeat(2, 1fr); } 
    .gallery-grid { grid-template-columns: repeat(2, 1fr); } 
    .project-layout { gap: 20px; }
}

/* === RESPONSIVE MOBILE (MAX 768px) === */
@media(max-width: 768px) {
    header { padding: 0 20px; height: 60px; }
    .desktop-nav { display: none; }
    .mobile-nav { display: flex; }
    .container { padding: 0 20px; }
    
    /* Ensure content doesn't hide behind nav */
    main { padding-bottom: calc(var(--bottom-nav-h) + 30px); }

    /* SINGLE COLUMN GRIDS */
    .grid, .grid.fixed-3, .gallery-grid { grid-template-columns: 1fr; gap: 20px; } 

    /* FIX PROJECT LAYOUT STACKING */
    .project-layout { display: flex; flex-direction: column; gap: 30px; }
    .project-sidebar { position: relative; top: 0; width: 100%; order: -1; margin-bottom: 20px; }
    
    /* HERO RESIZE */
    .hero-project { height: 40vh; }
    .hero-text { padding: 0 20px 2rem; }
    .hero-text h1 { font-size: 2.2rem; }
    .project-subtitle { font-size: 1rem; }

    /* VIDEO PLAYER FIX */
    .video-item { margin-bottom: 1.5rem; }

    .bio-card { padding: 2rem 1.5rem; }
    
    /* ADMIN MOBILE */
    .admin-sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid #333; padding: 1rem; display: flex; flex-direction: column; }
    .admin-menu { display: flex; flex-direction: row; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
    .admin-menu a { white-space: nowrap; font-size: 0.7rem; padding: 8px 12px; border: 1px solid #333; background: #141414; }
    .admin-menu a.active { border-color: var(--accent); border-left: 1px solid var(--accent); }
    .admin-main { margin-left: 0; width: 100%; padding: 1.5rem; }
    .form-cols-2 { grid-template-columns: 1fr; gap: 15px; }
    .stat-grid, .dash-actions, .dash-summary-row { grid-template-columns: 1fr; }
    
    /* FOOTER STACK */
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .footer-content > *:first-child, .footer-content > *:last-child { text-align: center!important; }
    
    /* COOKIES */
    .cookie-content { flex-direction: column; gap: 15px; text-align: center; }
    .cookie-banner.show { bottom: var(--bottom-nav-h); }
    
    /* TIMELINE HIDE ON MOBILE (Too small) */
    #timeline-container { display: none; }
    main { padding-top: 20px; }
}