diff --git a/app.js b/app.js index fca511b..821f125 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,20 @@ /* PostPilot generator page logic */ (() => { const $ = (id) => document.getElementById(id); + + // Sample transcripts by topic - opinionated notes the AI can learn a voice from + const SAMPLES = { + ai: `Everyone wants to bolt AI onto their product, but most of it is theater. I'd rather ship one AI feature that quietly saves users thirty seconds than five that feel like managing a junior intern. The gap between a demo that wows in a meeting and something that survives real users on a stressed Tuesday morning is enormous. If it doesn't move activation, rip it out. No sacred AI cows.`, + economics: `Everyone's watching the Fed like it's the only thing that matters, but the real story is in small business credit. When local businesses can't borrow affordably, hiring freezes long before the headlines catch up. I think we pay too much attention to the stock market and too little to Main Street indicators. GDP numbers hide more than they reveal about how regular people are actually doing.`, + startups: `Most startups don't die from competition, they die from building something nobody asked for. Talk to twenty customers before you write a line of code. I'm also convinced raising too much money too early kills more companies than raising too little - constraints force focus. Revenue is the only validation that matters. Everything else is applause.`, + marketing: `Brand isn't your logo, it's what people say about you when you're not in the room. Most companies pump out content nobody reads instead of making one thing people actually share. I believe boring industries are the biggest branding opportunity - if everyone in your category sounds the same, sounding human is a superpower. Metrics without a story are just noise.`, + careers: `Job descriptions asking for five years of experience in a three-year-old technology tell you everything about broken hiring. I believe skills beat credentials, and portfolios beat resumes. The best career moves I've seen came from people who built things in public instead of quietly applying to hundreds of roles. Networking isn't schmoozing - it's being useful to people before you need them.`, + leadership: `The best managers I've had did less, not more - fewer meetings, clearer priorities, faster decisions. Micromanagement is fear wearing a productivity costume. I think most companies promote their best individual contributors into management and lose twice: a great builder gone, a mediocre manager gained. Trust is the only real productivity hack.`, + finance: `Budgeting apps don't fix spending problems any more than scales fix eating problems - behavior beats tools every time. I think the personal finance industry profits from complexity, when the winning strategy fits on an index card: spend less than you earn, automate savings, buy boring index funds, wait. The hardest part isn't knowledge, it's patience.`, + health: `We treat sleep like a luxury and then wonder why burnout is everywhere. I'm convinced most workplace wellness programs are box-ticking - a meditation app subscription doesn't fix a culture of 9pm emails. Walking meetings, actual lunch breaks, and respecting time off would do more than any perk. Health isn't a productivity hack, it's the foundation everything else sits on.`, + climate: `Sustainability theater drives me crazy - companies celebrating paper straws while their supply chain burns coal. Real climate progress is boring: better insulation, efficient logistics, cleaner grids. I think the biggest lever isn't individual guilt, it's procurement - when big buyers demand cleaner suppliers, whole industries move. Progress beats purity.`, + realestate: `Everyone asks when to buy like there's a magic date, but the honest answer is: when your life needs it and the math works. Rent versus buy isn't a moral question. I think we massively underbuild housing and then act shocked at prices - zoning reform would do more for affordability than any first-time-buyer subsidy. Location risk is the most underpriced factor in real estate.`, + }; const btn = $("generate-btn"); const progress = $("progress"); const progressText = $("progress-text"); @@ -201,12 +215,24 @@ }, 1200); } + // Topic dropdown fills the notes box with an editable sample + $("sample-topic").addEventListener("change", () => { + const key = $("sample-topic").value; + if (!key) return; + const box = $("transcript"); + if (box.value.trim() && + !confirm("Replace your current notes with the sample?")) { + $("sample-topic").value = ""; + return; + } + box.value = SAMPLES[key] || ""; + }); + btn.addEventListener("click", async () => { setError(""); const transcript = $("transcript").value.trim(); - const useSample = $("use-sample").checked; - if (!transcript && !useSample) { - setError("Paste a transcript or check “Use built-in sample transcript”."); + if (!transcript) { + setError("Paste some notes, or pick a sample topic from the dropdown."); return; } setBusy(true); @@ -217,7 +243,6 @@ headers: { "Content-Type": "application/json" }, body: JSON.stringify({ transcript, - use_sample: useSample, tone: $("tone").value, word_min: Math.max(0, Math.min(3000, parseInt($("wordmin").value, 10) || 100)), word_max: Math.max(0, Math.min(3000, parseInt($("wordmax").value, 10) || 200)), diff --git a/app.py b/app.py index 2e3c9da..c1af0e2 100644 --- a/app.py +++ b/app.py @@ -153,6 +153,21 @@ def _serialize_draft(text, topic, img, draft_id): return d +def _resolve_url(url): + """Follow Google News redirect links to the real article URL.""" + if not url or "news.google.com" not in url: + return url + try: + r = requests.get(url, timeout=10, allow_redirects=True, + headers={"User-Agent": "Mozilla/5.0"}) + final = r.url + if final and "news.google.com" not in final: + return final + except Exception: + pass + return url + + def _append_source(text, url): """Add the source article link to the post text, just above the hashtags.""" if not url: @@ -168,7 +183,7 @@ def _append_source(text, url): def _rank_topics_for_voice(content, voice, transcript_text, n): """Boost the weight of news signals most relevant to the user's themes/opinions so select_topics() favors them over generic top headlines.""" - primaries = [s for s in content if s.kind in ("ai_news", "arxiv")] or list(content) + primaries = [s for s in content if s.kind in ("ai_news", "arxiv", "news")] or list(content) if len(primaries) <= n: return interests = "; ".join((voice.themes or []) + (voice.opinions or [])) @@ -212,12 +227,20 @@ def _rank_topics_for_voice(content, voice, transcript_text, n): def _run_job(job_id, settings, transcript_text): try: - _job_update(job_id, progress="Gathering live AI news...") - content, voice_signals = g.gather_signals(settings, transcript_text) + _job_update(job_id, progress="Reading your notes...") + queries = [] + try: + queries = g.derive_search_queries(transcript_text) + except Exception as e: + print(f" [warn] could not derive topics ({e}).") + + _job_update(job_id, progress="Gathering live news about your topics...") + content, voice_signals = g.gather_signals(settings, transcript_text, + queries=queries or None) if not content: _job_update(job_id, status="error", - error="No news signals found. Check the server's internet " - "connection and that feedparser is installed.") + error="No news found for your topics in this lookback " + "window. Try a longer lookback or broader notes.") return _job_update(job_id, progress="Building your voice profile...") @@ -235,6 +258,7 @@ def _run_job(job_id, settings, transcript_text): used_images = set() for i, topic in enumerate(topics, 1): _job_update(job_id, progress=f"Writing variant {i} of {len(topics)}...") + topic.primary.url = _resolve_url(topic.primary.url) text = g.format_post(g.generate_post(topic, voice, settings), max_chars=getattr(settings, "max_chars", 2900)) text = _append_source(text, topic.primary.url) @@ -321,8 +345,8 @@ def _wc(key, default): lookback = max(1, min(24 * 365 * 10, lb_value * unit_hours[unit])) transcript = (data.get("transcript") or "").strip() - if data.get("use_sample"): - transcript = g.SAMPLE_TRANSCRIPT + if not transcript: + return jsonify({"error": "Paste a transcript or some notes first."}), 400 settings = g.Settings(tone=tone, length=length_key, variants=variants, news_lookback_hours=lookback, max_news_items=12, diff --git a/generator.html b/generator.html index b870606..8581d30 100644 --- a/generator.html +++ b/generator.html @@ -4,6 +4,7 @@ Generator — PostPilot + @@ -13,10 +14,11 @@ @@ -27,13 +29,26 @@

Settings

- -
Used to learn your voice. Leave empty and check the box below to try the built-in sample.
+ +
Used to learn your voice and find news about your topics.
-
- - +
+ + +
Fills the notes box with sample opinions on that topic — edit freely.
@@ -102,7 +117,7 @@

Settings

Your generated posts will appear here.
- Paste a transcript (or use the sample) and hit Generate posts. + Paste your notes (or pick a sample topic) and hit Generate posts.
diff --git a/generator.py b/generator.py index 742fb4e..1f3791f 100644 --- a/generator.py +++ b/generator.py @@ -29,21 +29,6 @@ class Settings: news_lookback_hours: int = 48 max_news_items: int = 6 images: bool = True -SAMPLE_TRANSCRIPT = """\ -Sarah: Where are we with the onboarding rewrite? -Miguel: Getting there. Everyone wants to bolt AI onto the flow, but I don't think -we've earned it yet. We haven't nailed the boring basics - empty states, error -messages - and now there's pressure to drop a chatbot in the corner. I'm allergic -to that. AI should remove steps, not add a shiny thing you have to talk to. -Sarah: Leadership sees competitors shipping copilots everywhere. -Miguel: Most of them are demos, not products. That's my whole thing lately - the -gap between a demo that wows in a meeting and something that survives contact with -real users on a stressed Tuesday morning. I'd rather ship one AI feature that -quietly saves thirty seconds than five that feel like managing a junior intern. -The teams that win aren't the ones with the fanciest model - they're obsessive -about where AI reduces friction versus where it's just theater. And we measure it. -If it doesn't move activation, we rip it out. No sacred AI cows. -""" @dataclass class Signal: kind: str; lane: str; text: str @@ -106,11 +91,59 @@ def _fetch_rss(s: Settings): (dt or datetime.now(timezone.utc)).date().isoformat(), 1.0))) items.sort(key=lambda t: t[0], reverse=True) return [sig for _, sig in items[:s.max_news_items]] -def fetch_trending(s: Settings): +def derive_search_queries(text, n=4): + """Turn the user's notes into news search queries (any topic).""" + text = (text or "").strip() + if not text: return [] + if llm_available(): + try: + raw = llm_complete( + "Read these notes and identify the main topics the writer cares " + f"about. Return ONLY a JSON array of 2-{n} short news-search " + "queries (2-5 words each), no explanations. " + 'Example: ["remote work productivity", "college tuition costs"]' + "\n\nNOTES:\n" + text[:4000], + system="You extract news search topics from notes. Output only " + "a JSON array of strings.", + max_tokens=150, temperature=0.2) + cleaned = re.sub(r"^```[a-zA-Z]*\n?|\n?```$", "", raw.strip()) + try: + arr = json.loads(cleaned) + except Exception: + arr = re.findall(r'"([^"]{3,60})"', cleaned) + arr = [str(q).strip() for q in arr if str(q).strip()] + if arr: return arr[:n] + except Exception as e: + print(f" [warn] query derivation failed ({e}); using keywords.") + words = list(_keywords(text)) + return [" ".join(words[:4])] if words else [] +def fetch_news_for(query, s: Settings): + """Google News RSS for an arbitrary topic - no API key needed.""" + if feedparser is None: return [] + from urllib.parse import quote_plus + days = max(1, s.news_lookback_hours // 24) + url = ("https://news.google.com/rss/search?q=" + quote_plus(query) + + f"+when:{days}d&hl=en-US&gl=US&ceid=US:en") + try: + feed = feedparser.parse(url) + except Exception: + return [] + out = [] + for e in feed.entries[:s.max_news_items]: + tm = getattr(e, "published_parsed", None) + dt = datetime(*tm[:6], tzinfo=timezone.utc) if tm else datetime.now(timezone.utc) + title = getattr(e, "title", "") + if not title: continue + out.append(Signal("news", CONTENT, + _strip_html(getattr(e, "summary", "")) or title, + title, getattr(e, "link", ""), dt.date().isoformat(), + 1.0, {"query": query})) + return out +def fetch_trending(s: Settings, query=None): if requests is None: return [] try: r = requests.get("https://hn.algolia.com/api/v1/search_by_date", params={ - "query": "AI OR LLM OR OpenAI OR Anthropic", "tags": "story", + "query": query or "AI OR LLM OR OpenAI OR Anthropic", "tags": "story", "numericFilters": "points>50", "hitsPerPage": 6}, timeout=15) r.raise_for_status() except Exception: return [] @@ -147,14 +180,32 @@ def fetch_local_voice(directory, kind): except OSError: continue if t: out.append(Signal(kind, VOICE, t, os.path.basename(p), "", _today(), 1.5)) return out -def gather_signals(s: Settings, transcript_text): +def gather_signals(s: Settings, transcript_text, queries=None): print("-> Gathering sources...") content = [] - for fn in (fetch_ai_news, fetch_trending, fetch_arxiv): - try: got = fn(s) - except Exception as e: print(f" [warn] {fn.__name__} failed: {e}"); got = [] - if got: print(f" . {fn.__name__}: {len(got)} signal(s)") - content.extend(got) + if queries: + # Topic-driven: search the news for what the user's notes are about + seen = set() + for q in queries: + try: got = fetch_news_for(q, s) + except Exception as e: print(f" [warn] news '{q}' failed: {e}"); got = [] + for sig in got: + key = (sig.title or sig.url).lower() + if key and key not in seen: + seen.add(key); content.append(sig) + if got: print(f" . news '{q}': {len(got)} signal(s)") + try: + trending = fetch_trending(s, query=" OR ".join(queries)[:120]) + except Exception: + trending = [] + content.extend(trending) + else: + # Legacy default (CLI): AI-focused sources + for fn in (fetch_ai_news, fetch_trending, fetch_arxiv): + try: got = fn(s) + except Exception as e: print(f" [warn] {fn.__name__} failed: {e}"); got = [] + if got: print(f" . {fn.__name__}: {len(got)} signal(s)") + content.extend(got) voice = fetch_transcript(transcript_text) voice += fetch_local_voice("data/past_posts", "past_post") voice += fetch_local_voice("data/notes", "notes") @@ -213,7 +264,7 @@ def to_prompt_block(self): blk += "\n\nRELATED DISCUSSION:\n" + "\n".join(f"- ({s.kind}) {s.short(140)}" for s in self.supporting) return blk def select_topics(content, n): - primaries = [s for s in content if s.kind in ("ai_news","arxiv")] or list(content) + primaries = [s for s in content if s.kind in ("ai_news","arxiv","news")] or list(content) supports = [s for s in content if s.kind == "trending"] primaries = sorted(primaries, key=lambda s: s.weight, reverse=True) topics = [] @@ -348,6 +399,10 @@ def generate_post(topic, voice, s: Settings): === THE NEWS THEY'RE REACTING TO === {topic.to_prompt_block()} === RULES === +- If the person's profile above is thin, vague, or just a topic, do NOT + refuse and do NOT comment on the lack of information. Simply write as a + thoughtful professional who cares about that topic. You ALWAYS output a + finished post and nothing else - never meta-commentary about the inputs. - Open with a scroll-stopping first line. No "I'm excited to share". - {TONE_GUIDE.get(s.tone, TONE_GUIDE['insightful'])} - Length: {LENGTH_GUIDE.get(s.length, LENGTH_GUIDE['medium'])} @@ -371,7 +426,10 @@ def generate_post(topic, voice, s: Settings): "capitalization and punctuation: every sentence starts with a capital letter, " "contractions have apostrophes (don't, isn't, they're), proper nouns are " "capitalized (Microsoft, ChatGPT, AI). A person's voice is their ideas and " - "word choice, never sloppy mechanics.", + "word choice, never sloppy mechanics. You always deliver the post - with " + "rich profile material you mimic the person, with thin material you write " + "as a smart professional on the topic. Refusing or explaining is never " + "an acceptable output.", max_tokens=getattr(s, "max_tokens", 700), temperature=0.8) except Exception as e: print(f" [warn] LLM generation failed ({e}); using template.") @@ -459,8 +517,7 @@ def main(): if args.transcript and os.path.exists(args.transcript): with open(args.transcript, "r", encoding="utf-8") as f: transcript_text = f.read() else: - if args.transcript: print(f" [info] '{args.transcript}' not found; using built-in sample.") - transcript_text = SAMPLE_TRANSCRIPT + raise SystemExit("Provide a transcript: python generator.py --transcript notes.txt") if not llm_available(): print(" [info] No ANTHROPIC_API_KEY set - fallback mode (free news + template).\n") run(Settings(tone=args.tone, length=args.length, variants=max(1, min(5, args.variants)), diff --git a/index.html b/index.html index dc5f48f..624c23d 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ PostPilot — LinkedIn posts in your voice + @@ -15,57 +16,142 @@ How it works Examples Library + Connect LinkedIn Open generator
-

LinkedIn posts that sound like you, powered by today's AI news

-

Paste a meeting transcript or your notes. PostPilot learns your voice, pulls the latest AI headlines, and drafts ready-to-publish posts — each with a license-safe image attached.

+ +

LinkedIn posts that sound like you, powered by today's news

+

Paste a meeting transcript or your notes on any topic. PostPilot learns your voice, finds the latest headlines about what you care about, and drafts ready-to-publish posts — each with a license-safe image attached.

Generate posts
-
-
- 🗞️ -

Live news, not stale takes

-

Pulls fresh AI stories from news feeds, Hacker News, and arXiv within your chosen lookback window, so every post reacts to something current.

-
-
- 🎙️ -

Your actual voice

-

Builds a profile of your themes, opinions, and writing style from a transcript or notes — then ghostwrites as you, not as a generic AI.

-
-
- 🖼️ -

License-safe images

-

Every draft comes with a matching stock photo from Openverse or Pexels, with license and attribution details included.

+
+

A new way to show up on LinkedIn. Purpose-built for people with opinions but no time, PostPilot turns your notes and today's news into posts that sound like you.

+ +
+
+
FIG 0.1
+ + + + + + + + + + +

Reacts to live news

+

Reads your notes, works out what you care about — AI, economics, real estate, anything — and pulls fresh headlines on exactly those topics.

+
+ +
+
FIG 0.2
+ + + + + + + + + + +

Writes in your voice

+

Learns your themes, opinions, and rhythm from a transcript or notes — then ghostwrites as you, with clean grammar and structure.

+
+ +
+
FIG 0.3
+ + + + + + + +

Ships with one click

+

A license-safe image is picked to match each draft. Save the keepers to your library and post straight to LinkedIn.

+
-
- ⚙️ -

Tuned to your taste

-

Pick tone (insightful, casual, bold, technical), length, and how many variants you want. Copy the one you like straight into LinkedIn.

+
+ +
+

Every detail pulls its weight. Small systems working together, so posting takes minutes instead of an afternoon.

+
+
+
+
draft
+
posted
+
draft
+
+

A library for the keepers

+

Save the drafts worth keeping, post them when the timing's right, and always see what's already gone out.

+
+ +
+
+
100 words200 words
+
+
+

Any length you need

+

Set a word range — from a two-liner to an article draft.

+
+ +
+
+ Insightful + Casual + Bold + Technical +
+

Your tone, dialed in

+

Four voices, one dropdown away.

+
+ +
+
+
SOURCE reuters.com/business/housing-inventory-climbs…
+
IMAGE Photo by Anna K. on Pexels — free commercial use
+
AUTO Linked and credited in every draft
+
+

Receipts included

+

Every post links its source article, and every image ships with its license and photographer credit.

+

How it works

    -
  1. Paste your materialA meeting transcript, voice memo transcription, or rough notes — anything in your own words.
  2. -
  3. Pick your settingsTone, length, number of variants, and how far back to look for news.
  4. -
  5. We do the readingFresh AI news is gathered and matched against your themes and opinions.
  6. -
  7. Copy and postReview the drafts, grab the image, paste into LinkedIn. Done.
  8. +
  9. 01
    Paste your materialA meeting transcript, voice memo transcription, or rough notes — anything in your own words.
  10. +
  11. 02
    Pick your settingsTone, length, number of variants, and how far back to look for news.
  12. +
  13. 03
    We do the readingFresh news about your topics is gathered and matched against your themes and opinions.
  14. +
  15. 04
    Post itReview the drafts, grab the image, publish to LinkedIn with one click. Done.
+ +
+
+
+ +
postpilot — generator
+
+
+
+

Example output

-

Sample drafts generated from a product-meeting transcript, reacting to real AI headlines. Each comes with a license-safe stock image and attribution.

+

Sample drafts on three different topics — each generated from short notes, reacting to a real headline, with a license-safe stock image and attribution.

-

Insightful · 150 words

+

Insightful · 100–200 words

example
Engineer working with code projected across her face @@ -81,28 +167,54 @@

Insightful · 150 words

Where have you seen AI actually reduce friction — not just add theater? +Source: https://www.theverge.com/ai-copilot-launches + #AI #ProductManagement #ArtificialIntelligence #UX
-

Bold · 80 words

+

Bold · 60–100 words

example
- Close-up of a blue circuit board -
Hot take: your product hasn't earned an AI chatbot yet. + US dollar bills +
Hot take: the new budgeting app of the week won't fix anyone's finances. + +This week's survey says 60% of users abandon finance apps within a month. Of course they do. Tools don't change behavior — defaults do. -New research this week shows most users abandon in-app assistants within two sessions. Not surprising. We keep bolting AI onto flows before nailing the boring basics — empty states, error messages, onboarding that makes sense. +The winning strategy still fits on an index card: spend less than you earn, automate the savings, buy boring index funds, wait. -AI should remove steps. Not add a shiny thing you have to talk to. +The hardest part was never knowledge. It's patience. -No sacred AI cows. If it doesn't move activation, it goes. +What's the money habit that actually stuck for you? -What would you cut from your product tomorrow? +Source: https://www.cnbc.com/finance-app-retention-survey -#AI #ProductStrategy #UX
- +#PersonalFinance #Investing #MoneyHabits
+ +
+ +
+
+

Casual · 100–200 words

+ example +
+ House with a front lawn +
Everyone keeps asking me when to buy a house, like there's a magic date circled on some calendar. + +This week's housing report shows inventory finally climbing in most metros. Good news! And also — it changes almost nothing about the real question. + +Buy when your life needs it and the math works. That's it. Renting isn't throwing money away; it's paying for flexibility. Owning isn't a guaranteed investment; it's a lifestyle choice with a mortgage attached. + +The thing nobody wants to hear: we massively underbuild housing, then act shocked at prices. Zoning reform would do more for affordability than any first-time-buyer program. + +Are you waiting on the market, or waiting on your life? + +Source: https://www.realtor.com/june-housing-inventory-report + +#RealEstate #Housing #HomeBuying
+
@@ -113,5 +225,287 @@

Bold · 80 words

+ + + + diff --git a/library.html b/library.html index b645303..3ce5aa1 100644 --- a/library.html +++ b/library.html @@ -4,6 +4,7 @@ Library — PostPilot + @@ -11,18 +12,38 @@ -
-

Your drafts

-

Drafts you save from the generator live here. Post the keepers, delete the rest.

+
+
+

Your drafts

+ +
+

Drafts you save from the generator live here. Post the keepers, delete the rest.

+ +
+ + + +
-
+ +
@@ -95,6 +116,19 @@

${when} ${posted ? 'posted' : '${esc(d.text)}

`; + const body = el.querySelector(".post-body"); + if ((d.text || "").length > 420) { + body.classList.add("clamped"); + const more = document.createElement("button"); + more.className = "show-more"; + more.textContent = "Show more"; + more.addEventListener("click", () => { + const c = body.classList.toggle("clamped"); + more.textContent = c ? "Show more" : "Show less"; + }); + body.after(more); + } + el.querySelector(".copy-btn").addEventListener("click", (e) => { navigator.clipboard.writeText(d.text).then(() => { e.target.textContent = "Copied!"; @@ -137,19 +171,53 @@

${when} ${posted ? 'posted' : ' { + if (status !== "all" && d.status !== status) return false; + if (q && !((d.text || "") + " " + ((d.source && d.source.title) || "")) + .toLowerCase().includes(q)) return false; + return true; + }); + arr.sort((a, b) => sort === "old" + ? (a.created || "").localeCompare(b.created || "") + : (b.created || "").localeCompare(a.created || "")); + + const list = $("list"); + list.innerHTML = ""; + $("empty-state").style.display = ALL.length ? "none" : ""; + $("no-match").style.display = (ALL.length && !arr.length) ? "" : "none"; + + const count = $("lib-count"); + if (ALL.length) { + const posted = ALL.filter(d => d.status === "posted").length; + const showing = arr.length === ALL.length ? "" : ` · showing ${arr.length}`; + count.textContent = `${ALL.length} draft${ALL.length === 1 ? "" : "s"} · ${posted} posted${showing}`; + count.style.display = ""; + } else { + count.style.display = "none"; + } + arr.forEach(d => list.appendChild(card(d))); + } + async function load() { setError(""); try { const r = await fetch("/api/library"); const data = await r.json(); - const list = $("list"); - list.innerHTML = ""; - $("empty-state").style.display = data.drafts.length ? "none" : ""; - data.drafts.forEach(d => list.appendChild(card(d))); + ALL = data.drafts || []; + render(); } catch (e) { setError("Could not load the library."); } } + ["q", "f-status", "f-sort"].forEach(id => + $(id).addEventListener("input", render)); load(); })(); diff --git a/styles.css b/styles.css index c7bbf84..e233026 100644 --- a/styles.css +++ b/styles.css @@ -1,28 +1,107 @@ +@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@600;700;800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Instrument+Serif:ital@1&display=swap'); + :root { - --bg: #0f1117; - --surface: #171a23; - --surface-2: #1e222e; - --border: #2a2f3d; - --text: #e8eaf0; - --muted: #9aa1b2; + --bg: #0b0d12; + --surface: #12151d; + --surface-2: #1a1e29; + --border: #262b38; + --border-hover: #38405a; + --text: #f2f4f9; + --muted: #b6bdcd; --accent: #4f8ff7; + --accent-2: #7c5cff; --accent-hover: #6ba1f9; --green: #3ecf8e; - --radius: 12px; - --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + --c-purple: #8b5cf6; + --c-pink: #ec4899; + --c-orange: #f97316; + --c-teal: #14b8a6; + --c-yellow: #eab308; + --radius: 14px; + --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + --font-display: "Bricolage Grotesque", "Instrument Sans", -apple-system, sans-serif; + --shadow: 0 8px 30px rgba(0, 0, 0, 0.35); } * { box-sizing: border-box; margin: 0; padding: 0; } body { background: var(--bg); + background-image: + radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 143, 247, 0.07), transparent); + background-attachment: fixed; color: var(--text); font-family: var(--font); line-height: 1.6; min-height: 100vh; } -a { color: var(--accent); text-decoration: none; } +/* Dot-grid texture, faded at the edges */ +body::before { + content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; + background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px); + background-size: 26px 26px; + -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%); + mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%); +} + +/* Film-grain noise so the dark isn't flat */ +body::after { + content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; + opacity: 0.028; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); +} + +/* Slow-drifting aurora glows (hero) */ +.hero { position: relative; } +.hero-orbs { position: absolute; inset: -80px 0 0 0; z-index: -1; overflow: visible; pointer-events: none; } +.hero-orb { + position: absolute; border-radius: 50%; filter: blur(90px); +} +.hero-orb:nth-child(1) { + width: 420px; height: 420px; left: 4%; top: -60px; + background: rgba(79, 143, 247, 0.20); + animation: drift1 16s ease-in-out infinite alternate; +} +.hero-orb:nth-child(2) { + width: 360px; height: 360px; right: 4%; top: 30px; + background: rgba(139, 92, 246, 0.16); + animation: drift2 20s ease-in-out infinite alternate; +} +.hero-orb:nth-child(3) { + width: 300px; height: 300px; left: 42%; top: 140px; + background: rgba(236, 72, 153, 0.10); + animation: drift1 24s ease-in-out infinite alternate-reverse; +} +@keyframes drift1 { from { transform: translate(0, 0); } to { transform: translate(70px, 40px); } } +@keyframes drift2 { from { transform: translate(0, 0); } to { transform: translate(-60px, -30px); } } + +/* Hero entrance */ +@media (prefers-reduced-motion: no-preference) { + .hero h1, .hero p, .hero .btn { + animation: heroUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; + } + .hero p { animation-delay: 0.12s; } + .hero .btn { animation-delay: 0.24s; } +} +@keyframes heroUp { + from { opacity: 0; transform: translateY(22px); } + to { opacity: 1; transform: translateY(0); } +} + +::selection { background: rgba(79, 143, 247, 0.35); } + +::-webkit-scrollbar { width: 10px; } +::-webkit-scrollbar-track { background: var(--bg); } +::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; } +::-webkit-scrollbar-thumb:hover { background: var(--border-hover); } + +h1, h2, h3, .logo { + font-family: var(--font-display); + letter-spacing: -0.01em; +} + +a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; } a:hover { color: var(--accent-hover); } .container { max-width: 1000px; margin: 0 auto; padding: 0 24px; } @@ -30,40 +109,78 @@ a:hover { color: var(--accent-hover); } /* Nav */ nav { display: flex; align-items: center; justify-content: space-between; - padding: 20px 0; border-bottom: 1px solid var(--border); + padding: 18px 0; + position: sticky; top: 0; z-index: 50; + background: rgba(11, 13, 18, 0.75); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-bottom: 1px solid var(--border); +} +.logo { + font-weight: 800; font-size: 1.5rem; color: #ffffff; + letter-spacing: -0.02em; } -.logo { font-weight: 700; font-size: 1.15rem; color: var(--text); } .logo span { color: var(--accent); } -.nav-links { display: flex; gap: 24px; align-items: center; } -.nav-links a { color: var(--muted); font-size: 0.95rem; } -.nav-links a:hover, .nav-links a.active { color: var(--text); } +.nav-links { display: flex; gap: 22px; align-items: center; } +.nav-links a { + color: #9aa3b8; font-size: 0.95rem; font-weight: 600; + transition: color 0.2s ease; +} +.nav-links a:hover, .nav-links a.active { color: #ffffff; } +.nav-links a.btn-ghost { color: var(--text); } +.nav-links a.btn-ghost:hover { color: #ffffff; } +.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #ffffff; } +.nav-links a.btn-sm { font-size: 0.85rem; font-weight: 600; } /* Buttons */ .btn { - display: inline-block; padding: 12px 28px; border-radius: 8px; + display: inline-block; padding: 12px 28px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; - transition: background 0.15s ease; + font-family: var(--font); + transition: transform 0.15s ease, box-shadow 0.15s ease, + background 0.15s ease, border-color 0.15s ease; +} +.btn-primary { + background: var(--accent); + color: #fff; + box-shadow: 0 2px 10px rgba(79, 143, 247, 0.25); +} +.btn-primary:hover { + color: #fff; + background: var(--accent-hover); + transform: translateY(-1px); + box-shadow: 0 4px 14px rgba(79, 143, 247, 0.3); +} +.btn-primary:disabled { + opacity: 0.5; cursor: not-allowed; transform: none; + box-shadow: none; } -.btn-primary { background: var(--accent); color: #fff; } -.btn-primary:hover { background: var(--accent-hover); color: #fff; } -.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; } .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); } -.btn-ghost:hover { border-color: var(--muted); } -.btn-sm { padding: 6px 14px; font-size: 0.85rem; } +.btn-ghost:hover { border-color: var(--border-hover); transform: translateY(-1px); } +.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 8px; } /* Landing hero */ -.hero { text-align: center; padding: 90px 0 70px; } +.hero { text-align: center; padding: 100px 0 80px; } .hero h1 { - font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; - letter-spacing: -0.02em; margin-bottom: 20px; + font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; + letter-spacing: -0.03em; margin-bottom: 22px; font-weight: 800; +} +.hero h1 em { + font-family: "Instrument Serif", Georgia, serif; + font-style: italic; + font-weight: 400; + font-size: 1.08em; + background: linear-gradient(100deg, var(--accent), var(--c-purple), var(--c-pink)); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; } -.hero h1 em { color: var(--accent); font-style: normal; } .hero p { - color: var(--muted); font-size: 1.15rem; max-width: 620px; - margin: 0 auto 36px; + color: #c6cdda; font-size: 1.13rem; max-width: 640px; + margin: 0 auto 38px; line-height: 1.7; } /* Feature cards */ @@ -74,30 +191,220 @@ nav { .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; + transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; } -.card .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; } -.card h3 { font-size: 1.05rem; margin-bottom: 8px; } +.card:hover { + transform: translateY(-3px); + border-color: var(--border-hover); + box-shadow: var(--shadow); +} +.card .icon { font-size: 1.7rem; margin-bottom: 14px; display: block; } +.card h3 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 700; } .card p { color: var(--muted); font-size: 0.92rem; } +/* Linear-style features */ +.lin-section { padding: 30px 0 100px; } +.lin-head { + font-size: clamp(1.5rem, 3.4vw, 2.3rem); + line-height: 1.25; letter-spacing: -0.03em; font-weight: 700; + color: #bcc4d4; max-width: 880px; margin-bottom: 70px; +} +.lin-head strong { color: var(--text); font-weight: 700; } +.lin-features { + display: grid; grid-template-columns: repeat(3, 1fr); +} +.lin-item { padding: 0 32px; } +.lin-item:first-child { padding-left: 0; } +.lin-item + .lin-item { border-left: 1px solid var(--border); } +.lin-fig { + font-family: ui-monospace, "Cascadia Code", Consolas, monospace; + font-size: 0.7rem; color: var(--muted); + letter-spacing: 0.08em; margin-bottom: 26px; +} +.lin-item svg { width: 100%; max-width: 230px; display: block; margin-bottom: 34px; } +.lin-item:nth-child(1) .lin-fig { color: var(--accent); } +.lin-item:nth-child(2) .lin-fig { color: var(--c-purple); } +.lin-item:nth-child(3) .lin-fig { color: var(--c-orange); } +.lin-item:nth-child(1) svg { filter: drop-shadow(0 0 26px rgba(79, 143, 247, 0.28)); } +.lin-item:nth-child(2) svg { filter: drop-shadow(0 0 26px rgba(139, 92, 246, 0.28)); } +.lin-item:nth-child(3) svg { filter: drop-shadow(0 0 26px rgba(249, 115, 22, 0.24)); } +.lin-item h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 8px; } +.lin-item p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; } +@media (max-width: 820px) { + .lin-features { grid-template-columns: 1fr; gap: 44px; } + .lin-item { padding: 0; } + .lin-item + .lin-item { border-left: none; border-top: 1px solid var(--border); padding-top: 40px; } +} + +/* Bento grid (landing) */ +.bento-section { padding: 0 0 100px; } +.bento { + display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; +} +.bento-card { + position: relative; overflow: hidden; + background: var(--surface); border: 1px solid var(--border); + border-radius: var(--radius); padding: 22px; + transition: border-color 0.2s ease; +} +.bento-card:hover { border-color: var(--border-hover); } +.b-span4 { grid-column: span 4; } +.b-span2 { grid-column: span 2; } +@media (max-width: 820px) { .b-span4, .b-span2 { grid-column: span 6; } } +.bento-card h3 { font-size: 0.98rem; font-weight: 700; margin-top: 18px; } +.bento-card > p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; } +.b-vignette { + background: var(--surface-2); border: 1px solid var(--border); + border-radius: 10px; padding: 16px; min-height: 128px; + display: flex; flex-direction: column; justify-content: center; gap: 12px; + overflow: hidden; +} +.v-note { + font-size: 0.82rem; color: var(--muted); font-style: italic; + border-left: 2px solid var(--border-hover); padding-left: 10px; +} +.v-chips { display: flex; flex-wrap: wrap; gap: 8px; } +.chip { + font-size: 0.74rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; + opacity: 0; transform: translateY(6px); + animation: chipIn 6s ease infinite; +} +.chip.c-blue { background: rgba(79,143,247,0.15); color: #8db6fa; animation-delay: 0.6s; } +.chip.c-purple { background: rgba(139,92,246,0.15); color: #b39af8; animation-delay: 1.1s; } +.chip.c-orange { background: rgba(249,115,22,0.15); color: #fba368; animation-delay: 1.6s; } +@keyframes chipIn { + 0%, 8% { opacity: 0; transform: translateY(6px); } + 16%, 88% { opacity: 1; transform: translateY(0); } + 96%, 100% { opacity: 0; transform: translateY(6px); } +} +.v-lib { gap: 10px; } +.lib-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; } +.lr-line { height: 9px; border-radius: 5px; background: var(--border); } +.v-words { gap: 10px; } +.w-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); } +.w-track { + height: 8px; border-radius: 5px; overflow: hidden; + background: var(--surface); border: 1px solid var(--border); +} +.w-fill { + height: 100%; border-radius: 5px; + background: linear-gradient(90deg, var(--accent), var(--c-purple)); + animation: wRange 4.5s ease-in-out infinite alternate; +} +@keyframes wRange { from { width: 32%; } to { width: 88%; } } +.v-src { gap: 8px; } +.src-line { + font-size: 0.76rem; color: var(--muted); padding: 7px 11px; + background: var(--surface); border: 1px solid var(--border); border-radius: 7px; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + opacity: 0; animation: chipIn 7s ease infinite; +} +.src-line.s1 { animation-delay: 0.4s; } +.src-line.s2 { animation-delay: 1.0s; } +.src-line.s3 { animation-delay: 1.6s; } +.src-tag { + display: inline-block; font-family: ui-monospace, Consolas, monospace; + font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; + padding: 1px 7px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; +} +.src-tag.t-blue { background: rgba(79,143,247,0.16); color: #85b3fa; } +.src-tag.t-purple { background: rgba(139,92,246,0.16); color: #b39af8; } +.src-tag.t-green { background: rgba(62,207,142,0.16); color: #6fdcae; } +.v-ticker { padding: 0 16px; position: relative; } +.v-ticker::before, .v-ticker::after { + content: ""; position: absolute; left: 0; right: 0; height: 28px; z-index: 1; +} +.v-ticker::before { top: 0; background: linear-gradient(var(--surface-2), transparent); } +.v-ticker::after { bottom: 0; background: linear-gradient(transparent, var(--surface-2)); } +.ticker { animation: tickerUp 14s linear infinite; } +.ticker div { + font-size: 0.74rem; color: var(--muted); padding: 6px 10px; margin: 6px 0; + background: var(--surface); border: 1px solid var(--border); border-radius: 7px; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; +} +@keyframes tickerUp { from { transform: translateY(0); } to { transform: translateY(-50%); } } +.v-tones { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; } +.tone-pill { + font-size: 0.76rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; + border: 1px solid var(--border); color: var(--muted); + transition: all 0.35s ease; +} +.tone-pill.on { + background: var(--accent); border-color: var(--accent); color: #fff; + box-shadow: 0 2px 12px rgba(79,143,247,0.4); +} +.v-publish { flex-direction: row; align-items: center; justify-content: center; gap: 16px; } +.keycap { + font-size: 0.85rem; font-weight: 700; color: var(--text); + background: linear-gradient(180deg, var(--surface), var(--surface-2)); + border: 1px solid var(--border-hover); border-bottom-width: 3px; + border-radius: 9px; padding: 10px 20px; + transition: transform 0.12s ease, border-bottom-width 0.12s ease; +} +.keycap.pressed { transform: translateY(2px); border-bottom-width: 1px; } +.pub-status { font-size: 0.82rem; color: var(--muted); min-width: 150px; transition: color 0.3s ease; } +.pub-status.ok { color: var(--green); font-weight: 600; } + /* How it works */ .steps { padding: 0 0 90px; } -.steps h2 { text-align: center; font-size: 1.6rem; margin-bottom: 36px; } +.steps h2 { + text-align: center; font-size: 1.7rem; margin-bottom: 36px; + font-weight: 800; letter-spacing: -0.02em; +} .steps ol { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; } .steps li { - counter-increment: step; background: var(--surface); - border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; - color: var(--muted); font-size: 0.92rem; + border: 1px solid var(--border); border-radius: var(--radius); + padding: 22px; color: var(--muted); font-size: 0.92rem; + transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; +} +.steps li strong { + color: var(--text); display: block; margin-bottom: 5px; + font-family: var(--font-display); font-size: 1.02rem; +} +.sc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } +.sc-icon { + width: 46px; height: 46px; border-radius: 12px; + display: flex; align-items: center; justify-content: center; + background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); +} +.sc-icon svg { width: 22px; height: 22px; } +.sc-blue .sc-icon { color: #85b3fa; } +.sc-purple .sc-icon { color: #b39af8; } +.sc-orange .sc-icon { color: #fba368; } +.sc-green .sc-icon { color: #6fdcae; } +.sc-num { + font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; + color: var(--muted); opacity: 0.8; +} +.sc-blue { + background: radial-gradient(130% 100% at 50% 0%, rgba(79, 143, 247, 0.17), var(--surface) 62%); + border-color: rgba(79, 143, 247, 0.32); +} +.sc-blue:hover { box-shadow: 0 10px 40px rgba(79, 143, 247, 0.22); } +.sc-blue .sc-icon { box-shadow: 0 0 22px rgba(79, 143, 247, 0.4); border-color: rgba(79, 143, 247, 0.45); } +.sc-purple { + background: radial-gradient(130% 100% at 50% 0%, rgba(139, 92, 246, 0.17), var(--surface) 62%); + border-color: rgba(139, 92, 246, 0.32); +} +.sc-purple:hover { box-shadow: 0 10px 40px rgba(139, 92, 246, 0.22); } +.sc-purple .sc-icon { box-shadow: 0 0 22px rgba(139, 92, 246, 0.4); border-color: rgba(139, 92, 246, 0.45); } +.sc-orange { + background: radial-gradient(130% 100% at 50% 0%, rgba(249, 115, 22, 0.15), var(--surface) 62%); + border-color: rgba(249, 115, 22, 0.3); } -.steps li::before { - content: counter(step); display: block; width: 30px; height: 30px; - border-radius: 50%; background: var(--accent); color: #fff; - font-weight: 700; text-align: center; line-height: 30px; margin-bottom: 12px; +.sc-orange:hover { box-shadow: 0 10px 40px rgba(249, 115, 22, 0.2); } +.sc-orange .sc-icon { box-shadow: 0 0 22px rgba(249, 115, 22, 0.35); border-color: rgba(249, 115, 22, 0.45); } +.sc-green { + background: radial-gradient(130% 100% at 50% 0%, rgba(62, 207, 142, 0.15), var(--surface) 62%); + border-color: rgba(62, 207, 142, 0.3); } -.steps li strong { color: var(--text); display: block; margin-bottom: 4px; } +.sc-green:hover { box-shadow: 0 10px 40px rgba(62, 207, 142, 0.2); } +.sc-green .sc-icon { box-shadow: 0 0 22px rgba(62, 207, 142, 0.35); border-color: rgba(62, 207, 142, 0.45); } +.steps li:hover { transform: translateY(-4px); } footer { border-top: 1px solid var(--border); padding: 28px 0; text-align: center; @@ -115,31 +422,47 @@ footer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; } -.panel h2 { font-size: 1.1rem; margin-bottom: 18px; } +.panel h2 { font-size: 1.1rem; margin-bottom: 18px; font-weight: 700; } .field { margin-bottom: 18px; } .field label { - display: block; font-size: 0.85rem; font-weight: 600; + display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; + text-transform: uppercase; letter-spacing: 0.04em; } .field select, .field input[type="number"], .field textarea { width: 100%; background: var(--surface-2); color: var(--text); - border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; + border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 0.95rem; font-family: var(--font); + transition: border-color 0.15s ease, box-shadow 0.15s ease; } .field textarea { min-height: 170px; resize: vertical; line-height: 1.5; } .field select:focus, .field textarea:focus, .field input:focus { outline: none; border-color: var(--accent); + box-shadow: 0 0 0 3px rgba(79, 143, 247, 0.18); +} +.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; } + +/* Scroll reveal (landing) */ +@media (prefers-reduced-motion: no-preference) { + .reveal { + opacity: 0; transform: translateY(16px); filter: blur(3px); + transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), + transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), + filter 0.8s cubic-bezier(0.22, 1, 0.36, 1); + will-change: opacity, transform, filter; + } + .reveal.revealed { opacity: 1; transform: none; filter: none; } } -.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; } .checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; } +.checkbox-row input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; } .checkbox-row label { font-size: 0.9rem; color: var(--text); cursor: pointer; } /* Progress */ #progress { display: none; text-align: center; padding: 50px 20px; } #progress.visible { display: block; } .spinner { - width: 36px; height: 36px; margin: 0 auto 18px; + width: 38px; height: 38px; margin: 0 auto 18px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; } @@ -150,14 +473,23 @@ footer { .post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; + transition: border-color 0.2s ease, box-shadow 0.2s ease; + animation: rise 0.3s ease; +} +.post-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); } +@keyframes rise { + from { opacity: 0; transform: translateY(8px); } + to { opacity: 1; transform: translateY(0); } } .post-card .post-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); + flex-wrap: wrap; gap: 10px; } -.post-card .post-header h3 { font-size: 0.95rem; } +.post-card .post-header h3 { font-size: 0.95rem; font-weight: 700; } .post-card .post-body { padding: 20px; white-space: pre-wrap; font-size: 0.97rem; line-height: 1.65; + overflow-wrap: anywhere; } .post-card img.post-image { width: 100%; max-height: 320px; object-fit: cover; display: block; @@ -165,19 +497,24 @@ footer { .post-meta { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); + overflow-wrap: anywhere; } .post-meta a { font-size: 0.8rem; } -.copy-btn.copied { background: var(--green); border-color: var(--green); color: #fff; } +.copy-btn.copied, .save-btn.copied { + background: var(--green); border-color: var(--green); color: #fff; +} .badge { - display: inline-block; padding: 2px 10px; border-radius: 20px; + display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); + letter-spacing: 0.02em; } -.badge.ok { color: var(--green); border-color: var(--green); } +.badge.ok { color: var(--green); border-color: rgba(62, 207, 142, 0.5); } .error-box { - display: none; background: #3a1d22; border: 1px solid #a04050; + display: none; background: rgba(160, 64, 80, 0.12); + border: 1px solid rgba(160, 64, 80, 0.6); color: #f0c0c8; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 20px; } @@ -191,16 +528,78 @@ footer { .voice-box.visible { display: block; } .voice-box strong { color: var(--text); } +/* Generator & library page polish */ +.gen-layout, .lib-wrap { + animation: heroUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; +} +@media (min-width: 821px) { + .gen-layout > .panel { position: sticky; top: 92px; } +} +.voice-box { border-left: 3px solid var(--accent); } +.voice-box.visible { display: block; animation: rise 0.4s ease; } +#empty-state { + border-style: dashed; background: transparent; + padding: 60px 24px !important; +} +.lib-head { + display: flex; align-items: baseline; gap: 12px; + margin-bottom: 6px; +} +.lib-head h1 { font-size: 1.5rem; letter-spacing: -0.02em; } +.lib-count { + font-size: 0.8rem; color: var(--muted); background: var(--surface); + border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px; +} +.lib-toolbar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; } +.lib-toolbar input, .lib-toolbar select { + background: var(--surface-2); color: var(--text); + border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; + font-size: 0.9rem; font-family: var(--font); +} +.lib-toolbar input { flex: 1; min-width: 200px; } +.lib-toolbar input:focus, .lib-toolbar select:focus { + outline: none; border-color: var(--accent); + box-shadow: 0 0 0 3px rgba(79, 143, 247, 0.18); +} +.lib-grid { + display: grid; grid-template-columns: repeat(2, 1fr); + gap: 20px; align-items: start; +} +@media (max-width: 900px) { .lib-grid { grid-template-columns: 1fr; } } +.lib-grid .post-card { margin-bottom: 0; } +.post-body.clamped { + max-height: 190px; overflow: hidden; position: relative; +} +.post-body.clamped::after { + content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; + background: linear-gradient(transparent, var(--surface)); +} +.show-more { + display: block; width: 100%; background: none; border: none; + color: var(--accent); font-size: 0.82rem; font-weight: 600; + font-family: var(--font); cursor: pointer; padding: 8px 0 10px; +} +.show-more:hover { color: var(--accent-hover); } + /* Landing page: example output */ .examples { padding: 0 0 90px; } -.examples h2 { text-align: center; font-size: 1.6rem; margin-bottom: 12px; } +.examples h2 { + text-align: center; font-size: 1.7rem; margin-bottom: 12px; + font-weight: 800; letter-spacing: -0.02em; +} .examples-note { text-align: center; color: var(--muted); font-size: 0.92rem; max-width: 640px; margin: 0 auto 32px; } .examples-grid { - display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); - gap: 24px; margin-bottom: 28px; + display: grid; grid-template-columns: repeat(3, 1fr); + gap: 20px; margin-bottom: 28px; + align-items: start; } -.examples .post-card { margin-bottom: 0; } -.examples .post-body { font-size: 0.9rem; } +@media (max-width: 900px) { .examples-grid { grid-template-columns: 1fr; } } +.examples .post-header { flex-wrap: wrap; gap: 6px; } +.examples .post-body { font-size: 0.84rem; padding: 16px; } +.examples .post-meta { font-size: 0.74rem; } +.examples .post-card { margin-bottom: 0; border-top: 3px solid var(--accent); } +.examples .post-card:nth-child(2) { border-top-color: var(--c-purple); } +.examples .post-card:nth-child(3) { border-top-color: var(--c-orange); }