/* ==========================================================================
   components.css — buttons, entries, tags, Discord plates
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------- */

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.4rem;
	border-radius: 999px;
	background: var(--rose);
	color: var(--ink-deep);
	font-weight: 700;
	font-size: var(--t-sm);
	letter-spacing: 0.01em;
	text-decoration: none;
	border: 1px solid var(--rose);
	transition: background 0.18s ease, color 0.18s ease;
}

.button:hover {
	background: #f291b1;
	color: var(--ink-deep);
}

.button--quiet {
	background: transparent;
	color: var(--parchment);
	border-color: var(--rule);
}

.button--quiet:hover {
	background: rgba(233, 121, 158, 0.12);
	color: var(--parchment);
	border-color: var(--rose);
}

/* --- Entry list (work, contact methods) ---------------------------------- */

.entries {
	list-style: none;
	padding: 0;
	margin: 0;
	border-top: 1px solid var(--rule);
}

.entry {
	border-bottom: 1px solid var(--rule);
	padding-block: 1.6rem;
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

.entry__numeral {
	font-family: var(--display);
	font-style: italic;
	color: var(--gilt);
	font-size: var(--t-md);
	line-height: 1.4;
}

.entry h3 {
	margin-bottom: 0.35rem;
}

.entry p {
	color: var(--muted);
	max-width: 38rem;
}

.entry__meta {
	margin-top: 0.6rem;
	font-size: var(--t-sm);
	color: var(--muted);
	font-style: italic;
	font-family: var(--display);
}

.entry a {
	color: var(--rose);
}

/* Small qualifier beside an entry heading ("personal", "work") */
.entry__tag {
	font-family: var(--body);
	font-size: var(--t-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gilt);
	border: 1px solid var(--rule);
	border-radius: 999px;
	padding: 0.15em 0.6em;
	vertical-align: 0.25em;
	white-space: nowrap;
}

/* --- Ledger (label / value pairs) ---------------------------------------- */

.ledger {
	margin-top: 1.75rem;
	display: grid;
	gap: 0.75rem;
	max-width: 34rem;
}

.ledger > div {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr);
	gap: 0.35rem 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--rule);
}

.ledger dt {
	font-family: var(--display);
	font-style: italic;
	color: var(--gilt);
	font-size: var(--t-sm);
}

.ledger dd {
	margin: 0;
	color: var(--muted);
	font-size: var(--t-sm);
}

.ledger a {
	color: var(--rose);
}

@media (max-width: 480px) {
	.ledger > div {
		grid-template-columns: 1fr;
	}
}

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

.reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-shown {
	opacity: 1;
	transform: none;
}

/* --- Marginalia (skills) ------------------------------------------------- */

.marginalia {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: 1.75rem;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: var(--t-sm);
}

.marginalia li {
	position: relative;
	padding-left: 1rem;
}

.marginalia li::before {
	content: "❧";
	position: absolute;
	left: 0;
	color: var(--rose);
	font-size: 0.7rem;
	top: 0.15em;
}

/* --- Shared plate (Discord cards) ---------------------------------------- */

.plate {
	background: linear-gradient(180deg, var(--page) 0%, var(--page-soft) 100%);
	border: 1px solid var(--edge-line);
	border-radius: 18px;
	overflow: hidden;
	box-shadow:
		0 0 0 1px var(--edge-glow),
		0 0 30px -14px var(--edge),
		0 18px 40px -30px #000;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plate:hover {
	border-color: var(--edge);
	box-shadow:
		0 0 0 1px var(--edge-glow),
		0 0 34px -10px var(--edge),
		0 18px 40px -30px #000;
}

.plate__title {
	font-family: var(--display);
	font-style: italic;
	font-size: var(--t-sm);
	color: var(--gilt);
	padding: 0.9rem 1.15rem 0;
}

.plate__body {
	padding: 0.9rem 1.15rem 1.15rem;
}

