/*
Theme Name: Gilded Folio
Theme URI: https://example.com/gilded-folio
Author: Afaan
Description: An animated one-page portfolio theme for developers and designers. Counting preloader with a handwritten greeting, a rippling giant hero word, split-text reveals, floating tech chips, a pinned side-scrolling Services section, a scroll-driven gold "Work" headline with drifting blobs, parallax project cards, a custom cursor and a built-in contact form. Everything is editable in Appearance → Customize; projects are added under Projects.
Version: 2.0.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gilded-folio
Tags: portfolio, one-column, custom-menu, custom-logo, featured-images, translation-ready, dark, accessibility-ready
*/

/* ---------- Tokens ---------- */
:root {
	--cream: #efe8dc;
	--ink: #0a0a0a;
	--gold: #c9a86a;
	--paper: #ebe6dc;
	--muted: rgba(235, 230, 220, .62);
	--line: rgba(235, 230, 220, .16);
	--panel: #141414;
	--display: "Big Shoulders Display", Impact, "Arial Narrow Bold", sans-serif;
	--script: "Mrs Saint Delafield", "Brush Script MT", cursive;
	--body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pad: clamp(1.25rem, 5vw, 5rem);
	--ease: cubic-bezier(.2, .8, .1, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ink);
	color: var(--paper);
	font: 400 1rem/1.65 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: fixed; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem;
	background: var(--gold); color: var(--ink); text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.gf-defs { position: absolute; pointer-events: none; }

/* ---------- Preloader (home page, first visit only) ---------- */
.preloader {
	display: none; position: fixed; inset: 0; z-index: 150;
	align-items: center; justify-content: center;
	background: var(--ink); color: var(--gold);
	transition: transform 1s var(--ease);
}
html.gf-preload .preloader { display: flex; }
.preloader.is-done { transform: translateY(-100%); }
.preloader__count {
	font: 900 clamp(5rem, 22vw, 14rem)/1 var(--display);
	transition: opacity .35s ease, transform .35s ease;
}
.preloader__hello {
	position: absolute; font: 400 clamp(5rem, 24vw, 15rem)/1 var(--script);
	clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease);
	padding: 0 .2em; white-space: nowrap;
}
.preloader.is-hello .preloader__count { opacity: 0; transform: translateY(-1rem); }
.preloader.is-hello .preloader__hello { clip-path: inset(0 0 0 0); }

