/* ==========================================================
   Rostand Njomo — modern portfolio theme
   ========================================================== */
:root {
    --bg: #f6f7fb;
    --bg-2: #eef0f7;
    --surface: #ffffff;
    --surface-2: #fbfbfe;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text: #0f172a;
    --muted: #4b5568;
    --faint: #8a93a6;
    --accent: #6d4aff;
    --accent-2: #0891b2;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --accent-3: #f472b6;
    --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    --radius: 20px;
    --radius-sm: 12px;
    --maxw: 1180px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- background decoration ---------- */
.bg-grid {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(rgba(15,23,42,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.blob {
    position: absolute; z-index: -1; border-radius: 50%;
    filter: blur(100px); opacity: .22; pointer-events: none;
    animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 520px; height: 520px; background: var(--accent); top: -160px; left: -120px; }
.blob-2 { width: 420px; height: 420px; background: var(--accent-2); top: 80px; right: -140px; animation-delay: -6s; opacity: .18; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}

/* ---------- navigation ---------- */
.nav {
    position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
    transition: top .3s ease;
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 12px 10px 20px;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: var(--grad); color: #fff; font-size: .85rem; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
    display: block; padding: 8px 14px; border-radius: 999px;
    color: var(--muted); font-size: .92rem; font-weight: 500;
    transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
    padding: 8px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
    letter-spacing: .06em; color: var(--muted); border: 1px solid var(--border); cursor: pointer;
    background: transparent; font-family: inherit;
}
.lang-switch:hover { color: var(--text); border-color: var(--border-strong); }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 22px; border-radius: 999px;
    font-weight: 600; font-size: .95rem; border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s, border-color .2s;
    cursor: pointer; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 255, .7); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(124, 92, 255, .9); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 180px 0 100px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 14px 7px 10px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: .85rem; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.04; letter-spacing: -.04em; font-weight: 700;
    margin: 24px 0 20px;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.typed { border-right: 3px solid var(--accent-2); padding-right: 4px; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; }
.hero-meta strong { display: block; font-family: var(--font-display); font-size: 2rem; letter-spacing: -.03em; }
.hero-meta span { color: var(--faint); font-size: .88rem; }

.hero-card {
    position: relative; padding: 28px; border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .3);
    backdrop-filter: blur(10px);
}
.hero-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(160deg, rgba(124,92,255,.6), transparent 40%, rgba(34,211,238,.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; line-height: 1.9; color: #c3c9d9; }
.code .k { color: #c084fc; } .code .s { color: #34d399; } .code .p { color: #22d3ee; } .code .c { color: #6b7389; }
.window-dots { display: flex; gap: 7px; margin-bottom: 18px; }
.window-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; } .window-dots i:nth-child(3) { background: #28c840; }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--border); padding: 22px 0; overflow: hidden; background: var(--surface); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.marquee-item i { font-size: 1.5rem; color: var(--text); opacity: .85; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section.section { padding: 120px 0; position: relative; }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent-2); margin-bottom: 14px;
}
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 18px; }
.section-sub { color: var(--muted); max-width: 640px; font-size: 1.05rem; margin: 0; }
.section-head { margin-bottom: 56px; }

/* about */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.about-text p { color: var(--muted); font-size: 1.05rem; white-space: pre-line; margin: 0; }

/* cards */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; box-shadow: var(--shadow); transition: border-color .3s, transform .3s, box-shadow .3s;
    position: relative; overflow: hidden;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(15,23,42,.25); }
.card .glow {
    position: absolute; width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(109,74,255,.14), transparent 70%);
    top: -120px; right: -120px; opacity: 0; transition: opacity .4s; pointer-events: none;
}
.card:hover .glow { opacity: 1; }

.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.4rem; margin-bottom: 22px; color: #fff;
}
.ic-1 { background: linear-gradient(135deg, #7c5cff, #a78bfa); }
.ic-2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.ic-3 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.ic-4 { background: linear-gradient(135deg, #10b981, #34d399); }
.card h3 { font-size: 1.2rem; margin: 0 0 10px; letter-spacing: -.01em; }
.card p { color: var(--muted); margin: 0; }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px;
    border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border);
    font-weight: 600; box-shadow: var(--shadow); transition: .25s;
}
.skill:hover { border-color: rgba(109,74,255,.45); background: rgba(109,74,255,.05); }
.skill i, .skill svg { font-size: 1.5rem; width: 28px; text-align: center; color: var(--accent-2); flex-shrink: 0; }

/* projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
    display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: .3s;
}
.project:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 30px 60px -30px rgba(15,23,42,.35); }
.project-img { aspect-ratio: 16 / 11; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.project-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.project:hover .project-img img { transform: scale(1.05); }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h3 { margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }
.project-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tag { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); }
.project-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--accent-2); }
.project-link:hover { gap: 12px; }
.project-link { transition: gap .2s; }
.projects-more { text-align: center; margin-top: 40px; }
.project.is-hidden { display: none; }

/* cta / contact */
.cta {
    border-radius: 32px; padding: 72px 56px; text-align: center; position: relative; overflow: hidden;
    background: radial-gradient(ellipse at top, rgba(109,74,255,.16), transparent 60%), var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.cta h2 { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.035em; line-height: 1.08; margin: 0 0 18px; }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto 34px; font-size: 1.08rem; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 40px; color: var(--faint); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }
.socials { display: flex; gap: 10px; }
.socials a {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.socials a:hover { border-color: var(--border-strong); color: var(--text); }

/* flash */
.flash {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60;
    padding: 14px 22px; border-radius: 14px; background: var(--text); color: #fff; border: 0;
    box-shadow: 0 20px 50px -20px rgba(15,23,42,.5); animation: flashIn .4s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translate(-50%, 20px); } }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- legal / app pages ---------- */
.page { padding: 150px 0 60px; }
.page .container { max-width: 820px; }
.page-head { margin-bottom: 40px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.035em; line-height: 1.1; margin: 10px 0 14px; }
.page-head p { color: var(--muted); margin: 0; }
.prose { color: var(--text); }
.prose h2 { font-family: var(--font-display); color: var(--text); font-size: 1.35rem; letter-spacing: -.02em; margin: 44px 0 12px; }
.prose h3 { color: var(--text); font-size: 1.05rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.toc a { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 32px 0; }
.contact-card .label { color: var(--faint); font-size: .85rem; margin-bottom: 4px; }
.contact-card .value { font-size: 1.15rem; font-weight: 600; word-break: break-all; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }
.app-pill { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .hero-inner, .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 140px; }
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute; top: calc(100% + 8px); left: 24px; right: 24px;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
        background: rgba(255, 255, 255, .97); box-shadow: var(--shadow); border: 1px solid var(--border); border-radius: 20px;
        backdrop-filter: blur(16px);
        opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .25s;
    }
    .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
    .nav-links a { padding: 12px 16px; }
    .nav-actions .btn { display: none; }
}
@media (max-width: 640px) {
    section.section { padding: 84px 0; }
    .services-grid, .projects-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .cta { padding: 52px 24px; }
    .hero-meta { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* media player notice */
.notice { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 28px; border-left: 4px solid var(--accent); }
.notice:hover { transform: none; }
.notice-icon { font-size: 1.5rem; color: var(--accent); line-height: 1; padding-top: 2px; }
.notice h3 { margin: 0 0 8px; }
.notice p + p { margin-top: 10px; }

/* AI highlight */
.ai-card { margin-bottom: 20px; padding: 36px; }
.ai-card:hover { transform: none; }
.ai-head { display: flex; gap: 22px; align-items: flex-start; }
.ai-head .service-icon { margin-bottom: 0; flex-shrink: 0; }
.ai-head h3 { font-size: 1.4rem; }
.ai-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.ai-points > div { display: flex; gap: 12px; padding: 18px; border-radius: var(--radius-sm); background: var(--bg-2); }
.ai-points i { color: var(--accent); font-size: 1.25rem; line-height: 1.4; }
.ai-points span { color: var(--muted); font-size: .93rem; }
.ai-points strong { display: block; color: var(--text); margin-bottom: 4px; }
@media (max-width: 900px) { .ai-points { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ai-head { flex-direction: column; } }

/* hero "what I build" card */
.hero-card-title { margin: 0 0 16px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; transition: background .2s; }
.offer:hover { background: var(--bg-2); }
.offer .service-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 1.15rem; margin: 0; flex-shrink: 0; }
.offer strong { display: block; font-size: .98rem; }
.offer small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.offer-arrow { margin-left: auto; color: var(--faint); transition: transform .2s, color .2s; }
.offer:hover .offer-arrow { transform: translateX(3px); color: var(--accent); }
.hero-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