.plate__state {
	color: var(--muted);
	font-size: var(--t-sm);
	padding: 0.35rem 0 0.4rem;
}

/* --- Presence card ------------------------------------------------------- */

.presence {
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr);
	gap: 0.95rem;
	align-items: center;
}

.presence__avatar {
	position: relative;
	width: 68px;
	height: 68px;
}

.presence__avatar img.avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: var(--ink-deep);
	border: 1px solid var(--rule);
}

/* Discord avatar decoration frame overlays the avatar at ~1.2× */
.presence__avatar img.decoration {
	position: absolute;
	inset: -10%;
	width: 120%;
	height: 120%;
	pointer-events: none;
}

.presence__dot {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	border: 3px solid var(--page);
	background: var(--status-offline);
	z-index: 2;
}

.presence__dot[data-status="online"] {
	background: var(--status-online);
}
.presence__dot[data-status="idle"] {
	background: var(--status-idle);
}
.presence__dot[data-status="dnd"] {
	background: var(--status-dnd);
}

.presence__dot[data-status="online"]::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 2px solid var(--status-online);
	animation: ripple 2.6s ease-out infinite;
}

@keyframes ripple {
	0% {
		transform: scale(1);
		opacity: 0.7;
	}
	70%,
	100% {
		transform: scale(1.9);
		opacity: 0;
	}
}

.presence__name {
	font-family: var(--display);
	font-size: var(--t-md);
	line-height: 1.2;
}

.presence__handle {
	color: var(--muted);
	font-size: var(--t-sm);
}

.presence__status {
	font-size: var(--t-sm);
	color: var(--muted);
	margin-top: 0.15rem;
}

.presence__custom {
	margin-top: 0.35rem;
	font-size: var(--t-sm);
	color: var(--parchment);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.presence__custom img {
	width: 16px;
	height: 16px;
}

.activity {
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rule);
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 0.7rem;
	align-items: center;
}

.activity img {
	width: 44px;
	height: 44px;
	border-radius: 9px;
	object-fit: cover;
	background: var(--ink-deep);
}

.activity__name {
	font-weight: 700;
	font-size: var(--t-sm);
}

.activity__detail,
.activity__time {
	font-size: var(--t-xs);
	color: var(--muted);
}

.activity__time {
	font-variant-numeric: tabular-nums;
}

/* --- Spotify panel ------------------------------------------------------- */

.spotify {
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rule);
}

.spotify__label {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: var(--t-xs);
	color: var(--muted);
	font-family: var(--display);
	font-style: italic;
	margin-bottom: 0.6rem;
}

.spotify__mark {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--spotify);
	flex: none;
	box-shadow: 0 0 8px -1px var(--spotify);
}

.spotify__row {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 0.75rem;
	align-items: center;
}

.spotify__art {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--ink-deep);
}

.spotify__text {
	min-width: 0;
}

.spotify__song,
.spotify__artist,
.spotify__album {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.spotify__song {
	display: block;
	font-weight: 700;
	font-size: var(--t-sm);
	color: var(--parchment);
	text-decoration: none;
	line-height: 1.35;
}

a.spotify__song:hover {
	color: var(--spotify);
	text-decoration: underline;
}

.spotify__artist,
.spotify__album {
	font-size: var(--t-xs);
	color: var(--muted);
	line-height: 1.4;
}

.spotify__album {
	opacity: 0.75;
}

.spotify__bar {
	margin-top: 0.7rem;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	overflow: hidden;
}

.spotify__bar span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--spotify);
	transition: width 1s linear;
}

