/*
  Supplementary utility classes needed by index.html that are not part of the
  precompiled Tailwind bundle (tailwindcss.css was built from the original markup).
*/

.h-auto {
	height: auto;
}

.py-10 {
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

.border-t {
	border-top-width: 1px;
}

/*
  Brand colour shade: sky-700 (#0369a1).
  The precompiled bundle only ships sky-300/50, which fail WCAG contrast
  (sky-300 on white = 1.67:1; sky-50 on sky-300 = 1.56:1). sky-700 passes AA
  both as text on white (5.93:1) and as a background for white text (5.93:1),
  and keeps the sky-blue brand identity. Defined here in Tailwind's idiom.
*/
.bg-sky-700 {
	--tw-bg-opacity: 1;
	background-color: rgb(3 105 161 / var(--tw-bg-opacity));
}

.text-sky-700 {
	--tw-text-opacity: 1;
	color: rgb(3 105 161 / var(--tw-text-opacity));
}

.border-sky-700 {
	--tw-border-opacity: 1;
	border-color: rgb(3 105 161 / var(--tw-border-opacity));
}

.fill-sky-700 {
	fill: #0369a1;
}

.hover\:bg-sky-700:hover {
	--tw-bg-opacity: 1;
	background-color: rgb(3 105 161 / var(--tw-bg-opacity));
}

.hover\:fill-sky-700:hover {
	fill: #0369a1;
}

/*
  Skill category cards: heading + pill-style tag list.
  space-y-3 isn't in the precompiled bundle, so it's defined here.
*/
.space-y-3 > * + * {
	margin-top: 0.75rem;
}

.skill-pill {
	display: inline-block;
	background: rgb(240 249 255);            /* sky-50 */
	color: rgb(3 105 161 / var(--tw-text-opacity, 1)); /* sky-700 */
	border: 1px solid rgb(186 230 253);      /* sky-200 */
	border-radius: 9999px;
	padding: 0.25rem 0.75rem;                /* py-1 px-3 */
	font-size: 0.875rem;                     /* text-sm */
	font-weight: 500;                        /* font-medium */
	line-height: 1.5;
}

/*
  Skip-to-content link: visually hidden until focused by keyboard users.
*/
.skip-link {
	position: absolute;
	left: 1rem;
	top: -3rem;
	z-index: 100;
	padding: 0.5rem 1rem;
	background: #0369a1;
	color: #f0f9ff;
	border-radius: 0 0 0.5rem 0.5rem;
	font-weight: 600;
	transition: top 0.2s ease-in-out;
}

.skip-link:focus {
	top: 0;
}

/*
  Project cards: smooth the hover lift and give the background image a gentle
  zoom that eases in sync with the card's existing -translate-y-2 lift.
*/
.project-card__media {
	transition: transform 0.4s ease, -webkit-transform 0.4s ease;
}

.project-card:hover .project-card__media {
	transform: scale(1.04);
}

/* Soft depth on hover for project cards. */
.project-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
	box-shadow: 0 12px 28px -8px rgb(15 23 42 / 0.18);
}

/* Sidebar profile photo: subtle ring + gentle hover scale. */
.profile-photo {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 0 0 3px rgb(3 105 161 / 0.9); /* sky-700 ring */
}

.profile-photo:hover {
	transform: scale(1.03);
	box-shadow: 0 0 0 3px rgb(3 105 161 / 0.9), 0 8px 20px -6px rgb(15 23 42 / 0.35);
}

/* =========================================================================
   Motion & polish (restrained, professional)
   - All effects are one-time (no infinite loops).
   - The .js scope means no-JS users see content immediately.
   - prefers-reduced-motion disables everything below.
   ========================================================================= */

/* --- Hero entrance: staggered fade-up on first paint --- */
@keyframes heroFadeUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.js .hero-enter > * {
	opacity: 0;
	animation: heroFadeUp 0.6s ease-out both;
}
.js .hero-enter > *:nth-child(1) { animation-delay: 0.05s; }
.js .hero-enter > *:nth-child(2) { animation-delay: 0.17s; }
.js .hero-enter > *:nth-child(3) { animation-delay: 0.29s; }
.js .hero-enter > *:nth-child(4) { animation-delay: 0.41s; }
.js .hero-enter > *:nth-child(5) { animation-delay: 0.53s; }

/* --- Scroll reveal: content sections fade + rise in once --- */
.js .reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
	will-change: opacity, transform;
}

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

/* --- Section heading accent: sky-700 underline that grows on reveal --- */
.js .reveal .section-heading {
	position: relative;
}

.js .reveal .section-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -0.4rem;
	height: 3px;
	width: 0;
	background: #0369a1; /* sky-700 */
	border-radius: 2px;
	transition: width 0.7s ease-out 0.15s;
}

.js .reveal.is-visible .section-heading::after {
	width: 2.5rem;
}

/* --- Link micro-interaction: underline grows from left on hover --- */
.link-underline {
	position: relative;
	text-decoration: none;
}

.link-underline::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 1.5px;
	width: 0;
	background: currentColor;
	transition: width 0.25s ease-out;
}

.link-underline:hover::after,
.link-underline:focus-visible::after {
	width: 100%;
}

/* --- Respect users who prefer reduced motion: disable everything --- */
@media (prefers-reduced-motion: reduce) {
	.js .hero-enter > *,
	.js .reveal,
	.js .reveal .section-heading::after,
	.link-underline::after,
	.project-card,
	.project-card__media,
	.profile-photo {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}

	.js .reveal .section-heading::after {
		width: 2.5rem;
	}
}

@media (min-width: 1024px) {
	.lg\:justify-between {
		justify-content: space-between;
	}

	/* Anchor the fixed sidebar explicitly so it can't drift off-screen. */
	.lg\:top-0 {
		top: 0;
	}

	.lg\:left-0 {
		left: 0;
	}

	.lg\:h-screen {
		height: 100vh;
	}
}
