/**
 * Developer Portfolio - Custom Styles
 * Styles that complement the theme.json design tokens
 */

/* ============================================
   GLOBAL
   ============================================ */

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

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	overflow-x: hidden;
}

::selection {
	background: rgba(139, 92, 246, 0.3);
	color: #fff;
}

/* ============================================
   GRADIENT TEXT UTILITY
   ============================================ */

.developer-portfolio-gradient-text {
	background: linear-gradient(90deg, #a78bfa 0%, #22d3ee 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.developer-portfolio-gradient-text-light {
	background: linear-gradient(90deg, #ffffff 0%, #ffffff 60%, #c4b5fd 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.site-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	background: rgba(10, 10, 15, 0.7) !important;
	transition: background 0.3s ease;
}

.site-header .wp-block-site-title a {
	text-decoration: none !important;
}

.site-header .wp-block-site-title a .wp-block-site-title__text::after {
	content: none;
}

.site-logo-icon {
	width: 2.25rem;
	height: 2.25rem;
	flex-shrink: 0;
}

.main-navigation .wp-block-navigation__container {
	gap: 0.25rem;
}

.main-navigation .wp-block-navigation-item a {
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	transition: color 0.2s ease, background 0.2s ease;
}

.main-navigation .wp-block-navigation-item.current-menu-item a,
.main-navigation .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--foreground) !important;
	background: rgba(139, 92, 246, 0.12);
}

.main-navigation .wp-block-navigation-item.current-menu-item a {
	border: 1px solid rgba(139, 92, 246, 0.3);
}

.header-cta-button .wp-block-button__link {
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.header-cta-button .wp-block-button__link:hover {
	opacity: 0.9;
	box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
	position: relative;
}

.hero-background {
	position: relative;
	background: var(--wp--preset--color--background);
	min-height: 0 !important;
	padding-top: 10rem !important;
	padding-bottom: 6rem !important;
}

/* Fix paragraph flex-basis acting as height in vertical flex */
.hero-section p[style*="flex-basis"],
.hero-section p[class*="has-muted-color"] {
	flex-basis: auto !important;
	max-width: 42rem;
	height: auto !important;
}

.cta-card p[style*="flex-basis"],
.cta-card p[class*="has-muted-color"] {
	flex-basis: auto !important;
	max-width: 32rem;
	height: auto !important;
}

.hero-background::before {
	content: '';
	position: absolute;
	top: 25%;
	left: 25%;
	width: 24rem;
	height: 24rem;
	background: rgba(124, 58, 237, 0.2);
	border-radius: 50%;
	filter: blur(80px);
	animation: pulse 4s ease-in-out infinite;
}

.hero-background::after {
	content: '';
	position: absolute;
	bottom: 25%;
	right: 25%;
	width: 24rem;
	height: 24rem;
	background: rgba(6, 182, 212, 0.15);
	border-radius: 50%;
	filter: blur(80px);
	animation: pulse 4s ease-in-out infinite 1s;
}

.hero-badge {
	background: rgba(139, 92, 246, 0.1) !important;
}

@keyframes pulse {
	0%, 100% { opacity: 0.6; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.05); }
}

/* Grid pattern overlay for hero */
.hero-background > .wp-block-group {
	position: relative;
	z-index: 2;
}

.hero-section::after {
	content: '';
	position: absolute;
	inset: 0;
	opacity: 0.03;
	background-image:
		linear-gradient(rgba(139, 92, 246, 0.3) 1px, transparent 1px),
		linear-gradient(90deg, rgba(139, 92, 246, 0.3) 1px, transparent 1px);
	background-size: 60px 60px;
	pointer-events: none;
}

/* ============================================
   CARDS (Projects, Blog, Tech, Stats)
   ============================================ */