.spotify__times {
	display: flex;
	justify-content: space-between;
	margin-top: 0.3rem;
	font-size: var(--t-xs);
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* --- Server card --------------------------------------------------------- */

.plate__title + .server__banner {
	margin-top: 0.75rem;
}

.server__banner {
	height: 96px;
	background:
		linear-gradient(120deg, rgba(233, 121, 158, 0.5), rgba(227, 185, 107, 0.35)),
		var(--page-soft);
	background-size: cover;
	background-position: center;
}

.server__head {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	gap: 0.8rem;
	align-items: center;
	margin-top: -32px;
}

.server__icon {
	width: 54px;
	height: 54px;
	border-radius: 16px;
	border: 3px solid var(--page);
	background: var(--ink-deep);
	object-fit: cover;
}

.server__name {
	font-family: var(--display);
	font-size: var(--t-base);
	padding-top: 26px;
}

.server__counts {
	display: flex;
	gap: 1.25rem;
	margin-top: 0.9rem;
}

.count {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: var(--t-sm);
	color: var(--muted);
}

.count b {
	color: var(--parchment);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.count::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--status-offline);
}

.count--online::before {
	background: var(--status-online);
}

.server .button {
	margin-top: 1.1rem;
	width: 100%;
	justify-content: center;
}

/* --- Minecraft server panel ---------------------------------------------- */

.mc__head {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 0.8rem;
	align-items: center;
}

.mc__icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: var(--ink-deep);
	border: 1px solid var(--rule);
	object-fit: cover;
	image-rendering: pixelated;
}

.mc__name {
	font-family: var(--display);
	font-size: var(--t-base);
	line-height: 1.25;
}

.mc__state {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: var(--t-sm);
	color: var(--muted);
	margin-top: 0.1rem;
}

.mc__state b {
	color: var(--parchment);
	font-variant-numeric: tabular-nums;
}

.mc__state::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--status-offline);
	flex: none;
}

.mc__state[data-online="yes"]::before {
	background: var(--status-online);
	box-shadow: 0 0 8px -1px var(--status-online);
}

.mc__motd {
	margin-top: 0.8rem;
	font-size: var(--t-xs);
	color: var(--muted);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mc__version {
	margin-top: 0.35rem;
	font-size: var(--t-xs);
	color: var(--muted);
	font-family: var(--display);
	font-style: italic;
	opacity: 0.8;
}

.mc__address {
	margin-top: 0.9rem;
	display: flex;
	align-items: stretch;
	gap: 0.4rem;
}

.mc__address code {
	flex: 1;
	min-width: 0;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid var(--edge-line);
	border-radius: 8px;
	padding: 0.45rem 0.6rem;
	font-size: var(--t-xs);
	color: var(--parchment);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.6;
}

.mc__copy {
	flex: none;
	border: 1px solid var(--edge-line);
	background: var(--edge-glow);
	color: var(--parchment);
	border-radius: 8px;
	padding: 0.45rem 0.75rem;
	font-family: var(--body);
	font-size: var(--t-xs);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.mc__copy:hover {
	background: var(--edge);
	border-color: var(--edge);
	color: var(--ink-deep);
}

.mc__copy.is-done {
	background: var(--status-online);
	border-color: var(--status-online);
	color: var(--ink-deep);
}

.mc__bedrock {
	margin-top: 0.45rem;
	font-size: var(--t-xs);
	color: var(--muted);
}

/* --- Reader counter ------------------------------------------------------ */

.views {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	padding-top: 0.15rem;
}

.views__figure {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.views__figure b {
	font-family: var(--display);
	font-size: var(--t-lg);
	font-weight: 500;
	color: var(--parchment);
	font-variant-numeric: tabular-nums;
}

.views__figure span {
	font-size: var(--t-xs);
	color: var(--muted);
	font-family: var(--display);
	font-style: italic;
}

.views__figure--live b {
	color: var(--rose);
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.views__figure--live b::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--status-online);
	flex: none;
	animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.35;
	}
}

/* Inline count in the footer */
[data-view-count] b {
	font-variant-numeric: tabular-nums;
	color: var(--parchment);
	font-weight: 500;
}

/* Live-refresh indicator */
.live {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: var(--t-xs);
	color: var(--muted);
	margin-top: 0.75rem;
	font-style: italic;
	font-family: var(--display);
}

.is-error {
	color: var(--status-idle);
}
