/*
Theme Name: Abhishek Madaan
Theme URI: https://abmadaan.com
Author: Abhishek Madaan
Description: Product and brand designer, Bengaluru
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: abmadaan
*/
/* Abhishek Madaan — sticky case index
   Near-black, bone type, rose accent. The left column never scrolls. */

:root {
	--ink: #0e0e0f;
	--panel: #141416;
	--line: #2a2a2d;
	--bone: #ede8de;
	--muted: #8d887d;
	--rose: #ff7a9c;
	--serif: "Instrument Serif", Georgia, serif;
	--sans: "Archivo", "Segoe UI", system-ui, sans-serif;
	--pad: clamp(20px, 3.4vw, 44px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::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-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1rem; }

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.01em;
	margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

.label {
	font-family: var(--sans);
	font-size: .64rem;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0;
}

.skip { position: absolute; left: -9999px; top: 0; background: var(--bone); color: var(--ink); padding: .8rem 1.2rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

/* ---------- layout ---------- */

.layout {
	display: grid;
	grid-template-columns: 330px 1fr;
	max-width: 1500px;
	margin-inline: auto;
	border-inline: 1px solid var(--line);
	min-height: 100vh;
}

.side {
	position: sticky;
	top: 0;
	height: 100vh;
	padding: var(--pad);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	background: var(--panel);
}
.who h1 { font-size: clamp(1.9rem, 2.4vw, 2.4rem); }
.who h1 em { font-style: italic; color: var(--rose); }
.who .role {
	font-family: var(--sans);
	font-size: .7rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: .5rem;
	line-height: 1.8;
}

.idx { margin-top: .6rem; }
.idx .label { margin-bottom: .6rem; }
.idx ol { list-style: none; margin: 0; padding: 0; }
.idx li { border-top: 1px solid var(--line); }
.idx li:last-child { border-bottom: 1px solid var(--line); }
.idx a {
	display: grid;
	grid-template-columns: 2rem 1fr;
	gap: .4rem;
	align-items: baseline;
	padding-block: .62rem;
	transition: color .2s var(--ease);
}
.idx a:hover { color: var(--rose); }
.idx .n {
	font-family: var(--sans);
	font-size: .62rem;
	letter-spacing: .1em;
	color: var(--muted);
	transition: color .2s var(--ease);
}
.idx .t { font-size: .92rem; font-weight: 500; display: flex; justify-content: space-between; gap: .6rem; }
.idx .t small { font-size: .68rem; color: var(--muted); font-weight: 400; }
.idx a.active { color: var(--rose); }
.idx a.active .n { color: var(--rose); }
.idx a.active .n::after { content: " ●"; font-size: .5rem; vertical-align: .2em; }

.side-foot {
	margin-top: auto;
	font-size: .72rem;
	color: var(--muted);
	line-height: 1.9;
}
.side-foot a { border-bottom: 1px solid var(--line); }
.side-foot a:hover { color: var(--rose); border-color: var(--rose); }

.main { padding: var(--pad) var(--pad) 4rem; min-width: 0; }

/* top bar for mobile */
.mobile-bar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 1.4rem;
}

/* ---------- intro ---------- */

.intro {
	padding-bottom: clamp(28px, 4vw, 56px);
	border-bottom: 1px solid var(--line);
	max-width: 900px;
}
.intro h2 {
	font-size: clamp(1.7rem, 3.6vw, 3rem);
	line-height: 1.14;
	max-width: 26ch;
	margin-bottom: 1.4rem;
}
.intro h2 em { color: var(--rose); }
.intro .cols { columns: 2 260px; column-gap: 2.4rem; font-size: .95rem; color: #c3bdb2; }
.intro .cols p { break-inside: avoid; }

/* ---------- cases ---------- */

.case {
	display: block;
	padding-block: clamp(28px, 4vw, 52px);
	border-bottom: 1px solid var(--line);
	scroll-margin-top: 12px;
}
.case-fig { overflow: hidden; background: #1b1b1e; }
.case-fig img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform .8s var(--ease), opacity .3s var(--ease);
	opacity: .92;
}
.case:hover .case-fig img { transform: scale(1.02); opacity: 1; }

.case-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.2rem;
	padding-top: 1rem;
	flex-wrap: wrap;
}
.case-head h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.case-head .year { font-family: var(--sans); font-size: .68rem; letter-spacing: .16em; color: var(--muted); }
.case-line {
	display: flex;
	justify-content: space-between;
	gap: 1.4rem;
	flex-wrap: wrap;
	margin-top: .4rem;
}
.case-line p { margin: 0; color: #b7b1a5; font-size: .95rem; max-width: 62ch; }
.case-line .more {
	font-family: var(--sans);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rose);
	white-space: nowrap;
	transition: letter-spacing .2s var(--ease);
}
.case:hover .more { letter-spacing: .2em; }

/* ---------- case study page ---------- */

.study { padding-block: clamp(20px, 3vw, 36px) clamp(30px, 4vw, 56px); }
.study h1 { margin: .5rem 0 1rem; max-width: 22ch; }
.study h1 em { font-style: italic; color: var(--rose); }
.study .meta {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.2rem;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	padding-block: 1rem;
	margin-block: 1.6rem;
}
.study .meta div span { display: block; font-family: var(--sans); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.study .meta div b { font-weight: 500; font-size: .9rem; }

.prose { max-width: 66ch; }
.prose h3 { margin: 2rem 0 .6rem; }
.prose p { color: #c3bdb2; }
.prose ul { padding-left: 1.1rem; color: #c3bdb2; }
.prose li { margin-bottom: .4rem; }

figure.plate { margin: 2rem 0; }
figure.plate img { width: 100%; object-fit: cover; border: 1px solid var(--line); }
figure.plate figcaption { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: .5rem; }

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1.8rem 0; }
.results div { background: var(--panel); padding: 1.2rem 1rem; }
.results b { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; line-height: 1; margin-bottom: .35rem; }
.results span { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- about ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.about-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); }
.facts { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.facts li {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 1rem;
	padding-block: .55rem;
	border-top: 1px solid var(--line);
	font-size: .9rem;
}
.facts li span:first-child { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: .2rem; }

.clients { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1rem; }
.clients span { font-family: var(--serif); font-size: 1.1rem; }

.contact-form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.contact-form label { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-form input,
.contact-form textarea {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line);
	padding: .55rem 0;
	font-size: .98rem;
	border-radius: 0;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--rose); }
.contact-form textarea { min-height: 100px; resize: vertical; }
.contact-form button {
	justify-self: start;
	background: var(--rose);
	color: var(--ink);
	border: 0;
	padding: .8rem 1.3rem;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity .2s var(--ease);
}
.contact-form button:hover { opacity: .85; }

/* ---------- footer for non-split pages ---------- */

.foot {
	border-top: 1px solid var(--line);
	margin-top: 3rem;
	padding-block: 1.6rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: .66rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
}
.foot a:hover { color: var(--rose); }

/* ---------- reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
	.js .reveal { opacity: 0; translate: 0 12px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
	.js .reveal.in { opacity: 1; translate: 0; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
	.layout { grid-template-columns: 1fr; border-inline: 0; }
	.side {
		position: static;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid var(--line);
		gap: 1rem;
	}
	.idx ol { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
	.idx li { border: 0; }
	.idx a { grid-template-columns: auto auto; gap: .4rem; padding-block: .3rem; }
	.idx .t { display: inline; font-size: .84rem; }
	.idx .t small { display: none; }
	.side-foot { margin-top: .6rem; }
	.about-grid { grid-template-columns: 1fr; }
	.study .meta { grid-template-columns: 1fr 1fr; }
	.results { grid-template-columns: 1fr; }
	.intro .cols { columns: 1; }
}

@media (max-width: 640px) {
	.case-fig img { aspect-ratio: 4 / 3; }
	.case-line { display: block; }
	.case-line .more { display: inline-block; margin-top: .6rem; }
	.facts li { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---------- developer credit ---------- */

.theme-credit {
	font-size: inherit;
	opacity: .75;
	margin: 0;
	letter-spacing: .02em;
	display: inline;
}

.theme-credit a {
	border-bottom: 1px solid currentColor;
	text-decoration: none;
}