/*
Theme Name: UAS Atlas
Theme URI: https://umarattique.com
Author: Umar Attique Shah
Author URI: https://umarattique.com
Description: A quiet dark portfolio theme for an SEO and WordPress consultant. Archivo and IBM Plex, hairline structure, amber accent, and no decoration that does not earn its place.
Version: 5.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uas-atlas
Tags: portfolio, one-column, custom-menu, featured-images, threaded-comments
*/

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
	--ink:     #0A0C0F;
	--ink-2:   #101318;
	--ink-3:   #171B21;
	--bone:    #EFEBE4;
	--bone-2:  rgba(239, 235, 228, .60);
	--bone-3:  rgba(239, 235, 228, .36);
	--signal:  #F0A03C;
	--signal-2:#FFB65E;
	--rule:    rgba(239, 235, 228, .10);
	--rule-2:  rgba(239, 235, 228, .05);

	--display: 'Archivo', 'Helvetica Neue', system-ui, sans-serif;
	--body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
	--mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

	--wrap: 1160px;
	--gut: clamp(22px, 5vw, 60px);
	--sec: clamp(76px, 11vw, 152px);
	--r: 4px;
	--ease: cubic-bezier(.2, .7, .3, 1);
}

/* ============================================================
   2. Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--ink);
	color: var(--bone);
	font: 400 clamp(15px, .5vw + 13.8px, 16.5px)/1.7 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.nav-locked { overflow: hidden; }

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--bone); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--signal); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
	font-family: var(--display);
	font-variation-settings: 'wdth' 110;
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -.022em;
	margin: 0 0 .5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.1rem, 1.4vw, 1.32rem); font-variation-settings: 'wdth' 104; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--sec); }
.section--tight { padding-top: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 8px; top: -60px; z-index: 100;
	background: var(--signal); color: #0A0C0F; padding: 10px 16px;
	font: 500 13px/1 var(--mono); transition: top .18s;
}
.skip-link:focus { top: 8px; }

/* ---- shared bits ---- */
.eyebrow {
	font: 500 11px/1 var(--mono);
	letter-spacing: .18em; text-transform: uppercase;
	color: var(--signal);
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 20px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: .5; }
.eyebrow--center { justify-content: center; }

.lede {
	font-size: clamp(1rem, .45vw + .92rem, 1.16rem);
	line-height: 1.62;
	color: var(--bone-2);
	max-width: 56ch;
}

.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 14px 24px;
	font: 500 13.5px/1 var(--mono);
	letter-spacing: .02em;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--r);
	transition: background .2s, border-color .2s, color .2s, transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--signal { background: var(--signal); color: #0A0C0F; }
.btn--signal:hover { background: var(--signal-2); }
.btn--ghost { border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--bone-3); background: var(--ink-2); }

.section__head { max-width: 62ch; margin-bottom: clamp(38px, 5vw, 62px); }

/* reveals — only when JS is there to switch them back on */
.has-js [data-in] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .7s var(--ease), transform .7s var(--ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}
.has-js [data-in].is-in { opacity: 1; transform: none; }

/* ============================================================
   3. Header
   ============================================================ */
.site-header {
	position: sticky; top: 0; z-index: 60;
	border-bottom: 1px solid transparent;
	transition: background .25s, border-color .25s, backdrop-filter .25s;
}
.site-header.is-stuck {
	background: rgba(10, 12, 15, .84);
	backdrop-filter: blur(14px) saturate(1.3);
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	border-bottom-color: var(--rule-2);
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 70px;
}
.brand {
	display: inline-flex; align-items: baseline; gap: 9px;
	text-decoration: none;
	font-family: var(--display); font-variation-settings: 'wdth' 116;
	font-weight: 800; font-size: 17px; letter-spacing: -.015em;
}
.brand span { font: 400 10.5px/1 var(--mono); color: var(--bone-3); letter-spacing: .14em; }
.brand img { max-height: 34px; width: auto; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; }
.site-nav a {
	position: relative;
	font: 500 13.5px/1 var(--mono);
	text-decoration: none; color: var(--bone-2);
	padding: 6px 0;
	transition: color .2s;
}
.site-nav a::after {
	content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
	height: 1px; background: var(--signal);
	transition: right .28s var(--ease);
}
.site-nav a:hover { color: var(--bone); }
.site-nav a:hover::after { right: 0; }

.nav-toggle {
	display: none;
	background: none; border: 1px solid var(--rule); border-radius: var(--r);
	color: var(--bone); padding: 9px 13px; cursor: pointer;
	font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}

/* ============================================================
   4. Hero
   ============================================================ */
