:root {
    --primary: #00f3ff;
    --bg: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --nav-height: 70px;
}

[data-theme="red"] { --primary: #ff003c; }
[data-theme="green"] { --primary: #00ff00; }
[data-theme="gold"] { --primary: #ffd700; }

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex; flex-direction: column;
}

#app {
    flex: 1; position: relative; width: 100%; overflow: hidden;
}

/* === PAGES === */
.page {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: none; flex-direction: column;
    padding: 15px; padding-bottom: var(--nav-height);
    opacity: 0; animation: fadeUp 0.3s forwards;
}
.page.active { display: flex; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-area {
    flex: 1; overflow-y: auto; padding-bottom: 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.scroll-area::-webkit-scrollbar { width: 0px; }

/* === HOME & ANIMATIONS === */
.center-content {
    height: 100%; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
}

/* 1. Floating Profile */
.profile-container {
    position: relative; width: 150px; height: 150px;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 25px;
    animation: floatImg 4s ease-in-out infinite;
}
@keyframes floatImg {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.profile-container img {
    width: 110px; height: 110px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 25px rgba(0,0,0,0.6); z-index: 2;
}
.ring { position: absolute; border-radius: 50%; }
.ring.outer {
    width: 100%; height: 100%; border: 2px dashed var(--primary);
    border-top-color: transparent; border-bottom-color: transparent;
    animation: spin 10s linear infinite;
}
.ring.inner {
    width: 125px; height: 125px; border: 2px solid var(--primary);
    border-left-color: transparent; border-right-color: transparent;
    animation: spin 5s linear infinite reverse;
}

/* 2. Glitch Name Effect */
.glitch-wrapper { position: relative; margin-bottom: 15px; }
.glitch-text {
    font-family: 'Orbitron', sans-serif; font-size: 2rem;
    font-weight: 900; color: #fff; text-transform: uppercase;
    letter-spacing: 3px; position: relative; z-index: 1;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: var(--bg);
}
.glitch-text::before {
    left: 2px; text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px; text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

/* 3. Laser Role Box */
.role-box {
    position: relative; border: 1px solid var(--primary);
    padding: 8px 25px; border-radius: 4px; background: rgba(0, 0, 0, 0.3);
    overflow: hidden; margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}
.role-box::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: laserScan 3s infinite linear;
}
.role-box span {
    font-family: 'Share Tech Mono', monospace; font-size: 1.1rem;
    font-weight: bold; letter-spacing: 3px; color: var(--primary);
    text-transform: uppercase; z-index: 2; position: relative;
}

/* 4. Tagline Cursor */
.tagline {
    font-family: 'Rajdhani', sans-serif; color: #aaa; font-size: 0.9rem;
    letter-spacing: 2px; border-right: 2px solid var(--primary);
    padding-right: 5px; animation: blinkCursor 0.8s steps(2) infinite;
}

/* === PAGE TITLES === */
.page-title {
    font-family: 'Orbitron', sans-serif; text-align: center;
    color: var(--primary); border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px; margin-bottom: 15px; font-size: 1.6rem;
    text-shadow: 0 0 15px var(--primary);
    background: linear-gradient(to bottom, transparent, rgba(0, 243, 255, 0.05));
}

/* === SEARCH BAR STYLING (NEW) === */
.search-wrapper {
    position: relative; margin-bottom: 15px; padding: 0 5px;
}
.search-icon {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 1rem;
}
#project-search {
    width: 100%; padding: 12px 15px 12px 40px;
    background: rgba(0,0,0,0.5); border: 1px solid var(--primary);
    color: var(--primary); font-family: 'Share Tech Mono', monospace;
    font-size: 1rem; border-radius: 4px; outline: none;
    transition: 0.3s;
}
#project-search::placeholder { color: rgba(255,255,255,0.3); }
#project-search:focus { box-shadow: 0 0 10px var(--primary); background: rgba(0,0,0,0.8); }

/* === CENTERED CARDS (PROJECTS & SOCIAL) === */
.cyber-card, .social-link {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px; text-decoration: none; color: white;
    border-radius: 8px; transition: 0.3s;
    text-align: center; position: relative; overflow: hidden;
}
.cyber-card:hover, .social-link:hover {
    background: var(--primary); color: #000;
    box-shadow: 0 0 15px var(--primary); border-color: var(--primary);
}
.card-content { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.card-title {
    font-family: 'Rajdhani', sans-serif; font-weight: 700;
    font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; display: block;
}
.card-desc { font-size: 0.8rem; color: #ccc; margin-top: 3px; font-weight: 500; }
.cyber-card:hover .card-desc { color: #000; }
.card-icon { font-size: 1.4rem; color: var(--primary); margin-bottom: 5px; }
.cyber-card:hover .card-icon { color: #000; }

/* === ABOUT & STATS === */
.bio-card {
    background: var(--card-bg); border-left: 3px solid var(--primary);
    padding: 15px; border-radius: 4px; text-align: center;
}
.icon-top { font-size: 1.2rem; color: var(--primary); margin-bottom: 10px; display: block;}
.stats-grid { display: flex; gap: 10px; margin: 15px 0; }
.stat-box {
    flex: 1; text-align: center; border: 1px solid var(--primary);
    padding: 10px; border-radius: 6px; background: rgba(0,0,0,0.4);
}
.stat-box h3 { font-size: 1.5rem; color: var(--primary); }
.divider { text-align: center; color: var(--primary); font-weight: bold; margin: 20px 0 10px 0; letter-spacing: 2px; }
.skill-wrapper { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.skill {
    background: rgba(255,255,255,0.1); padding: 5px 12px;
    border-radius: 4px; font-weight: bold; border: 1px solid transparent;
}
.skill:hover { border-color: var(--primary); color: var(--primary); }

/* === NAV & UTILS === */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height);
    background: rgba(0, 0, 0, 0.95); border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-around; align-items: center; z-index: 100;
}
.nav-btn { font-size: 1.4rem; color: #555; padding: 10px; transition: 0.3s; }
.nav-btn.active { color: var(--primary); transform: translateY(-5px); text-shadow: 0 0 15px var(--primary); }

.header-tools { position: fixed; top: 15px; right: 15px; z-index: 200; }
.settings-btn { font-size: 1.4rem; color: var(--primary); background: rgba(0,0,0,0.5); padding: 8px; border-radius: 50%; cursor: pointer;}
.theme-panel {
    position: fixed; top: 60px; right: 15px; background: #000; border: 1px solid var(--primary);
    padding: 15px; border-radius: 8px; display: none; z-index: 201; width: 150px;
}
.theme-opt {
    padding: 8px; margin: 5px 0; border: 1px solid #333; cursor: pointer;
    font-weight: bold; text-align: center; color: #fff;
}
.theme-opt.cyan { border-left: 4px solid #00f3ff; }
.theme-opt.red { border-left: 4px solid #ff003c; }
.theme-opt.green { border-left: 4px solid #00ff00; }
.theme-opt.gold { border-left: 4px solid #ffd700; }

#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 1000;
    display: none; justify-content: center; align-items: center;
}
#lightbox img { max-width: 95%; max-height: 80%; border: 2px solid var(--primary); }
.close-lb { position: absolute; top: 30px; right: 30px; font-size: 3rem; color: var(--primary); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); }

/* Animation Keyframes */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    20% { clip: rect(80px, 9999px, 90px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(60px, 9999px, 20px, 0); }
    80% { clip: rect(20px, 9999px, 70px, 0); }
    100% { clip: rect(50px, 9999px, 30px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(50px, 9999px, 10px, 0); }
    40% { clip: rect(70px, 9999px, 30px, 0); }
    60% { clip: rect(30px, 9999px, 60px, 0); }
    80% { clip: rect(90px, 9999px, 20px, 0); }
    100% { clip: rect(20px, 9999px, 90px, 0); }
}
@keyframes laserScan {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}
@keyframes blinkCursor {
    from { border-color: var(--primary); }
    to { border-color: transparent; }
}