/* ---------- Top bar ---------- */
.topbar {
	position: fixed; inset: 0 0 auto 0; z-index: 90;
	display: flex; align-items: center; justify-content: space-between;
	padding: 1.1rem var(--pad); color: #fff; pointer-events: none; mix-blend-mode: difference;
}
.topbar > * { pointer-events: auto; }
.brand { text-decoration: none; }
.brand__text { font: 800 1.35rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand img { max-height: 2.4rem; width: auto; }
.nav .menu { display: flex; gap: clamp(1.25rem, 3vw, 3rem); }
.nav a { text-decoration: none; font-size: .9rem; font-weight: 500; position: relative; padding: .3rem 0; }
.nav a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after, .nav .current-menu-item > a::after { transform: scaleX(1); }
.menu-btn {
	display: none; background: none; border: 0; padding: .4rem 0; cursor: pointer;
	font-size: .9rem; font-weight: 500;
}
@media (min-width: 820px) {
	.nav { position: absolute; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 819px) {
	.menu-btn { display: block; position: relative; z-index: 95; }
	.nav {
		position: fixed; inset: 0; z-index: 92; display: flex; align-items: center; justify-content: center;
		background: var(--ink); color: var(--paper);
		opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
	}
	.nav .menu { flex-direction: column; align-items: center; gap: .5rem; }
	.nav a { font: 800 clamp(3rem, 15vw, 6rem)/1.05 var(--display); text-transform: uppercase; }
	body.menu-open .nav { opacity: 1; visibility: visible; }
	body.menu-open .topbar { mix-blend-mode: normal; color: var(--paper); }
	body.menu-open .brand { position: relative; z-index: 95; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative; min-height: 100vh; min-height: 100svh;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 6rem var(--pad) 5rem; background: var(--cream); color: var(--ink); text-align: center;
}
.hero__title { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero__mask { display: block; overflow: hidden; width: 100%; padding: 0 1vw; }
.hero__big {
	display: inline-block; white-space: nowrap; font: 900 clamp(5.5rem, 26vw, 44rem)/.84 var(--display);
	text-transform: uppercase; letter-spacing: -.005em; cursor: default;
}
.hero__sub {
	font: 800 clamp(1.8rem, 6.5vw, 6.5rem)/1 var(--display); text-transform: uppercase;
	letter-spacing: .02em; margin-top: .6rem;
}
.hero__labels {
	display: flex; gap: 1.2rem; margin-top: 1.1rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.hero__labels li + li::before { content: ""; display: inline-block; width: .3rem; height: .3rem; margin-right: 1.2rem; background: currentColor; border-radius: 50%; vertical-align: middle; }
.hero__scroll {
	position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
	font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
	display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.hero__scroll::after { content: ""; width: 1px; height: 2rem; background: currentColor; transform-origin: top; animation: gf-line 2s var(--ease) infinite; }
.hero__note { position: absolute; right: var(--pad); bottom: 1.6rem; font-size: .8rem; font-weight: 500; }
@keyframes gf-line { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* One orchestrated entrance: the big word rises, the rest follows. */
html.js .hero__big { transform: translateY(108%); animation: gf-show .01s 12s forwards; }
html.js .hero__sub, html.js .hero__labels, html.js .hero__scroll, html.js .hero__note { opacity: 0; animation: gf-show .01s 12s forwards; }
html.gf-in .hero__big { transform: none; animation: none; transition: transform 1.2s var(--ease); }
html.gf-in .hero__sub, html.gf-in .hero__labels, html.gf-in .hero__scroll, html.gf-in .hero__note {
	opacity: 1; animation: none; transition: opacity .8s ease .7s;
}
@keyframes gf-show { to { transform: none; opacity: 1; } }

/* ---------- Section label ---------- */
.section-label { display: inline-block; color: var(--gold); font-weight: 700; letter-spacing: .08em; padding-bottom: .9rem; border-bottom: 1px solid var(--gold); min-width: 9rem; text-align: center; }

/* ---------- About ---------- */
.about { padding: clamp(5rem, 12vw, 11rem) var(--pad); text-align: center; }
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 7rem); align-items: center; margin-top: clamp(3rem, 6vw, 6rem); text-align: left; }
.about__photo { aspect-ratio: 4 / 5; background: var(--panel); overflow: hidden; display: grid; place-items: center; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .6s ease; }
.about__photo:hover img { filter: none; }
.about__ph { font: 900 14rem/1 var(--display); color: var(--gold); opacity: .5; }
.about__head { font: 800 clamp(2.4rem, 6vw, 5.6rem)/.96 var(--display); text-transform: uppercase; max-width: 14ch; }
.about__text { margin-top: 1.5rem; max-width: 52ch; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .8rem; color: var(--gold); font-weight: 700; margin-bottom: .2rem; }
.facts dd { font-weight: 500; }

/* ---------- Expertise ---------- */
.expertise {
	display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 7rem);
	padding: clamp(4rem, 9vw, 9rem) var(--pad); border-top: 1px solid var(--line);
}
.expertise__head { font: 900 clamp(3.2rem, 9vw, 8rem)/.88 var(--display); text-transform: uppercase; }
.expertise__intro p { margin-top: 1.5rem; max-width: 36ch; color: var(--muted); }
.skill { border-top: 1px solid var(--line); padding: 1.4rem 0; cursor: default; }
.skill:last-child { border-bottom: 1px solid var(--line); }
.skill__title { font: 700 clamp(1.3rem, 2.4vw, 2rem)/1.2 var(--body); color: var(--muted); transition: color .3s ease, transform .4s var(--ease); }
.skill__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.skill__more > p { overflow: hidden; max-width: 46ch; color: var(--muted); }
.skill.is-active .skill__title { color: var(--paper); transform: translateX(.75rem); }
.skill.is-active .skill__more { grid-template-rows: 1fr; }
.skill.is-active .skill__more > p { padding: .8rem 0 0 .75rem; }
.skill.is-active { box-shadow: inset 3px 0 0 var(--gold); padding-left: .5rem; }

/* ---------- Work ---------- */
.work { border-top: 1px solid var(--line); }
.work__stage { height: 260vh; position: relative; }
.work__pin {
	position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
	display: flex; flex-direction: column; justify-content: center;
}
.work__kicker { text-align: center; color: var(--gold); font-weight: 500; letter-spacing: .06em; font-size: .9rem; margin-bottom: 1rem; }
.work__word {
	font: 900 clamp(12rem, 44vw, 52rem)/.8 var(--display); color: var(--gold); text-transform: uppercase;
	white-space: nowrap; transform: translateX(calc(10vw - var(--p, 0) * 42vw)); will-change: transform; padding-top: .05em;
}
.ticker { position: absolute; left: 0; right: 0; bottom: 1.8rem; overflow: hidden; border-top: 1px solid var(--line); padding-top: 1rem; }
.ticker__track { display: flex; width: max-content; animation: gf-marquee 38s linear infinite; }
.ticker__set { display: flex; }
.ticker__set span { padding: 0 2rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.ticker__set span::before { content: ""; display: inline-block; width: .35rem; height: .35rem; margin-right: 2rem; background: var(--gold); border-radius: 50%; vertical-align: middle; }
@keyframes gf-marquee { to { transform: translateX(-50%); } }

.projects { display: grid; gap: clamp(1.5rem, 3vw, 3rem); padding: 0 var(--pad) clamp(5rem, 10vw, 9rem); }
.projects--archive { grid-template-columns: repeat(2, 1fr); padding-left: 0; padding-right: 0; }
.project__link { position: relative; display: block; text-decoration: none; overflow: hidden; background: var(--panel); border-radius: 6px; }
.project__media { aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .6s ease; filter: brightness(.7); }
.project__link:hover .project__media img, .project__link:focus-visible .project__media img { transform: scale(1.04); filter: brightness(.9); }
.project__ph { font: 900 12rem/1 var(--display); color: var(--gold); opacity: .35; }
.project__body {
	position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1.25rem, 3vw, 3rem);
	background: linear-gradient(to top, rgba(10, 10, 10, .88), rgba(10, 10, 10, 0)); padding-top: 6rem;
}
.project__title { font: 700 clamp(1.8rem, 4.5vw, 4rem)/1.05 var(--body); letter-spacing: -.02em; }
.project__excerpt { margin-top: .6rem; max-width: 46ch; color: var(--muted); font-size: .95rem; }
.project__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.project__tags li { font-size: .75rem; font-weight: 700; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 99px; }
.project__go {
	position: absolute; right: clamp(1rem, 3vw, 2.5rem); bottom: clamp(1rem, 3vw, 2.5rem);
	width: 4rem; height: 4rem; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
	display: grid; place-items: center; transition: background .3s ease, color .3s ease, transform .4s var(--ease);
}
.project__go::before { content: "\2197"; font-size: 1.4rem; line-height: 1; }
.project__link:hover .project__go, .project__link:focus-visible .project__go { background: var(--gold); color: var(--ink); transform: rotate(45deg); }
.empty { color: var(--muted); border: 1px dashed var(--line); padding: 2rem; text-align: center; }

/* ---------- Contact ---------- */
.contact {
	display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 7rem); align-items: start;
	padding: clamp(4rem, 9vw, 9rem) var(--pad); border-top: 1px solid var(--line);
}
.contact__head { font: 900 clamp(3rem, 8vw, 7.5rem)/.9 var(--display); text-transform: uppercase; max-width: 11ch; }
.contact__copy p { margin-top: 1.5rem; max-width: 40ch; color: var(--muted); }
.contact__mail { font-weight: 700; }
.contact__mail a { color: var(--gold); text-underline-offset: .25em; }
.form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: 1.4rem; }
.form__trap { position: absolute; left: -9999px; }
.field { display: grid; gap: .3rem; }
.field span { font-size: .8rem; font-weight: 700; color: var(--gold); }
.field input, .field textarea { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: .6rem 0; border-radius: 0; resize: vertical; transition: border-color .3s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.form__status { padding: .8rem 1rem; border-radius: 8px; font-size: .9rem; margin: 0 !important; }
.form__status--ok { background: rgba(201, 168, 106, .15); color: var(--gold); }
.form__status--err { background: rgba(220, 90, 70, .15); color: #ff9d8c; }
.btn {
	display: inline-block; justify-self: start; background: var(--gold); color: var(--ink); border: 0; border-radius: 99px;
	padding: .9rem 1.8rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .3s var(--ease), background .3s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--paper); }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding: 2rem var(--pad); border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.social { display: flex; gap: 1.5rem; }
.social a { text-decoration: none; }
.social a:hover { color: var(--gold); }

/* ---------- Inner pages ---------- */
.page { width: min(100% - 2 * var(--pad), 52rem); margin: 0 auto; padding: 9rem 0 6rem; }
.page--wide { width: min(100% - 2 * var(--pad), 80rem); }
.page__head { margin-bottom: 3rem; }
.page__title { font: 900 clamp(3rem, 9vw, 7.5rem)/.9 var(--display); text-transform: uppercase; }
.page__hero { margin-bottom: 3rem; border-radius: 6px; overflow: hidden; }
.page__back { margin-top: 4rem; }
.page__back a, .entry a { color: var(--gold); text-underline-offset: .2em; }
.entry > * + * { margin-top: 1.25rem; }
.entry h2, .entry h3, .entry h4 { font-family: var(--display); text-transform: uppercase; line-height: 1; margin-top: 2.5rem; }
.entry h2 { font-size: 2.6rem; } .entry h3 { font-size: 2rem; } .entry h4 { font-size: 1.5rem; }
.entry ul, .entry ol { padding-left: 1.4rem; } .entry ul { list-style: disc; }
.entry blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 3px solid var(--gold); font-size: 1.15rem; }
.entry pre, .entry code { background: var(--panel); border-radius: 6px; font-size: .9em; }
.entry code { padding: .1em .35em; } .entry pre { padding: 1rem; overflow-x: auto; } .entry pre code { padding: 0; }
.entry table { width: 100%; border-collapse: collapse; } .entry th, .entry td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--line); }
.alignwide { width: min(100vw - 2 * var(--pad), 80rem); margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; } .alignright { float: right; margin: 0 0 1rem 1.5rem; } .aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

