/*
	Artistic Elements: Brush Strokes & Azulejo Border
	Subtle artistic touches for Pushti's portfolio
*/

/* ===== AZULEJO TILE BORDER ===== */

/* Hide bottom, side borders and corners - keep only top border */
.azulejo-border-bottom,
.azulejo-border-left,
.azulejo-border-right,
.azulejo-corner {
	display: none;
}

/* Top border */
.azulejo-border-top {
	position: fixed;
	top: 0;
	left: 30px;
	right: 30px;
	height: 30px;
	pointer-events: none;
	z-index: 9999;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Crect width='60' height='60' fill='%23ffffff'/%3E%3Cpath d='M30 10 L35 20 L30 30 L25 20 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M50 30 L40 35 L30 30 L40 25 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M30 50 L25 40 L30 30 L35 40 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M10 30 L20 25 L30 30 L20 35 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ffffff' stroke='%231e4d8b' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='%23ffc34d'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='45' cy='30' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='15' cy='30' r='2' fill='%231e4d8b'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-size: 30px 30px;
	opacity: 0.85;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Bottom border */
.azulejo-border-bottom {
	position: fixed;
	bottom: 0;
	left: 30px;
	right: 30px;
	height: 30px;
	pointer-events: none;
	z-index: 9999;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Crect width='60' height='60' fill='%23ffffff'/%3E%3Cpath d='M30 10 L35 20 L30 30 L25 20 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M50 30 L40 35 L30 30 L40 25 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M30 50 L25 40 L30 30 L35 40 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M10 30 L20 25 L30 30 L20 35 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ffffff' stroke='%231e4d8b' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='%23ffc34d'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='45' cy='30' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='15' cy='30' r='2' fill='%231e4d8b'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-size: 30px 30px;
	opacity: 0.85;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

/* Left border */
.azulejo-border-left {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 30px;
	pointer-events: none;
	z-index: 9999;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Crect width='60' height='60' fill='%23ffffff'/%3E%3Cpath d='M30 10 L35 20 L30 30 L25 20 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M50 30 L40 35 L30 30 L40 25 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M30 50 L25 40 L30 30 L35 40 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M10 30 L20 25 L30 30 L20 35 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ffffff' stroke='%231e4d8b' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='%23ffc34d'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='45' cy='30' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='15' cy='30' r='2' fill='%231e4d8b'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-y;
	background-size: 30px 30px;
	opacity: 0.85;
	box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

/* Right border */
.azulejo-border-right {
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	width: 30px;
	pointer-events: none;
	z-index: 9999;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Crect width='60' height='60' fill='%23ffffff'/%3E%3Cpath d='M30 10 L35 20 L30 30 L25 20 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M50 30 L40 35 L30 30 L40 25 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M30 50 L25 40 L30 30 L35 40 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M10 30 L20 25 L30 30 L20 35 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ffffff' stroke='%231e4d8b' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='%23ffc34d'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='45' cy='30' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='15' cy='30' r='2' fill='%231e4d8b'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-y;
	background-size: 30px 30px;
	opacity: 0.85;
	box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

/* Corner tiles to cover overlaps */
.azulejo-corner {
	position: fixed;
	width: 30px;
	height: 30px;
	pointer-events: none;
	z-index: 10000;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Crect width='60' height='60' fill='%23ffffff'/%3E%3Cpath d='M30 10 L35 20 L30 30 L25 20 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M50 30 L40 35 L30 30 L40 25 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M30 50 L25 40 L30 30 L35 40 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Cpath d='M10 30 L20 25 L30 30 L20 35 Z' fill='%23ffc34d' stroke='%231e4d8b' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ffffff' stroke='%231e4d8b' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='%23ffc34d'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='45' cy='30' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%231e4d8b'/%3E%3Ccircle cx='15' cy='30' r='2' fill='%231e4d8b'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 30px 30px;
	opacity: 0.85;
}

.azulejo-corner-tl {
	top: 0;
	left: 0;
}

.azulejo-corner-tr {
	top: 0;
	right: 0;
}

.azulejo-corner-bl {
	bottom: 0;
	left: 0;
}

.azulejo-corner-br {
	bottom: 0;
	right: 0;
}

/* ===== BRUSH STROKE DIVIDERS ===== */

.brush-divider {
	position: relative;
	height: 4px;
	margin: var(--spacing-xl) auto;
	max-width: 300px;
	background: linear-gradient(90deg,
		transparent 0%,
		var(--color-accent) 10%,
		var(--color-accent) 90%,
		transparent 100%
	);
	opacity: 0.6;
	border-radius: 50%;
	transform: rotate(-1deg);
}

.brush-divider::before {
	content: '';
	position: absolute;
	top: -2px;
	left: 10%;
	right: 10%;
	height: 6px;
	background: var(--color-accent);
	opacity: 0.3;
	filter: blur(2px);
	border-radius: 50%;
}

/* Brush stroke variants */
.brush-divider-subtle {
	opacity: 0.3;
	max-width: 200px;
	transform: rotate(1deg);
}

/* ===== TYPEWRITER EFFECT ===== */

.rotating-text {
	font-family: var(--font-primary);
	font-weight: 500;
	position: relative;
}

/* Blinking cursor */
.rotating-text::after {
	content: '|';
	margin-left: 2px;
	animation: blink 1s step-end infinite;
}

@keyframes blink {
	0%, 50% {
		opacity: 1;
	}
	51%, 100% {
		opacity: 0;
	}
}

/* ===== BRUSH STROKE ACCENTS ===== */

/* Hero section brush accent */
.hero-brush-accent {
	position: absolute;
	bottom: 20%;
	left: 5%;
	width: 150px;
	height: 8px;
	background: linear-gradient(90deg,
		transparent,
		var(--color-accent),
		transparent
	);
	opacity: 0.15;
	border-radius: 50%;
	transform: rotate(-5deg);
	animation: fadeInSlide 1s ease-out 0.8s both;
}

.hero-brush-accent-2 {
	position: absolute;
	top: 25%;
	right: 8%;
	width: 120px;
	height: 6px;
	background: linear-gradient(90deg,
		transparent,
		var(--color-accent),
		transparent
	);
	opacity: 0.12;
	border-radius: 50%;
	transform: rotate(8deg);
	animation: fadeInSlide 1s ease-out 1.2s both;
}

@keyframes fadeInSlide {
	from {
		opacity: 0;
		transform: translateX(-20px) rotate(-5deg);
	}
	to {
		opacity: 0.15;
		transform: translateX(0) rotate(-5deg);
	}
}

/* ===== SECTION HEADER BRUSH UNDERLINE ===== */

.section-label::after,
.about-label::after {
	content: '';
	display: block;
	width: 60%;
	height: 3px;
	background: var(--color-accent);
	margin: 0.5rem auto 0;
	opacity: 0.4;
	border-radius: 50%;
	transform: scaleX(0);
	animation: brushUnderline 0.8s ease-out 0.3s forwards;
}

@keyframes brushUnderline {
	to {
		transform: scaleX(1);
	}
}

/* ===== RESPONSIVE BEHAVIOR ===== */

@media (max-width: 768px) {
	.brush-divider {
		max-width: 200px;
	}

	.hero-brush-accent,
	.hero-brush-accent-2 {
		display: none;
	}

	/* Reduce azulejo border size on tablets */
	.azulejo-border-top,
	.azulejo-border-bottom {
		left: 20px;
		right: 20px;
		height: 20px;
		background-size: 20px 20px;
	}

	.azulejo-border-left,
	.azulejo-border-right {
		width: 20px;
		background-size: 20px 20px;
	}

	.azulejo-corner {
		width: 20px;
		height: 20px;
		background-size: 20px 20px;
	}
}

@media (max-width: 480px) {
	/* Hide side borders and corners on mobile, keep only top/bottom */
	.azulejo-border-left,
	.azulejo-border-right,
	.azulejo-corner {
		display: none;
	}

	.azulejo-border-top,
	.azulejo-border-bottom {
		left: 0;
		right: 0;
		height: 15px;
		background-size: 15px 15px;
	}
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
	.brush-divider,
	.hero-brush-accent,
	.hero-brush-accent-2,
	.rotating-text::after {
		animation: none !important;
		transition: none !important;
	}
}
