Elevate public site UX: premium hero, motion, scrollspy, shared footer
deploy / deploy (push) Successful in 6m30s

Redesign-preserve pass on the light editorial theme (dials 7/5/3):

- Hero: live availability status, accent value-prop, role line, social row,
  staggered entrance
- Motion (all motivated, reduced-motion safe): CSS scroll-driven reading
  progress bar, scrollspy nav with animated underline, CTA/blog arrow nudges,
  service hover accent rule, portfolio cover scale, card lift
- Shared multi-column footer across home + blog (brand, nav, contact, social)
- Fix anchor scroll offset under the fixed navbar (scroll-margin-top)
- Wire real social: LinkedIn, Instagram, email (code.soroush@gmail.com)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-26 02:48:22 +03:30
parent 5cc9ed976c
commit dd882287df
4 changed files with 182 additions and 42 deletions
+89 -20
View File
@@ -1,8 +1,8 @@
/* ════════════════════════════════════════════════════════════════════════
Minimal editorial theme - light, single accent.
Public site styles are scoped under `.site` so the dark admin (which shares
this file via _AdminLayout) is left untouched. Admin-only classes (.glass,
.label-mono, .admin-nav-link) keep their dark definitions at the bottom.
Minimal editorial theme, premium pass - light, single accent.
Public styles scoped under `.site`; the dark admin (which shares this file
via _AdminLayout) keeps its own dark classes at the bottom (.glass etc).
Dials: VARIANCE 7 / MOTION 5 / DENSITY 3.
════════════════════════════════════════════════════════════════════════ */
:root {
@@ -16,7 +16,10 @@
--accent: #2563eb; /* blue-600 - the single accent */
--accent-ink: #1d4ed8; /* blue-700 */
--accent-weak: #eff4ff;
--accent-line: #c7d2fe; /* indigo-200, for hover borders */
--ok: #16a34a; /* availability indicator only */
--radius: 8px;
--nav-h: 4.25rem;
}
* { box-sizing: border-box; }
@@ -46,33 +49,58 @@ body.site {
.site h1, .site h2, .site h3, .site h4 {
font-family: 'Syne', system-ui, sans-serif;
font-weight: 700; color: var(--text);
letter-spacing: -0.02em; line-height: 1.12;
letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance;
}
[dir='rtl'] .site h1, [dir='rtl'] .site h2,
[dir='rtl'] .site h3, [dir='rtl'] .site h4 {
font-family: 'Vazirmatn', system-ui, sans-serif; letter-spacing: 0;
}
/* anchor targets clear the fixed navbar */
.site section[id] { scroll-margin-top: var(--nav-h); }
.accent-text { color: var(--accent); }
/* thin reading-progress bar (CSS scroll-driven; degrades to nothing) */
.scroll-progress {
position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
background: var(--accent); transform-origin: left center; transform: scaleX(0);
animation: sp-grow linear both; animation-timeline: scroll(root);
}
[dir='rtl'] .scroll-progress { transform-origin: right center; }
@keyframes sp-grow { to { transform: scaleX(1); } }
/* ─── Navigation ─────────────────────────────────────────────────────── */
.nav-link { font-size: .9rem; color: var(--text-2); transition: color .18s ease; }
.nav-link:hover { color: var(--text); }
#navbar { transition: background .25s ease, border-color .25s ease; border-bottom: 1px solid transparent; }
#navbar.scrolled { background: rgba(250,250,250,.82); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav-link { position: relative; font-size: .9rem; color: var(--text-2); transition: color .18s ease; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link::after {
content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
[dir='rtl'] .nav-link::after { transform-origin: right; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
/* ─── Buttons (one shape: 8px radius, no pills, no glow) ──────────────── */
.btn, .btn-primary {
display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
padding: .7rem 1.15rem; border-radius: var(--radius);
padding: .72rem 1.2rem; border-radius: var(--radius);
font-weight: 600; font-size: .92rem;
background: var(--accent); color: #fff; border: 1px solid var(--accent);
transition: background .18s ease, transform .12s ease;
transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:hover, .btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:hover, .btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); box-shadow: 0 8px 24px -10px rgba(37,99,235,.5); }
.btn:active, .btn-primary:active { transform: translateY(1px); }
.btn svg { transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
[dir='rtl'] .btn:hover svg { transform: translateX(-3px); }
.btn-ghost {
display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
padding: .7rem 1.15rem; border-radius: var(--radius);
padding: .72rem 1.2rem; border-radius: var(--radius);
font-weight: 500; font-size: .92rem;
color: var(--text); background: transparent; border: 1px solid var(--line-strong);
transition: border-color .18s ease, background .18s ease, transform .12s ease;
@@ -80,18 +108,39 @@ body.site {
.btn-ghost:hover { border-color: var(--text); background: #fff; }
.btn-ghost:active { transform: translateY(1px); }
/* ─── Type helpers ───────────────────────────────────────────────────── */
.kicker {
font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
color: var(--text-3); font-weight: 500;
/* ─── Availability status ────────────────────────────────────────────── */
.status {
display: inline-flex; align-items: center; gap: .5rem;
font-size: .8rem; color: var(--text-2);
border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: .32rem .7rem;
}
.status .dot { position: relative; width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }
.status .dot::after { content: ""; position: absolute; inset: 0; border-radius: 999px; background: var(--ok); opacity: .55; animation: ping 1.9s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 70%, 100% { transform: scale(2.4); opacity: 0; } }
/* ─── Social ─────────────────────────────────────────────────────────── */
.social {
display: inline-flex; align-items: center; justify-content: center;
width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius);
color: var(--text-2); transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.social:hover { color: var(--text); border-color: var(--text); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
/* ─── Type helpers ───────────────────────────────────────────────────── */
.kicker { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
[dir='rtl'] .kicker { letter-spacing: .06em; }
.lede { color: var(--text-2); font-size: 1.05rem; line-height: 1.7; max-width: 44rem; }
.sec-head { margin-bottom: 3rem; max-width: 46rem; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.sec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.sec-head .lede { margin-top: .9rem; }
.arrow-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 500; font-size: .85rem; }
.arrow-link svg { transition: transform .2s ease; }
.arrow-link:hover svg, .group:hover .arrow-link svg { transform: translateX(3px); }
[dir='rtl'] .arrow-link:hover svg, [dir='rtl'] .group:hover .arrow-link svg { transform: translateX(-3px); }
/* ─── Neutral tag chip (one shape) ───────────────────────────────────── */
.chip {
display: inline-flex; align-items: center;
@@ -100,10 +149,24 @@ body.site {
background: #fff; white-space: nowrap;
}
/* ─── Service blocks (animated accent top-rule on hover) ─────────────── */
.svc { position: relative; }
.svc::before {
content: ""; position: absolute; inset-block-start: -1px; inset-inline: 0; height: 2px;
background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
[dir='rtl'] .svc::before { transform-origin: right; }
.svc:hover::before { transform: scaleX(1); }
.svc:hover .svc-icon { color: var(--accent); }
.svc-icon { transition: color .2s ease; }
/* ─── Surface card (portfolio, contact) ──────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-link { transition: border-color .18s ease, transform .18s ease; }
.card-link:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-link { transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.card-link:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: 0 16px 40px -24px rgba(24,24,27,.35); }
.cover { overflow: hidden; }
.cover > * { transition: transform .45s cubic-bezier(.22,1,.36,1); }
.card-link:hover .cover > * { transform: scale(1.04); }
/* ─── Form fields ────────────────────────────────────────────────────── */
.flabel { display: block; font-size: .85rem; font-weight: 500; color: var(--text-2); margin-bottom: .4rem; }
@@ -115,8 +178,13 @@ body.site {
.field::placeholder { color: var(--text-3); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
/* ─── Scroll reveal (MOTION_INTENSITY 3: subtle, transform+opacity only) ─ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.foot-link { color: var(--text-2); font-size: .9rem; transition: color .18s ease; }
.foot-link:hover { color: var(--text); }
/* ─── Scroll reveal (MOTION 5: subtle, transform+opacity only) ───────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: none; }
/* ─── Blog prose ─────────────────────────────────────────────────────── */
@@ -162,4 +230,5 @@ body.site {
transition-duration: .001ms !important; scroll-behavior: auto !important;
}
.reveal { opacity: 1 !important; transform: none !important; }
.scroll-progress { display: none; }
}
+24
View File
@@ -15,6 +15,30 @@
io.observe(sentinel);
})();
/* ─── Scrollspy: highlight the nav link for the section in view ───────── */
(function () {
const links = Array.from(document.querySelectorAll('#navbar a[href*="#"]'));
if (!links.length || !('IntersectionObserver' in window)) return;
const map = {};
links.forEach((a) => {
const id = (a.getAttribute('href') || '').split('#')[1];
if (id) (map[id] = map[id] || []).push(a);
});
const sections = Object.keys(map)
.map((id) => document.getElementById(id))
.filter(Boolean);
if (!sections.length) return;
const io = new IntersectionObserver((entries) => {
entries.forEach((e) => {
if (!e.isIntersecting) return;
links.forEach((a) => a.classList.remove('active'));
(map[e.target.id] || []).forEach((a) => a.classList.add('active'));
});
}, { rootMargin: '-45% 0px -50% 0px', threshold: 0 });
sections.forEach((s) => io.observe(s));
})();
/* ─── Mobile menu toggle ─────────────────────────────────────────────── */
(function () {
const btn = document.getElementById('menu-btn');