.post-row + .post-row { border-top: 1px solid var(--line); }
.post-row__link { display: block; text-decoration: none; padding: 2rem 0; }
.post-row__date { font-size: .8rem; color: var(--gold); font-weight: 700; }
.post-row__title { font: 800 clamp(1.8rem, 4vw, 3rem)/1.05 var(--display); text-transform: uppercase; margin-top: .3rem; transition: color .3s ease; }
.post-row__link:hover .post-row__title { color: var(--gold); }
.post-row__excerpt { margin-top: .6rem; color: var(--muted); max-width: 60ch; }
.navigation.pagination { margin-top: 3rem; } .nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-links a, .nav-links .current { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; }
.nav-links .current { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.searchform { display: flex; gap: .75rem; margin: 1.5rem 0; }
.searchform input { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: .8rem 1.2rem; }

.comments { margin-top: 5rem; }
.comments__title { font: 800 2rem/1 var(--display); text-transform: uppercase; margin-bottom: 1.5rem; }
.comments__list, .comments__list ol { list-style: none; padding-left: 0; }
.comments__list .comment-body { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.comments__list .children { padding-left: 1.5rem; }
.comment-form { display: grid; gap: 1rem; margin-top: 2rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .7rem 1rem;
}
.comment-form .submit { background: var(--gold); color: var(--ink); border: 0; border-radius: 99px; padding: .8rem 1.6rem; font-weight: 700; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 819px) {
	.about__grid, .expertise, .contact { grid-template-columns: 1fr; }
	.about__photo { max-width: 26rem; }
	.projects--archive { grid-template-columns: 1fr; }
	.hero__labels { gap: .8rem; font-size: .7rem; }
	.hero__labels li + li::before { margin-right: .8rem; }
	.hero__note { display: none; }
	.project__excerpt { display: none; }
	.project__go { width: 3rem; height: 3rem; }
	.work__stage { height: 200vh; }
}

/* ================================================================
   v2 – motion layer
   ================================================================ */

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; background: var(--gold); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* Hero scroll effect needs its own layer */
.hero__title { will-change: transform, opacity; }

/* Split-text headings */
html.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em 0 .08em; margin: -.12em 0 -.08em; }
html.js [data-split] .wi { display: inline-block; transform: translateY(115%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 70ms); }
html.js [data-split].is-in .wi { transform: none; }

/* Reveals */
html.js .section-label::after { content: ""; display: block; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform 1.1s var(--ease); margin-top: .9rem; }
.section-label { border-bottom: 0; padding-bottom: 0; }
html.js .section-label.is-in::after { transform: scaleX(1); }
.section-label::after { background: var(--gold); }
html.js .about__photo { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); }
html.js .about__photo.is-in { clip-path: inset(0); }
html.js .about__photo img { transform: scale(1.25); transition: transform 1.8s var(--ease), filter .6s ease; }
html.js .about__photo.is-in img { transform: none; }
html.js .facts, html.js .contact__copy p, html.js .form { opacity: 0; transform: translateY(1.5rem); transition: opacity .9s ease, transform .9s var(--ease); }
html.js .facts.is-in, html.js .contact__copy p.is-in, html.js .form.is-in { opacity: 1; transform: none; }
html.js .skill { opacity: 0; transform: translateX(2rem); transition: opacity .8s ease, transform .9s var(--ease), box-shadow .3s ease; }
html.js .skill.is-in { opacity: 1; transform: none; }
html.js .skill:nth-child(2) { transition-delay: .08s, .08s, 0s; } html.js .skill:nth-child(3) { transition-delay: .16s, .16s, 0s; } html.js .skill:nth-child(4) { transition-delay: .24s, .24s, 0s; }
html.js .project { clip-path: inset(14% 0 0 0 round 6px); opacity: 0; transform: translateY(3rem); transition: clip-path 1.2s var(--ease), opacity .8s ease, transform 1.2s var(--ease); }
html.js .project.is-in { clip-path: inset(0 round 6px); opacity: 1; transform: none; }
.project__media img { transform: scale(1.14); }

