/* Custom Premium CSS for NOBODY Portfolio - Developer/Coding Edition */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;0,800;1,400&display=swap');

:root {
    --bg-primary: #020617;       /* Ultra dark slate */
    --bg-secondary: #0b1329;     /* Deep terminal blue-black */
    --accent-sky: #38bdf8;       /* Primary accent: sky blue */
    --accent-purple: #c084fc;    /* Secondary accent: purple */
    --text-primary: #f3f4f6;     /* Bright text */
    --text-muted: #6b7280;       /* Coding gray comments */
    
    /* Code Editor Colors */
    --code-bg: #090f1d;
    --code-keyword: #f43f5e;     /* Pink-red */
    --code-fn: #38bdf8;          /* Cyan */
    --code-string: #34d399;      /* Emerald green */
    --code-number: #fb923c;      /* Orange */
    --code-comment: #6b7280;     /* Slate gray */
    --code-bracket: #ffd700;     /* Yellow */
    --code-type: #a78bfa;        /* Light violet */
    
    /* Glassmorphism settings */
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(56, 189, 248, 0.15);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset and Core Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 3D Wave Canvas */
#wave-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-sky);
}

/* Glass Container Base */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* Layout Elements */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
header.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

header.navbar-wrapper.scrolled {
    padding: 0.6rem 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-sky);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    object-fit: cover;
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff 30%, var(--accent-sky) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: #9ca3af;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 0.25rem 0;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-sky);
}

/* Coding style Nav Links: <link /> */
.nav-link::before {
    content: '<';
    color: var(--accent-purple);
    opacity: 0;
    margin-right: 2px;
    transition: var(--transition-smooth);
    display: inline-block;
    transform: translateX(4px);
}

.nav-link::after {
    content: ' />';
    color: var(--accent-purple);
    opacity: 0;
    margin-left: 2px;
    transition: var(--transition-smooth);
    display: inline-block;
    transform: translateX(-4px);
}

.nav-link:hover::before, .nav-link.active::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-link:hover::after, .nav-link.active::after {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Dropdown Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 1.5rem;
    right: 1.5rem;
    padding: 1.5rem;
    z-index: 99;
    flex-direction: column;
    gap: 1.25rem;
    list-style: none;
    border-radius: 12px;
}

.mobile-nav.open {
    display: flex;
    animation: fadeInDown 0.3s forwards ease;
}

/* Sections */
section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* Code Syntax Styled Headings */
.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    color: #fff;
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.code-keyword { color: var(--code-keyword); }
.code-fn { color: var(--code-fn); }
.code-op { color: var(--accent-purple); }
.code-bracket { color: var(--code-bracket); }

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 7rem;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

/* Interactive N Particle Logo Container */
#logo-container {
    width: 280px;
    height: 280px;
    margin-bottom: 2rem;
    cursor: pointer;
    position: relative;
}

/* Background Soft Aura behind N Particle Canvas */
#logo-container::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(192, 132, 252, 0.15) 50%, transparent 100%);
    filter: blur(15px);
    z-index: -1;
    pointer-events: none;
}

#logo-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-greeting {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-sky);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #93c5fd, var(--accent-sky));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: #fff;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.8rem;
    background-color: var(--accent-sky);
    animation: blinkCursor 0.8s infinite;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 1.5rem 0 2rem;
}

/* Mock Terminal Command Line */
.hero-terminal {
    background: #090f1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 2.5rem;
    text-align: left;
    font-size: 0.85rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    display: flex;
    gap: 8px;
}

.terminal-prompt {
    color: var(--accent-sky);
    user-select: none;
    font-weight: 600;
}

.terminal-command {
    color: var(--text-primary);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-sky), #0284c7);
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-sky);
    transform: translateY(-3px);
}

/* About Section & Coding Profile Terminal */
.about-card {
    padding: 2.5rem 2rem;
    text-align: center;
}

.about-terminal-wrapper {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: left;
}

.about-text {
    font-size: 1.05rem;
    color: #9ca3af;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.skills-group {
    flex: 1 1 300px;
    max-width: 450px;
}

.skills-group h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Tech Tag (Developer theme icons) */
.tech-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.tech-tag i {
    font-size: 1.1rem;
    color: var(--accent-sky);
    transition: var(--transition-smooth);
}

