/* ── Variables (Nebula palette) ── */
:root {
    --bg:           #060d1a;
    --bg2:          #0a1628;
    --border:       rgba(56,189,248,.12);
    --border-hover: rgba(56,189,248,.35);
    --accent:       #38bdf8;
    --accent-dim:   rgba(56,189,248,.15);
    --accent-glow:  rgba(56,189,248,.25);
    --text:         #e2e8f0;
    --text-muted:   #64748b;
    --text-faint:   #334155;
    --rl:           12px;
    --tm:           .2s;
    --glass-bg:     rgba(6,13,26,.75);
    --glass-border: rgba(56,189,248,.13);
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Canvas ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#particles-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Blobs ── */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: drift 30s infinite alternate ease-in-out;
}
.blob-1 {
    width: 600px; height: 600px;
    background: #0ea5e9;
    top: -150px; left: -150px;
    opacity: .06;
}
.blob-2 {
    width: 500px; height: 500px;
    background: #6366f1;
    bottom: -100px; right: -100px;
    opacity: .05;
    animation-delay: -15s;
}

/* ── Page wrap ── */
.page-wrap {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Glass ── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--rl);
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.3rem;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--tm);
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #020810;
}
.btn-primary:hover {
    background: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-live {
    background: rgba(56,189,248,.1);
    color: var(--accent);
    border: 1px solid rgba(56,189,248,.25);
}
.btn-live:hover {
    background: var(--accent);
    color: #020810;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-sm { padding: .42rem .9rem; font-size: .65rem; }

/* ── Accent text ── */
.accent {
    background: linear-gradient(135deg, #7dd3fc, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Status dot ── */
.status-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}
.status-dot.sm { width: 5px; height: 5px; }

/* ══════════════════════════════════════════
   NAV
══════════════════════════════════════════ */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.5rem;
    margin: 1.5rem 0 4rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: .7rem; }
.nav-logo  { width: 34px; height: 34px; object-fit: contain; }
.nav-brand {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -.03em;
    text-transform: uppercase;
    color: var(--text);
}
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-link {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: color var(--tm);
}
.nav-link:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: 5rem 1rem 6rem;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding: .4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--accent-dim);
}
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.04em;
    margin-bottom: 1.5rem;
}
.hero-sub {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .9rem 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
}
.hstat-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent);
}
.hstat-lbl {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: .1rem;
}
.hstat-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}

/* ══════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════ */
.section { padding: 4rem 0; }
.section-eyebrow {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .6rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -.03em;
    margin-bottom: .6rem;
}
.section-sub {
    color: var(--text-muted);
    font-size: .85rem;
    max-width: 460px;
}
.section-header { margin-bottom: 2.5rem; }

/* ══════════════════════════════════════════
   PROJECT GRID
══════════════════════════════════════════ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* ══════════════════════════════════════════
   PROJECT CARD
══════════════════════════════════════════ */
.project-card {
    background: rgba(10,22,40,.6);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all .35s ease;
}
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(56,189,248,.08);
}
.project-card.featured {
    border-color: rgba(56,189,248,.25);
}
.project-card.featured:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 50px rgba(56,189,248,.15);
}