/* Failsafe: if the script never starts, show everything */
html.gf-fallback .wi, html.gf-fallback .facts, html.gf-fallback .contact__copy p, html.gf-fallback .form, html.gf-fallback .skill, html.gf-fallback .project,
html.gf-fallback .about__photo, html.gf-fallback .about__photo img { transform: none !important; opacity: 1 !important; clip-path: none !important; }
html.gf-fallback .section-label::after { transform: none !important; }

/* Floating tech chips (Expertise) */
.expertise { position: relative; overflow: hidden; }
.chips { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.expertise__intro, .skills { position: relative; z-index: 1; }
.chip { position: absolute; will-change: transform; }
.chip span {
	display: block; padding: .55rem 1rem; border: 1px solid var(--gold); border-radius: 12px; background: rgba(20, 20, 20, .85);
	color: var(--gold); font-size: .8rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(4px);
	animation: gf-float 6s ease-in-out infinite alternate;
}
.chip:nth-child(1) { left: 46%; top: 9%; } .chip:nth-child(2) { left: 90%; top: 6%; } .chip:nth-child(3) { left: 38%; top: 76%; }
.chip:nth-child(4) { left: 84%; top: 88%; } .chip:nth-child(5) { left: 6%; top: 84%; } .chip:nth-child(6) { left: 84%; top: 62%; }
.chip:nth-child(2n) span { animation-duration: 7.5s; animation-delay: -2s; } .chip:nth-child(3n) span { animation-duration: 5s; animation-delay: -3s; }
@keyframes gf-float { from { translate: 0 -.6rem; rotate: -3deg; } to { translate: 0 .7rem; rotate: 3deg; } }

/* Services: pinned stage with a sideways track */
.services { border-top: 1px solid var(--line); background: var(--panel); }
.services__stage { position: relative; }
.services__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(1.5rem, 4vh, 3rem); padding-top: 4.5rem; }
.services__head { padding: 0 var(--pad); display: grid; grid-template-columns: auto 1fr; gap: .5rem 3rem; align-items: end; }
.services__title { font: 900 clamp(3.2rem, 9vw, 8rem)/.88 var(--display); text-transform: uppercase; grid-row: 1 / span 2; }
.services__text { color: var(--muted); max-width: 34ch; justify-self: end; text-align: right; }
.services__bar { grid-column: 1 / -1; height: 1px; background: var(--line); margin-top: 1rem; overflow: hidden; }
.services__bar span { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.services__track { display: flex; gap: clamp(1rem, 2vw, 2rem); padding: 0 var(--pad); width: max-content; will-change: transform; align-items: stretch; }
.service {
	position: relative; flex: 0 0 auto; width: clamp(17rem, 34vw, 30rem); height: clamp(18rem, 48vh, 28rem); overflow: hidden;
	border: 1px solid var(--line); border-radius: 14px; background: var(--ink); padding: clamp(1.25rem, 2.2vw, 2rem);
	display: flex; flex-direction: column; justify-content: flex-end;
	transition: border-color .4s ease, background .4s ease, translate .6s var(--ease);
}
.service::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--gold); transition: height .6s var(--ease); z-index: 0; }
.service > * { position: relative; z-index: 1; }
.service:hover, .service.is-near { border-color: var(--gold); translate: 0 -.6rem; }
.service__glyph {
	position: absolute !important; z-index: 0 !important; right: -.05em; top: -.12em; font: 900 clamp(11rem, 22vw, 20rem)/1 var(--display);
	color: transparent; -webkit-text-stroke: 1px rgba(201, 168, 106, .35); pointer-events: none; transition: -webkit-text-stroke-color .4s ease;
}
.service:hover .service__glyph, .service.is-near .service__glyph { -webkit-text-stroke-color: var(--gold); }
.service__title { font: 800 clamp(1.7rem, 2.8vw, 2.5rem)/1.02 var(--display); text-transform: uppercase; }
.service__text { margin-top: .8rem; color: var(--muted); font-size: .95rem; max-width: 34ch; }
.service__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.service__tags li { font-size: .72rem; font-weight: 700; padding: .22rem .65rem; border: 1px solid var(--line); border-radius: 99px; }
.service--cta { background: var(--gold); border-color: var(--gold); color: var(--ink); align-items: center; justify-content: center; width: clamp(14rem, 24vw, 22rem); }
.service--cta::after { display: none; }
.service--cta:hover { translate: none; }
.service__contact { font: 900 clamp(2rem, 4vw, 3.4rem)/1 var(--display); text-transform: uppercase; text-decoration: none; text-align: center; display: inline-block; padding: 1rem; }
.service__contact::after { content: " \2192"; }

