/* Nafis Portfolio — main styles */

:root {
	--bg: #f3f5f6;
	--surface: #ffffff;
	--ink: #1e293b;
	--muted: #55636e;
	--line: #dce2e6;
	--brand: #0891b2;
	--brand-2: #0e7490;
	--on-brand: #ffffff;
	--mango: #f97316;
	--due: #b4412f;
	--paid: #1d7a4c;
	--shadow: 0 1px 2px rgba(20, 33, 43, .06), 0 12px 32px -12px rgba(20, 33, 43, .18);
	--display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--body: "Figtree", "Segoe UI", system-ui, sans-serif;
	--radius-lg: 24px;
	--radius: 14px;
	--wrap: 1160px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f172a;
		--surface: #172036;
		--ink: #e8eef1;
		--muted: #9aabb5;
		--line: #26324a;
		--brand: #22d3ee;
		--brand-2: #67e8f9;
		--on-brand: #0b1a3a;
		--due: #f08a76;
		--paid: #6fd39d;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -14px rgba(0, 0, 0, .6);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 17px/1.65 var(--body);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 22px; border-radius: 999px;
	background: var(--brand); color: var(--on-brand);
	font: 600 16px/1 var(--body); text-decoration: none;
	border: 2px solid var(--brand);
	transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-off { background: transparent; color: var(--muted); border: 2px dashed var(--line); cursor: default; }
.btn-off:hover { background: transparent; border-color: var(--line); }

/* Navigation */
.nav {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-logo { width: auto; height: 40px; }
.brand-text { display: grid; gap: 3px; }
.brand-name { font: 800 21px/1 var(--display); letter-spacing: -.02em; }
.brand-sub { font: 600 12px/1 var(--body); color: var(--brand); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
		background: var(--surface); cursor: pointer;
	}
	.bars, .bars::before, .bars::after {
		display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s;
	}
	.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
	.bars::before { top: -6px; }
	.bars::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
	.nav-links {
		position: absolute; top: 72px; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--bg); border-bottom: 1px solid var(--line);
		padding: 8px 24px 20px; display: none;
	}
	.nav-links.open { display: flex; }
	.nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
	.nav-links .btn { margin-top: 16px; }
}

/* Hero */
.hero { padding: 56px 0 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .75fr); gap: 56px; align-items: center; }
.hero-role { font-weight: 600; color: var(--brand); margin-bottom: 18px; display: inline-flex; align-items: center; gap: 10px; }
.hero-role::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--mango); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; max-width: 15ch; }
.hero-text { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin: 22px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-photo { margin: 0; position: relative; }
.hero-photo::before {
	content: ""; position: absolute; inset: 22px -18px -18px 22px;
	background: var(--brand); border-radius: var(--radius-lg); z-index: 0;
}
.hero-photo img, .monogram {
	position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
	border-radius: var(--radius-lg); background: var(--surface);
}
.monogram {
	display: grid; place-items: center;
	font: 800 clamp(5rem, 11vw, 8rem)/1 var(--display); letter-spacing: -.05em;
	color: var(--brand); border: 1px solid var(--line);
}
.hero-photo figcaption {
	position: relative; z-index: 2; margin: -44px 16px 0; padding: 14px 18px;
	background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
	display: grid; gap: 2px; font-size: 15px;
}
.hero-photo figcaption strong { font-family: var(--display); font-size: 17px; }
.hero-photo figcaption span { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--paid); box-shadow: 0 0 0 4px color-mix(in srgb, var(--paid) 22%, transparent); }

