/* Cat DeLo — Mobile portfolio styles.
   Editorial paper-grid feed with hard ink shadows, mono micro-copy,
   DOTBask wordmark on hero. Sized for 375px viewport. */

* {
	box-sizing: border-box;
}

.m-app {
	position: relative;
	width: 100%;
	min-height: 100%;
	background: var(--bg-page);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ───────── Top bar ───────── */

.m-topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	height: 44px;
	background: var(--bg-page);
	border-bottom: 1px solid var(--fg-1);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
}
.m-topbar-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%) translateY(-1px);
	display: flex;
	align-items: center;
	gap: 8px;
}
.m-dot {
	width: 6px;
	height: 6px;
	background: var(--color-orange);
	border-radius: 50%;
	display: inline-block;
}
.m-iconbtn {
	width: 36px;
	height: 36px;
	border: 1px solid var(--fg-1);
	background: var(--bg-page);
	color: var(--fg-1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	transition:
		background 150ms ease,
		color 150ms ease;
}
.m-iconbtn:active,
.m-iconbtn.is-active {
	background: var(--fg-1);
	color: var(--bg-page);
}

/* ───────── Scroll body ───────── */

.m-scroll {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

/* ───────── Hero ───────── */

.m-hero {
	padding: 24px 20px 28px;
	border-bottom: 1px solid var(--fg-1);
}
.m-hero-eyebrow {
	display: flex;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-soft);
}
.m-hero-mark {
	font-family: var(--font-display);
	font-size: 96px;
	line-height: 0.88;
	color: var(--fg-accent);
	letter-spacing: -0.02em;
	margin: 18px 0 0;
	font-weight: 400;
	user-select: none;
}
.m-hero-tag {
	margin: 18px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--fg-1);
	max-width: 28ch;
}
.m-hero-meta {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--fg-1);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px 20px;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.m-hero-meta .k {
	display: block;
	color: var(--fg-1);
	opacity: 0.8;
	margin-bottom: 4px;
}
.m-hero-meta .v {
	display: block;
	color: var(--fg-1);
}
.m-hero-meta .v.hot {
	color: var(--fg-accent);
}

/* ───────── Section rule ───────── */

.m-section-rule {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--fg-1);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
}

/* ───────── Feed ───────── */