/* Work: drifting gold blobs */
.blob {
	position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--gold); z-index: 2;
	transform: translate3d(calc(var(--p, 0) * var(--dx)), calc(var(--p, 0) * var(--dy)), 0);
	animation: gf-drift var(--t) ease-in-out infinite alternate; pointer-events: none;
}
@keyframes gf-drift { from { translate: 0 -1rem; scale: .85; } to { translate: .6rem 1rem; scale: 1.15; } }

/* Custom cursor (fine pointers only; JS adds the element) */
.cursor {
	position: fixed; left: 0; top: 0; z-index: 300; width: 2.6rem; height: 2.6rem; border: 1px solid var(--gold); border-radius: 50%;
	pointer-events: none; opacity: 0; display: grid; place-items: center; color: var(--ink); font-size: .72rem; font-weight: 800;
	transition: width .35s var(--ease), height .35s var(--ease), background .3s ease, opacity .3s ease; will-change: transform;
}
.cursor.is-on { opacity: 1; }
.cursor span { opacity: 0; transition: opacity .25s ease; }
.cursor.is-link { width: 4.2rem; height: 4.2rem; background: rgba(201, 168, 106, .22); }
.cursor.is-view { width: 6rem; height: 6rem; background: var(--gold); }
.cursor.is-view span { opacity: 1; }
@media (pointer: coarse) { .cursor { display: none; } }