/* One page-load moment */
@media (prefers-reduced-motion: no-preference) {
	.hero-copy > *, .hero-photo { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
	.hero-copy > :nth-child(2) { animation-delay: .06s; }
	.hero-copy > :nth-child(3) { animation-delay: .12s; }
	.hero-copy > :nth-child(4) { animation-delay: .18s; }
	.hero-photo { animation-delay: .22s; }
	@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Sections */
.sec { padding: 88px 0; }
.sec-tint { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head h2, .about h2, .contact h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -.025em; }
.sec-head p { color: var(--muted); font-size: 1.08rem; }
.sub-head { font-size: 1.5rem; margin: 72px 0 24px; }
.mini-head { font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin: 32px 0 14px; }

/* Featured software / app */
.feature {
	display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 44px; margin-bottom: 28px;
}
.feature + .feature { margin-top: 0; }
.feature-app { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.kicker { display: inline-block; font-size: 14px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.feature h3 { font-size: clamp(2rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.feature-label { font-weight: 600; font-size: 1.08rem; margin-bottom: 14px; }
.feature-copy > p:not(.kicker):not(.feature-label) { color: var(--muted); max-width: 52ch; }
.feature-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Demo login box */
.demo { margin: 22px 0 0; padding: 18px 20px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.demo-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin: 0 0 2px; }
.demo-text { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.demo-list li { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.demo-list li:first-child { padding-top: 0; border-top: 0; }
.demo-role { font-weight: 600; font-size: 15px; }
.demo-cred { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.demo-cred > span { color: var(--muted); width: 76px; flex: none; }
.demo-cred code { font: 600 15px/1.4 var(--body); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; }
.copy { font: 600 13px/1 var(--body); color: var(--brand); background: none; border: 0; padding: 6px 4px; cursor: pointer; }
.copy:hover { text-decoration: underline; }

/* Software details */
.more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 4px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 14px 0; list-style: none; display: inline-flex; align-items: center; gap: 10px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid currentColor; font-size: 16px; line-height: 1; }
.more[open] summary::before { content: "−"; }
.more-body { columns: 2 320px; column-gap: 48px; padding-bottom: 8px; }
.more-body > p:first-child { column-span: all; color: var(--muted); max-width: 70ch; }
.more-body h4 { font-size: 1.15rem; margin: 0 0 8px; padding-top: 14px; break-after: avoid; }
.more-body ul { margin: 0 0 8px; padding-left: 20px; break-inside: avoid; }
.more-body li { margin-bottom: 6px; }
.more-body p { break-inside: avoid; }

/* Browser frame */
.browser {
	display: block; text-decoration: none; overflow: hidden;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	box-shadow: var(--shadow);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-bar .addr {
	flex: 1; margin-left: 8px; font-size: 13px; color: var(--muted);
	background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; background: var(--bg); transition: transform .5s ease; }
.browser:hover img { transform: scale(1.02); }

/* Phone frame */
.phone {
	justify-self: center; width: min(280px, 100%);
	padding: 12px; border-radius: 40px; background: #1e293b;
	box-shadow: var(--shadow);
}
.phone-screen { border-radius: 30px; overflow: hidden; background: #f7f9fa; aspect-ratio: 9 / 18.5; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.mock { height: 100%; display: flex; flex-direction: column; color: #14212b; font-size: 13px; }
.mock-top { background: #0891b2; color: #fff; font: 700 17px/1 var(--display); padding: 34px 18px 18px; }
.mock-total { margin: 14px; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 2px 10px rgba(20, 33, 43, .08); display: flex; flex-direction: column; gap: 4px; }
.mock-total span { color: #55636e; }
.mock-total b { font: 800 22px/1 var(--display); color: #b4412f; }
.mock-list { list-style: none; margin: 0 14px; padding: 0; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(20, 33, 43, .08); }
.mock-list li { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e8edf0; }
.mock-list li:last-child { border-bottom: 0; }
.mock-list .due { color: #b4412f; }
.mock-list .paid { color: #1d7a4c; }
.mock-btns { margin: auto 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mock-btns span { text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; color: #fff; background: #1d7a4c; }
.mock-btns span + span { background: #b4412f; }

/* Websites grid */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 28px; }
.site-body { padding: 18px 4px 0; }
.site-label { font-size: 14px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site h4 { font-size: 1.35rem; margin-bottom: 8px; }
.site-body > p:not(.site-label) { color: var(--muted); font-size: 16px; }
.tag { font-size: 12px; font-weight: 600; color: #6b4a00; background: color-mix(in srgb, var(--mango) 35%, transparent); padding: 2px 10px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .tag { color: var(--mango); } }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px 32px; }
.service { border-top: 3px solid var(--brand); padding-top: 20px; }
.service h3 { font-size: 1.25rem; }
.service p { color: var(--muted); font-size: 16px; margin: 0; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; }
.about-copy > p { font-size: 1.08rem; max-width: 60ch; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.about-exp .mini-head { margin-top: 0; }
.exp { list-style: none; margin: 0; padding: 0; }
.exp li { position: relative; padding: 0 0 28px 26px; border-left: 2px solid var(--line); }
.exp li:last-child { padding-bottom: 0; }
.exp li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--brand); }
.exp-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.exp h4 { font-size: 1.2rem; margin: 0; }
.exp-time { font-size: 14px; color: var(--muted); white-space: nowrap; }
.exp-place { font-weight: 600; margin: 4px 0 6px; }
.exp li p:not(.exp-place) { color: var(--muted); font-size: 16px; margin: 0; }

/* Beyond work */
.beyond { margin-top: 72px; display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 40px; align-items: center; }
.beyond { padding-top: 48px; border-top: 1px solid var(--line); }
.beyond:not(:has(.beyond-photos)) { grid-template-columns: 1fr; }
.beyond:not(:has(.beyond-photos)) .beyond-copy { max-width: 640px; }
.beyond h3 { font-size: 1.5rem; }
.beyond-copy p { color: var(--muted); }
.beyond-photos { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.beyond-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.beyond-photos.count-1 { grid-template-columns: 1fr; }
.beyond-photos.count-1 img { aspect-ratio: 16 / 9; }
.beyond-photos.count-2 { grid-template-columns: repeat(2, 1fr); }
.beyond-photos.count-3 { grid-template-columns: repeat(3, 1fr); }

/* Contact */
.contact { background: var(--brand); color: var(--on-brand); }
.contact a { color: var(--on-brand); }
.contact-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.contact p { font-size: 1.12rem; opacity: .9; max-width: 46ch; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--on-brand) 25%, transparent); font-size: 1.1rem; }
.contact-list li:first-child { border-top: 1px solid color-mix(in srgb, var(--on-brand) 25%, transparent); }
.contact-list span { opacity: .75; }
.contact-list a { font-weight: 600; text-decoration: none; word-break: break-all; text-align: right; }
.contact-list a:hover { text-decoration: underline; }

/* Footer */
.foot { padding: 28px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.foot p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 12px; line-height: 1.5; }
.foot-brand strong { color: var(--ink); }
.foot-brand em { font-style: normal; font-size: 14px; }
.foot-logo { width: auto; height: 32px; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--brand); }

/* Generic pages */
.page-in { padding-top: 48px; padding-bottom: 88px; max-width: 820px; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.entry-content > * { max-width: 100%; }
.entry + .entry { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 960px) {
	.feature, .feature-app { grid-template-columns: minmax(0, 1fr); padding: 28px; gap: 32px; }
	.feature > *, .feature-app > * { min-width: 0; }
	.feature-app .phone { order: -1; }
	.about, .contact-in, .beyond { grid-template-columns: 1fr; gap: 40px; }
	.beyond-photos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	.hero { padding: 28px 0 56px; }
	.hero-in { grid-template-columns: 1fr; gap: 48px; }
	.hero-photo { max-width: 270px; width: calc(100% - 18px); }
	.sec { padding: 64px 0; }
	.feature { padding: 22px; border-radius: 20px; }
	.contact-list li { flex-direction: column; gap: 2px; }
	.contact-list a { text-align: left; }
	.btn { width: 100%; }
	.nav .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Demo note and screenshot library */
.demo-note { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.demo-note strong { color: var(--ink, inherit); }
.shots { grid-column: 1 / -1; margin-top: 26px; }
.shots h4 { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 0 0 12px; }
.shots-row { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.shot { flex: 0 0 auto; width: 210px; margin: 0; scroll-snap-align: start; }
.shot a { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (min-width: 720px) { .shot { width: 230px; } }
