:root {
	color-scheme: light dark;
	--bg: #0b0e14; --bg-soft: #11151d; --fg: #e6edf3; --muted: #8b97a6;
	--card: #141a24; --border: #232c3a; --accent: #6ea8fe; --accent-2: #b48ef7;
	--tag: #1b2330;
}
@media (prefers-color-scheme: light) {
	:root { --bg: #f7f9fc; --bg-soft: #eef2f8; --fg: #141920; --muted: #5a6675;
		--card: #ffffff; --border: #dce3ec; --accent: #0b62d6; --accent-2: #7b3ff2;
		--tag: #eef2f8; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg);
	font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- hero (shared) ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.hero.compact { min-height: 62vh; }
.hero::before { content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(60rem 40rem at 15% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
		radial-gradient(50rem 40rem at 90% 90%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 60%);
	animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(0, -3%, 0) scale(1.08); } }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .04em; font-size: .95rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.75rem); line-height: 1.05; letter-spacing: -.03em;
	margin: 0 0 1.25rem; font-weight: 700; }
.hero p.sub { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--muted); max-width: 42rem; margin: 0 0 2rem; }
.cta { display: inline-flex; gap: .9rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: .7rem 1.4rem; border-radius: 10px; text-decoration: none;
	font-weight: 600; font-size: .98rem; transition: transform .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--fg); }
.btn:hover { transform: translateY(-2px); }
.scroll-hint { position: absolute; bottom: 1.75rem; left: 50%; transform: translateX(-50%);
	color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
	z-index: 1; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, .4rem); } }

/* ---------- sections ---------- */
.section { padding: 6rem 0; }
.section.alt { background: var(--bg-soft); }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
	font-weight: 700; margin: 0 0 1rem; }
.about h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 1.25rem; letter-spacing: -.02em; }
.about p { color: var(--muted); max-width: 46rem; font-size: 1.08rem; margin: 0 0 1rem; }
.skills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.skills span { background: var(--tag); border: 1px solid var(--border); border-radius: 8px; padding: .35rem .75rem; font-size: .85rem; }

/* ---------- project rows (index) ---------- */
.projects h2.section-title { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 3.5rem; letter-spacing: -.02em; }
.project { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; margin-bottom: 6rem; }
.project:last-child { margin-bottom: 0; }
.project.flip .shot { order: 2; }
.shot { position: relative; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
	background: var(--bg-soft); box-shadow: 0 24px 60px -30px rgba(0,0,0,.6);
	aspect-ratio: 16 / 10; display: grid; place-items: center; }
.shot a.cover { position: absolute; inset: 0; z-index: 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project:hover .shot img { transform: scale(1.04); }
.shot .ph { color: var(--muted); font-size: .9rem; text-align: center; padding: 1.5rem; }
.shot .ph b { display: block; color: var(--fg); font-size: 1rem; margin-bottom: .35rem; }
.info h3 { font-size: 1.7rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.info h3 a { color: inherit; text-decoration: none; }
.info h3 a:hover { color: var(--accent); }
.info .role { color: var(--accent); font-size: .9rem; font-weight: 600; margin: 0 0 1rem; }
.info p { color: var(--muted); margin: 0 0 1.25rem; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; }
.tag { background: var(--tag); border: 1px solid var(--border); border-radius: 7px; padding: .2rem .6rem; font-size: .78rem; color: var(--muted); }
.links { display: flex; gap: 1.25rem; font-size: .95rem; flex-wrap: wrap; }
.links a { text-decoration: none; font-weight: 600; }
.links a:hover { text-decoration: underline; }
.more { display: inline-flex; align-items: center; gap: .3rem; }

/* ---------- detail page ---------- */
.back { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--muted);
	font-size: .9rem; font-weight: 600; margin-bottom: 2rem; }
.back:hover { color: var(--accent); }
.detail-role { color: var(--accent); font-weight: 600; margin: 0 0 1rem; font-size: 1rem; }
.gallery { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.gallery figure { margin: 0; }
.gallery figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; text-align: center; }
.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; }
.feature h4 { margin: 0 0 .5rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.prose { max-width: 46rem; }
.prose p { color: var(--muted); font-size: 1.08rem; }
.h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 2rem; letter-spacing: -.02em; }
pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
	overflow-x: auto; font-size: .88rem; line-height: 1.5; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- footer ---------- */
footer { padding: 4rem 0; text-align: center; color: var(--muted); font-size: .95rem; border-top: 1px solid var(--border); }
footer a { text-decoration: none; }

/* ---------- reveal system ---------- */
[data-reveal] { opacity: 0; transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
	transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal="up"]    { transform: translateY(34px); }
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(.92); }
[data-reveal="blur"]  { transform: translateY(24px); filter: blur(8px); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
	.hero::before, .scroll-hint, .shot img, .project:hover .shot img { animation: none; transition: none; }
	html { scroll-behavior: auto; }
}
@media (max-width: 720px) {
	.project, .project.flip { grid-template-columns: 1fr; gap: 1.5rem; }
	.project.flip .shot { order: 0; }
	.section { padding: 4rem 0; }
}