.btn, .menu-btn, .service__contact { transition: transform .35s var(--ease), background .3s ease; }

@media (max-width: 819px) {
	.services__head { grid-template-columns: 1fr; }
	.services__title { grid-row: auto; }
	.services__text { justify-self: start; text-align: left; }
	.service { width: 78vw; }
	.chip:nth-child(n+4) { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	html.js .hero__big { transform: none; }
	html.js .hero__sub, html.js .hero__labels, html.js .hero__scroll, html.js .hero__note { opacity: 1; }
	.work__stage { height: auto; }
	.work__pin { position: static; height: auto; padding: 6rem 0 7rem; }
	.work__word { transform: none; font-size: 30vw; text-align: center; }
	.ticker { position: static; margin-top: 3rem; }
	.ticker__track { animation: none; }
	.services__stage { height: auto !important; }
	.services__pin { position: static; height: auto; padding: 5rem 0; }
	.services__track { width: auto; overflow-x: auto; transform: none !important; padding-bottom: 1rem; }
	.services__bar { display: none; }
	.cursor, .chip span, .blob { animation: none; }
	html.js [data-split] .wi, html.js .facts, html.js .contact__copy p, html.js .form, html.js .skill, html.js .project, html.js .about__photo, html.js .about__photo img { transform: none; opacity: 1; clip-path: none; }
	html.js .section-label::after { transform: none; }
}