.project-card,
.blog-post-card,
.tech-card,
.stat-card {
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover,
.blog-post-card:hover {
	border-color: rgba(139, 92, 246, 0.4) !important;
	box-shadow: 0 16px 40px rgba(139, 92, 246, 0.08);
}

.tech-card:hover,
.stat-card:hover {
	border-color: rgba(139, 92, 246, 0.3) !important;
}

.project-card .wp-block-post-featured-image {
	overflow: hidden;
}

.project-card .wp-block-post-featured-image img {
	transition: transform 0.5s ease;
}

.project-card:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* ============================================
   TECH BADGES
   ============================================ */

/* Fix tech category color dots to be circles */
.tech-card .wp-block-group[style*="9999px"] {
	width: 0.75rem !important;
	height: 0.75rem !important;
	min-width: 0.75rem !important;
	min-height: 0.75rem !important;
	max-width: 0.75rem !important;
	max-height: 0.75rem !important;
	padding: 0 !important;
	flex: 0 0 0.75rem !important;
}

.tech-badges {
	display: flex !important;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tech-badge {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	border-radius: 0.5rem;
	border: 1px solid;
	font-size: 0.8rem;
	line-height: 1.4;
}

.tech-badge.violet {
	background: rgba(139, 92, 246, 0.1);
	color: #a78bfa;
	border-color: rgba(139, 92, 246, 0.2);
}

.tech-badge.cyan {
	background: rgba(6, 182, 212, 0.1);
	color: #22d3ee;
	border-color: rgba(6, 182, 212, 0.2);
}

.tech-badge.emerald {
	background: rgba(16, 185, 129, 0.1);
	color: #34d399;
	border-color: rgba(16, 185, 129, 0.2);
}

.tech-badge.amber {
	background: rgba(245, 158, 11, 0.1);
	color: #fbbf24;
	border-color: rgba(245, 158, 11, 0.2);
}

/* ============================================
   POST CATEGORY BADGES
   ============================================ */

.post-category-badge a {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 0.375rem;
	background: rgba(139, 92, 246, 0.1);
	border: 1px solid rgba(139, 92, 246, 0.2);
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.post-category-badge a:hover {
	background: rgba(139, 92, 246, 0.2);
}

/* Project tags */
.project-tags a {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 0.375rem;
	background: rgba(139, 92, 246, 0.1);
	border: 1px solid rgba(139, 92, 246, 0.2);
	text-decoration: none !important;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-card {
	position: relative;
	overflow: hidden;
}

.cta-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 10rem;
	height: 10rem;
	background: rgba(139, 92, 246, 0.1);
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
}

.cta-card::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10rem;
	height: 10rem;
	background: rgba(6, 182, 212, 0.1);
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
}

.cta-card > * {
	position: relative;
	z-index: 1;
}

.cta-card {
	gap: 1rem !important;
	padding-top: 3rem !important;
	padding-bottom: 3rem !important;
}

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */

.timeline-item {
	position: relative;
}

.timeline-item::before {
	content: '';
	position: absolute;
	left: -9px;
	top: 0.5rem;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: #8b5cf6;
	border: 4px solid var(--wp--preset--color--background);
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-image-wrapper {
	position: relative;
}

.location-badge {
	position: absolute !important;
	bottom: -1rem;
	right: -1rem;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
	background: rgba(10, 10, 15, 0.5) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.footer-social-links .wp-social-link {
	transition: background 0.2s ease, border-color 0.2s ease;
	background: var(--wp--preset--color--secondary) !important;
	border: 1px solid transparent;
	border-radius: 0.5rem;
}

.footer-social-links .wp-social-link:hover {
	background: rgba(139, 92, 246, 0.2) !important;
	border-color: rgba(139, 92, 246, 0.3);
}

.footer-social-links .wp-social-link:hover svg {
	color: #a78bfa !important;
}

/* ============================================
   BUTTONS - Global hover effects
   ============================================ */

.wp-block-button__link {
	transition: opacity 0.2s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
}

.hero-cta-primary .wp-block-button__link:hover {
	box-shadow: 0 16px 40px rgba(139, 92, 246, 0.25) !important;
	transform: scale(1.03);
}

/* ============================================
   QUERY PAGINATION
   ============================================ */

.wp-block-query-pagination {
	gap: 0.5rem;
}

.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination-next a,
.wp-block-query-pagination-previous a {
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	background: var(--wp--preset--color--secondary);
	border: 1px solid rgba(139, 92, 246, 0.15);
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: all 0.2s ease;
}

.wp-block-query-pagination .page-numbers:hover,
.wp-block-query-pagination .page-numbers.current,
.wp-block-query-pagination-next a:hover,
.wp-block-query-pagination-previous a:hover {
	background: rgba(139, 92, 246, 0.2);
	border-color: rgba(139, 92, 246, 0.3);
	color: var(--wp--preset--color--violet-400);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 782px) {
	.hide-on-mobile {
		display: none !important;
	}

	.hero-background::before,
	.hero-background::after {
		width: 16rem;
		height: 16rem;
	}

	.location-badge {
		position: relative !important;
		bottom: auto;
		right: auto;
		margin-top: 1rem;
		display: inline-flex;
	}

	.wp-block-columns {
		flex-direction: column;
	}
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--wp--preset--color--background);
}

::-webkit-scrollbar-thumb {
	background: rgba(139, 92, 246, 0.3);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(139, 92, 246, 0.5);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.is-scrolled {
	background: rgba(10, 10, 15, 0.9) !important;
}

/* ============================================
   BLOCK EDITOR COMPATIBILITY
   ============================================ */

.editor-styles-wrapper {
	background: var(--wp--preset--color--background) !important;
	color: var(--wp--preset--color--foreground) !important;
}
