/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
	--bg-color: #e3dac9;
	--text-primary: #2b3228;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

*:focus-visible {
	outline: 2px dotted var(--text-primary);
	outline-offset: 2px;
}

*::selection {
	background-color: var(--text-primary);
	color: var(--bg-color);
}

/* ==========================================================================
   2. FONTS
   ========================================================================== */
@font-face {
	font-family: 'Raleway';
	src: url('./assets/raleway-regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Raleway';
	src: url('./assets/raleway-bold.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Garamond';
	src: url('./assets/cormorant-garamond-bold.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   3. BASE STYLES
   ========================================================================== */
body {
	display: flex;
	justify-content: center;
	min-height: 100vh;
	padding: 40px 20px;
	font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-primary);
	line-height: 1.6;
}
body {
	outline: 2px dotted var(--text-primary);
	outline-offset: -4px;
}

/* Home page body adjustments */
body.home {
	align-items: center;
	min-height: 100dvh;
	padding: 20px;
	line-height: 1.4;
	overflow: hidden;
}

/* Noise overlay */
body.home::after {
	content: '';
	position: fixed;
	inset: 0;
	background-image: url(./assets/noise.png);
	background-repeat: repeat;
	pointer-events: none;
	z-index: 2147483647;
}

/* Default container */
.container {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 720px;
	width: 100%;
	padding: 40px 30px;
	border-radius: 16px;
	border: 2px solid var(--text-primary);
	outline: 2px dotted var(--text-primary);
	outline-offset: 2px;
	background-color: rgb(from var(--bg-color) r g b / 85%);
}

/* Home page container adjustments */
.home .container {
	max-width: 440px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	padding: 32px;
	overflow-y: auto;
	text-align: center;
	animation: anim--fade-in 1s ease;
}

@media screen and (max-width: 440px) {
	.home .container {
		padding: 24px;
	}
}

/* ==========================================================================
   4. TYPOGRAPHY & LINKS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Garamond';
	font-weight: 700;
	line-height: 1.2;
}

h1 {
	font-size: 36px;
	margin-bottom: 8px;
}

.home h1 {
	font-size: 38px;
	margin-bottom: 0;
}

h2 {
	font-size: 22px;
	margin-top: 20px;
}

.home h2 {
	font-size: 24px;
	margin-top: 0;
}

h3 {
	font-size: 18px;
	margin-top: 14px;
}

p, ul, ol {
	font-size: 16px;
	margin-bottom: 12px;
}

ul, ol {
	padding-left: 20px;
}

li {
	margin-bottom: 6px;
}

a {
	color: var(--text-primary);
	text-decoration: underline;
}

a:hover {
	opacity: 0.8;
}

.back-link {
	display: inline-block;
	color: var(--text-primary);
	text-decoration: underline;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 8px;
}

hr {
	max-width: 62px;
	width: 100%;
	margin: 0 auto;
	border: none;
	border-top: 2px dotted var(--text-primary);
}

/* ==========================================================================
   5. HOME SPECIFIC COMPONENTS
   ========================================================================== */
header {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.logo-container {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	justify-content: center;
}

.logo-svg {
	width: 72px;
	height: 72px;
	stroke: var(--text-primary);
	fill: none;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.logo-img {
	width: 64px;
	aspect-ratio: 1 / 1;
}

.bio {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 16px;
}

.bio p {
	margin-bottom: 0;
}

.links {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.link-button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 260px;
	padding: 14px 20px;
	border-radius: 8px;
	border: 2px solid var(--text-primary);
	background-color: var(--text-primary);
	color: var(--bg-color);
	text-decoration: none;
	font-size: 16px;
	font-weight: 700;
	transition: background-color 150ms ease, color 150ms ease;
}

.link-button:hover {
	background-color: transparent;
	color: var(--text-primary);
	opacity: 1;
}

@media screen and (max-width: 319px) {
	.link-button {
		padding: 14px 20px 14px 48px;
	}
}

.icon {
	position: absolute;
	left: 16px;
	width: 24px;
	height: 24px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 150ms ease;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
	display: flex;
	justify-content: center;
	gap: 8px;
	font-size: 16px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 2px dotted var(--text-primary);
}

.home footer {
	padding-top: 0;
	border-top: none;
}

footer a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   7. DECORATIONS & ANIMATIONS
   ========================================================================== */
.background {
	position: fixed;
	inset: 0;
	z-index: -1;
}

.decoration {
	position: absolute;
	width: 75vh;
	background-size: contain;
	background-repeat: no-repeat;
}

.decoration.left {
	top: 60%;
	left: 15%;
	transform: translate(-50%, -50%) rotate(15deg);
	width: 70vh;
	aspect-ratio: 1808 / 2791;
	background-image: url(./assets/fern-a.png);
	animation: anim--deco-left--fade-in 4s ease;
}

.decoration.right {
	top: 60%;
	left: 85%;
	transform: translate(-50%, -50%) rotate(-15deg);
	width: 55vh;
	aspect-ratio: 1386 / 2805;
	background-image: url(./assets/fern-b.png);
	animation: anim--deco-right--fade-in 4s ease;
}

@media screen and (max-width: 1024px) {
	.decoration.left { left: 5%; }
	.decoration.right { left: 95%; }
}

@media screen and (max-width: 600px) {
	.decoration.left { left: -10%; }
	.decoration.right { left: 110%; }
}

@keyframes anim--fade-in {
	0% {
		transform: translateY(-100px);
		opacity: 0;
	}
	100% {
		transform: translateY(0px);
		opacity: 1;
	}
}

@keyframes anim--deco-left--fade-in {
	0% {
		transform: translate(-75%, -50%) rotate(0deg);
		opacity: 0;
	}
}

@keyframes anim--deco-right--fade-in {
	0% {
		transform: translate(-25%, -50%) rotate(0deg);
		opacity: 0;
	}
}