.tech-tag:hover {
    background: var(--code-bg);
    border-color: var(--accent-sky);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

.tech-tag:hover i {
    transform: scale(1.2);
    color: var(--accent-purple);
}

/* Code Editor Card Theme (Visual Programming Vibe) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Optimised columns min size from 290px to 250px for mobile screens */
    gap: 2rem;
    align-items: start; /* Fix grid card stretch on minimize */
}

.project-card {
    background: var(--code-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    min-width: 0; /* Fix flex layout overflow */
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.2);
}

/* Terminal Header Box */
.terminal-header {
    background: #0f172a;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #eab308; }
.terminal-dot.green { background-color: #22c55e; }

/* Micro Symbols on hover */
.terminal-dot::before {
    content: '';
    font-size: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.terminal-dots:hover .terminal-dot::before {
    opacity: 1;
}

.terminal-dot.red::before { content: '×'; }
.terminal-dot.yellow::before { content: '−'; font-weight: 700; }
.terminal-dot.green::before { content: '+'; }

.terminal-title {
    font-size: 0.75rem;
    color: #4b5563;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.terminal-actions {
    display: flex;
    gap: 10px;
    color: #4b5563;
    font-size: 0.75rem;
}

/* Mock Code Workspace */
.code-workspace {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0; /* Fix flex layout overflow */
}

.code-editor-body {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    min-width: 0; /* Fix flex layout overflow */
}

.line-numbers {
    color: #374151;
    text-align: right;
    user-select: none;
}

.code-lines {
    flex-grow: 1;
    overflow-x: auto;
    white-space: pre;
    color: #cbd5e1;
}

/* Custom thin scrollbars for horizontal code overflow */
.code-lines::-webkit-scrollbar {
    height: 4px;
}
.code-lines::-webkit-scrollbar-track {
    background: transparent;
}
.code-lines::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 2px;
}
.code-lines::-webkit-scrollbar-thumb:hover {
    background: var(--accent-sky);
}

/* Syntax Highlighting CSS */
.sh-comment { color: var(--code-comment); font-style: italic; }
.sh-kw { color: var(--code-keyword); font-weight: 600; }
.sh-fn { color: var(--code-fn); }
.sh-str { color: var(--code-string); }
.sh-num { color: var(--code-number); }
.sh-bracket { color: var(--code-bracket); }
.sh-type { color: var(--code-type); }

/* Card CTA Area */
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-sky);
    background: rgba(56, 189, 248, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-sky);
    text-decoration: none;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.project-link i {
    font-size: 0.75rem;
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: #fff;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* Contact Footer */
footer {
    padding: 6rem 0 3rem;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--glass-border);
    background: rgba(2, 6, 23, 0.6);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    color: #9ca3af;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #9ca3af;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: #fff;
    background: var(--accent-sky);
    border-color: var(--accent-sky);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.35);
}

.copyright {
    color: #4b5563;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* --- Animations --- */
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.3; }
    100% { transform: scale(1.05); opacity: 0.5; }
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Matrix Easter Egg Styles --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: none;
}

#matrix-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    text-shadow: 0 0 10px #0f0;
    z-index: 10000;
    display: none;
    text-align: center;
    pointer-events: none;
    line-height: 2;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    #hero {
        padding-top: 5rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .btn {
        width: 100%;
    }
    .skills-wrapper {
        gap: 2rem;
    }
}

/* --- Terminal Card Interactive States & Backdrop --- */

.project-card .code-workspace {
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                padding 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease;
}

/* Minimized State (Collapse Workspace) */
.project-card.minimized .code-workspace {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Maximized Portal container (full screen wrapper) */
.maximized-card-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none; /* Let clicks pass through to backdrop */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Maximized State (Fullscreen Popup overlay) */
.project-card.maximized {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 800px !important;
    height: auto !important;
    max-height: 85vh !important;
    z-index: 10000 !important;
    pointer-events: auto !important; /* Re-enable clicks on the card itself */
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 
                0 0 50px rgba(56, 189, 248, 0.35) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    animation: zoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.project-card.maximized .code-workspace {
    max-height: 70vh !important;
}

/* Closed State (Fades out and collapses) */
.project-card.closed {
    transform: scale(0.9) !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
}

/* Backdrop for Fullscreen Modal */
.maximized-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px); /* Subtle, elegant blur */
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.maximized-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* System Restore Bar (Terminal prompt style) */
.restore-bar {
    font-size: 0.8rem;
    color: var(--code-comment);
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeInDown 0.3s forwards ease;
    user-select: none;
}

.restore-btn {
    color: var(--code-string);
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.restore-btn:hover {
    color: var(--accent-sky);
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

