/* ============================================
   CSS RESET
   ============================================ */

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

* {
	margin: 0;
	padding: 0;
}

html {
	-moz-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
}

ul,
ol {
	list-style: none;
}

body {
	min-height: 100vh;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.1;
	font-weight: inherit;
	font-size: inherit;
}

h1,
h2,
h3,
h4 {
	text-wrap: balance;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

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

button {
	background: none;
	border: none;
	cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
	/* COLORS */
	--color-white: hsl(0, 100%, 100%);
	--color-gray-100: hsl(225, 10%, 92%);
	--color-gray-500: hsl(227, 10%, 46%);
	--color-blue-400: hsl(183, 62%, 54%);
	--color-blue-600: hsl(185, 75%, 39%);
	--color-navy-950: hsl(229, 23%, 23%);

	--color-text-primary: var(--color-navy-950);
	--color-text-secondary: var(--color-gray-500);
	--color-border: var(--color-gray-100);
	--color-background: var(--color-white);
	--color-background-page: hsl(185, 75%, 39%);

	/* SPACING */
	--spacing-050: 0.25rem;
	--spacing-100: 0.5rem;
	--spacing-150: 0.75rem;
	--spacing-200: 1rem;
	--spacing-300: 1.5rem;
	--spacing-400: 2rem;
	--spacing-500: 2.5rem;
	--spacing-600: 3rem;
	--spacing-700: 3.5rem;
	--spacing-800: 4rem;
	--spacing-900: 4.5rem;

	/* TYPOGRAPHY */

	--font-fallback-stack:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--font-family-primary: "Kumbh Sans", var(--font-fallback-stack);
	--font-family-secondary: "Open Sans", var(--font-fallback-stack);

	--font-weight-regular: 400;
	--font-weight-bold: 700;

	--font-size-preset-1: 1.125rem;
	--font-size-preset-2: 0.875rem;
	--font-size-preset-3: 0.625rem;

	--line-height-preset-1: 1.25;
	--line-height-preset-2: 1.25;
	--line-height-preset-3: 1.25;

	--letter-spacing-preset-1: 0;
	--letter-spacing-preset-2: 0;
	--letter-spacing-preset-3: 0.09375rem;

	/* BORDER RADIUS */
	--radius-md: 0.94rem;
	--radius-full: 50%;

	/* BORDERS */
	--border-thin: 0.0625rem;
	--border-thick: 0.3125rem;

	/* SHADOWS */
	--shadow-card: 0 3.125rem 6.25rem -1.25rem hsla(195, 84%, 20%, 0.504);
}

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

body {
	min-inline-size: 100dvw;
	display: grid;
	place-content: center;
	background-color: var(--color-blue-600);
	font-family: var(--font-family-primary);
	position: relative;
	overflow: hidden;
	background-image:
		url(./images/bg-pattern-top.svg), url(./images/bg-pattern-bottom.svg);
	background-position:
		right 50vw bottom 40vh,
		left 50vw top 40vh;
	background-repeat: no-repeat, no-repeat;
}

.profile-card {
	align-items: center;
	box-shadow: var(--shadow-card);
	border-radius: var(--radius-md);
	background-color: var(--color-white);
	overflow: hidden;
}

.profile-card::before {
	content: "";
	display: block;
	inline-size: 21.987rem;
	block-size: 9rem;
	background-image: url(./images/bg-pattern-card.svg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.profile-card__avatar {
	inline-size: 7rem;
	block-size: 7rem;
	border-radius: 50%;
	justify-self: center;
	margin-block-start: -4rem;
	border: 5px solid var(--color-white);
}

.profile-card__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--spacing-050);
	margin-block-start: var(--spacing-200);
}

.profile-card__name-wrapper {
	display: flex;
	align-items: center;
	gap: var(--spacing-150);
}

.profile-card__name {
	font-family: var(--font-family-primary);
	font-size: var(--font-size-preset-1);
	font-weight: var(--font-weight-bold);
	color: var(--color-navy-950);
}

.profile-card__age {
	font-family: var(--font-family-primary);
	color: var(--color-gray-500);
	font-size: var(--font-size-preset-1);
}

.profile-card__location {
	color: var(--color-gray-500);
	font-size: var(--font-size-preset-0);
}

.profile-card__divider {
	margin-block-start: var(--spacing-300);
	border: 1px solid var(--color-gray-100);
}

.profile-card__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: repeat(2, auto);
	grid-auto-flow: column;
	row-gap: var(--spacing-050);
	margin-block-start: var(--spacing-300);
	padding-block-end: var(--spacing-300);
	text-align: center;
	line-height: 125%;
}

.profile-card__stat-value,
.profile-card__stat-label {
	display: block;
}

.profile-card__stat-value {
	font-size: var(--font-size-preset-1);
	color: var(--color-navy-950);
	font-weight: var(--font-weight-bold);
}

.profile-card__stat-label {
	font-size: var(--font-size-preset-3);
	font-weight: var(--font-weight-regular);
	color: var(--color-gray-500);
	letter-spacing: var(--letter-spacing-preset-3);
}

/* ============================================
   ATTRIBUTION
   ============================================ */

.attribution {
	position: fixed;
	inset-block-end: var(--spacing-200);
	inset-inline: 0;
	font-size: 0.6875rem;
	text-align: center;
	color: var(--color-white);
}

.attribution a {
	color: var(--color-white);
	text-decoration: underline;
}