.m-feed {
	padding: 24px 20px 32px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.m-card {
	display: flex;
	flex-direction: column;
	background: transparent;
	cursor: pointer;
	user-select: none;
}
.m-card-meta {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: 10px;
	padding-bottom: 8px;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.m-card-meta .num {
	color: var(--fg-accent);
}
.m-card-meta .kind {
	color: var(--fg-1);
	opacity: 0.8;
}
.m-card-meta .year {
	color: var(--fg-1);
}

.m-card-frame {
	width: 100%;
	aspect-ratio: 5 / 4;
	border: 2px solid var(--fg-1);
	box-shadow: 6px 6px 0 0 var(--fg-1);
	overflow: hidden;
	background: var(--bg-elevated);
	transition:
		box-shadow 180ms ease,
		transform 180ms ease,
		border-color 180ms ease;
}
.m-card:active .m-card-frame {
	border-color: var(--fg-accent);
	box-shadow: 3px 3px 0 0 var(--fg-accent);
	transform: translate(3px, 3px);
}
.m-card-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.m-card-foot {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-top: 10px;
	gap: 12px;
}
.m-card-name {
	font-family: var(--font-sans);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--fg-1);
	margin: 0;
	line-height: 1.15;
}
.m-card-arrow {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 18px;
	color: var(--fg-accent);
	line-height: 1;
}

/* ───────── Footer ───────── */

.m-footer {
	border-top: 1px solid var(--fg-1);
	padding: 28px 20px 36px;
	background: var(--bg-elevated);
}
.m-footer-mark {
	font-family: var(--font-display);
	font-size: 44px;
	line-height: 0.9;
	color: var(--fg-accent);
	letter-spacing: -0.02em;
}
.m-footer-cols {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.m-footer-cols > div {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-soft);
	align-items: baseline;
}
.m-footer-cols .k {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-footer-cols a,
.m-footer-cols span {
	font-family: var(--font-sans);
	font-size: 14px;
	color: var(--fg-1);
	text-decoration: none;
}
.m-footer-cols a {
	border-bottom: 1px solid var(--fg-1);
	padding-bottom: 1px;
}

.m-footer-bottom {
	margin-top: 18px;
	display: flex;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	opacity: 0.8;
}

/* ───────── Drawer ───────── */

.m-scrim {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease;
	z-index: 40;
}
.m-scrim.open {
	opacity: 1;
	pointer-events: auto;
}

.m-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 84%;
	max-width: 320px;
	background: var(--bg-page);
	border-right: 1px solid var(--fg-1);
	transform: translateX(-100%);
	transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
	z-index: 50;
	display: flex;
	flex-direction: column;
	padding: 14px 22px 24px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.m-drawer.open {
	transform: translateX(0);
}
.m-drawer-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--fg-1);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.m-drawer-mark {
	margin-top: 28px;
	font-family: var(--font-display);
	font-size: 84px;
	line-height: 0.88;
	color: var(--fg-accent);
	letter-spacing: -0.02em;
}
.m-drawer-tag {
	margin: 16px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--fg-1);
	max-width: 24ch;
}
.m-drawer-nav {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--fg-1);
	display: flex;
	flex-direction: column;
}
.m-drawer-nav a {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	align-items: baseline;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--border-soft);
	text-decoration: none;
	color: var(--fg-1);
	font-family: var(--font-display);
	font-size: 28px;
	line-height: 1;
	letter-spacing: -0.01em;
}
.m-drawer-nav a .num {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-drawer-nav a .arrow {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 16px;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-drawer-nav a.active {
	color: var(--fg-accent);
}
.m-drawer-nav a.active .num,
.m-drawer-nav a.active .arrow {
	color: var(--fg-accent);
	opacity: 1;
}

/* Work toggle button — matches the <a> style */
.m-drawer-nav-btn {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	align-items: baseline;
	gap: 14px;
	padding: 16px 0;
	border: none;
	border-bottom: 1px solid var(--border-soft);
	background: none;
	text-align: left;
	width: 100%;
	cursor: pointer;
	color: var(--fg-1);
	font-family: var(--font-display);
	font-size: 28px;
	line-height: 1;
	letter-spacing: -0.01em;
}
.m-drawer-nav-btn .num {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-drawer-nav-btn .arrow {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 16px;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-drawer-nav-btn.active {
	color: var(--fg-accent);
}
.m-drawer-nav-btn.active .num,
.m-drawer-nav-btn.active .arrow {
	color: var(--fg-accent);
	opacity: 1;
}

/* Inline work project list inside the drawer */
.m-drawer-work-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--border-soft);
}
.m-drawer-work-list li button {
	display: grid;
	grid-template-columns: 24px 1fr auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 0 12px 12px;
	border: none;
	border-bottom: 1px solid var(--border-soft);
	background: none;
	text-align: left;
	cursor: pointer;
	color: var(--fg-1);
}
.m-drawer-work-list li:last-child button {
	border-bottom: none;
}
.m-drawer-work-list .num {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.15em;
	opacity: 1;
}
.m-drawer-work-list .name {
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 500;
}
.m-drawer-work-list .year {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.1em;
	opacity: 1;
}
.m-drawer-footer {
	margin-top: auto;
	padding-top: 24px;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.m-drawer-footer a {
	color: var(--fg-accent);
	text-decoration: none;
}

/* ───────── Index pull-down sheet ───────── */

.m-index {
	position: fixed;
	top: 44px;
	left: 0;
	right: 0;
	background: var(--bg-page);
	border-bottom: 1px solid var(--fg-1);
	z-index: 35;
	transform: translateY(-110%);
	transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
	max-height: calc(100vh - 44px);
	overflow-y: auto;
}
.m-index.open {
	transform: translateY(0);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}
.m-index-head {
	display: flex;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--fg-1);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.m-index-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.m-index-list li {
	border-bottom: 1px solid var(--border-soft);
}
.m-index-list button {
	display: grid;
	grid-template-columns: 32px 1fr auto auto;
	align-items: baseline;
	gap: 10px;
	width: 100%;
	padding: 14px 20px;
	background: transparent;
	border: 0;
	text-align: left;
	color: var(--fg-1);
	cursor: pointer;
	font: inherit;
}
.m-index-list button .num {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-index-list button .name {
	font-size: 15px;
	font-weight: 500;
}
.m-index-list button .kind {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-index-list button .year {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	color: var(--fg-accent);
}
.m-index-list li.active button {
	color: var(--fg-accent);
}
.m-index-list li.active button .num,
.m-index-list li.active button .kind {
	color: var(--fg-accent);
	opacity: 1;
}

/* ───────── Detail sheet ───────── */

.m-sheet {
	position: fixed;
	inset: 0;
	background: var(--bg-page);
	z-index: 60;
	transform: translateY(100%);
	transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
	display: flex;
	flex-direction: column;
}
.m-sheet.open {
	transform: translateY(0);
}
.m-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	height: 44px;
	border-bottom: 1px solid var(--fg-1);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	flex-shrink: 0;
}
.m-sheet-scroll {
	flex: 1;
	overflow-y: auto;
}
.m-sheet-hero {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-bottom: 1px solid var(--fg-1);
	background: var(--bg-elevated);
	overflow: hidden;
}
.m-sheet-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.m-sheet-body {
	padding: 22px 20px 32px;
}
.m-sheet-cat {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--fg-accent);
}
.m-sheet-title {
	font-family: var(--font-display);
	font-size: 56px;
	line-height: 0.92;
	color: var(--fg-1);
	letter-spacing: -0.015em;
	margin: 8px 0 18px;
	font-weight: 400;
	text-wrap: pretty;
}
.m-sheet-desc {
	font-size: 16.5px;
	line-height: 1.55;
	color: var(--fg-1);
	margin: 0 0 22px;
}
.m-sheet-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--fg-1);
}
.m-sheet-list li {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--border-soft);
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.m-sheet-list .k {
	color: var(--fg-1);
	opacity: 0.8;
}
.m-sheet-list .v {
	color: var(--fg-1);
	text-align: right;
}

.m-sheet-actions {
	margin-top: 22px;
}
.m-sheet-actions a {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid var(--fg-1);
	color: var(--fg-1);
}
.m-sheet-actions a.primary {
	background: var(--fg-accent);
	border-color: var(--fg-accent);
	color: #ffffff;
}

.m-sheet-pager {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--fg-1);
	display: flex;
	justify-content: space-between;
	gap: 12px;
}
.m-sheet-pager button {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 0;
	padding: 0;
	color: var(--fg-1);
	text-align: left;
	cursor: pointer;
	font: inherit;
}
.m-sheet-pager button:disabled {
	opacity: 0.35;
	cursor: default;
}
.m-sheet-pager .arrow {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 18px;
	color: var(--fg-accent);
}
.m-sheet-pager .lbl {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.m-sheet-pager .lbl.right {
	text-align: right;
	align-items: flex-end;
}
.m-sheet-pager .lbl .t {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fg-1);
	opacity: 0.8;
}
.m-sheet-pager .lbl .n {
	font-size: 13px;
	font-weight: 500;
	color: var(--fg-1);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 14ch;
}
