/* ═══════════════════════════════════════════════════════════
   MORSHED SARKAR — PORTFOLIO DESIGN SYSTEM
   Mobile-first · Light theme · Sage Teal + Warm Gold
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --color-primary: #2A9D8F;
    --color-primary-light: #3DBAA9;
    --color-primary-dark: #1F7A6E;
    --color-primary-glass: rgba(42, 157, 143, 0.08);
    --color-accent: #E9C46A;
    --color-accent-light: #F2D98D;
    --color-accent-dark: #D4A843;
    --color-bg: #FEFBF6;
    --color-surface: #F5F0EB;
    --color-surface-raised: #FFFFFF;
    --color-text: #1D1D1D;
    --color-text-secondary: #5A5550;
    --color-text-muted: #8B8680;
    --color-border: #E8E2DB;
    --color-border-light: #F0EBE5;
    --color-success: #4CAF50;
    --color-error: #E74C3C;

    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Outfit', system-ui, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(29,29,29,0.04);
    --shadow-md: 0 4px 16px rgba(29,29,29,0.06);
    --shadow-lg: 0 8px 32px rgba(29,29,29,0.08);
    --shadow-xl: 0 16px 48px rgba(29,29,29,0.1);
    --shadow-glow: 0 0 30px rgba(42, 157, 143, 0.15);

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --nav-height: 0px;
    --bottom-bar-height: 72px;
    --content-max: 1100px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: calc(var(--bottom-bar-height) + 16px);
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.15rem, 3.5vw, 1.5rem); }
h4 { font-size: 1.05rem; font-weight: 600; }
p { font-size: 1rem; color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); font-size: 0.875rem; }
.text-accent { color: var(--color-primary); }
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: 8px;
}

/* ── Desktop Navbar (hidden on mobile) ──────────────────── */
.desktop-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(254, 251, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    transition: transform 0.35s var(--ease-out);
    height: 64px;
}
.desktop-nav.hidden { transform: translateY(-100%); }
.desktop-nav .nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.desktop-nav .nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-text);
}
.desktop-nav .nav-logo span { color: var(--color-primary); }
.desktop-nav .nav-links { display: flex; gap: 32px; align-items: center; }
.desktop-nav .nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.2s;
    position: relative;
}
.desktop-nav .nav-links a:hover,
.desktop-nav .nav-links a.active { color: var(--color-primary); }
.desktop-nav .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* ── Mobile Bottom Tab Bar ──────────────────────────────── */
.bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--bottom-bar-height);
    background: rgba(254, 251, 246, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-bar .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease-out);
    color: var(--color-text-muted);
    position: relative;
}
.bottom-bar .tab.active { color: var(--color-primary); }
.bottom-bar .tab.active::before {
    content: '';
    position: absolute;
    top: 2px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}
.bottom-bar .tab svg { width: 22px; height: 22px; }
.bottom-bar .tab span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── Explore Drawer (mobile) ────────────────────────────── */
.explore-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29,29,29,0.3);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.explore-overlay.open { opacity: 1; pointer-events: all; }
.explore-drawer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1002;
    background: var(--color-surface-raised);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 12px 24px 32px;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
    max-height: 75vh;
    overflow-y: auto;
}
.explore-drawer.open { transform: translateY(0); }
.explore-drawer .drawer-handle {
    width: 36px; height: 4px;
    background: var(--color-border);
    border-radius: 4px;
    margin: 0 auto 20px;
}
.explore-drawer .drawer-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text);
}
.explore-drawer .drawer-links { display: flex; flex-direction: column; gap: 4px; }
.explore-drawer .drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}
.explore-drawer .drawer-link:hover,
.explore-drawer .drawer-link:active { background: var(--color-primary-glass); }
.explore-drawer .drawer-link svg {
    width: 20px; height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}
.explore-drawer .drawer-link .link-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.35s var(--ease-out);
}
.card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-flat {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.btn-outline {
    border: 1.5px solid var(--color-border);
    color: var(--color-text);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-glass);
}
/* Ripple effect */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out;
    pointer-events: none;
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ── Tags / Chips ───────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--color-primary-glass);
    color: var(--color-primary-dark);
}

/* ── Visitor Counter Badge ──────────────────────────────── */
.visitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}
.visitor-badge .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Typewriter ─────────────────────────────────────────── */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--color-primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* ── Page Transitions ───────────────────────────────────── */
.page-content {
    animation: pageIn 0.45s var(--ease-out) both;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-exit {
    animation: pageOut 0.25s var(--ease-out) both;
}
@keyframes pageOut {
    to { opacity: 0; transform: translateY(-8px); }
}

/* ── Scroll Reveal ──────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Interactive Tech Grid ──────────────────────────────── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid transparent;
    transition: all 0.3s var(--ease-out);
    text-align: center;
}
.tech-item:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-glass);
    transform: translateY(-3px);
}
.tech-item .tech-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.tech-item .tech-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text);
}
.tech-item .tech-detail {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    display: none;
}
.tech-item:hover .tech-detail { display: block; }

/* ── Form Styles ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
}
.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--color-surface-raised);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glass);
}
textarea.form-input { resize: vertical; min-height: 120px; }

/* ── Blog Post Card ─────────────────────────────────────── */
.blog-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-light);
    transition: all 0.3s var(--ease-out);
}
.blog-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}
.blog-card .blog-category { margin-bottom: 10px; }
.blog-card .blog-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}
.blog-card .blog-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.blog-card .blog-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ── Testimonial Card ───────────────────────────────────── */
.testimonial-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-light);
    position: relative;
}
.testimonial-card .quote-mark {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 8px;
}
.testimonial-card .quote-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.7;
}
.testimonial-card .quote-author {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
}
.testimonial-card .quote-role {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ── Custom Cursor (desktop only) ───────────────────────── */
@media (hover: hover) and (pointer: fine) {
    .custom-cursor {
        width: 20px; height: 20px;
        border: 2px solid var(--color-primary);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 9999;
        transition: width 0.2s, height 0.2s, background 0.2s, border 0.2s;
        transform: translate(-50%, -50%);
        mix-blend-mode: normal;
    }
    .custom-cursor.hovering {
        width: 40px; height: 40px;
        background: var(--color-primary-glass);
        border-color: var(--color-primary-light);
    }
}

/* ── Desktop breakpoint ─────────────────────────────────── */
@media (min-width: 768px) {
    :root {
        --nav-height: 64px;
        --bottom-bar-height: 0px;
    }
    body {
        padding-top: var(--nav-height);
        padding-bottom: 0;
    }
    .desktop-nav { display: block; }
    .bottom-bar { display: none; }
    .explore-overlay, .explore-drawer { display: none; }
    .container { padding: 0 40px; }
    .section { padding: 80px 0; }
    .tech-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1024px) {
    .container { padding: 0 60px; }
    .section { padding: 100px 0; }
}

/* ── Utility ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
