/**
 * Mostafizur Ahmed - Handcrafted Developer Portfolio
 * Clean, Human, Minimalist Dark Aesthetic
 * Domain: mostafizur.in
 */

:root {
    --bg-base: #09090b;
    --bg-surface: #121215;
    --bg-surface-elevated: #18181c;
    --bg-card: #121215;
    --border-subtle: #27272a;
    --border-hover: #3f3f46;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent: #38bdf8;
    --accent-subtle: rgba(56, 189, 248, 0.1);
    --accent-emerald: #10b981;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
    
    --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    color-scheme: dark;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle Dark Texture */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(at 50% 0%, rgba(56, 189, 248, 0.05) 0px, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Top Navigation (Desktop) */
.navbar-wrapper {
    position: sticky;
    top: 20px;
    z-index: 100;
    padding: 0 20px;
    margin-bottom: 40px;
}

.navbar {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(18, 18, 21, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 6px 16px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.brand-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-hover);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: #fff;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #09090b;
}

.btn-primary:hover {
    background: #f4f4f5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: #202025;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* Page Views */
.page-view {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-view.active {
    display: block;
    opacity: 1;
}

/* Status Indicator Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    color: #34d399;
    margin-bottom: 20px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(2); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* Hero Section */
.hero {
    padding: 10px 0 50px;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-avatar-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 3px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hero-bio {
    font-size: 1.05rem;
    color: #d4d4d8;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 40px;
}

/* Fact Pills */
.fact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0 48px;
}

.fact-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.fact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.fact-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

/* Section Common */
.section {
    padding: 30px 0 50px;
}

.section-head {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 6px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Terminal Component */
.terminal-card {
    background: #0d0e11;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 28px 0 40px;
    font-family: var(--font-mono);
}

.terminal-bar {
    background: #14151a;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-1 { background: #ef4444; }
.dot-2 { background: #eab308; }
.dot-3 { background: #22c55e; }

.terminal-body {
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
}

.t-prompt { color: #a1a1aa; }
.t-cmd { color: #38bdf8; }
.t-ok { color: #4ade80; }
.t-dim { color: #71717a; }

/* Real Project Cards */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-item:hover {
    border-color: var(--border-hover);
    background: #151519;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.project-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #a1a1aa;
}

/* Experience List */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.exp-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
}

.exp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.exp-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

.exp-time {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #38bdf8;
}

.exp-company {
    font-size: 0.92rem;
    color: #a1a1aa;
    margin-bottom: 14px;
}

.exp-bullets {
    padding-left: 20px;
    color: #d4d4d8;
    font-size: 0.92rem;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Contact Section & Form */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
}

.contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 28px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.c-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.92rem;
    transition: var(--transition);
}

.c-link:hover {
    color: #fff;
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.c-link-val {
    color: #fff;
    font-weight: 500;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #d4d4d8;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: #09090b;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
    border-color: #38bdf8;
    background: #0d0e11;
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: #18181b;
    border: 1px solid var(--border-subtle);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.toast-success {
    border-color: #10b981;
}
.toast-error {
    border-color: #ef4444;
}

/* Desktop Footer */
.footer {
    margin-top: auto;
    padding: 40px 0 30px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ========================================================
   MOBILE BOTTOM NAVIGATION BAR
   ======================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 12px;
    left: 16px;
    right: 16px;
    z-index: 999;
    background: rgba(18, 18, 22, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 8px 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mobile-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #71717a;
    padding: 6px 2px;
    border-radius: 14px;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-icon {
    width: 22px;
    height: 22px;
    transition: var(--transition);
}

.mobile-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.mobile-nav-item.active .mobile-nav-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-item.active .mobile-nav-icon {
    color: #38bdf8;
    transform: translateY(-1px);
}

/* ========================================================
   RESPONSIVE QUERIES
   ======================================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 6px 12px 6px 6px;
    }

    /* Hide desktop navigation links on mobile (handled by bottom nav) */
    .navbar .nav-links {
        display: none;
    }
    
    .navbar .nav-cta {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .navbar .nav-cta .btn-primary {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .navbar .nav-cta .btn-icon {
        width: 32px;
        height: 32px;
    }

    /* Show mobile bottom navigation */
    .mobile-bottom-nav {
        display: block;
    }

    /* Add bottom padding to body/footer so mobile nav does not obscure content */
    body {
        padding-bottom: 84px;
    }

    .toast-container {
        bottom: 90px;
        right: 16px;
        left: 16px;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .hero-avatar-wrap {
        width: 76px;
        height: 76px;
        flex-shrink: 0;
    }

    .fact-grid {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}