/* Card banner */
.card-banner {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.default-banner { background: #050c1a; }
.card-icon {
    font-size: 2.5rem;
    color: var(--text-faint);
    transition: all .4s ease;
    position: relative;
    z-index: 1;
}
.project-card:hover .card-icon {
    color: rgba(56,189,248,.4);
    transform: scale(1.1);
}
.banner-grid {
    position: absolute;
    inset: 0;
    opacity: .07;
    background-image: radial-gradient(#38bdf8 0.5px, transparent 0.5px);
    background-size: 12px 12px;
}

/* Nebula banner */
.nebula-banner {
    background: linear-gradient(135deg, #060d1a 0%, #0a1628 100%);
}
.nebula-preview {
    display: flex;
    gap: 8px;
    width: 220px;
    height: 110px;
    background: rgba(6,13,26,.9);
    border: 1px solid rgba(56,189,248,.15);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.np-sidebar {
    width: 28px;
    background: rgba(4,9,22,.9);
    border-right: 1px solid rgba(56,189,248,.1);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.np-dot {
    width: 16px; height: 16px;
    border-radius: 4px;
    background: rgba(56,189,248,.12);
}
.np-dot:first-child { background: rgba(56,189,248,.35); }
.np-main {
    flex: 1;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.np-bar {
    height: 7px;
    background: rgba(56,189,248,.2);
    border-radius: 3px;
}
.np-bar.short { width: 55%; }
.np-msg {
    height: 5px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    margin-top: 2px;
}
.np-msg.short { width: 65%; }

/* Card badge */
.card-badge {
    position: absolute;
    top: 10px; right: 10px;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(56,189,248,.25);
    padding: .25rem .6rem;
    border-radius: 50px;
}

/* Card body */
.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1;
}
.card-meta {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
}
.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}
.card-desc {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

/* Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .2rem;
}
.tag {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    padding: .2rem .55rem;
    border-radius: 50px;
}

/* Card footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    gap: .5rem;
}
.card-footer-btns {
    display: flex;
    gap: .4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Card status labels */
.card-status {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.card-status.live {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.card-status.pending { color: var(--text-faint); }
.card-status.wip     { color: #f59e0b; }

/* ══════════════════════════════════════════
   STACK
══════════════════════════════════════════ */
.stack-section {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
}
.stack-label {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.75rem;
}
.stack-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--text-faint);
    transition: all .25s ease;
    cursor: default;
}
.stack-item i { font-size: 1.75rem; }
.stack-item span {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.stack-item:hover { color: var(--accent); transform: translateY(-3px); }

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.contact-left { position: relative; z-index: 1; }
.contact-right {
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-bg-icon {
    font-size: 14rem;
    color: var(--text-faint);
    opacity: .04;
    pointer-events: none;
}
.contact-form {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.field-group { display: flex; flex-direction: column; gap: .4rem; }
.field-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.field-input {
    background: rgba(0,0,0,.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .75rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    transition: all var(--tm);
    outline: none;
    resize: none;
    width: 100%;
}
.field-input::placeholder { color: var(--text-faint); }
.field-input:focus {
    border-color: var(--accent);
    background: rgba(0,0,0,.5);
    box-shadow: 0 0 0 3px rgba(56,189,248,.08);
}
.form-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.status-text {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity .3s ease;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}
.footer-left { display: flex; align-items: center; gap: .65rem; }
.footer-logo {
    width: 22px; height: 22px;
    object-fit: contain;
    opacity: .3;
    filter: grayscale(1);
}
.footer-copy {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.footer-link {
    color: var(--text-faint);
    font-size: 1.1rem;
    transition: color var(--tm);
    text-decoration: none;
}
.footer-link:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes drift {
    from { transform: translate(-5%, -5%) scale(1); }
    to   { transform: translate(10%, 10%) scale(1.08); }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1;  box-shadow: 0 0 6px var(--accent); }
    50%       { opacity: .5; box-shadow: 0 0 12px var(--accent); }
}

/* ══════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 700px) {
    .nav { position: relative; top: 0; margin: 1rem 0 2.5rem; }
    .hero { padding: 3rem 0 4rem; }
    .hero-stats { gap: 1.2rem; padding: .8rem 1.5rem; }
    .field-row { grid-template-columns: 1fr; }
    .contact-wrap { grid-template-columns: 1fr; }
    .contact-right { display: none; }
    .project-grid { grid-template-columns: 1fr; }
    .card-footer { flex-wrap: wrap; }
    .card-footer-btns { width: 100%; }
}
/* ── Image banner ── */
.image-banner {
    background: #050c1a;
    padding: 0;
}
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform .4s ease;
}
.project-card:hover .banner-img {
    transform: scale(1.03);
}