.hero {
	position: relative; isolation: isolate;
	padding-block: clamp(72px, 12vw, 152px) clamp(56px, 8vw, 104px);
}
.hero::before {
	content: '';
	position: absolute; inset: -30% -20% auto 30%; height: 92vh; z-index: -1;
	background: radial-gradient(46% 42% at 70% 34%, rgba(240, 160, 60, .10), transparent 68%);
	pointer-events: none;
}
.hero h1 { max-width: 16ch; margin-bottom: 26px; }
.hero h1 em { font-style: normal; color: var(--signal); font-variation-settings: 'wdth' 100; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.proof {
	list-style: none; margin: 44px 0 0; padding: 20px 0 0;
	border-top: 1px solid var(--rule);
	display: flex; flex-wrap: wrap; gap: 12px 30px;
	font: 400 12.5px/1.4 var(--mono);
	color: var(--bone-3);
}
.proof b { color: var(--bone); font-weight: 500; }
.proof a { color: var(--bone-3); text-decoration-color: var(--rule); }
.proof a:hover { color: var(--bone); text-decoration-color: var(--signal); }

/* ============================================================
   5. Services — a ruled list, not a grid of boxes
   ============================================================ */
.rows { border-top: 1px solid var(--rule); }
.row {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr) minmax(0, .78fr);
	gap: clamp(14px, 3vw, 44px);
	padding-block: clamp(26px, 3.2vw, 42px);
	border-bottom: 1px solid var(--rule);
	align-items: start;
	transition: background .3s;
}
.row:hover { background: linear-gradient(90deg, rgba(240, 160, 60, .035), transparent 60%); }
.row__kicker {
	font: 500 11px/1.5 var(--mono);
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--signal);
	padding-top: 6px;
}
.row h3 { margin: 0 0 8px; }
.row p { color: var(--bone-2); font-size: .95rem; margin: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
	font: 400 11.5px/1 var(--mono);
	color: var(--bone-3);
	border: 1px solid var(--rule);
	border-radius: 100px;
	padding: 7px 12px;
}

/* ============================================================
   6. Work
   ============================================================ */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: clamp(16px, 2vw, 22px);
}
.card {
	position: relative;
	background: var(--ink-2);
	border: 1px solid var(--rule);
	border-radius: 6px;
	padding: clamp(24px, 2.4vw, 32px);
	transition: border-color .28s, background .28s, transform .28s var(--ease);
}
.card:hover {
	border-color: rgba(240, 160, 60, .34);
	background: var(--ink-3);
	transform: translateY(-3px);
}
.card__meta {
	font: 500 11px/1 var(--mono);
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--signal);
	margin-bottom: 20px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--bone-2); font-size: .93rem; margin: 0; }
.card__stat {
	display: flex; align-items: baseline; gap: 11px;
	margin-top: 24px; padding-top: 20px;
	border-top: 1px solid var(--rule);
}
.card__stat b {
	font-family: var(--display); font-variation-settings: 'wdth' 118; font-weight: 800;
	font-size: clamp(1.8rem, 2.8vw, 2.3rem); line-height: 1; letter-spacing: -.03em;
	color: var(--signal);
}
.card__stat i {
	font: 400 11px/1.4 var(--mono); font-style: normal;
	color: var(--bone-3); text-transform: uppercase; letter-spacing: .1em;
	max-width: 18ch;
}

/* ============================================================
   7. Numbers band
   ============================================================ */
.band { background: var(--ink-2); border-block: 1px solid var(--rule-2); }
.band__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: clamp(24px, 4vw, 56px);
}
.stat b {
	display: block;
	font-family: var(--display); font-variation-settings: 'wdth' 118; font-weight: 800;
	font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.035em;
	margin-bottom: 12px;
}
.stat span { font: 400 12.5px/1.6 var(--mono); color: var(--bone-3); }

/* ============================================================
   8. Process
   ============================================================ */
.step {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: clamp(14px, 3vw, 40px);
	padding-block: clamp(24px, 3vw, 36px);
	border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step__when {
	font: 500 11.5px/1.5 var(--mono);
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--signal);
	padding-top: 4px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--bone-2); font-size: .95rem; margin: 0; max-width: 64ch; }

