:root {
    --font-display: "Plus Jakarta Sans", Figtree, ui-sans-serif, system-ui, sans-serif;
    --font-body: Figtree, ui-sans-serif, system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
}

.font-display {
    font-family: var(--font-display);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 15px) scale(0.95);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-25px, 25px);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes bounceSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

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

.mesh-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.mesh-orb--slow {
    animation: floatSlow 25s ease-in-out infinite;
}

.mesh-orb--delay-1 {
    animation-delay: -5s;
}

.mesh-orb--delay-2 {
    animation-delay: -10s;
}

.mesh-orb--delay-3 {
    animation-delay: -15s;
}

.grid-overlay {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 40%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-text-accent {
    background: linear-gradient(135deg, #a5b4fc 0%, #f0abfc 50%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-slogan {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 45%, #f5d0fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-enter {
    animation: fadeInUp 0.8s ease-out both;
}

.hero-enter-delay-1 {
    animation-delay: 0.1s;
}

.hero-enter-delay-2 {
    animation-delay: 0.2s;
}

.hero-enter-delay-3 {
    animation-delay: 0.35s;
}

.hero-enter-delay-4 {
    animation-delay: 0.5s;
}

.hero-enter-delay-5 {
    animation-delay: 0.65s;
}

.orbit-pill {
    animation: fadeInUp 0.6s ease-out both;
}

.orbit-pill:nth-child(1) { animation-delay: 0.4s; }
.orbit-pill:nth-child(2) { animation-delay: 0.5s; }
.orbit-pill:nth-child(3) { animation-delay: 0.6s; }
.orbit-pill:nth-child(4) { animation-delay: 0.7s; }

.scroll-cue {
    animation: bounceSoft 2s ease-in-out infinite;
}

.btn-glow {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.35), 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-ghost-underline {
    position: relative;
}

.btn-ghost-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

.btn-ghost-underline:hover::after {
    width: 100%;
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.projects-bg {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    scroll-margin-top: 5rem;
}

.projects-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99, 102, 241, 0.15), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 80%, rgba(167, 139, 250, 0.1), transparent),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: auto, auto, 28px 28px;
    pointer-events: none;
}

.projects-header {
    position: relative;
    text-align: center;
}

.projects-header .projects-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}

.projects-header .projects-title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #f8fafc;
}

.projects-header .projects-subtitle {
    margin: 1rem auto 0;
    max-width: 36rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #94a3b8;
}

.projects-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 3.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.project-card {
    --accent: #818cf8;
    --accent-glow: rgba(129, 140, 248, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.project-card-glow {
    position: absolute;
    top: -3rem;
    right: -2rem;
    height: 8rem;
    width: 8rem;
    border-radius: 9999px;
    background: var(--accent);
    opacity: 0;
    filter: blur(48px);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 48px -16px var(--accent-glow);
}

.project-card:hover .project-card-glow {
    opacity: 0.35;
}

.project-card--indigo {
    --accent: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);
}

.project-card--violet {
    --accent: #a78bfa;
    --accent-glow: rgba(124, 58, 237, 0.4);
}

.project-card--emerald {
    --accent: #34d399;
    --accent-glow: rgba(16, 185, 129, 0.35);
}

.project-card--fuchsia {
    --accent: #e879f9;
    --accent-glow: rgba(192, 38, 211, 0.35);
}

.project-card-inner {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .project-card-inner {
        padding: 1.75rem;
    }
}

.project-card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.project-card-icon {
    display: inline-flex;
    height: 3rem;
    width: 3rem;
    shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #0f172a));
    font-size: 0.8125rem;
    font-weight: 800;
    color: #0f172a;
    box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.project-card-meta {
    flex: 1;
    min-width: 0;
}

.project-card-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.project-card-title {
    margin-top: 0.375rem;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f1f5f9;
}

.project-card-domain {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.project-card-domain-dot {
    height: 0.375rem;
    width: 0.375rem;
    border-radius: 9999px;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.project-card-quick {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.project-card-quick:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    transform: translate(2px, -2px);
}

.project-card-desc {
    margin-top: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #94a3b8;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.project-feature-chip {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    font-weight: 500;
    color: #cbd5e1;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.project-card:hover .project-feature-chip {
    border-color: rgba(255, 255, 255, 0.12);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.25s ease;
}

.project-card-cta:hover {
    gap: 0.75rem;
}

.project-card-cta-icon {
    transition: transform 0.25s ease;
}

.project-card-cta:hover .project-card-cta-icon {
    transform: translateX(3px);
}

.project-card-live {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.ecosystem-band {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #4c1d95 75%, #0f172a 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.chip-link {
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.chip-link:hover {
    transform: translateY(-2px);
}

.chip-link:focus-visible,
.btn-glow:focus-visible,
.project-card-quick:focus-visible,
.project-card-cta:focus-visible,
a:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .mesh-orb,
    .scroll-cue,
    .ecosystem-band {
        animation: none;
    }

    .hero-enter,
    .orbit-pill {
        animation: fadeIn 0.3s ease both;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .project-card:hover {
        transform: none;
    }

    .project-card:hover .project-card-glow {
        opacity: 0;
    }

    .project-card-quick:hover {
        transform: none;
    }

    .project-card-cta:hover .project-card-cta-icon {
        transform: none;
    }
}
