/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-orange: #ff8c42;
    --accent-red: #ff3b3b;
    --accent-cyan: #00d4ff;
    --accent-green: #00ff41;

    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.03);
    --card-glass: rgba(255, 255, 255, 0.05);

    --gradient-primary: linear-gradient(135deg, #ff8c42, #ff3b3b);
    --nav-bg: rgba(5, 5, 5, 0.85);
    --nav-height: 70px;

    --cursor-x: 50%;
    --cursor-y: 50%;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Orbitron:wght@500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    /* perspective removed from body to fix fixed positioning interactions */
    /* Cursor Glow Effect */
    background-image: radial-gradient(600px circle at var(--cursor-x) var(--cursor-y),
            rgba(255, 140, 66, 0.12),
            transparent 40%);
    background-attachment: fixed;
}

/* --- ANIMATIONS --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes spin-glow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--accent-green);
    }

    50% {
        box-shadow: 0 0 25px var(--accent-green), 0 0 40px var(--accent-green);
    }
}

.floating-element {
    animation: float 4s ease-in-out infinite;
}

/* --- STARS BACKGROUND --- */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
    opacity: 0.5;
}

/* --- NAVIGATION BAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    transition: background-color 0.5s ease;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(255, 140, 66, 0.3);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--glass-shine);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    background: var(--glass-border);
    border-color: var(--accent-orange);
}

.nav-links a i {
    font-size: 1rem;
}

.nav-toggle {
    display: none;
    background: var(--glass-shine);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- MAIN CONTENT --- */
main {
    padding-top: calc(var(--nav-height) + 2rem);
    min-height: 100vh;
    perspective: 1000px;
    /* Moved here to keep 3D effects within content */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HERO / DEVELOPER CARD SECTION --- */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 60px 0;
    perspective: 1000px;
}

.dev-card {
    background: var(--card-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 100%;
    max-width: 850px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

/* Profile Wrapper with Rotating Border */
.profile-wrapper {
    position: relative;
    width: 156px;
    height: 156px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(transparent, var(--accent-orange), var(--accent-red), transparent);
    animation: spin-glow 4s linear infinite;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #111;
    overflow: hidden;
    background: #000;
    position: relative;
    z-index: 2;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-dot {
    width: 22px;
    height: 22px;
    background: var(--accent-green);
    border: 4px solid #080808;
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
    box-shadow: 0 0 10px var(--accent-green);
    z-index: 3;
    animation: pulse 2s infinite;
}

.dev-content {
    flex: 1;
    z-index: 2;
}

.dev-label {
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.dev-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
}

.dev-bio {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* --- SOCIAL BUTTONS --- */
.social-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    /* Made bolder */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-tg:hover {
    background: rgba(0, 136, 204, 0.3);
    border-color: #0088cc;
}

.btn-yt:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
}

.btn-gh:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.btn-dc:hover {
    background: rgba(88, 101, 242, 0.3);
    border-color: #5865F2;
}

/* --- SECTION STYLES --- */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- GLASS CARDS GRID --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.glass-card {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    text-align: left;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-10px);
    background: var(--glass-shine);
    border-color: var(--accent-orange);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.i-orange {
    background: rgba(255, 140, 66, 0.15);
    color: var(--accent-orange);
}

.i-cyan {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
}

.i-green {
    background: rgba(0, 255, 65, 0.15);
    color: var(--accent-green);
}

.i-red {
    background: rgba(255, 59, 59, 0.15);
    color: var(--accent-red);
}

.glass-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.glass-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.feature-list li {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-list li i {
    color: var(--accent-orange);
    width: 16px;
}

.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.card-link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--accent-cyan);
}

/* --- BOT CARDS --- */
.bot-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.bot-card:hover {
    border-color: var(--accent-orange);
    transform: translateX(8px);
    background: var(--glass-shine);
}

.bot-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bot-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.bot-info span {
    color: var(--accent-cyan);
    font-size: 0.85rem;
}

.bot-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(5, 5, 5, 0.9);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.footer-logo img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

footer a {
    color: var(--accent-orange);
    text-decoration: none;
}

/* --- MODAL POPUP --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    /* justify-content: center; removed to allow margin:auto to work */
    /* align-items: center; removed to prevent cutting off tall content */
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    /* Allow scrolling within overlay if needed */
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.99));
    border: 1px solid rgba(255, 140, 66, 0.4);
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    /* Removed max-height to allow content to grow naturally, relying on window scroll if needed or internal scroll */
    max-height: none;
    position: relative;
    margin: auto;
    /* Centers the modal vertically and horizontally safely */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(255, 140, 66, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(180deg, rgba(255, 140, 66, 0.05), transparent);
}

.modal-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.3);
}

.modal-title h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-title span {
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.modal-body {
    padding: 25px 30px 30px;
}

.modal-body p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-body h3 {
    color: var(--accent-orange);
    margin: 20px 0 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 59, 59, 0.25);
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: rotate(90deg);
}

/* Clickable Cards */
.glass-card.clickable,
.bot-card {
    cursor: pointer;
}

.glass-card.clickable:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 10px 40px rgba(255, 140, 66, 0.15);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(5, 5, 5, 0.98);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dev-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .social-btns {
        justify-content: center;
    }

    .dev-name {
        font-size: 1.5rem;
    }
}