
/* ===== RESET & TOKENS ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy:        #040320;
    --navy-mid:    #0a0840;
    --indigo:      #4f46e5;
    --indigo-glow: #6366f1;
    --cyan:        #06b6d4;
    --white:       #ffffff;
    --off-white:   #f0f0f8;
    --surface:     #ffffff;
    --muted:       #6b7280;
    --border:      #e5e7eb;
    --text:        #111827;
    --radius-sm:   12px;
    --radius-md:   20px;
    --radius-lg:   32px;
    --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
    --transition:  0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

h1, h2, h3 { font-family: 'Syne', sans-serif; letter-spacing: -0.03em; }
a { text-decoration: none; color: inherit; }

/* ===== HERO ===== */
.hero {
    min-height: 100svh;
    background: var(--navy);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 160px;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: drift 12s ease-in-out infinite alternate;
}
.hero-blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, #4f46e5, transparent); top: -120px; left: -100px; animation-delay: 0s; }
.hero-blob-2 { width: 380px; height: 380px; background: radial-gradient(circle, #06b6d4, transparent); bottom: -80px; right: -80px; animation-delay: -5s; }
.hero-blob-3 { width: 260px; height: 260px; background: radial-gradient(circle, #818cf8, transparent); top: 40%; left: 60%; animation-delay: -9s; }

@keyframes drift {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.08); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.35);
    color: #a5b4fc;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 36px;
    animation: fadeUp 0.8s var(--ease-out) both;
}

.hero-badge::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.0;
    margin-bottom: 28px;
    animation: fadeUp 0.9s 0.1s var(--ease-out) both;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--indigo-glow), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,0.65);
    max-width: 600px;
    margin: 0 auto 48px;
    animation: fadeUp 1s 0.2s var(--ease-out) both;
}

/* Stats pills */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 1.1s 0.3s var(--ease-out) both;
}

.hero-stat {
    padding: 10px 22px;
    border-radius: 50px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    transition: background 0.3s, border-color 0.3s;
}

.hero-stat:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
}

.hero-stat strong {
    color: #a5b4fc;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    margin-right: 4px;
}

/* Scroll indicator */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeUp 1.2s 0.8s var(--ease-out) both;
}

.scroll-track {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    border-radius: 1px;
}

.scroll-track::after {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(99,102,241,0.8));
    animation: scrollDrop 1.8s ease-in-out infinite;
}

@keyframes scrollDrop {
    0%   { top: -100%; }
    100% { top: 100%; }
}

/* ===== FILTERS ===== */
.filters-bar {
    background: var(--white);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border);
}

.filters-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar { display: none; }

.filters-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    margin-right: 8px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: var(--indigo);
    color: var(--indigo);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--indigo), #4338ca);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    max-width: 1160px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.projects-count {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.count-num {
    color: var(--indigo);
    font-size: 22px;
    margin-right: 6px;
}

/* Layout toggle */
.layout-toggle {
    display: flex;
    gap: 4px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.layout-btn {
    width: 34px; height: 34px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: all 0.2s;
}

.layout-btn.active {
    background: var(--indigo);
    color: white;
}

.layout-btn:hover:not(.active) { background: var(--off-white); color: var(--text); }

/* ===== GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.projects-grid.list-view {
    grid-template-columns: 1fr;
}

/* ===== PROJECT CARD ===== */
.project-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(79,70,229,0.14);
    border-color: rgba(99,102,241,0.3);
}

/* List view card */
.projects-grid.list-view .project-card {
    flex-direction: row;
    transform: none !important;
}

.projects-grid.list-view .project-card:hover {
    box-shadow: 0 8px 32px rgba(79,70,229,0.12);
    border-color: rgba(99,102,241,0.3);
}

.projects-grid.list-view .project-image {
    width: 280px;
    height: auto;
    flex-shrink: 0;
}

.projects-grid.list-view .project-content {
    padding: 32px 32px;
}

/* Image */
.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e8f8, #d1d5f0);
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-image img { transform: scale(1.06); }

/* Overlay */
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(4,3,32,0.85) 0%,
        rgba(79,70,229,0.4) 55%,
        transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 24px;
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 50px;
    background: var(--white);
    color: var(--navy);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.overlay-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* Badge */
.project-badge {
    position: absolute;
    top: 14px; left: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 700;
    color: var(--indigo);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(99,102,241,0.2);
}

/* Content */
.project-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    transition: color 0.2s;
}

.project-card:hover .project-content h3 { color: var(--indigo); }

.project-content p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.68;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.project-tag {
    padding: 4px 11px;
    border-radius: 50px;
    background: rgba(79,70,229,0.07);
    color: var(--indigo);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(79,70,229,0.15);
    transition: background 0.2s;
}

.project-tag:hover { background: rgba(79,70,229,0.14); }

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    color: var(--indigo);
    transition: gap var(--transition);
}

.project-link svg { transition: transform var(--transition); }

.project-card:hover .project-link { gap: 10px; }
.project-card:hover .project-link svg { transform: translateX(3px); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 100px 24px;
    grid-column: 1 / -1;
}

.empty-icon {
    width: 72px; height: 72px;
    background: rgba(79,70,229,0.08);
    border-radius: 20px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    font-size: 28px;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--muted);
    font-size: 15px;
}

/* ===== CTA ===== */
.cta-section {
    padding: 0 24px 100px;
}

.cta-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 80px 60px;
    background: var(--navy);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.cta-blob-1 { width: 400px; height: 400px; background: radial-gradient(circle, #4f46e5, transparent); top: -100px; left: -100px; }
.cta-blob-2 { width: 300px; height: 300px; background: radial-gradient(circle, #06b6d4, transparent); bottom: -80px; right: -60px; }

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #818cf8;
    margin-bottom: 20px;
}

.cta-inner h2 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 18px;
    line-height: 1.1;
}

.cta-inner p {
    color: rgba(255,255,255,0.6);
    font-size: 17px;
    margin-bottom: 42px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: var(--white);
    color: var(--navy);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    border-radius: 50px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    transition: background var(--transition), transform var(--transition);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .projects-grid.list-view .project-image { width: 200px; }
}

@media (max-width: 768px) {
    .hero { padding: 100px 20px 140px; }
    .projects-grid { grid-template-columns: 1fr; }
    .projects-grid.list-view .project-card { flex-direction: column; }
    .projects-grid.list-view .project-image { width: 100%; height: 220px; }
    .projects-grid.list-view .project-content { padding: 24px; }
    .cta-inner { padding: 56px 32px; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 280px; justify-content: center; }
    .layout-toggle { display: none; }
}

@media (max-width: 480px) {
    .filters-inner { padding: 12px 0; }
    .filter-btn { padding: 7px 16px; font-size: 13px; }
}