/* ============================================================
   9. Writing
   ============================================================ */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.post-card {
	display: flex; flex-direction: column;
	border-top: 1px solid var(--rule);
	padding-top: 24px;
	text-decoration: none;
}
.post-card__thumb {
	aspect-ratio: 16 / 10; overflow: hidden; border-radius: 5px;
	margin-bottom: 18px; background: var(--ink-2);
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__meta {
	font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
	color: var(--bone-3); margin-bottom: 14px;
	display: flex; gap: 14px;
}
.post-card h3 { font-size: 1.1rem; line-height: 1.26; margin-bottom: 10px; transition: color .2s; }
.post-card:hover h3 { color: var(--signal); }
.post-card p { color: var(--bone-2); font-size: .92rem; margin: 0; }

/* ============================================================
   10. CTA + footer
   ============================================================ */
.cta { text-align: center; position: relative; isolation: isolate; padding-block: var(--sec); }
.cta::before {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background: radial-gradient(42% 62% at 50% 100%, rgba(240, 160, 60, .10), transparent 70%);
	pointer-events: none;
}
.cta h2 { max-width: 17ch; margin-inline: auto; }
.cta .lede { margin-inline: auto; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.site-footer {
	border-top: 1px solid var(--rule);
	padding-block: 40px 52px;
	font: 400 12.5px/1.7 var(--mono);
	color: var(--bone-3);
}
.site-footer__inner {
	display: flex; flex-wrap: wrap; justify-content: space-between;
	gap: 20px 40px; align-items: center;
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; color: var(--bone-3); }
.site-footer a:hover { color: var(--signal); }

/* ============================================================
   11. Blog + pages
   ============================================================ */
.page-head { padding-block: clamp(60px, 9vw, 116px) clamp(28px, 4vw, 48px); }
.page-head h1 { max-width: 20ch; font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.page-head .meta {
	font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
	color: var(--bone-3); display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px;
}

.entry { padding-bottom: var(--sec); }
.entry__media { margin-bottom: clamp(28px, 4vw, 48px); border-radius: 6px; overflow: hidden; }

.prose { width: min(100%, 70ch); margin-inline: auto; }
.prose h2 { margin-top: 1.9em; font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--bone-2); }
.prose ul, .prose ol { padding-left: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--signal); }
.prose blockquote {
	margin: 1.7em 0; padding: 4px 0 4px 22px;
	border-left: 2px solid var(--signal);
	font-size: 1.06em; color: var(--bone);
}
.prose code { font: 400 .86em/1.6 var(--mono); background: var(--ink-2); padding: 2px 6px; border-radius: 3px; }
.prose pre { background: var(--ink-2); border: 1px solid var(--rule); padding: 18px; border-radius: 5px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: 5px; margin-block: 1.5em; }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.5em; font-size: .93em; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; }
.prose th { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }

.pager {
	display: flex; justify-content: space-between; gap: 16px;
	padding-block: 36px; border-top: 1px solid var(--rule);
	font: 500 13px/1 var(--mono);
}
.pager a { text-decoration: none; }

.notfound { text-align: center; padding-block: clamp(90px, 15vw, 190px); }
.notfound .code {
	font-family: var(--display); font-variation-settings: 'wdth' 122; font-weight: 800;
	font-size: clamp(5rem, 17vw, 11rem); line-height: .85; color: var(--ink-3);
	letter-spacing: -.04em;
}

.search-form { display: flex; gap: 8px; max-width: 420px; margin-inline: auto; }
.search-form input[type="search"] {
	flex: 1; background: var(--ink-2); border: 1px solid var(--rule);
	color: var(--bone); padding: 12px 14px; border-radius: var(--r);
	font: 400 14px/1 var(--body);
}
.search-form button {
	background: var(--signal); color: #0A0C0F; border: 0; cursor: pointer;
	padding: 12px 18px; border-radius: var(--r); font: 500 13px/1 var(--mono);
}

/* ============================================================
   12. Responsive
   ============================================================ */
@media (max-width: 940px) {
	.row { grid-template-columns: 140px minmax(0, 1fr); }
	.row > div:last-child { grid-column: 2; }
}

@media (max-width: 760px) {
	.nav-toggle { display: inline-block; }
	.header-cta { display: none; }
	.site-nav {
		position: fixed; inset: 70px 0 0; z-index: 40;
		background: var(--ink); display: none; padding: 32px var(--gut);
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; align-items: flex-start; gap: 2px; }
	.site-nav a { font-size: 1.35rem; font-family: var(--display); padding: 14px 0; }

	.row, .step { grid-template-columns: 1fr; gap: 12px; }
	.row > div:last-child { grid-column: 1; }
	.site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
	.cta__actions .btn, .hero__actions .btn { font-size: 11.5px; padding-inline: 16px; }
}

/* ============================================================
   13. 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;
	}
	.has-js [data-in] { opacity: 1; transform: none; }
}
