/*
Theme Name: IQ Links
Theme URI: https://iq-digital.co.uk/
Author: Issa Qandil
Author URI: https://iq-digital.co.uk/
Description: A lightweight, elegant link-sharing theme. Build a polished social link page using native WordPress menus, with no plugins or page builder required.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iq-links
Tags: one-column, custom-logo, custom-menu, custom-colors, editor-style, featured-images, translation-ready
*/

:root {
	--iq-background: #f7f7f4;
	--iq-surface: #ffffff;
	--iq-text: #1f2421;
	--iq-muted: #6a716d;
	--iq-border: rgba(31, 36, 33, 0.12);
	--iq-accent: #2f6758;
	--iq-accent-soft: rgba(47, 103, 88, 0.09);
	--iq-shadow: 0 14px 45px rgba(24, 31, 27, 0.08);
	--iq-radius: 18px;
	--iq-width: 680px;
	--iq-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--iq-font-serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at 10% 0%, var(--iq-accent-soft), transparent 34rem),
		var(--iq-background);
	color: var(--iq-text);
	font-family: var(--iq-font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.admin-bar {
	min-height: calc(100vh - 32px);
}

a {
	color: var(--iq-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

img {
	max-width: 100%;
	height: auto;
}

button,
input,
textarea,
select {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
	z-index: 100000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	margin: 0;
	overflow: visible;
	clip: auto;
	background: var(--iq-surface);
	color: var(--iq-text);
	border: 1px solid var(--iq-border);
	border-radius: 10px;
	box-shadow: var(--iq-shadow);
	font-weight: 700;
	text-decoration: none;
}

.site-shell {
	width: min(100% - 32px, var(--iq-width));
	margin-inline: auto;
	padding: clamp(48px, 8vw, 92px) 0 36px;
}

.profile-header {
	text-align: center;
	margin-bottom: 34px;
}

.profile-mark {
	display: grid;
	place-items: center;
	width: 104px;
	height: 104px;
	margin: 0 auto 22px;
	border: 6px solid rgba(255, 255, 255, 0.82);
	border-radius: 28px;
	background: var(--iq-surface);
	box-shadow: var(--iq-shadow);
	overflow: hidden;
}

.profile-mark.is-circle {
	border-radius: 999px;
}

.profile-mark .custom-logo-link,
.profile-mark .custom-logo {
	display: block;
	width: 100%;
	height: 100%;
}

.profile-mark .custom-logo {
	object-fit: cover;
}

.profile-initials {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--iq-accent);
	color: #ffffff;
	font-family: var(--iq-font-serif);
	font-size: 2.15rem;
	font-weight: 700;
	letter-spacing: -0.04em;
}

.profile-eyebrow {
	margin: 0 0 8px;
	color: var(--iq-accent);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}

.site-title {
	margin: 0;
	font-family: var(--iq-font-serif);
	font-size: clamp(2.1rem, 8vw, 3.2rem);
	font-weight: 600;
	letter-spacing: -0.045em;
	line-height: 1.04;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	max-width: 510px;
	margin: 14px auto 0;
	color: var(--iq-muted);
	font-size: clamp(1rem, 2.8vw, 1.08rem);
	line-height: 1.68;
}

.home-intro {
	max-width: 560px;
	margin: -8px auto 28px;
	color: var(--iq-muted);
	text-align: center;
}

.home-intro > *:first-child {
	margin-top: 0;
}

.home-intro > *:last-child {
	margin-bottom: 0;
}

.link-menu,
.social-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.link-menu {
	display: grid;
	gap: 13px;
}

.link-menu > li {
	margin: 0;
}

.link-menu a {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	min-height: 78px;
	padding: 17px 19px 17px 22px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--iq-text);
	border: 1px solid var(--iq-border);
	border-radius: var(--iq-radius);
	box-shadow: 0 2px 0 rgba(31, 36, 33, 0.02);
	text-decoration: none;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.link-menu a::after {
	content: "↗";
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: var(--iq-accent-soft);
	color: var(--iq-accent);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1;
	transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.link-menu a:hover,
.link-menu a:focus-visible {
	transform: translateY(-2px);
	background: var(--iq-surface);
	border-color: rgba(47, 103, 88, 0.35);
	box-shadow: 0 18px 38px rgba(24, 31, 27, 0.1);
	outline: none;
}

.link-menu a:hover::after,
.link-menu a:focus-visible::after {
	transform: translate(2px, -2px);
	background: var(--iq-accent);
	color: #ffffff;
}

.link-copy {
	min-width: 0;
}

.link-title {
	display: block;
	font-size: 1rem;
	font-weight: 760;
	letter-spacing: -0.015em;
	line-height: 1.35;
}

.link-description {
	display: block;
	margin-top: 3px;
	color: var(--iq-muted);
	font-size: 0.875rem;
	line-height: 1.45;
}

.link-menu .featured-link > a {
	background: var(--iq-accent);
	color: #ffffff;
	border-color: transparent;
}

.link-menu .featured-link .link-description {
	color: rgba(255, 255, 255, 0.78);
}

.link-menu .featured-link > a::after {
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

.link-menu .featured-link > a:hover,
.link-menu .featured-link > a:focus-visible {
	border-color: transparent;
	box-shadow: 0 18px 42px rgba(47, 103, 88, 0.24);
}

.setup-message {
	padding: 24px;
	background: var(--iq-surface);
	border: 1px dashed rgba(47, 103, 88, 0.35);
	border-radius: var(--iq-radius);
	color: var(--iq-muted);
	text-align: center;
}

.setup-message strong {
	display: block;
	margin-bottom: 4px;
	color: var(--iq-text);
}

.social-navigation {
	margin-top: 28px;
}

.social-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 9px;
}

.social-menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 14px;
	background: rgba(255, 255, 255, 0.56);
	color: var(--iq-muted);
	border: 1px solid var(--iq-border);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
	transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.social-menu a:hover,
.social-menu a:focus-visible {
	background: var(--iq-surface);
	color: var(--iq-accent);
	border-color: rgba(47, 103, 88, 0.35);
	outline: none;
}

.site-footer {
	padding-top: 34px;
	color: var(--iq-muted);
	font-size: 0.8rem;
	text-align: center;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: inherit;
}


.compact-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 22px;
}

.compact-brand {
	min-width: 0;
	color: var(--iq-text);
	font-family: var(--iq-font-serif);
	font-size: 1.25rem;
	font-weight: 650;
	letter-spacing: -0.025em;
	text-decoration: none;
}

.compact-home {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 7px 12px;
	background: rgba(255, 255, 255, 0.62);
	color: var(--iq-muted);
	border: 1px solid var(--iq-border);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 750;
	text-decoration: none;
}

.compact-home:hover,
.compact-home:focus-visible {
	background: var(--iq-surface);
	color: var(--iq-accent);
	border-color: rgba(47, 103, 88, 0.35);
	outline: none;
}

/* Standard pages and posts */
.content-card {
	padding: clamp(24px, 6vw, 48px);
	background: var(--iq-surface);
	border: 1px solid var(--iq-border);
	border-radius: calc(var(--iq-radius) + 4px);
	box-shadow: var(--iq-shadow);
}

.content-card + .content-card {
	margin-top: 20px;
}

.entry-header {
	margin-bottom: 28px;
}

.entry-title {
	margin: 0;
	font-family: var(--iq-font-serif);
	font-size: clamp(2rem, 6vw, 3rem);
	letter-spacing: -0.04em;
	line-height: 1.08;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-meta {
	margin-top: 10px;
	color: var(--iq-muted);
	font-size: 0.85rem;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--iq-font-serif);
	letter-spacing: -0.025em;
	line-height: 1.2;
}

.entry-content h2 {
	margin-top: 1.7em;
	font-size: 1.7rem;
}

.entry-content h3 {
	margin-top: 1.55em;
	font-size: 1.35rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
	margin-top: 0;
	margin-bottom: 1.25em;
}

.entry-content blockquote {
	padding-left: 18px;
	border-left: 3px solid var(--iq-accent);
	color: var(--iq-muted);
}

.entry-content .wp-block-image,
.entry-content img {
	border-radius: 14px;
}

.page-navigation,
.posts-navigation,
.post-navigation {
	margin-top: 22px;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.nav-links a {
	display: inline-flex;
	padding: 10px 14px;
	background: var(--iq-surface);
	border: 1px solid var(--iq-border);
	border-radius: 12px;
	font-weight: 700;
	text-decoration: none;
}

.not-found {
	text-align: center;
}

.back-link {
	display: inline-flex;
	margin-top: 18px;
	padding: 11px 16px;
	background: var(--iq-accent);
	color: #ffffff;
	border-radius: 12px;
	font-weight: 750;
	text-decoration: none;
}

@media (max-width: 782px) {
	body.admin-bar {
		min-height: calc(100vh - 46px);
	}
}

@media (max-width: 520px) {
	.site-shell {
		width: min(100% - 22px, var(--iq-width));
		padding-top: 38px;
	}

	.profile-mark {
		width: 92px;
		height: 92px;
		border-width: 5px;
		border-radius: 24px;
	}

	.link-menu a {
		min-height: 72px;
		padding: 15px 15px 15px 18px;
		gap: 12px;
		border-radius: 15px;
	}

	.link-menu a::after {
		width: 34px;
		height: 34px;
	}

	.content-card {
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
