/* 
    SIYAH SYSTEM v13.0 | OBSIDIAN PRIME (BADGE EDITION)
    Features: Native Avatar Color, Repo Analysis Badges, Clickable Lang Selector.
*/

:root {
    --background: #080808;
    --text: #ffffff;
    --text-muted: #666666;
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.06);
    --glass: rgba(255, 255, 255, 0.015);
    --theme-invert: #ffffff;
    --theme-invert-bg: #000000;
    --shimmer: rgba(255, 255, 255, 0.4);
    --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    --container-max: 1250px;
}

[data-theme="light"] {
    --background: #f8f8f8;
    --text: #080808;
    --text-muted: #666666;
    --accent: #000000;
    --border: rgba(0, 0, 0, 0.1);
    --glass: rgba(0, 0, 0, 0.04);
    --theme-invert: #000000;
    --theme-invert-bg: #ffffff;
    --shimmer: rgba(0, 0, 0, 0.25);
}

/* Base Normalization */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }
body { background: var(--background); color: var(--text); font-family: 'Outfit', sans-serif; overflow-x: hidden; transition: background 0.8s ease; line-height: 1.5; min-height: 100vh; }
a { color: inherit !important; text-decoration: none !important; }
button { background: none; border: none; font-family: inherit; color: inherit; }

/* Atmospheric FX */
.noise { position: fixed; inset: 0; background: url('https://grainy-gradients.vercel.app/noise.svg'); opacity: 0.04; pointer-events: none; z-index: 9999; }
.scanlines { position: fixed; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.01) 50%); background-size: 100% 4px; pointer-events: none; z-index: 9998; }

/* Precision Cursor */
#cursor-glow { width: 450px; height: 450px; background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%); position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 10000; }
#cursor-dot { width: 6px; height: 6px; background: var(--text); border-radius: 50%; position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 10001; }
/* Cursor Hover State */
.hoverable:hover ~ #cursor-dot { transform: translate(-50%, -50%) scale(2); background: #ffffff; mix-blend-mode: difference; }

/* Navigation Hub */
.tabs { 
    position: fixed; top: 2.5rem; left: 50%; transform: translateX(-50%); 
    display: flex; gap: 0.6rem; background: var(--glass); border: 1px solid var(--border); 
    padding: 0.5rem; border-radius: 1.5rem; backdrop-filter: blur(25px); z-index: 1000; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.tab { padding: 0.8rem 1.8rem; border-radius: 1.1rem; font-family: 'Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2rem; font-weight: 800; transition: var(--transition); text-transform: uppercase; color: var(--text-muted); cursor: pointer !important; }
.tab.active { background: var(--text); color: var(--background); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* Language Dropdown & Interactive Button */
.nav-controls { position: fixed; top: 2.5rem; right: 4rem; display: flex; gap: 1.2rem; align-items: center; z-index: 1000; }
.control-btn { background: var(--glass); border: 1px solid var(--border); padding: 0 1rem; height: 3.2rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); backdrop-filter: blur(20px); gap: 0.8rem; cursor: pointer !important; }
.control-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.control-btn img { width: 22px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.control-btn span { font-family: 'Mono', monospace; font-size: 0.8rem; font-weight: 800; }

.lang-dropdown { position: relative; }
.lang-menu { 
    position: absolute; top: 4rem; right: 0; background: var(--background); border: 1px solid var(--border); 
    padding: 0.8rem; border-radius: 1.2rem; display: none; flex-direction: column; gap: 0.5rem; 
    width: 150px; box-shadow: 0 30px 60px rgba(0,0,0,0.6); backdrop-filter: blur(30px);
}
.lang-menu::before {
    content: ''; position: absolute; top: -1.5rem; left: 0; right: 0; height: 1.5rem;
}
.lang-dropdown:hover .lang-menu { display: flex; animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.lang-item { 
    padding: 0.8rem 1rem; border-radius: 0.8rem; font-family: 'Mono', monospace; font-size: 0.7rem; font-weight: 600;
    color: var(--text-muted); transition: var(--transition); display: flex; align-items: center; gap: 0.8rem; cursor: pointer !important;
}
.lang-item:hover { background: rgba(255,255,255,0.05); color: #ffffff; transform: translateX(5px); }
.lang-item img { width: 20px; border-radius: 3px; }

/* Container Flow */
.container { padding: 14rem 4rem 10rem; max-width: var(--container-max); margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; position: relative; }
.view-section { display: none; width: 100%; transition: var(--transition); }
.view-section.active { display: flex; flex-direction: column; align-items: center; justify-content: center; animation: revealPrime 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes revealPrime { from { opacity: 0; transform: translateY(30px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Title FX */
.prefix { font-size: 4.5rem; font-weight: 900; letter-spacing: -0.05em; color: var(--text); position: relative; text-transform: uppercase; line-height: 1.1; margin-bottom: 0.5rem; z-index: 2; }
.prefix::before { content: attr(data-text); position: absolute; inset: 0; color: transparent; background: linear-gradient(110deg, transparent 40%, var(--shimmer) 50%, transparent 60%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: textShimmer 5s ease-in-out infinite; }
@keyframes textShimmer { 0% { background-position: -150% 0; } 100% { background-position: 150% 0; } }

/* Home Section Layout */
.god-tier-layout { display: flex; gap: 6rem; align-items: center; width: 100%; justify-content: center; max-width: 1100px; }
.sticky-side { width: 340px; flex-shrink: 0; }
.avatar-capsule { 
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.1); 
    padding: 1.2rem; border-radius: 3.5rem; aspect-ratio: 1/1; 
    box-shadow: 0 40px 120px rgba(0,0,0,0.5); transition: var(--transition); 
}
.avatar-hero { width: 100%; height: 100%; object-fit: cover; border-radius: 2.5rem; transition: var(--transition); }
.avatar-capsule:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.3); box-shadow: 0 50px 140px rgba(0,0,0,0.7); }

.main-side { flex: 1; text-align: left; }
.hero-name { font-size: 9rem; font-weight: 950; letter-spacing: -0.07em; line-height: 0.85; margin-bottom: 2.5rem; color: var(--text); }
.bio-p { font-size: 1.4rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; margin-bottom: 1.5rem; max-width: 700px; }
.bio-p strong { color: var(--text); font-weight: 600; text-shadow: 0 0 20px rgba(125,125,125,0.1); }

/* Grid Sections */
.section-header { margin-bottom: 5rem; text-align: center; width: 100%; position: relative; }
.sub-prefix { font-family: 'Mono', monospace; color: var(--text-muted); opacity: 0.4; letter-spacing: 0.4rem; font-size: 0.75rem; margin-top: 1.5rem; }

/* Refined Repo Cards with Compact Badges */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; width: 100%; max-width: 1250px; }
.project-card { 
    background: linear-gradient(145deg, rgba(255,255,255,0.02), transparent); 
    border: 1px solid var(--border); 
    padding: 2.2rem; border-radius: 2rem; 
    transition: var(--transition); backdrop-filter: blur(30px); text-align: left; 
    display: flex; flex-direction: column; justify-content: space-between;
    text-decoration: none; cursor: pointer !important;
}
.project-card:hover { border-color: rgba(125,125,125,0.4); transform: translateY(-6px); background: var(--glass); box-shadow: 0 30px 80px rgba(0,0,0,0.2); }
.project-card h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.8rem; color: var(--text); letter-spacing: -0.04em; }
.project-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.5rem; }

/* The Compact Badge System */
.repo-analysis {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto;
}
.badge {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem; border-radius: 1.5rem;
    font-family: 'Mono', monospace; font-size: 0.65rem; font-weight: 700;
    color: var(--text); background: var(--glass); border: 1px solid var(--border);
    transition: var(--transition); letter-spacing: 0.05em;
    cursor: pointer !important; z-index: 5;
}
.badge:hover { transform: translateY(-2px); background: var(--border); border-color: rgba(125,125,125,0.25); }

.badge-lang { border-color: var(--lang-color, var(--border)); }
.badge-lang:hover { background: var(--lang-color); color: #000; box-shadow: 0 5px 20px var(--lang-color); border-color: transparent; }

.badge-star { color: #f1e05a; border-color: rgba(241, 224, 90, 0.2); }
.badge-star:hover { background: rgba(241, 224, 90, 0.1); border-color: #f1e05a; box-shadow: 0 5px 20px rgba(241, 224, 90, 0.2); }
.badge-star.liked { background: rgba(241, 224, 90, 0.15); border-color: #f1e05a; filter: drop-shadow(0 0 8px rgba(241, 224, 90, 0.4)); transform: scale(1.05); }

.badge-size { color: var(--text-muted); }
.badge-size:hover { background: var(--border); color: var(--text); }

.repo-lang-dot { width: 8px; height: 8px; border-radius: 50%; opacity: 0.9; background-color: var(--lang-color); }

/* Contact Hub Compact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; width: 100%; max-width: 900px; margin: 0 auto; }
.contact-card { 
    background: var(--glass); border: 1px solid var(--border); 
    padding: 2.5rem 1.5rem; border-radius: 2rem; transition: var(--transition); 
    backdrop-filter: blur(20px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
}
.contact-card:hover { background: var(--text); color: var(--background); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(125,125,125,0.1); }
.contact-icon { width: 50px; height: 50px; object-fit: contain; transition: var(--transition); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1)); }
.contact-card:hover .contact-icon { transform: scale(1.15); filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3)); }
.contact-card h3 { font-size: 1rem; font-weight: 900; letter-spacing: 0.2rem; text-transform: uppercase; }

/* Footer */
.branding-footer { position: fixed; bottom: 2.5rem; left: 4rem; right: 4rem; display: flex; justify-content: space-between; align-items: center; font-family: 'Mono', monospace; font-size: 0.7rem; color: var(--text-muted); opacity: 0.35; letter-spacing: 0.3rem; z-index: 1000; pointer-events: none; }
.footer-links { display: flex; gap: 3rem; pointer-events: auto; }
.footer-links a { text-decoration: none; color: inherit; transition: var(--transition); cursor: pointer !important; }
.footer-links a:hover { color: var(--text); opacity: 1; transform: translateY(-3px); }

/* Mobile */
@media (max-width: 1100px) {
    .container { padding: 11rem 2.5rem 8rem; }
    .god-tier-layout { flex-direction: column; text-align: center; gap: 4rem; }
    .hero-name { font-size: 6rem; }
    .prefix { font-size: 3rem; }
    .sticky-side { width: 100%; max-width: 260px; }
    .main-side { text-align: center; }
    .projects-grid, .contact-grid { grid-template-columns: 1fr; }
    .nav-controls { display: none; }
    .tabs { width: 90%; }
}
